blob: a4287bc71f941ca64c0dba9355fc12db54861315 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002# From configure.in Revision: 80576 .
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Matthias Kloseb9621712010-04-24 17:59:49 +00004# Generated by GNU Autoconf 2.65 for python 3.2.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005#
Georg Brandle2e15612009-05-20 18:25:10 +00006# Report bugs to <http://bugs.python.org/>.
Martin v. Löwis1d459062005-03-14 21:23:33 +00007#
Matthias Kloseb9621712010-04-24 17:59:49 +00008#
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
Matthias Kloseb9621712010-04-24 17:59:49 +000010# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
11# Inc.
12#
13#
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014# This configure script is free software; the Free Software Foundation
15# gives unlimited permission to copy, distribute and modify it.
Matthias Kloseb9621712010-04-24 17:59:49 +000016## -------------------- ##
17## M4sh Initialization. ##
18## -------------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +000019
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020# Be more Bourne compatible
21DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000022if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000023 emulate sh
24 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000025 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000026 # is contrary to our usage. Disable this feature.
27 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000029else
Matthias Kloseb9621712010-04-24 17:59:49 +000030 case `(set -o) 2>/dev/null` in #(
31 *posix*) :
32 set -o posix ;; #(
33 *) :
34 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000035esac
Martin v. Löwis11437992002-04-12 09:54:03 +000036fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000037
38
Matthias Kloseb9621712010-04-24 17:59:49 +000039as_nl='
40'
41export as_nl
42# Printing a long string crashes Solaris 7 /usr/bin/printf.
43as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
44as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
45as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
46# Prefer a ksh shell builtin over an external printf program on Solaris,
47# but without wasting forks for bash or zsh.
48if test -z "$BASH_VERSION$ZSH_VERSION" \
49 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
50 as_echo='print -r --'
51 as_echo_n='print -rn --'
52elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
53 as_echo='printf %s\n'
54 as_echo_n='printf %s'
55else
56 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
57 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
58 as_echo_n='/usr/ucb/echo -n'
59 else
60 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
61 as_echo_n_body='eval
62 arg=$1;
63 case $arg in #(
64 *"$as_nl"*)
65 expr "X$arg" : "X\\(.*\\)$as_nl";
66 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
67 esac;
68 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
69 '
70 export as_echo_n_body
71 as_echo_n='sh -c $as_echo_n_body as_echo'
72 fi
73 export as_echo_body
74 as_echo='sh -c $as_echo_body as_echo'
75fi
Martin v. Löwis11437992002-04-12 09:54:03 +000076
77# The user is always right.
78if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000079 PATH_SEPARATOR=:
80 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
81 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
82 PATH_SEPARATOR=';'
83 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000084fi
Martin v. Löwis11437992002-04-12 09:54:03 +000085
Thomas Wouters47b49bf2007-08-30 22:15:33 +000086
87# IFS
88# We need space, tab and new line, in precisely that order. Quoting is
89# there to prevent editors from complaining about space-tab.
90# (If _AS_PATH_WALK were called with IFS unset, it would disable word
91# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000092IFS=" "" $as_nl"
93
94# Find who we are. Look in the path if we contain no directory separator.
Matthias Kloseb9621712010-04-24 17:59:49 +000095case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000096 *[\\/]* ) as_myself=$0 ;;
97 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000098for as_dir in $PATH
99do
100 IFS=$as_save_IFS
101 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +0000102 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
103 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000104IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +0000105
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000106 ;;
107esac
108# We did not find ourselves, most probably we were run as `sh COMMAND'
109# in which case we are not to be found in the path.
110if test "x$as_myself" = x; then
111 as_myself=$0
112fi
113if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000114 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
115 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000116fi
117
Matthias Kloseb9621712010-04-24 17:59:49 +0000118# Unset variables that we do not need and which cause bugs (e.g. in
119# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
120# suppresses any "Segmentation fault" message there. '((' could
121# trigger a bug in pdksh 5.2.14.
122for as_var in BASH_ENV ENV MAIL MAILPATH
123do eval test x\${$as_var+set} = xset \
124 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000125done
126PS1='$ '
127PS2='> '
128PS4='+ '
129
130# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +0000131LC_ALL=C
132export LC_ALL
133LANGUAGE=C
134export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000135
Matthias Kloseb9621712010-04-24 17:59:49 +0000136# CDPATH.
137(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
138
139if test "x$CONFIG_SHELL" = x; then
140 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
141 emulate sh
142 NULLCMD=:
143 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
144 # is contrary to our usage. Disable this feature.
145 alias -g '\${1+\"\$@\"}'='\"\$@\"'
146 setopt NO_GLOB_SUBST
147else
148 case \`(set -o) 2>/dev/null\` in #(
149 *posix*) :
150 set -o posix ;; #(
151 *) :
152 ;;
153esac
154fi
155"
156 as_required="as_fn_return () { (exit \$1); }
157as_fn_success () { as_fn_return 0; }
158as_fn_failure () { as_fn_return 1; }
159as_fn_ret_success () { return 0; }
160as_fn_ret_failure () { return 1; }
161
162exitcode=0
163as_fn_success || { exitcode=1; echo as_fn_success failed.; }
164as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
165as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
166as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
167if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
168
169else
170 exitcode=1; echo positional parameters were not saved.
171fi
172test x\$exitcode = x0 || exit 1"
173 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
174 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
175 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
176 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
177test \$(( 1 + 1 )) = 2 || exit 1"
178 if (eval "$as_required") 2>/dev/null; then :
179 as_have_required=yes
180else
181 as_have_required=no
182fi
183 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
184
185else
186 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
187as_found=false
188for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
189do
190 IFS=$as_save_IFS
191 test -z "$as_dir" && as_dir=.
192 as_found=:
193 case $as_dir in #(
194 /*)
195 for as_base in sh bash ksh sh5; do
196 # Try only shells that exist, to save several forks.
197 as_shell=$as_dir/$as_base
198 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
199 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
200 CONFIG_SHELL=$as_shell as_have_required=yes
201 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
202 break 2
203fi
204fi
205 done;;
206 esac
207 as_found=false
208done
209$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
210 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
211 CONFIG_SHELL=$SHELL as_have_required=yes
212fi; }
213IFS=$as_save_IFS
214
215
216 if test "x$CONFIG_SHELL" != x; then :
217 # We cannot yet assume a decent shell, so we have to provide a
218 # neutralization value for shells without unset; and this also
219 # works around shells that cannot unset nonexistent variables.
220 BASH_ENV=/dev/null
221 ENV=/dev/null
222 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
223 export CONFIG_SHELL
224 exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
225fi
226
227 if test x$as_have_required = xno; then :
228 $as_echo "$0: This script requires a shell more modern than all"
229 $as_echo "$0: the shells that I found on your system."
230 if test x${ZSH_VERSION+set} = xset ; then
231 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
232 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
233 else
234 $as_echo "$0: Please tell bug-autoconf@gnu.org and
235$0: http://bugs.python.org/ about your system, including
236$0: any error possibly output before this message. Then
237$0: install a modern shell, or manually run the script
238$0: under such a shell if you do have one."
239 fi
240 exit 1
241fi
242fi
243fi
244SHELL=${CONFIG_SHELL-/bin/sh}
245export SHELL
246# Unset more variables known to interfere with behavior of common tools.
247CLICOLOR_FORCE= GREP_OPTIONS=
248unset CLICOLOR_FORCE GREP_OPTIONS
249
250## --------------------- ##
251## M4sh Shell Functions. ##
252## --------------------- ##
253# as_fn_unset VAR
254# ---------------
255# Portably unset VAR.
256as_fn_unset ()
257{
258 { eval $1=; unset $1;}
259}
260as_unset=as_fn_unset
261
262# as_fn_set_status STATUS
263# -----------------------
264# Set $? to STATUS, without forking.
265as_fn_set_status ()
266{
267 return $1
268} # as_fn_set_status
269
270# as_fn_exit STATUS
271# -----------------
272# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
273as_fn_exit ()
274{
275 set +e
276 as_fn_set_status $1
277 exit $1
278} # as_fn_exit
279
280# as_fn_mkdir_p
281# -------------
282# Create "$as_dir" as a directory, including parents if necessary.
283as_fn_mkdir_p ()
284{
285
286 case $as_dir in #(
287 -*) as_dir=./$as_dir;;
288 esac
289 test -d "$as_dir" || eval $as_mkdir_p || {
290 as_dirs=
291 while :; do
292 case $as_dir in #(
293 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
294 *) as_qdir=$as_dir;;
295 esac
296 as_dirs="'$as_qdir' $as_dirs"
297 as_dir=`$as_dirname -- "$as_dir" ||
298$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
299 X"$as_dir" : 'X\(//\)[^/]' \| \
300 X"$as_dir" : 'X\(//\)$' \| \
301 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
302$as_echo X"$as_dir" |
303 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
304 s//\1/
305 q
306 }
307 /^X\(\/\/\)[^/].*/{
308 s//\1/
309 q
310 }
311 /^X\(\/\/\)$/{
312 s//\1/
313 q
314 }
315 /^X\(\/\).*/{
316 s//\1/
317 q
318 }
319 s/.*/./; q'`
320 test -d "$as_dir" && break
321 done
322 test -z "$as_dirs" || eval "mkdir $as_dirs"
323 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
324
325
326} # as_fn_mkdir_p
327# as_fn_append VAR VALUE
328# ----------------------
329# Append the text in VALUE to the end of the definition contained in VAR. Take
330# advantage of any shell optimizations that allow amortized linear growth over
331# repeated appends, instead of the typical quadratic growth present in naive
332# implementations.
333if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
334 eval 'as_fn_append ()
335 {
336 eval $1+=\$2
337 }'
338else
339 as_fn_append ()
340 {
341 eval $1=\$$1\$2
342 }
343fi # as_fn_append
344
345# as_fn_arith ARG...
346# ------------------
347# Perform arithmetic evaluation on the ARGs, and store the result in the
348# global $as_val. Take advantage of shells that can avoid forks. The arguments
349# must be portable across $(()) and expr.
350if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
351 eval 'as_fn_arith ()
352 {
353 as_val=$(( $* ))
354 }'
355else
356 as_fn_arith ()
357 {
358 as_val=`expr "$@" || test $? -eq 1`
359 }
360fi # as_fn_arith
361
362
363# as_fn_error ERROR [LINENO LOG_FD]
364# ---------------------------------
365# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
366# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
367# script with status $?, using 1 if that was 0.
368as_fn_error ()
369{
370 as_status=$?; test $as_status -eq 0 && as_status=1
371 if test "$3"; then
372 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
373 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
374 fi
375 $as_echo "$as_me: error: $1" >&2
376 as_fn_exit $as_status
377} # as_fn_error
378
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000379if expr a : '\(a\)' >/dev/null 2>&1 &&
380 test "X`expr 00001 : '.*\(...\)'`" = X001; then
381 as_expr=expr
382else
383 as_expr=false
384fi
385
386if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
387 as_basename=basename
388else
389 as_basename=false
390fi
391
Matthias Kloseb9621712010-04-24 17:59:49 +0000392if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
393 as_dirname=dirname
394else
395 as_dirname=false
396fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000397
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000398as_me=`$as_basename -- "$0" ||
399$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
400 X"$0" : 'X\(//\)$' \| \
401 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000402$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000403 sed '/^.*\/\([^/][^/]*\)\/*$/{
404 s//\1/
405 q
406 }
407 /^X\/\(\/\/\)$/{
408 s//\1/
409 q
410 }
411 /^X\/\(\/\).*/{
412 s//\1/
413 q
414 }
415 s/.*/./; q'`
416
Matthias Kloseb9621712010-04-24 17:59:49 +0000417# Avoid depending upon Character Ranges.
418as_cr_letters='abcdefghijklmnopqrstuvwxyz'
419as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
420as_cr_Letters=$as_cr_letters$as_cr_LETTERS
421as_cr_digits='0123456789'
422as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000423
424
Matthias Kloseb9621712010-04-24 17:59:49 +0000425 as_lineno_1=$LINENO as_lineno_1a=$LINENO
426 as_lineno_2=$LINENO as_lineno_2a=$LINENO
427 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
428 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
429 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000430 sed -n '
431 p
432 /[$]LINENO/=
433 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +0000434 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000435 s/[$]LINENO.*/&-/
436 t lineno
437 b
438 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +0000439 N
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000440 :loop
441 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +0000442 t loop
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000443 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +0000444 ' >$as_me.lineno &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000445 chmod +x "$as_me.lineno" ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000446 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
Martin v. Löwis11437992002-04-12 09:54:03 +0000447
448 # Don't try to exec as it changes $[0], causing all sort of problems
449 # (the dirname of $[0] is not the place where we might find the
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000450 # original and so on. Autoconf is especially sensitive to this).
451 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +0000452 # Exit status is that of the last command.
453 exit
454}
455
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000456ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +0000457case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000458-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000459 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000460 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +0000461 xy) ECHO_C='\c';;
462 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
463 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000464 esac;;
465*)
466 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +0000467esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000468
Martin v. Löwis11437992002-04-12 09:54:03 +0000469rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000470if test -d conf$$.dir; then
471 rm -f conf$$.dir/conf$$.file
472else
473 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +0000474 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000475fi
Matthias Kloseb9621712010-04-24 17:59:49 +0000476if (echo >conf$$.file) 2>/dev/null; then
477 if ln -s conf$$.file conf$$ 2>/dev/null; then
478 as_ln_s='ln -s'
479 # ... but there are two gotchas:
480 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
481 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
482 # In both cases, we have to default to `cp -p'.
483 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
484 as_ln_s='cp -p'
485 elif ln conf$$.file conf$$ 2>/dev/null; then
486 as_ln_s=ln
487 else
Martin v. Löwis11437992002-04-12 09:54:03 +0000488 as_ln_s='cp -p'
Matthias Kloseb9621712010-04-24 17:59:49 +0000489 fi
Martin v. Löwis11437992002-04-12 09:54:03 +0000490else
491 as_ln_s='cp -p'
492fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000493rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
494rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +0000495
Skip Montanaro6dead952003-09-25 14:50:04 +0000496if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000497 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +0000498else
Skip Montanarof0d5f792004-08-15 14:08:23 +0000499 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +0000500 as_mkdir_p=false
501fi
502
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000503if test -x / >/dev/null 2>&1; then
504 as_test_x='test -x'
505else
506 if ls -dL / >/dev/null 2>&1; then
507 as_ls_L_option=L
508 else
509 as_ls_L_option=
510 fi
511 as_test_x='
512 eval sh -c '\''
513 if test -d "$1"; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000514 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000515 else
Matthias Kloseb9621712010-04-24 17:59:49 +0000516 case $1 in #(
517 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000518 esac;
Matthias Kloseb9621712010-04-24 17:59:49 +0000519 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000520 ???[sx]*):;;*)false;;esac;fi
521 '\'' sh
522 '
523fi
524as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +0000525
526# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000527as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000528
529# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000530as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000531
532
Matthias Kloseb9621712010-04-24 17:59:49 +0000533test -n "$DJDIR" || exec 7<&0 </dev/null
534exec 6>&1
Martin v. Löwis11437992002-04-12 09:54:03 +0000535
536# Name of the host.
537# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
538# so uname gets run too.
539ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
540
Martin v. Löwis11437992002-04-12 09:54:03 +0000541#
542# Initializations.
543#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000544ac_default_prefix=/usr/local
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000545ac_clean_files=
Skip Montanaro6dead952003-09-25 14:50:04 +0000546ac_config_libobj_dir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000547LIBOBJS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000548cross_compiling=no
549subdirs=
550MFLAGS=
551MAKEFLAGS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000552
Martin v. Löwis11437992002-04-12 09:54:03 +0000553# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000554PACKAGE_NAME='python'
555PACKAGE_TARNAME='python'
Benjamin Peterson46ea4f72009-06-27 21:40:27 +0000556PACKAGE_VERSION='3.2'
557PACKAGE_STRING='python 3.2'
Georg Brandle2e15612009-05-20 18:25:10 +0000558PACKAGE_BUGREPORT='http://bugs.python.org/'
Matthias Kloseb9621712010-04-24 17:59:49 +0000559PACKAGE_URL=''
Martin v. Löwis11437992002-04-12 09:54:03 +0000560
561ac_unique_file="Include/object.h"
562# Factoring default headers for most tests.
563ac_includes_default="\
564#include <stdio.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000565#ifdef HAVE_SYS_TYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000566# include <sys/types.h>
567#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000568#ifdef HAVE_SYS_STAT_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000569# include <sys/stat.h>
570#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000571#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000572# include <stdlib.h>
573# include <stddef.h>
574#else
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000575# ifdef HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000576# include <stdlib.h>
577# endif
578#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000579#ifdef HAVE_STRING_H
580# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000581# include <memory.h>
582# endif
583# include <string.h>
584#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000585#ifdef HAVE_STRINGS_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000586# include <strings.h>
587#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000588#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000589# include <inttypes.h>
Thomas Wouters477c8d52006-05-27 19:21:47 +0000590#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000591#ifdef HAVE_STDINT_H
592# include <stdint.h>
593#endif
594#ifdef HAVE_UNISTD_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000595# include <unistd.h>
596#endif"
597
Matthias Kloseb9621712010-04-24 17:59:49 +0000598ac_subst_vars='LTLIBOBJS
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000599SRCDIRS
Matthias Kloseb9621712010-04-24 17:59:49 +0000600THREADHEADERS
601LIBC
602LIBM
603HAVE_GETHOSTBYNAME
604HAVE_GETHOSTBYNAME_R
605HAVE_GETHOSTBYNAME_R_3_ARG
606HAVE_GETHOSTBYNAME_R_5_ARG
607HAVE_GETHOSTBYNAME_R_6_ARG
608LIBOBJS
609TRUE
610MACHDEP_OBJS
611DYNLOADFILE
612DLINCLDIR
613THREADOBJ
614LDLAST
615USE_THREAD_MODULE
616SIGNAL_OBJS
617USE_SIGNAL_MODULE
618LIBFFI_INCLUDEDIR
619PKG_CONFIG
620SHLIBS
621CFLAGSFORSHARED
622LINKFORSHARED
623CCSHARED
624BLDSHARED
625LDCXXSHARED
626LDSHARED
627SO
628LIBTOOL_CRUFT
629OTHER_LIBTOOL_OPT
630UNIVERSAL_ARCH_FLAGS
631BASECFLAGS
632OPT
633LN
634INSTALL_DATA
635INSTALL_SCRIPT
636INSTALL_PROGRAM
637SVNVERSION
638ARFLAGS
639AR
640RANLIB
641GNULD
642LINKCC
643RUNSHARED
644INSTSONAME
645LDLIBRARYDIR
646BLDLIBRARY
647DLLLIBRARY
648LDLIBRARY
649LIBRARY
650BUILDEXEEXT
651EGREP
652GREP
653CPP
654MAINCC
655CXX
656OBJEXT
657EXEEXT
658ac_ct_CC
659CPPFLAGS
660LDFLAGS
661CFLAGS
662CC
663EXPORT_MACOSX_DEPLOYMENT_TARGET
664CONFIGURE_MACOSX_DEPLOYMENT_TARGET
665SGI_ABI
666MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000667FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000668FRAMEWORKUNIXTOOLSPREFIX
669FRAMEWORKALTINSTALLLAST
670FRAMEWORKALTINSTALLFIRST
671FRAMEWORKINSTALLLAST
672FRAMEWORKINSTALLFIRST
673PYTHONFRAMEWORKINSTALLDIR
674PYTHONFRAMEWORKPREFIX
675PYTHONFRAMEWORKDIR
676PYTHONFRAMEWORKIDENTIFIER
677PYTHONFRAMEWORK
678LIPO_32BIT_FLAGS
679ARCH_RUN_32BIT
680UNIVERSALSDK
681CONFIG_ARGS
682SOVERSION
683VERSION
684target_alias
685host_alias
686build_alias
687LIBS
688ECHO_T
689ECHO_N
690ECHO_C
691DEFS
692mandir
693localedir
694libdir
695psdir
696pdfdir
697dvidir
698htmldir
699infodir
700docdir
701oldincludedir
702includedir
703localstatedir
704sharedstatedir
705sysconfdir
706datadir
707datarootdir
708libexecdir
709sbindir
710bindir
711program_transform_name
712prefix
713exec_prefix
714PACKAGE_URL
715PACKAGE_BUGREPORT
716PACKAGE_STRING
717PACKAGE_VERSION
718PACKAGE_TARNAME
719PACKAGE_NAME
720PATH_SEPARATOR
721SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000722ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000723ac_user_opts='
724enable_option_checking
725enable_universalsdk
726with_universal_archs
727with_framework_name
728enable_framework
729with_gcc
730with_cxx_main
731with_suffix
732enable_shared
733enable_profiling
734with_pydebug
735with_libs
736with_system_expat
737with_system_ffi
738with_dbmliborder
739with_signal_module
740with_dec_threads
741with_threads
742with_thread
743enable_ipv6
744with_doc_strings
745with_tsc
746with_pymalloc
747with_valgrind
748with_wctype_functions
749with_fpectl
750with_libm
751with_libc
752enable_big_digits
753with_wide_unicode
754with_computed_gotos
755'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000756 ac_precious_vars='build_alias
757host_alias
758target_alias
759CC
760CFLAGS
761LDFLAGS
762LIBS
763CPPFLAGS
764CPP'
765
Guido van Rossum627b2d71993-12-24 10:39:16 +0000766
Guido van Rossum7f43da71994-08-01 12:15:30 +0000767# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000768ac_init_help=
769ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000770ac_unrecognized_opts=
771ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000772# The variables have the same names as the options, with
773# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000774cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000775exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000776no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000777no_recursion=
778prefix=NONE
779program_prefix=NONE
780program_suffix=NONE
781program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000782silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000783site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000784srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000785verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000786x_includes=NONE
787x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000788
789# Installation directory options.
790# These are left unexpanded so users can "make install exec_prefix=/foo"
791# and all the variables that are supposed to be based on exec_prefix
792# by default will actually change.
793# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000794# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000795bindir='${exec_prefix}/bin'
796sbindir='${exec_prefix}/sbin'
797libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000798datarootdir='${prefix}/share'
799datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000800sysconfdir='${prefix}/etc'
801sharedstatedir='${prefix}/com'
802localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000803includedir='${prefix}/include'
804oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000805docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
806infodir='${datarootdir}/info'
807htmldir='${docdir}'
808dvidir='${docdir}'
809pdfdir='${docdir}'
810psdir='${docdir}'
811libdir='${exec_prefix}/lib'
812localedir='${datarootdir}/locale'
813mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000814
Guido van Rossum7f43da71994-08-01 12:15:30 +0000815ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000816ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000817for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000818do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000819 # If the previous option needs an argument, assign it.
820 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000821 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000822 ac_prev=
823 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000824 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000825
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000826 case $ac_option in
827 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
828 *) ac_optarg=yes ;;
829 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000830
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000831 # Accept the important Cygnus configure options, so we can diagnose typos.
832
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000833 case $ac_dashdash$ac_option in
834 --)
835 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000836
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000837 -bindir | --bindir | --bindi | --bind | --bin | --bi)
838 ac_prev=bindir ;;
839 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000840 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000841
842 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000843 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000844 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000845 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000846
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000847 -cache-file | --cache-file | --cache-fil | --cache-fi \
848 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
849 ac_prev=cache_file ;;
850 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
851 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000852 cache_file=$ac_optarg ;;
853
854 --config-cache | -C)
855 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000856
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000857 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000858 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000859 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000860 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000861
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000862 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
863 | --dataroo | --dataro | --datar)
864 ac_prev=datarootdir ;;
865 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
866 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
867 datarootdir=$ac_optarg ;;
868
Guido van Rossum7f43da71994-08-01 12:15:30 +0000869 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000870 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000871 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000872 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
873 as_fn_error "invalid feature name: $ac_useropt"
874 ac_useropt_orig=$ac_useropt
875 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
876 case $ac_user_opts in
877 *"
878"enable_$ac_useropt"
879"*) ;;
880 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
881 ac_unrecognized_sep=', ';;
882 esac
883 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000884
885 -docdir | --docdir | --docdi | --doc | --do)
886 ac_prev=docdir ;;
887 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
888 docdir=$ac_optarg ;;
889
890 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
891 ac_prev=dvidir ;;
892 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
893 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000894
895 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000896 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000897 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000898 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
899 as_fn_error "invalid feature name: $ac_useropt"
900 ac_useropt_orig=$ac_useropt
901 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
902 case $ac_user_opts in
903 *"
904"enable_$ac_useropt"
905"*) ;;
906 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
907 ac_unrecognized_sep=', ';;
908 esac
909 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000910
Guido van Rossum7f43da71994-08-01 12:15:30 +0000911 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
912 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
913 | --exec | --exe | --ex)
914 ac_prev=exec_prefix ;;
915 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
916 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
917 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000918 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000919
920 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000921 # Obsolete; use --with-gas.
922 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000923
Martin v. Löwis11437992002-04-12 09:54:03 +0000924 -help | --help | --hel | --he | -h)
925 ac_init_help=long ;;
926 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
927 ac_init_help=recursive ;;
928 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
929 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000930
931 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000932 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000933 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000934 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000935
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000936 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
937 ac_prev=htmldir ;;
938 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
939 | --ht=*)
940 htmldir=$ac_optarg ;;
941
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000942 -includedir | --includedir | --includedi | --included | --include \
943 | --includ | --inclu | --incl | --inc)
944 ac_prev=includedir ;;
945 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
946 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000947 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000948
949 -infodir | --infodir | --infodi | --infod | --info | --inf)
950 ac_prev=infodir ;;
951 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000952 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000953
954 -libdir | --libdir | --libdi | --libd)
955 ac_prev=libdir ;;
956 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000957 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000958
959 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
960 | --libexe | --libex | --libe)
961 ac_prev=libexecdir ;;
962 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
963 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000964 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000965
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000966 -localedir | --localedir | --localedi | --localed | --locale)
967 ac_prev=localedir ;;
968 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
969 localedir=$ac_optarg ;;
970
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000971 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000972 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000973 ac_prev=localstatedir ;;
974 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000975 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000976 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000977
978 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
979 ac_prev=mandir ;;
980 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000981 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000982
Guido van Rossum7f43da71994-08-01 12:15:30 +0000983 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000984 # Obsolete; use --without-fp.
985 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000986
987 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +0000988 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000989 no_create=yes ;;
990
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000991 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
992 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
993 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000994
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000995 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
996 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
997 | --oldin | --oldi | --old | --ol | --o)
998 ac_prev=oldincludedir ;;
999 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1000 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1001 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001002 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001003
Guido van Rossum7f43da71994-08-01 12:15:30 +00001004 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1005 ac_prev=prefix ;;
1006 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001007 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001008
1009 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1010 | --program-pre | --program-pr | --program-p)
1011 ac_prev=program_prefix ;;
1012 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1013 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001014 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001015
1016 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1017 | --program-suf | --program-su | --program-s)
1018 ac_prev=program_suffix ;;
1019 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1020 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001021 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001022
1023 -program-transform-name | --program-transform-name \
1024 | --program-transform-nam | --program-transform-na \
1025 | --program-transform-n | --program-transform- \
1026 | --program-transform | --program-transfor \
1027 | --program-transfo | --program-transf \
1028 | --program-trans | --program-tran \
1029 | --progr-tra | --program-tr | --program-t)
1030 ac_prev=program_transform_name ;;
1031 -program-transform-name=* | --program-transform-name=* \
1032 | --program-transform-nam=* | --program-transform-na=* \
1033 | --program-transform-n=* | --program-transform-=* \
1034 | --program-transform=* | --program-transfor=* \
1035 | --program-transfo=* | --program-transf=* \
1036 | --program-trans=* | --program-tran=* \
1037 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001038 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001039
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001040 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1041 ac_prev=pdfdir ;;
1042 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1043 pdfdir=$ac_optarg ;;
1044
1045 -psdir | --psdir | --psdi | --psd | --ps)
1046 ac_prev=psdir ;;
1047 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1048 psdir=$ac_optarg ;;
1049
Guido van Rossum7f43da71994-08-01 12:15:30 +00001050 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1051 | -silent | --silent | --silen | --sile | --sil)
1052 silent=yes ;;
1053
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001054 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1055 ac_prev=sbindir ;;
1056 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1057 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001058 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001059
1060 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1061 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1062 | --sharedst | --shareds | --shared | --share | --shar \
1063 | --sha | --sh)
1064 ac_prev=sharedstatedir ;;
1065 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1066 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1067 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1068 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001069 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001070
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001071 -site | --site | --sit)
1072 ac_prev=site ;;
1073 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001074 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001075
Guido van Rossum7f43da71994-08-01 12:15:30 +00001076 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1077 ac_prev=srcdir ;;
1078 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001079 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001080
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001081 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1082 | --syscon | --sysco | --sysc | --sys | --sy)
1083 ac_prev=sysconfdir ;;
1084 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1085 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001086 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001087
Guido van Rossum7f43da71994-08-01 12:15:30 +00001088 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001089 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001090 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001091 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001092
1093 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1094 verbose=yes ;;
1095
Martin v. Löwis11437992002-04-12 09:54:03 +00001096 -version | --version | --versio | --versi | --vers | -V)
1097 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001098
1099 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001100 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001101 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001102 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1103 as_fn_error "invalid package name: $ac_useropt"
1104 ac_useropt_orig=$ac_useropt
1105 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1106 case $ac_user_opts in
1107 *"
1108"with_$ac_useropt"
1109"*) ;;
1110 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1111 ac_unrecognized_sep=', ';;
1112 esac
1113 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001114
1115 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001116 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001117 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001118 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1119 as_fn_error "invalid package name: $ac_useropt"
1120 ac_useropt_orig=$ac_useropt
1121 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1122 case $ac_user_opts in
1123 *"
1124"with_$ac_useropt"
1125"*) ;;
1126 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1127 ac_unrecognized_sep=', ';;
1128 esac
1129 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001130
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001131 --x)
1132 # Obsolete; use --with-x.
1133 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001134
1135 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1136 | --x-incl | --x-inc | --x-in | --x-i)
1137 ac_prev=x_includes ;;
1138 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1139 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001140 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001141
1142 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1143 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1144 ac_prev=x_libraries ;;
1145 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1146 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001147 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001148
Matthias Kloseb9621712010-04-24 17:59:49 +00001149 -*) as_fn_error "unrecognized option: \`$ac_option'
1150Try \`$0 --help' for more information."
Guido van Rossum7f43da71994-08-01 12:15:30 +00001151 ;;
1152
Martin v. Löwis11437992002-04-12 09:54:03 +00001153 *=*)
1154 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1155 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001156 case $ac_envvar in #(
1157 '' | [0-9]* | *[!_$as_cr_alnum]* )
1158 as_fn_error "invalid variable name: \`$ac_envvar'" ;;
1159 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001160 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001161 export $ac_envvar ;;
1162
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001163 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001164 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001165 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001166 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001167 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001168 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
Guido van Rossum7f43da71994-08-01 12:15:30 +00001169 ;;
1170
1171 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001172done
1173
Guido van Rossum7f43da71994-08-01 12:15:30 +00001174if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001175 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Matthias Kloseb9621712010-04-24 17:59:49 +00001176 as_fn_error "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001177fi
1178
Matthias Kloseb9621712010-04-24 17:59:49 +00001179if test -n "$ac_unrecognized_opts"; then
1180 case $enable_option_checking in
1181 no) ;;
1182 fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
1183 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1184 esac
1185fi
1186
1187# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001188for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1189 datadir sysconfdir sharedstatedir localstatedir includedir \
1190 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1191 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001192do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001193 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001194 # Remove trailing slashes.
1195 case $ac_val in
1196 */ )
1197 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1198 eval $ac_var=\$ac_val;;
1199 esac
1200 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001201 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001202 [\\/$]* | ?:[\\/]* ) continue;;
1203 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001204 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00001205 as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001206done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001207
Martin v. Löwis11437992002-04-12 09:54:03 +00001208# There might be people who depend on the old broken behavior: `$host'
1209# used to hold the argument of --host etc.
1210# FIXME: To remove some day.
1211build=$build_alias
1212host=$host_alias
1213target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001214
Martin v. Löwis11437992002-04-12 09:54:03 +00001215# FIXME: To remove some day.
1216if test "x$host_alias" != x; then
1217 if test "x$build_alias" = x; then
1218 cross_compiling=maybe
Matthias Kloseb9621712010-04-24 17:59:49 +00001219 $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
Martin v. Löwis11437992002-04-12 09:54:03 +00001220 If a cross compiler is detected then cross compile mode will be used." >&2
1221 elif test "x$build_alias" != "x$host_alias"; then
1222 cross_compiling=yes
1223 fi
1224fi
1225
1226ac_tool_prefix=
1227test -n "$host_alias" && ac_tool_prefix=$host_alias-
1228
1229test "$silent" = yes && exec 6>/dev/null
1230
Guido van Rossum627b2d71993-12-24 10:39:16 +00001231
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001232ac_pwd=`pwd` && test -n "$ac_pwd" &&
1233ac_ls_di=`ls -di .` &&
1234ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Matthias Kloseb9621712010-04-24 17:59:49 +00001235 as_fn_error "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001236test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Matthias Kloseb9621712010-04-24 17:59:49 +00001237 as_fn_error "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001238
1239
Guido van Rossum627b2d71993-12-24 10:39:16 +00001240# Find the source files, if location was not specified.
1241if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001242 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001243 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001244 ac_confdir=`$as_dirname -- "$as_myself" ||
1245$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1246 X"$as_myself" : 'X\(//\)[^/]' \| \
1247 X"$as_myself" : 'X\(//\)$' \| \
1248 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1249$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001250 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1251 s//\1/
1252 q
1253 }
1254 /^X\(\/\/\)[^/].*/{
1255 s//\1/
1256 q
1257 }
1258 /^X\(\/\/\)$/{
1259 s//\1/
1260 q
1261 }
1262 /^X\(\/\).*/{
1263 s//\1/
1264 q
1265 }
1266 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001267 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001268 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001269 srcdir=..
1270 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001271else
1272 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001273fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001274if test ! -r "$srcdir/$ac_unique_file"; then
1275 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Matthias Kloseb9621712010-04-24 17:59:49 +00001276 as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001277fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001278ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1279ac_abs_confdir=`(
Matthias Kloseb9621712010-04-24 17:59:49 +00001280 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001281 pwd)`
1282# When building in place, set srcdir=.
1283if test "$ac_abs_confdir" = "$ac_pwd"; then
1284 srcdir=.
1285fi
1286# Remove unnecessary trailing slashes from srcdir.
1287# Double slashes in file names in object file debugging info
1288# mess up M-x gdb in Emacs.
1289case $srcdir in
1290*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1291esac
1292for ac_var in $ac_precious_vars; do
1293 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1294 eval ac_env_${ac_var}_value=\$${ac_var}
1295 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1296 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1297done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001298
Martin v. Löwis11437992002-04-12 09:54:03 +00001299#
1300# Report the --help message.
1301#
1302if test "$ac_init_help" = "long"; then
1303 # Omit some internal or obsolete options to make the list less imposing.
1304 # This message is too long to be a string in the A/UX 3.1 sh.
1305 cat <<_ACEOF
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001306\`configure' configures python 3.2 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001307
1308Usage: $0 [OPTION]... [VAR=VALUE]...
1309
1310To assign environment variables (e.g., CC, CFLAGS...), specify them as
1311VAR=VALUE. See below for descriptions of some of the useful variables.
1312
1313Defaults for the options are specified in brackets.
1314
1315Configuration:
1316 -h, --help display this help and exit
1317 --help=short display options specific to this package
1318 --help=recursive display the short help of all the included packages
1319 -V, --version display version information and exit
1320 -q, --quiet, --silent do not print \`checking...' messages
1321 --cache-file=FILE cache test results in FILE [disabled]
1322 -C, --config-cache alias for \`--cache-file=config.cache'
1323 -n, --no-create do not create output files
1324 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1325
Martin v. Löwis11437992002-04-12 09:54:03 +00001326Installation directories:
1327 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001328 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001329 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001330 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001331
1332By default, \`make install' will install all the files in
1333\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1334an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1335for instance \`--prefix=\$HOME'.
1336
1337For better control, use the options below.
1338
1339Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001340 --bindir=DIR user executables [EPREFIX/bin]
1341 --sbindir=DIR system admin executables [EPREFIX/sbin]
1342 --libexecdir=DIR program executables [EPREFIX/libexec]
1343 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1344 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1345 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1346 --libdir=DIR object code libraries [EPREFIX/lib]
1347 --includedir=DIR C header files [PREFIX/include]
1348 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1349 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1350 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1351 --infodir=DIR info documentation [DATAROOTDIR/info]
1352 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1353 --mandir=DIR man documentation [DATAROOTDIR/man]
1354 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1355 --htmldir=DIR html documentation [DOCDIR]
1356 --dvidir=DIR dvi documentation [DOCDIR]
1357 --pdfdir=DIR pdf documentation [DOCDIR]
1358 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001359_ACEOF
1360
1361 cat <<\_ACEOF
1362_ACEOF
1363fi
1364
1365if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001366 case $ac_init_help in
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001367 short | recursive ) echo "Configuration of python 3.2:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001368 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001369 cat <<\_ACEOF
1370
1371Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001372 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001373 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1374 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001375 --enable-universalsdk[=SDKDIR]
Christian Heimes292d3512008-02-03 16:51:08 +00001376 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001377 --enable-framework[=INSTALLDIR]
1378 Build (MacOSX|Darwin) framework
1379 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001380 --enable-profiling enable C-level code profiling
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001381 --enable-ipv6 Enable ipv6 (with ipv4) support
1382 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001383 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001384 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001385
1386Optional Packages:
1387 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1388 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001389 --with-universal-archs=ARCH
1390 select architectures for universal build ("32-bit",
Ronald Oussoren3c064c12009-09-08 07:12:42 +00001391 "64-bit", "3-way", "intel" or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001392 --with-framework-name=FRAMEWORK
1393 specify an alternate name of the framework built
1394 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001395 --without-gcc never use gcc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001396 --with-cxx-main=<compiler>
1397 compile main() and link python executable with C++
1398 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001399 --with-suffix=.exe set executable suffix
1400 --with-pydebug build with Py_DEBUG defined
1401 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001402 --with-system-expat build pyexpat module using an installed expat
1403 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001404 --with-system-ffi build _ctypes module using an installed ffi library
Matthias Klose55708cc2009-04-30 08:06:49 +00001405 --with-dbmliborder=db1:db2:...
1406 order to check db backends for dbm. Valid value is a
1407 colon separated string with the backend names
1408 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001409 --with-signal-module disable/enable signal module
1410 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1411 --with(out)-threads[=DIRECTORY]
1412 disable/enable thread support
1413 --with(out)-thread[=DIRECTORY]
1414 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001415 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001416 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001417 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001418 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001419 --with-wctype-functions use wctype.h functions
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001420 --with-fpectl enable SIGFPE catching
1421 --with-libm=STRING math library
1422 --with-libc=STRING C library
Georg Brandl52d168a2008-01-07 18:10:24 +00001423 --with-wide-unicode Use 4-byte Unicode characters (default is 2 bytes)
Antoine Pitroub52ec782009-01-25 16:34:23 +00001424 --with-computed-gotos Use computed gotos / threaded dispatch in evaluation
1425 loop (not available on all compilers)
Martin v. Löwis11437992002-04-12 09:54:03 +00001426
1427Some influential environment variables:
1428 CC C compiler command
1429 CFLAGS C compiler flags
1430 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1431 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001432 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001433 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001434 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001435 CPP C preprocessor
1436
1437Use these variables to override the choices made by `configure' or to help
1438it to find libraries and programs with nonstandard names/locations.
1439
Georg Brandle2e15612009-05-20 18:25:10 +00001440Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001441_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001442ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001443fi
1444
1445if test "$ac_init_help" = "recursive"; then
1446 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001447 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001448 test -d "$ac_dir" ||
1449 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1450 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001451 ac_builddir=.
1452
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001453case "$ac_dir" in
1454.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1455*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001456 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001457 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001458 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001459 case $ac_top_builddir_sub in
1460 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1461 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1462 esac ;;
1463esac
1464ac_abs_top_builddir=$ac_pwd
1465ac_abs_builddir=$ac_pwd$ac_dir_suffix
1466# for backward compatibility:
1467ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001468
1469case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001470 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001471 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001472 ac_top_srcdir=$ac_top_builddir_sub
1473 ac_abs_top_srcdir=$ac_pwd ;;
1474 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001475 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001476 ac_top_srcdir=$srcdir
1477 ac_abs_top_srcdir=$srcdir ;;
1478 *) # Relative name.
1479 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1480 ac_top_srcdir=$ac_top_build_prefix$srcdir
1481 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001482esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001483ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001484
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001485 cd "$ac_dir" || { ac_status=$?; continue; }
1486 # Check for guested configure.
1487 if test -f "$ac_srcdir/configure.gnu"; then
1488 echo &&
1489 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1490 elif test -f "$ac_srcdir/configure"; then
1491 echo &&
1492 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001493 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001494 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001495 fi || ac_status=$?
1496 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001497 done
1498fi
1499
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001500test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001501if $ac_init_version; then
1502 cat <<\_ACEOF
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001503python configure 3.2
Matthias Kloseb9621712010-04-24 17:59:49 +00001504generated by GNU Autoconf 2.65
Martin v. Löwis11437992002-04-12 09:54:03 +00001505
Matthias Kloseb9621712010-04-24 17:59:49 +00001506Copyright (C) 2009 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001507This configure script is free software; the Free Software Foundation
1508gives unlimited permission to copy, distribute and modify it.
1509_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001510 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001511fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001512
1513## ------------------------ ##
1514## Autoconf initialization. ##
1515## ------------------------ ##
1516
1517# ac_fn_c_try_compile LINENO
1518# --------------------------
1519# Try to compile conftest.$ac_ext, and return whether this succeeded.
1520ac_fn_c_try_compile ()
1521{
1522 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1523 rm -f conftest.$ac_objext
1524 if { { ac_try="$ac_compile"
1525case "(($ac_try" in
1526 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1527 *) ac_try_echo=$ac_try;;
1528esac
1529eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1530$as_echo "$ac_try_echo"; } >&5
1531 (eval "$ac_compile") 2>conftest.err
1532 ac_status=$?
1533 if test -s conftest.err; then
1534 grep -v '^ *+' conftest.err >conftest.er1
1535 cat conftest.er1 >&5
1536 mv -f conftest.er1 conftest.err
1537 fi
1538 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1539 test $ac_status = 0; } && {
1540 test -z "$ac_c_werror_flag" ||
1541 test ! -s conftest.err
1542 } && test -s conftest.$ac_objext; then :
1543 ac_retval=0
1544else
1545 $as_echo "$as_me: failed program was:" >&5
1546sed 's/^/| /' conftest.$ac_ext >&5
1547
1548 ac_retval=1
1549fi
1550 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1551 as_fn_set_status $ac_retval
1552
1553} # ac_fn_c_try_compile
1554
1555# ac_fn_c_try_cpp LINENO
1556# ----------------------
1557# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1558ac_fn_c_try_cpp ()
1559{
1560 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1561 if { { ac_try="$ac_cpp conftest.$ac_ext"
1562case "(($ac_try" in
1563 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1564 *) ac_try_echo=$ac_try;;
1565esac
1566eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1567$as_echo "$ac_try_echo"; } >&5
1568 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1569 ac_status=$?
1570 if test -s conftest.err; then
1571 grep -v '^ *+' conftest.err >conftest.er1
1572 cat conftest.er1 >&5
1573 mv -f conftest.er1 conftest.err
1574 fi
1575 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1576 test $ac_status = 0; } >/dev/null && {
1577 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1578 test ! -s conftest.err
1579 }; then :
1580 ac_retval=0
1581else
1582 $as_echo "$as_me: failed program was:" >&5
1583sed 's/^/| /' conftest.$ac_ext >&5
1584
1585 ac_retval=1
1586fi
1587 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1588 as_fn_set_status $ac_retval
1589
1590} # ac_fn_c_try_cpp
1591
1592# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1593# -------------------------------------------------------
1594# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1595# the include files in INCLUDES and setting the cache variable VAR
1596# accordingly.
1597ac_fn_c_check_header_mongrel ()
1598{
1599 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1600 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1601 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1602$as_echo_n "checking for $2... " >&6; }
1603if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1604 $as_echo_n "(cached) " >&6
1605fi
1606eval ac_res=\$$3
1607 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1608$as_echo "$ac_res" >&6; }
1609else
1610 # Is the header compilable?
1611{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1612$as_echo_n "checking $2 usability... " >&6; }
1613cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1614/* end confdefs.h. */
1615$4
1616#include <$2>
1617_ACEOF
1618if ac_fn_c_try_compile "$LINENO"; then :
1619 ac_header_compiler=yes
1620else
1621 ac_header_compiler=no
1622fi
1623rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1624{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1625$as_echo "$ac_header_compiler" >&6; }
1626
1627# Is the header present?
1628{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1629$as_echo_n "checking $2 presence... " >&6; }
1630cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1631/* end confdefs.h. */
1632#include <$2>
1633_ACEOF
1634if ac_fn_c_try_cpp "$LINENO"; then :
1635 ac_header_preproc=yes
1636else
1637 ac_header_preproc=no
1638fi
1639rm -f conftest.err conftest.$ac_ext
1640{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1641$as_echo "$ac_header_preproc" >&6; }
1642
1643# So? What about this header?
1644case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1645 yes:no: )
1646 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1647$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1648 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1649$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1650 ;;
1651 no:yes:* )
1652 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1653$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1654 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1655$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1656 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1657$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1658 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1659$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1660 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1661$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1662( cat <<\_ASBOX
1663## -------------------------------------- ##
1664## Report this to http://bugs.python.org/ ##
1665## -------------------------------------- ##
1666_ASBOX
1667 ) | sed "s/^/$as_me: WARNING: /" >&2
1668 ;;
1669esac
1670 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1671$as_echo_n "checking for $2... " >&6; }
1672if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1673 $as_echo_n "(cached) " >&6
1674else
1675 eval "$3=\$ac_header_compiler"
1676fi
1677eval ac_res=\$$3
1678 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1679$as_echo "$ac_res" >&6; }
1680fi
1681 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1682
1683} # ac_fn_c_check_header_mongrel
1684
1685# ac_fn_c_try_run LINENO
1686# ----------------------
1687# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1688# that executables *can* be run.
1689ac_fn_c_try_run ()
1690{
1691 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1692 if { { ac_try="$ac_link"
1693case "(($ac_try" in
1694 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1695 *) ac_try_echo=$ac_try;;
1696esac
1697eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1698$as_echo "$ac_try_echo"; } >&5
1699 (eval "$ac_link") 2>&5
1700 ac_status=$?
1701 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1702 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1703 { { case "(($ac_try" in
1704 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1705 *) ac_try_echo=$ac_try;;
1706esac
1707eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1708$as_echo "$ac_try_echo"; } >&5
1709 (eval "$ac_try") 2>&5
1710 ac_status=$?
1711 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1712 test $ac_status = 0; }; }; then :
1713 ac_retval=0
1714else
1715 $as_echo "$as_me: program exited with status $ac_status" >&5
1716 $as_echo "$as_me: failed program was:" >&5
1717sed 's/^/| /' conftest.$ac_ext >&5
1718
1719 ac_retval=$ac_status
1720fi
1721 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1722 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1723 as_fn_set_status $ac_retval
1724
1725} # ac_fn_c_try_run
1726
1727# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1728# -------------------------------------------------------
1729# Tests whether HEADER exists and can be compiled using the include files in
1730# INCLUDES, setting the cache variable VAR accordingly.
1731ac_fn_c_check_header_compile ()
1732{
1733 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1734 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1735$as_echo_n "checking for $2... " >&6; }
1736if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1737 $as_echo_n "(cached) " >&6
1738else
1739 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1740/* end confdefs.h. */
1741$4
1742#include <$2>
1743_ACEOF
1744if ac_fn_c_try_compile "$LINENO"; then :
1745 eval "$3=yes"
1746else
1747 eval "$3=no"
1748fi
1749rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1750fi
1751eval ac_res=\$$3
1752 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1753$as_echo "$ac_res" >&6; }
1754 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1755
1756} # ac_fn_c_check_header_compile
1757
1758# ac_fn_c_try_link LINENO
1759# -----------------------
1760# Try to link conftest.$ac_ext, and return whether this succeeded.
1761ac_fn_c_try_link ()
1762{
1763 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1764 rm -f conftest.$ac_objext conftest$ac_exeext
1765 if { { ac_try="$ac_link"
1766case "(($ac_try" in
1767 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1768 *) ac_try_echo=$ac_try;;
1769esac
1770eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1771$as_echo "$ac_try_echo"; } >&5
1772 (eval "$ac_link") 2>conftest.err
1773 ac_status=$?
1774 if test -s conftest.err; then
1775 grep -v '^ *+' conftest.err >conftest.er1
1776 cat conftest.er1 >&5
1777 mv -f conftest.er1 conftest.err
1778 fi
1779 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1780 test $ac_status = 0; } && {
1781 test -z "$ac_c_werror_flag" ||
1782 test ! -s conftest.err
1783 } && test -s conftest$ac_exeext && {
1784 test "$cross_compiling" = yes ||
1785 $as_test_x conftest$ac_exeext
1786 }; then :
1787 ac_retval=0
1788else
1789 $as_echo "$as_me: failed program was:" >&5
1790sed 's/^/| /' conftest.$ac_ext >&5
1791
1792 ac_retval=1
1793fi
1794 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1795 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1796 # interfere with the next link command; also delete a directory that is
1797 # left behind by Apple's compiler. We do this before executing the actions.
1798 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1799 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1800 as_fn_set_status $ac_retval
1801
1802} # ac_fn_c_try_link
1803
1804# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1805# -------------------------------------------
1806# Tests whether TYPE exists after having included INCLUDES, setting cache
1807# variable VAR accordingly.
1808ac_fn_c_check_type ()
1809{
1810 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1811 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1812$as_echo_n "checking for $2... " >&6; }
1813if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1814 $as_echo_n "(cached) " >&6
1815else
1816 eval "$3=no"
1817 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1818/* end confdefs.h. */
1819$4
1820int
1821main ()
1822{
1823if (sizeof ($2))
1824 return 0;
1825 ;
1826 return 0;
1827}
1828_ACEOF
1829if ac_fn_c_try_compile "$LINENO"; then :
1830 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1831/* end confdefs.h. */
1832$4
1833int
1834main ()
1835{
1836if (sizeof (($2)))
1837 return 0;
1838 ;
1839 return 0;
1840}
1841_ACEOF
1842if ac_fn_c_try_compile "$LINENO"; then :
1843
1844else
1845 eval "$3=yes"
1846fi
1847rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1848fi
1849rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1850fi
1851eval ac_res=\$$3
1852 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1853$as_echo "$ac_res" >&6; }
1854 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1855
1856} # ac_fn_c_check_type
1857
1858# ac_fn_c_find_uintX_t LINENO BITS VAR
1859# ------------------------------------
1860# Finds an unsigned integer type with width BITS, setting cache variable VAR
1861# accordingly.
1862ac_fn_c_find_uintX_t ()
1863{
1864 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1865 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1866$as_echo_n "checking for uint$2_t... " >&6; }
1867if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1868 $as_echo_n "(cached) " >&6
1869else
1870 eval "$3=no"
1871 # Order is important - never check a type that is potentially smaller
1872 # than half of the expected target width.
1873 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1874 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1875 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1876/* end confdefs.h. */
1877$ac_includes_default
1878int
1879main ()
1880{
1881static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
1882test_array [0] = 0
1883
1884 ;
1885 return 0;
1886}
1887_ACEOF
1888if ac_fn_c_try_compile "$LINENO"; then :
1889 case $ac_type in #(
1890 uint$2_t) :
1891 eval "$3=yes" ;; #(
1892 *) :
1893 eval "$3=\$ac_type" ;;
1894esac
1895fi
1896rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1897 eval as_val=\$$3
1898 if test "x$as_val" = x""no; then :
1899
1900else
1901 break
1902fi
1903 done
1904fi
1905eval ac_res=\$$3
1906 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1907$as_echo "$ac_res" >&6; }
1908 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1909
1910} # ac_fn_c_find_uintX_t
1911
1912# ac_fn_c_find_intX_t LINENO BITS VAR
1913# -----------------------------------
1914# Finds a signed integer type with width BITS, setting cache variable VAR
1915# accordingly.
1916ac_fn_c_find_intX_t ()
1917{
1918 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1919 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
1920$as_echo_n "checking for int$2_t... " >&6; }
1921if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1922 $as_echo_n "(cached) " >&6
1923else
1924 eval "$3=no"
1925 # Order is important - never check a type that is potentially smaller
1926 # than half of the expected target width.
1927 for ac_type in int$2_t 'int' 'long int' \
1928 'long long int' 'short int' 'signed char'; do
1929 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1930/* end confdefs.h. */
1931$ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00001932int
1933main ()
1934{
Jesus Cea740f53a2010-04-28 11:35:30 +00001935static int test_array [1 - 2 * !(enum { N = $2 / 2 - 1 };
1936 0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
Matthias Kloseb9621712010-04-24 17:59:49 +00001937test_array [0] = 0
1938
1939 ;
1940 return 0;
1941}
1942_ACEOF
1943if ac_fn_c_try_compile "$LINENO"; then :
1944 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1945/* end confdefs.h. */
1946$ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00001947int
1948main ()
1949{
Jesus Cea740f53a2010-04-28 11:35:30 +00001950static int test_array [1 - 2 * !(enum { N = $2 / 2 - 1 };
1951 ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Kloseb9621712010-04-24 17:59:49 +00001952 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
1953test_array [0] = 0
1954
1955 ;
1956 return 0;
1957}
1958_ACEOF
1959if ac_fn_c_try_compile "$LINENO"; then :
1960
1961else
1962 case $ac_type in #(
1963 int$2_t) :
1964 eval "$3=yes" ;; #(
1965 *) :
1966 eval "$3=\$ac_type" ;;
1967esac
1968fi
1969rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1970fi
1971rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1972 eval as_val=\$$3
1973 if test "x$as_val" = x""no; then :
1974
1975else
1976 break
1977fi
1978 done
1979fi
1980eval ac_res=\$$3
1981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1982$as_echo "$ac_res" >&6; }
1983 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1984
1985} # ac_fn_c_find_intX_t
1986
1987# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1988# --------------------------------------------
1989# Tries to find the compile-time value of EXPR in a program that includes
1990# INCLUDES, setting VAR accordingly. Returns whether the value could be
1991# computed
1992ac_fn_c_compute_int ()
1993{
1994 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1995 if test "$cross_compiling" = yes; then
1996 # Depending upon the size, compute the lo and hi bounds.
1997cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1998/* end confdefs.h. */
1999$4
2000int
2001main ()
2002{
2003static int test_array [1 - 2 * !(($2) >= 0)];
2004test_array [0] = 0
2005
2006 ;
2007 return 0;
2008}
2009_ACEOF
2010if ac_fn_c_try_compile "$LINENO"; then :
2011 ac_lo=0 ac_mid=0
2012 while :; do
2013 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2014/* end confdefs.h. */
2015$4
2016int
2017main ()
2018{
2019static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2020test_array [0] = 0
2021
2022 ;
2023 return 0;
2024}
2025_ACEOF
2026if ac_fn_c_try_compile "$LINENO"; then :
2027 ac_hi=$ac_mid; break
2028else
2029 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2030 if test $ac_lo -le $ac_mid; then
2031 ac_lo= ac_hi=
2032 break
2033 fi
2034 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2035fi
2036rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2037 done
2038else
2039 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2040/* end confdefs.h. */
2041$4
2042int
2043main ()
2044{
2045static int test_array [1 - 2 * !(($2) < 0)];
2046test_array [0] = 0
2047
2048 ;
2049 return 0;
2050}
2051_ACEOF
2052if ac_fn_c_try_compile "$LINENO"; then :
2053 ac_hi=-1 ac_mid=-1
2054 while :; do
2055 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2056/* end confdefs.h. */
2057$4
2058int
2059main ()
2060{
2061static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2062test_array [0] = 0
2063
2064 ;
2065 return 0;
2066}
2067_ACEOF
2068if ac_fn_c_try_compile "$LINENO"; then :
2069 ac_lo=$ac_mid; break
2070else
2071 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2072 if test $ac_mid -le $ac_hi; then
2073 ac_lo= ac_hi=
2074 break
2075 fi
2076 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2077fi
2078rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2079 done
2080else
2081 ac_lo= ac_hi=
2082fi
2083rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2084fi
2085rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2086# Binary search between lo and hi bounds.
2087while test "x$ac_lo" != "x$ac_hi"; do
2088 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2089 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2090/* end confdefs.h. */
2091$4
2092int
2093main ()
2094{
2095static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2096test_array [0] = 0
2097
2098 ;
2099 return 0;
2100}
2101_ACEOF
2102if ac_fn_c_try_compile "$LINENO"; then :
2103 ac_hi=$ac_mid
2104else
2105 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2106fi
2107rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2108done
2109case $ac_lo in #((
2110?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2111'') ac_retval=1 ;;
2112esac
2113 else
2114 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2115/* end confdefs.h. */
2116$4
2117static long int longval () { return $2; }
2118static unsigned long int ulongval () { return $2; }
2119#include <stdio.h>
2120#include <stdlib.h>
2121int
2122main ()
2123{
2124
2125 FILE *f = fopen ("conftest.val", "w");
2126 if (! f)
2127 return 1;
2128 if (($2) < 0)
2129 {
2130 long int i = longval ();
2131 if (i != ($2))
2132 return 1;
2133 fprintf (f, "%ld", i);
2134 }
2135 else
2136 {
2137 unsigned long int i = ulongval ();
2138 if (i != ($2))
2139 return 1;
2140 fprintf (f, "%lu", i);
2141 }
2142 /* Do not output a trailing newline, as this causes \r\n confusion
2143 on some platforms. */
2144 return ferror (f) || fclose (f) != 0;
2145
2146 ;
2147 return 0;
2148}
2149_ACEOF
2150if ac_fn_c_try_run "$LINENO"; then :
2151 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2152else
2153 ac_retval=1
2154fi
2155rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2156 conftest.$ac_objext conftest.beam conftest.$ac_ext
2157rm -f conftest.val
2158
2159 fi
2160 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2161 as_fn_set_status $ac_retval
2162
2163} # ac_fn_c_compute_int
2164
2165# ac_fn_c_check_func LINENO FUNC VAR
2166# ----------------------------------
2167# Tests whether FUNC exists, setting the cache variable VAR accordingly
2168ac_fn_c_check_func ()
2169{
2170 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2171 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2172$as_echo_n "checking for $2... " >&6; }
2173if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2174 $as_echo_n "(cached) " >&6
2175else
2176 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2177/* end confdefs.h. */
2178/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2179 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2180#define $2 innocuous_$2
2181
2182/* System header to define __stub macros and hopefully few prototypes,
2183 which can conflict with char $2 (); below.
2184 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2185 <limits.h> exists even on freestanding compilers. */
2186
2187#ifdef __STDC__
2188# include <limits.h>
2189#else
2190# include <assert.h>
2191#endif
2192
2193#undef $2
2194
2195/* Override any GCC internal prototype to avoid an error.
2196 Use char because int might match the return type of a GCC
2197 builtin and then its argument prototype would still apply. */
2198#ifdef __cplusplus
2199extern "C"
2200#endif
2201char $2 ();
2202/* The GNU C library defines this for functions which it implements
2203 to always fail with ENOSYS. Some functions are actually named
2204 something starting with __ and the normal name is an alias. */
2205#if defined __stub_$2 || defined __stub___$2
2206choke me
2207#endif
2208
2209int
2210main ()
2211{
2212return $2 ();
2213 ;
2214 return 0;
2215}
2216_ACEOF
2217if ac_fn_c_try_link "$LINENO"; then :
2218 eval "$3=yes"
2219else
2220 eval "$3=no"
2221fi
2222rm -f core conftest.err conftest.$ac_objext \
2223 conftest$ac_exeext conftest.$ac_ext
2224fi
2225eval ac_res=\$$3
2226 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2227$as_echo "$ac_res" >&6; }
2228 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2229
2230} # ac_fn_c_check_func
2231
2232# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2233# ----------------------------------------------------
2234# Tries to find if the field MEMBER exists in type AGGR, after including
2235# INCLUDES, setting cache variable VAR accordingly.
2236ac_fn_c_check_member ()
2237{
2238 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2239 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2240$as_echo_n "checking for $2.$3... " >&6; }
2241if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then :
2242 $as_echo_n "(cached) " >&6
2243else
2244 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2245/* end confdefs.h. */
2246$5
2247int
2248main ()
2249{
2250static $2 ac_aggr;
2251if (ac_aggr.$3)
2252return 0;
2253 ;
2254 return 0;
2255}
2256_ACEOF
2257if ac_fn_c_try_compile "$LINENO"; then :
2258 eval "$4=yes"
2259else
2260 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2261/* end confdefs.h. */
2262$5
2263int
2264main ()
2265{
2266static $2 ac_aggr;
2267if (sizeof ac_aggr.$3)
2268return 0;
2269 ;
2270 return 0;
2271}
2272_ACEOF
2273if ac_fn_c_try_compile "$LINENO"; then :
2274 eval "$4=yes"
2275else
2276 eval "$4=no"
2277fi
2278rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2279fi
2280rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2281fi
2282eval ac_res=\$$4
2283 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2284$as_echo "$ac_res" >&6; }
2285 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2286
2287} # ac_fn_c_check_member
2288
2289# ac_fn_c_check_decl LINENO SYMBOL VAR
2290# ------------------------------------
2291# Tests whether SYMBOL is declared, setting cache variable VAR accordingly.
2292ac_fn_c_check_decl ()
2293{
2294 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2295 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $2 is declared" >&5
2296$as_echo_n "checking whether $2 is declared... " >&6; }
2297if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2298 $as_echo_n "(cached) " >&6
2299else
2300 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2301/* end confdefs.h. */
2302$4
2303int
2304main ()
2305{
2306#ifndef $2
2307 (void) $2;
2308#endif
2309
2310 ;
2311 return 0;
2312}
2313_ACEOF
2314if ac_fn_c_try_compile "$LINENO"; then :
2315 eval "$3=yes"
2316else
2317 eval "$3=no"
2318fi
2319rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2320fi
2321eval ac_res=\$$3
2322 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2323$as_echo "$ac_res" >&6; }
2324 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2325
2326} # ac_fn_c_check_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002327cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002328This file contains any messages produced by compilers while
2329running configure, to aid debugging if configure makes a mistake.
2330
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00002331It was created by python $as_me 3.2, which was
Matthias Kloseb9621712010-04-24 17:59:49 +00002332generated by GNU Autoconf 2.65. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002333
2334 $ $0 $@
2335
2336_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002337exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002338{
2339cat <<_ASUNAME
2340## --------- ##
2341## Platform. ##
2342## --------- ##
2343
2344hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2345uname -m = `(uname -m) 2>/dev/null || echo unknown`
2346uname -r = `(uname -r) 2>/dev/null || echo unknown`
2347uname -s = `(uname -s) 2>/dev/null || echo unknown`
2348uname -v = `(uname -v) 2>/dev/null || echo unknown`
2349
2350/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2351/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2352
2353/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2354/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2355/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002356/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002357/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2358/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2359/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2360
2361_ASUNAME
2362
2363as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2364for as_dir in $PATH
2365do
2366 IFS=$as_save_IFS
2367 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002368 $as_echo "PATH: $as_dir"
2369 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002370IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002371
2372} >&5
2373
2374cat >&5 <<_ACEOF
2375
2376
2377## ----------- ##
2378## Core tests. ##
2379## ----------- ##
2380
2381_ACEOF
2382
2383
2384# Keep a trace of the command line.
2385# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002386# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002387# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002388# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002389ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002390ac_configure_args0=
2391ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002392ac_must_keep_next=false
2393for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002394do
Skip Montanaro6dead952003-09-25 14:50:04 +00002395 for ac_arg
2396 do
2397 case $ac_arg in
2398 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2399 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2400 | -silent | --silent | --silen | --sile | --sil)
2401 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002402 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002403 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002404 esac
2405 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002406 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002407 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002408 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002409 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002410 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002411 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002412 case $ac_arg in
2413 *=* | --config-cache | -C | -disable-* | --disable-* \
2414 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2415 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2416 | -with-* | --with-* | -without-* | --without-* | --x)
2417 case "$ac_configure_args0 " in
2418 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2419 esac
2420 ;;
2421 -* ) ac_must_keep_next=true ;;
2422 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002423 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002424 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002425 ;;
2426 esac
2427 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002428done
Matthias Kloseb9621712010-04-24 17:59:49 +00002429{ ac_configure_args0=; unset ac_configure_args0;}
2430{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002431
2432# When interrupted or exit'd, cleanup temporary files, and complete
2433# config.log. We remove comments because anyway the quotes in there
2434# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002435# WARNING: Use '\'' to represent an apostrophe within the trap.
2436# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
Martin v. Löwis11437992002-04-12 09:54:03 +00002437trap 'exit_status=$?
2438 # Save into config.log some information that might help in debugging.
2439 {
2440 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002441
Martin v. Löwis11437992002-04-12 09:54:03 +00002442 cat <<\_ASBOX
2443## ---------------- ##
2444## Cache variables. ##
2445## ---------------- ##
2446_ASBOX
2447 echo
2448 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002449(
2450 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2451 eval ac_val=\$$ac_var
2452 case $ac_val in #(
2453 *${as_nl}*)
2454 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002455 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2456$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002457 esac
2458 case $ac_var in #(
2459 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002460 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2461 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002462 esac ;;
2463 esac
2464 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002465 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002466 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2467 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002468 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002469 "s/'\''/'\''\\\\'\'''\''/g;
2470 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2471 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002472 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002473 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002474 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002475 esac |
2476 sort
2477)
Martin v. Löwis11437992002-04-12 09:54:03 +00002478 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002479
2480 cat <<\_ASBOX
2481## ----------------- ##
2482## Output variables. ##
2483## ----------------- ##
2484_ASBOX
2485 echo
2486 for ac_var in $ac_subst_vars
2487 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002488 eval ac_val=\$$ac_var
2489 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002490 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002491 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002492 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002493 done | sort
2494 echo
2495
2496 if test -n "$ac_subst_files"; then
2497 cat <<\_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002498## ------------------- ##
2499## File substitutions. ##
2500## ------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002501_ASBOX
2502 echo
2503 for ac_var in $ac_subst_files
2504 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002505 eval ac_val=\$$ac_var
2506 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002507 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002508 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002509 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002510 done | sort
2511 echo
2512 fi
2513
Martin v. Löwis11437992002-04-12 09:54:03 +00002514 if test -s confdefs.h; then
2515 cat <<\_ASBOX
2516## ----------- ##
2517## confdefs.h. ##
2518## ----------- ##
2519_ASBOX
2520 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002521 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002522 echo
2523 fi
2524 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002525 $as_echo "$as_me: caught signal $ac_signal"
2526 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002527 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002528 rm -f core *.core core.conftest.* &&
2529 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002530 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002531' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002532for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002533 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002534done
2535ac_signal=0
2536
2537# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002538rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002539
Matthias Kloseb9621712010-04-24 17:59:49 +00002540$as_echo "/* confdefs.h */" > confdefs.h
2541
Martin v. Löwis11437992002-04-12 09:54:03 +00002542# Predefined preprocessor variables.
2543
2544cat >>confdefs.h <<_ACEOF
2545#define PACKAGE_NAME "$PACKAGE_NAME"
2546_ACEOF
2547
Martin v. Löwis11437992002-04-12 09:54:03 +00002548cat >>confdefs.h <<_ACEOF
2549#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2550_ACEOF
2551
Martin v. Löwis11437992002-04-12 09:54:03 +00002552cat >>confdefs.h <<_ACEOF
2553#define PACKAGE_VERSION "$PACKAGE_VERSION"
2554_ACEOF
2555
Martin v. Löwis11437992002-04-12 09:54:03 +00002556cat >>confdefs.h <<_ACEOF
2557#define PACKAGE_STRING "$PACKAGE_STRING"
2558_ACEOF
2559
Martin v. Löwis11437992002-04-12 09:54:03 +00002560cat >>confdefs.h <<_ACEOF
2561#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2562_ACEOF
2563
Matthias Kloseb9621712010-04-24 17:59:49 +00002564cat >>confdefs.h <<_ACEOF
2565#define PACKAGE_URL "$PACKAGE_URL"
2566_ACEOF
2567
Martin v. Löwis11437992002-04-12 09:54:03 +00002568
2569# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002570# Prefer an explicitly selected file to automatically selected ones.
2571ac_site_file1=NONE
2572ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002573if test -n "$CONFIG_SITE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002574 ac_site_file1=$CONFIG_SITE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002575elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002576 ac_site_file1=$prefix/share/config.site
2577 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002578else
Matthias Kloseb9621712010-04-24 17:59:49 +00002579 ac_site_file1=$ac_default_prefix/share/config.site
2580 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002581fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002582for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002583do
Matthias Kloseb9621712010-04-24 17:59:49 +00002584 test "x$ac_site_file" = xNONE && continue
2585 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2586 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2587$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002588 sed 's/^/| /' "$ac_site_file" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002589 . "$ac_site_file"
2590 fi
2591done
2592
2593if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002594 # Some versions of bash will fail to source /dev/null (special files
2595 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2596 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2597 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2598$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002599 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002600 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2601 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002602 esac
2603 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002604else
Matthias Kloseb9621712010-04-24 17:59:49 +00002605 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2606$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002607 >$cache_file
2608fi
2609
2610# Check that the precious variables saved in the cache have kept the same
2611# value.
2612ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002613for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002614 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2615 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002616 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2617 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002618 case $ac_old_set,$ac_new_set in
2619 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002620 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2621$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002622 ac_cache_corrupted=: ;;
2623 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002624 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2625$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002626 ac_cache_corrupted=: ;;
2627 ,);;
2628 *)
2629 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002630 # differences in whitespace do not lead to failure.
2631 ac_old_val_w=`echo x $ac_old_val`
2632 ac_new_val_w=`echo x $ac_new_val`
2633 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2634 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2635$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2636 ac_cache_corrupted=:
2637 else
2638 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2639$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2640 eval $ac_var=\$ac_old_val
2641 fi
2642 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2643$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2644 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2645$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002646 fi;;
2647 esac
2648 # Pass precious variables to config.status.
2649 if test "$ac_new_set" = set; then
2650 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002651 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002652 *) ac_arg=$ac_var=$ac_new_val ;;
2653 esac
2654 case " $ac_configure_args " in
2655 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002656 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002657 esac
2658 fi
2659done
2660if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002661 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2662$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2663 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2664$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2665 as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002666fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002667## -------------------- ##
2668## Main body of script. ##
2669## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002670
Guido van Rossum7f43da71994-08-01 12:15:30 +00002671ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002672ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002673ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2674ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2675ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002676
Guido van Rossum627b2d71993-12-24 10:39:16 +00002677
Michael W. Hudson54241132001-12-07 15:38:26 +00002678
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002679ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002680
2681
Martin v. Löwis11437992002-04-12 09:54:03 +00002682
Benjamin Petersond23f8222009-04-05 19:13:16 +00002683if test "$prefix" != "/"; then
2684 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2685fi
2686
2687
Martin v. Löwis11437992002-04-12 09:54:03 +00002688
2689
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002690# We don't use PACKAGE_ variables, and they cause conflicts
2691# with other autoconf-based packages that include Python.h
2692grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2693rm confdefs.h
2694mv confdefs.h.new confdefs.h
2695
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002696
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00002697VERSION=3.2
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002698
Martin v. Löwis1142de32002-03-29 16:28:31 +00002699
2700SOVERSION=1.0
2701
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002702# The later defininition of _XOPEN_SOURCE disables certain features
2703# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2704
Matthias Kloseb9621712010-04-24 17:59:49 +00002705$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002706
2707
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002708# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2709# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2710# them.
2711
Matthias Kloseb9621712010-04-24 17:59:49 +00002712$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002713
2714
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002715# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2716# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2717# them.
2718
Matthias Kloseb9621712010-04-24 17:59:49 +00002719$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002720
2721
Martin v. Löwisd6320502004-08-12 13:45:08 +00002722# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2723# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
2724
Matthias Kloseb9621712010-04-24 17:59:49 +00002725$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00002726
2727
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002728# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2729# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2730# them.
2731
Matthias Kloseb9621712010-04-24 17:59:49 +00002732$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002733
2734
2735
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002736define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002737
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00002738# Arguments passed to configure.
2739
2740CONFIG_ARGS="$ac_configure_args"
2741
Matthias Kloseb9621712010-04-24 17:59:49 +00002742{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
2743$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002744# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002745if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002746 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00002747 case $enableval in
2748 yes)
2749 enableval=/Developer/SDKs/MacOSX10.4u.sdk
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002750 if test ! -d "${enableval}"
2751 then
2752 enableval=/
2753 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002754 ;;
2755 esac
2756 case $enableval in
2757 no)
2758 UNIVERSALSDK=
2759 enable_universalsdk=
2760 ;;
2761 *)
2762 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002763 if test ! -d "${UNIVERSALSDK}"
2764 then
Matthias Kloseb9621712010-04-24 17:59:49 +00002765 as_fn_error "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002766 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002767 ;;
2768 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002769
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002770
Thomas Wouters477c8d52006-05-27 19:21:47 +00002771else
2772
2773 UNIVERSALSDK=
2774 enable_universalsdk=
2775
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002776fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002777
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002778if test -n "${UNIVERSALSDK}"
2779then
Matthias Kloseb9621712010-04-24 17:59:49 +00002780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
2781$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002782else
Matthias Kloseb9621712010-04-24 17:59:49 +00002783 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2784$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002785fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002786
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002787
Benjamin Peterson6794aa32008-07-16 20:33:37 +00002788
2789
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002790UNIVERSAL_ARCHS="32-bit"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00002791
Matthias Kloseb9621712010-04-24 17:59:49 +00002792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
2793$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002794
2795# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002796if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002797 withval=$with_universal_archs;
Matthias Kloseb9621712010-04-24 17:59:49 +00002798 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
2799$as_echo "$withval" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002800 UNIVERSAL_ARCHS="$withval"
2801
2802else
2803
Matthias Kloseb9621712010-04-24 17:59:49 +00002804 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 32-bit" >&5
2805$as_echo "32-bit" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002806
2807fi
2808
2809
2810
2811
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002812
2813# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002814if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002815 withval=$with_framework_name;
2816 PYTHONFRAMEWORK=${withval}
2817 PYTHONFRAMEWORKDIR=${withval}.framework
2818 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
2819
2820else
2821
2822 PYTHONFRAMEWORK=Python
2823 PYTHONFRAMEWORKDIR=Python.framework
2824 PYTHONFRAMEWORKIDENTIFIER=org.python.python
2825
2826fi
2827
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002828# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002829if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002830 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00002831 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00002832 yes)
Jack Jansene578a632001-08-15 01:27:14 +00002833 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00002834 esac
2835 case $enableval in
2836 no)
2837 PYTHONFRAMEWORK=
2838 PYTHONFRAMEWORKDIR=no-framework
2839 PYTHONFRAMEWORKPREFIX=
2840 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002841 FRAMEWORKINSTALLFIRST=
2842 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002843 FRAMEWORKALTINSTALLFIRST=
2844 FRAMEWORKALTINSTALLLAST=
2845 if test "x${prefix}" = "xNONE"; then
2846 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2847 else
2848 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2849 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00002850 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00002851 ;;
2852 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002853 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00002854 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00002855 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00002856 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00002857 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
2858 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002859 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002860
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002861 if test "x${prefix}" = "xNONE" ; then
2862 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002863
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002864 else
2865 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2866 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002867
2868 case "${enableval}" in
2869 /System*)
2870 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2871 if test "${prefix}" = "NONE" ; then
2872 # See below
2873 FRAMEWORKUNIXTOOLSPREFIX="/usr"
2874 fi
2875 ;;
2876
2877 /Library*)
2878 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2879 ;;
2880
2881 */Library/Frameworks)
2882 MDIR="`dirname "${enableval}"`"
2883 MDIR="`dirname "${MDIR}"`"
2884 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
2885
2886 if test "${prefix}" = "NONE"; then
2887 # User hasn't specified the
2888 # --prefix option, but wants to install
2889 # the framework in a non-default location,
2890 # ensure that the compatibility links get
2891 # installed relative to that prefix as well
2892 # instead of in /usr/local.
2893 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
2894 fi
2895 ;;
2896
2897 *)
2898 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2899 ;;
2900 esac
2901
Jack Jansen127e56e2001-09-11 14:41:54 +00002902 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00002903
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002904 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00002905 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002906 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002907
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002908 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002909
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002910 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
2911
2912 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
2913
Jack Jansene578a632001-08-15 01:27:14 +00002914 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002915
Guido van Rossum563e7081996-09-10 18:20:48 +00002916else
Martin v. Löwis11437992002-04-12 09:54:03 +00002917
Jack Jansene578a632001-08-15 01:27:14 +00002918 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00002919 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00002920 PYTHONFRAMEWORKPREFIX=
2921 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002922 FRAMEWORKINSTALLFIRST=
2923 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002924 FRAMEWORKALTINSTALLFIRST=
2925 FRAMEWORKALTINSTALLLAST=
2926 if test "x${prefix}" = "xNONE" ; then
2927 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2928 else
2929 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2930 fi
Jack Jansene578a632001-08-15 01:27:14 +00002931 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002932
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002933
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002934fi
2935
Thomas Wouters477c8d52006-05-27 19:21:47 +00002936
2937
Michael W. Hudson54241132001-12-07 15:38:26 +00002938
2939
2940
2941
Jack Jansene578a632001-08-15 01:27:14 +00002942
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002943
2944
2945
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002946
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002947
Jack Jansene578a632001-08-15 01:27:14 +00002948##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00002949## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00002950## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00002951##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002952# Set name for machine-dependent library files
2953
Matthias Kloseb9621712010-04-24 17:59:49 +00002954{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
2955$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002956if test -z "$MACHDEP"
2957then
Guido van Rossum563e7081996-09-10 18:20:48 +00002958 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002959 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00002960 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00002961 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002962 else
Guido van Rossum563e7081996-09-10 18:20:48 +00002963 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002964 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00002965 ac_md_system=`echo $ac_sys_system |
2966 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
2967 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00002968 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00002969 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00002970
Guido van Rossum07397971997-04-29 21:49:50 +00002971 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002972 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002973 darwin*) MACHDEP="darwin";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00002974 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00002975 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002976 esac
2977fi
Guido van Rossum91922671997-10-09 20:24:13 +00002978
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002979# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
2980# disable features if it is defined, without any means to access these
2981# features as extensions. For these systems, we skip the definition of
2982# _XOPEN_SOURCE. Before adding a system to the list to gain access to
2983# some feature, make sure there is no alternative way to access this
2984# feature. Also, when using wildcards, make sure you have verified the
2985# need for not defining _XOPEN_SOURCE on all systems matching the
2986# wildcard, and that the wildcard does not include future systems
2987# (which may remove their limitations).
2988case $ac_sys_system/$ac_sys_release in
2989 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
2990 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00002991 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00002992 # In addition, Stefan Krah confirms that issue #1244610 exists through
2993 # OpenBSD 4.6, but is fixed in 4.7.
2994 OpenBSD/2.* | OpenBSD/3.[0123456789] | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00002995 define_xopen_source=no
2996 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
2997 # also defined. This can be overridden by defining _BSD_SOURCE
2998 # As this has a different meaning on Linux, only define it on OpenBSD
2999
Matthias Kloseb9621712010-04-24 17:59:49 +00003000$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003001
3002 ;;
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003003 OpenBSD/4.[789])
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003004 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3005 # also defined. This can be overridden by defining _BSD_SOURCE
3006 # As this has a different meaning on Linux, only define it on OpenBSD
3007
Matthias Kloseb9621712010-04-24 17:59:49 +00003008$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003009
3010 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003011 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3012 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3013 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003014 NetBSD/1.5 | NetBSD/1.5.* | NetBSD/1.6 | NetBSD/1.6.* | NetBSD/1.6[A-S])
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003015 define_xopen_source=no;;
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003016 # On Solaris 2.6, sys/wait.h is inconsistent in the usage
3017 # of union __?sigval. Reported by Stuart Bishop.
3018 SunOS/5.6)
3019 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003020 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3021 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003022 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003023 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003024 define_xopen_source=no;;
3025 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003026 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003027 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003028 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003029 # On FreeBSD 4, the math functions C89 does not cover are never defined
3030 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3031 FreeBSD/4.*)
3032 define_xopen_source=no;;
3033 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3034 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3035 # identifies itself as Darwin/7.*
3036 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3037 # disables platform specific features beyond repair.
3038 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3039 # has no effect, don't bother defining them
3040 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003041 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003042 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003043 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003044 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3045 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3046 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003047 AIX/4)
3048 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003049 AIX/5)
3050 if test `uname -r` -eq 1; then
3051 define_xopen_source=no
3052 fi
3053 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003054 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3055 # defining NI_NUMERICHOST.
3056 QNX/6.3.2)
3057 define_xopen_source=no
3058 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003059
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003060esac
3061
3062if test $define_xopen_source = yes
3063then
Skip Montanarof0d5f792004-08-15 14:08:23 +00003064 # On Solaris w/ g++ it appears that _XOPEN_SOURCE has to be
3065 # defined precisely as g++ defines it
Martin v. Löwis7dece662005-11-26 11:38:24 +00003066 # Furthermore, on Solaris 10, XPG6 requires the use of a C99
3067 # compiler
Skip Montanarof0d5f792004-08-15 14:08:23 +00003068 case $ac_sys_system/$ac_sys_release in
Martin v. Löwis7dece662005-11-26 11:38:24 +00003069 SunOS/5.8|SunOS/5.9|SunOS/5.10)
Skip Montanarof0d5f792004-08-15 14:08:23 +00003070
Matthias Kloseb9621712010-04-24 17:59:49 +00003071$as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h
Skip Montanarof0d5f792004-08-15 14:08:23 +00003072
3073 ;;
3074 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003075
Matthias Kloseb9621712010-04-24 17:59:49 +00003076$as_echo "#define _XOPEN_SOURCE 600" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003077
Skip Montanarof0d5f792004-08-15 14:08:23 +00003078 ;;
3079 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003080
3081 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3082 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3083 # several APIs are not declared. Since this is also needed in some
3084 # cases for HP-UX, we define it globally.
Martin v. Löwis7dece662005-11-26 11:38:24 +00003085 # except for Solaris 10, where it must not be defined,
3086 # as it implies XPG4.2
3087 case $ac_sys_system/$ac_sys_release in
3088 SunOS/5.10)
3089 ;;
3090 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003091
Matthias Kloseb9621712010-04-24 17:59:49 +00003092$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003093
Martin v. Löwis7dece662005-11-26 11:38:24 +00003094 ;;
3095 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003096
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003097
Matthias Kloseb9621712010-04-24 17:59:49 +00003098$as_echo "#define _POSIX_C_SOURCE 200112L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003099
3100
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003101fi
3102
Guido van Rossum91922671997-10-09 20:24:13 +00003103#
3104# SGI compilers allow the specification of the both the ABI and the
3105# ISA on the command line. Depending on the values of these switches,
3106# different and often incompatable code will be generated.
3107#
3108# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3109# thus supply support for various ABI/ISA combinations. The MACHDEP
3110# variable is also adjusted.
3111#
3112
3113if test ! -z "$SGI_ABI"
3114then
3115 CC="cc $SGI_ABI"
3116 LDFLAGS="$SGI_ABI $LDFLAGS"
3117 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3118fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003119{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3120$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003121
Jack Jansen6b08a402004-06-03 12:41:45 +00003122# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3123# it may influence the way we can build extensions, so distutils
3124# needs to check it
3125
Thomas Wouters477c8d52006-05-27 19:21:47 +00003126
Jack Jansen6b08a402004-06-03 12:41:45 +00003127CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003128EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003129
Matthias Kloseb9621712010-04-24 17:59:49 +00003130{ $as_echo "$as_me:${as_lineno-$LINENO}: checking machine type as reported by uname -m" >&5
3131$as_echo_n "checking machine type as reported by uname -m... " >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00003132ac_sys_machine=`uname -m`
Matthias Kloseb9621712010-04-24 17:59:49 +00003133{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_sys_machine" >&5
3134$as_echo "$ac_sys_machine" >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00003135
Guido van Rossum627b2d71993-12-24 10:39:16 +00003136# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003137
3138# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3139# for debug/optimization stuff. BASECFLAGS is for flags that are required
3140# just to get things to compile and link. Users are free to override OPT
3141# when running configure or make. The build should not break if they do.
3142# BASECFLAGS should generally not be messed with, however.
3143
3144# XXX shouldn't some/most/all of this code be merged with the stuff later
3145# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003146{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3147$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003148
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003149# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003150if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003151 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003152 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003153 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003154 without_gcc=yes;;
3155 yes) CC=gcc
3156 without_gcc=no;;
3157 *) CC=$withval
3158 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003159 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003160else
Martin v. Löwis11437992002-04-12 09:54:03 +00003161
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003162 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003163 AIX*) CC=cc_r
3164 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003165 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003166 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003167fi
3168
Matthias Kloseb9621712010-04-24 17:59:49 +00003169{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3170$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003171
Guido van Rossum8b131c51995-03-09 14:10:13 +00003172# If the user switches compilers, we can't believe the cache
3173if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3174then
Matthias Kloseb9621712010-04-24 17:59:49 +00003175 as_fn_error "cached CC is different -- throw away $cache_file
3176(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003177fi
3178
Victor Stinner00d6a1d2010-03-25 01:02:29 +00003179save_CFLAGS=$CFLAGS
Martin v. Löwis11437992002-04-12 09:54:03 +00003180ac_ext=c
3181ac_cpp='$CPP $CPPFLAGS'
3182ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3183ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3184ac_compiler_gnu=$ac_cv_c_compiler_gnu
3185if test -n "$ac_tool_prefix"; then
3186 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3187set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003188{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3189$as_echo_n "checking for $ac_word... " >&6; }
3190if test "${ac_cv_prog_CC+set}" = set; then :
3191 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003192else
3193 if test -n "$CC"; then
3194 ac_cv_prog_CC="$CC" # Let the user override the test.
3195else
Martin v. Löwis11437992002-04-12 09:54:03 +00003196as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3197for as_dir in $PATH
3198do
3199 IFS=$as_save_IFS
3200 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003201 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003202 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 +00003203 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003204 $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 +00003205 break 2
3206 fi
3207done
Matthias Kloseb9621712010-04-24 17:59:49 +00003208 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003209IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003210
Jack Jansendd19cf82001-12-06 22:36:17 +00003211fi
3212fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003213CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003214if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003215 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3216$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003217else
Matthias Kloseb9621712010-04-24 17:59:49 +00003218 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3219$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003220fi
3221
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003222
Martin v. Löwis11437992002-04-12 09:54:03 +00003223fi
3224if test -z "$ac_cv_prog_CC"; then
3225 ac_ct_CC=$CC
3226 # Extract the first word of "gcc", so it can be a program name with args.
3227set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003228{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3229$as_echo_n "checking for $ac_word... " >&6; }
3230if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
3231 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003232else
3233 if test -n "$ac_ct_CC"; then
3234 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3235else
3236as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3237for as_dir in $PATH
3238do
3239 IFS=$as_save_IFS
3240 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003241 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003242 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 +00003243 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003244 $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 +00003245 break 2
3246 fi
3247done
Matthias Kloseb9621712010-04-24 17:59:49 +00003248 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003249IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003250
3251fi
3252fi
3253ac_ct_CC=$ac_cv_prog_ac_ct_CC
3254if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003255 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3256$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003257else
Matthias Kloseb9621712010-04-24 17:59:49 +00003258 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3259$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003260fi
3261
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003262 if test "x$ac_ct_CC" = x; then
3263 CC=""
3264 else
3265 case $cross_compiling:$ac_tool_warned in
3266yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003267{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3268$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003269ac_tool_warned=yes ;;
3270esac
3271 CC=$ac_ct_CC
3272 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003273else
3274 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003275fi
3276
Jack Jansendd19cf82001-12-06 22:36:17 +00003277if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003278 if test -n "$ac_tool_prefix"; then
3279 # 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 +00003280set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003281{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3282$as_echo_n "checking for $ac_word... " >&6; }
3283if test "${ac_cv_prog_CC+set}" = set; then :
3284 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003285else
3286 if test -n "$CC"; then
3287 ac_cv_prog_CC="$CC" # Let the user override the test.
3288else
Martin v. Löwis11437992002-04-12 09:54:03 +00003289as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3290for as_dir in $PATH
3291do
3292 IFS=$as_save_IFS
3293 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003294 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003295 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 +00003296 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003297 $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 +00003298 break 2
3299 fi
3300done
Matthias Kloseb9621712010-04-24 17:59:49 +00003301 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003302IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003303
3304fi
3305fi
3306CC=$ac_cv_prog_CC
3307if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003308 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3309$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003310else
Matthias Kloseb9621712010-04-24 17:59:49 +00003311 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3312$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003313fi
3314
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003315
Martin v. Löwis11437992002-04-12 09:54:03 +00003316 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003317fi
3318if test -z "$CC"; then
3319 # Extract the first word of "cc", so it can be a program name with args.
3320set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3322$as_echo_n "checking for $ac_word... " >&6; }
3323if test "${ac_cv_prog_CC+set}" = set; then :
3324 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003325else
3326 if test -n "$CC"; then
3327 ac_cv_prog_CC="$CC" # Let the user override the test.
3328else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003329 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003330as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3331for as_dir in $PATH
3332do
3333 IFS=$as_save_IFS
3334 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003335 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003336 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 +00003337 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3338 ac_prog_rejected=yes
3339 continue
3340 fi
3341 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003342 $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 +00003343 break 2
3344 fi
3345done
Matthias Kloseb9621712010-04-24 17:59:49 +00003346 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003347IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003348
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003349if test $ac_prog_rejected = yes; then
3350 # We found a bogon in the path, so make sure we never use it.
3351 set dummy $ac_cv_prog_CC
3352 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003353 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003354 # We chose a different compiler from the bogus one.
3355 # However, it has the same basename, so the bogon will be chosen
3356 # first if we set CC to just the basename; use the full file name.
3357 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003358 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003359 fi
3360fi
3361fi
3362fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003363CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003364if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3366$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003367else
Matthias Kloseb9621712010-04-24 17:59:49 +00003368 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3369$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003370fi
3371
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003372
Martin v. Löwis11437992002-04-12 09:54:03 +00003373fi
3374if test -z "$CC"; then
3375 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003376 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003377 do
3378 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3379set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003380{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3381$as_echo_n "checking for $ac_word... " >&6; }
3382if test "${ac_cv_prog_CC+set}" = set; then :
3383 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003384else
3385 if test -n "$CC"; then
3386 ac_cv_prog_CC="$CC" # Let the user override the test.
3387else
Martin v. Löwis11437992002-04-12 09:54:03 +00003388as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3389for as_dir in $PATH
3390do
3391 IFS=$as_save_IFS
3392 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003393 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003394 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 +00003395 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003396 $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 +00003397 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003398 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003399done
Matthias Kloseb9621712010-04-24 17:59:49 +00003400 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003401IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003402
3403fi
3404fi
3405CC=$ac_cv_prog_CC
3406if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003407 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3408$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003409else
Matthias Kloseb9621712010-04-24 17:59:49 +00003410 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3411$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003412fi
3413
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003414
Martin v. Löwis11437992002-04-12 09:54:03 +00003415 test -n "$CC" && break
3416 done
3417fi
3418if test -z "$CC"; then
3419 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003420 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003421do
3422 # Extract the first word of "$ac_prog", so it can be a program name with args.
3423set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003424{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3425$as_echo_n "checking for $ac_word... " >&6; }
3426if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
3427 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003428else
3429 if test -n "$ac_ct_CC"; then
3430 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3431else
3432as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3433for as_dir in $PATH
3434do
3435 IFS=$as_save_IFS
3436 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003437 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003438 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 +00003439 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003440 $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 +00003441 break 2
3442 fi
3443done
Matthias Kloseb9621712010-04-24 17:59:49 +00003444 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003445IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003446
Martin v. Löwis11437992002-04-12 09:54:03 +00003447fi
3448fi
3449ac_ct_CC=$ac_cv_prog_ac_ct_CC
3450if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003451 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3452$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003453else
Matthias Kloseb9621712010-04-24 17:59:49 +00003454 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3455$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003456fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003457
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003458
Martin v. Löwis11437992002-04-12 09:54:03 +00003459 test -n "$ac_ct_CC" && break
3460done
Michael W. Hudson54241132001-12-07 15:38:26 +00003461
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003462 if test "x$ac_ct_CC" = x; then
3463 CC=""
3464 else
3465 case $cross_compiling:$ac_tool_warned in
3466yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003467{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3468$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003469ac_tool_warned=yes ;;
3470esac
3471 CC=$ac_ct_CC
3472 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003473fi
3474
3475fi
3476
3477
Matthias Kloseb9621712010-04-24 17:59:49 +00003478test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3479$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3480as_fn_error "no acceptable C compiler found in \$PATH
3481See \`config.log' for more details." "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003482
3483# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003484$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3485set X $ac_compile
3486ac_compiler=$2
3487for ac_option in --version -v -V -qversion; do
3488 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003489case "(($ac_try" in
3490 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3491 *) ac_try_echo=$ac_try;;
3492esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003493eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3494$as_echo "$ac_try_echo"; } >&5
3495 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003496 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003497 if test -s conftest.err; then
3498 sed '10a\
3499... rest of stderr output deleted ...
3500 10q' conftest.err >conftest.er1
3501 cat conftest.er1 >&5
3502 fi
3503 rm -f conftest.er1 conftest.err
3504 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3505 test $ac_status = 0; }
3506done
Martin v. Löwis11437992002-04-12 09:54:03 +00003507
Matthias Kloseb9621712010-04-24 17:59:49 +00003508cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003509/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003510
Martin v. Löwis11437992002-04-12 09:54:03 +00003511int
3512main ()
3513{
3514
3515 ;
3516 return 0;
3517}
3518_ACEOF
3519ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003520ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003521# Try to create an executable without -o first, disregard a.out.
3522# It will help us diagnose broken compilers, and finding out an intuition
3523# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003524{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3525$as_echo_n "checking whether the C compiler works... " >&6; }
3526ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3527
3528# The possible output files:
3529ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3530
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003531ac_rmfiles=
3532for ac_file in $ac_files
3533do
3534 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003535 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003536 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3537 esac
3538done
3539rm -f $ac_rmfiles
3540
Matthias Kloseb9621712010-04-24 17:59:49 +00003541if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003542case "(($ac_try" in
3543 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3544 *) ac_try_echo=$ac_try;;
3545esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003546eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3547$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003548 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003549 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003550 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3551 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003552 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3553# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3554# in a Makefile. We should not override ac_cv_exeext if it was cached,
3555# so that the user can short-circuit this test for compilers unknown to
3556# Autoconf.
3557for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003558do
3559 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003560 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003561 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003562 ;;
3563 [ab].out )
3564 # We found the default executable, but exeext='' is most
3565 # certainly right.
3566 break;;
3567 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003568 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003569 then :; else
3570 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3571 fi
3572 # We set ac_cv_exeext here because the later test for it is not
3573 # safe: cross compilers may not add the suffix if given an `-o'
3574 # argument, so we may need to know it at that point already.
3575 # Even if this section looks crufty: it has the advantage of
3576 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003577 break;;
3578 * )
3579 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003580 esac
3581done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003582test "$ac_cv_exeext" = no && ac_cv_exeext=
3583
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003584else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003585 ac_file=''
3586fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003587if test -z "$ac_file"; then :
3588 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3589$as_echo "no" >&6; }
3590$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003591sed 's/^/| /' conftest.$ac_ext >&5
3592
Matthias Kloseb9621712010-04-24 17:59:49 +00003593{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3594$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3595{ as_fn_set_status 77
3596as_fn_error "C compiler cannot create executables
3597See \`config.log' for more details." "$LINENO" 5; }; }
3598else
3599 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3600$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003601fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003602{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3603$as_echo_n "checking for C compiler default output file name... " >&6; }
3604{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3605$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003606ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003607
Matthias Kloseb9621712010-04-24 17:59:49 +00003608rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003609ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00003610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3611$as_echo_n "checking for suffix of executables... " >&6; }
3612if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003613case "(($ac_try" in
3614 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3615 *) ac_try_echo=$ac_try;;
3616esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003617eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3618$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003619 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003620 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003621 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3622 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003623 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3624# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3625# work properly (i.e., refer to `conftest.exe'), while it won't with
3626# `rm'.
3627for ac_file in conftest.exe conftest conftest.*; do
3628 test -f "$ac_file" || continue
3629 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003630 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003631 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3632 break;;
3633 * ) break;;
3634 esac
3635done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003636else
Matthias Kloseb9621712010-04-24 17:59:49 +00003637 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3638$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3639as_fn_error "cannot compute suffix of executables: cannot compile and link
3640See \`config.log' for more details." "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003641fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003642rm -f conftest conftest$ac_cv_exeext
3643{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3644$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003645
3646rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003647EXEEXT=$ac_cv_exeext
3648ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003649cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3650/* end confdefs.h. */
3651#include <stdio.h>
3652int
3653main ()
3654{
3655FILE *f = fopen ("conftest.out", "w");
3656 return ferror (f) || fclose (f) != 0;
3657
3658 ;
3659 return 0;
3660}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003661_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003662ac_clean_files="$ac_clean_files conftest.out"
3663# Check that the compiler produces executables we can run. If not, either
3664# the compiler is broken, or we cross compile.
3665{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3666$as_echo_n "checking whether we are cross compiling... " >&6; }
3667if test "$cross_compiling" != yes; then
3668 { { ac_try="$ac_link"
3669case "(($ac_try" in
3670 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3671 *) ac_try_echo=$ac_try;;
3672esac
3673eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3674$as_echo "$ac_try_echo"; } >&5
3675 (eval "$ac_link") 2>&5
3676 ac_status=$?
3677 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3678 test $ac_status = 0; }
3679 if { ac_try='./conftest$ac_cv_exeext'
3680 { { case "(($ac_try" in
3681 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3682 *) ac_try_echo=$ac_try;;
3683esac
3684eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3685$as_echo "$ac_try_echo"; } >&5
3686 (eval "$ac_try") 2>&5
3687 ac_status=$?
3688 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3689 test $ac_status = 0; }; }; then
3690 cross_compiling=no
3691 else
3692 if test "$cross_compiling" = maybe; then
3693 cross_compiling=yes
3694 else
3695 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3696$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3697as_fn_error "cannot run C compiled programs.
3698If you meant to cross compile, use \`--host'.
3699See \`config.log' for more details." "$LINENO" 5; }
3700 fi
3701 fi
3702fi
3703{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3704$as_echo "$cross_compiling" >&6; }
3705
3706rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3707ac_clean_files=$ac_clean_files_save
3708{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3709$as_echo_n "checking for suffix of object files... " >&6; }
3710if test "${ac_cv_objext+set}" = set; then :
3711 $as_echo_n "(cached) " >&6
3712else
3713 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003714/* end confdefs.h. */
3715
3716int
3717main ()
3718{
3719
3720 ;
3721 return 0;
3722}
3723_ACEOF
3724rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00003725if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003726case "(($ac_try" in
3727 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3728 *) ac_try_echo=$ac_try;;
3729esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003730eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3731$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003732 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003733 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003734 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3735 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003736 for ac_file in conftest.o conftest.obj conftest.*; do
3737 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00003738 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003739 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003740 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3741 break;;
3742 esac
3743done
3744else
Matthias Kloseb9621712010-04-24 17:59:49 +00003745 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003746sed 's/^/| /' conftest.$ac_ext >&5
3747
Matthias Kloseb9621712010-04-24 17:59:49 +00003748{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3749$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3750as_fn_error "cannot compute suffix of object files: cannot compile
3751See \`config.log' for more details." "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003752fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003753rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003754fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003755{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3756$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003757OBJEXT=$ac_cv_objext
3758ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003759{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3760$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3761if test "${ac_cv_c_compiler_gnu+set}" = set; then :
3762 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003763else
Matthias Kloseb9621712010-04-24 17:59:49 +00003764 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003765/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003766
Martin v. Löwis11437992002-04-12 09:54:03 +00003767int
3768main ()
3769{
3770#ifndef __GNUC__
3771 choke me
3772#endif
3773
3774 ;
3775 return 0;
3776}
3777_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003778if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00003779 ac_compiler_gnu=yes
3780else
Matthias Kloseb9621712010-04-24 17:59:49 +00003781 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003782fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003783rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003784ac_cv_c_compiler_gnu=$ac_compiler_gnu
3785
3786fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003787{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3788$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3789if test $ac_compiler_gnu = yes; then
3790 GCC=yes
3791else
3792 GCC=
3793fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003794ac_test_CFLAGS=${CFLAGS+set}
3795ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00003796{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3797$as_echo_n "checking whether $CC accepts -g... " >&6; }
3798if test "${ac_cv_prog_cc_g+set}" = set; then :
3799 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003800else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003801 ac_save_c_werror_flag=$ac_c_werror_flag
3802 ac_c_werror_flag=yes
3803 ac_cv_prog_cc_g=no
3804 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00003805 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003806/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003807
Martin v. Löwis11437992002-04-12 09:54:03 +00003808int
3809main ()
3810{
3811
3812 ;
3813 return 0;
3814}
3815_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003816if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00003817 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003818else
Matthias Kloseb9621712010-04-24 17:59:49 +00003819 CFLAGS=""
3820 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003821/* end confdefs.h. */
3822
3823int
3824main ()
3825{
3826
3827 ;
3828 return 0;
3829}
3830_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003831if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003832
Matthias Kloseb9621712010-04-24 17:59:49 +00003833else
3834 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003835 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00003836 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003837/* end confdefs.h. */
3838
3839int
3840main ()
3841{
3842
3843 ;
3844 return 0;
3845}
3846_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003847if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003848 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00003849fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003850rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003851fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003852rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3853fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003854rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3855 ac_c_werror_flag=$ac_save_c_werror_flag
3856fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003857{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3858$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003859if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003860 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003861elif test $ac_cv_prog_cc_g = yes; then
3862 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003863 CFLAGS="-g -O2"
3864 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003865 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003866 fi
3867else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003868 if test "$GCC" = yes; then
3869 CFLAGS="-O2"
3870 else
3871 CFLAGS=
3872 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003873fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3875$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3876if test "${ac_cv_prog_cc_c89+set}" = set; then :
3877 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003878else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003879 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003880ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00003881cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003882/* end confdefs.h. */
3883#include <stdarg.h>
3884#include <stdio.h>
3885#include <sys/types.h>
3886#include <sys/stat.h>
3887/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3888struct buf { int x; };
3889FILE * (*rcsopen) (struct buf *, struct stat *, int);
3890static char *e (p, i)
3891 char **p;
3892 int i;
3893{
3894 return p[i];
3895}
3896static char *f (char * (*g) (char **, int), char **p, ...)
3897{
3898 char *s;
3899 va_list v;
3900 va_start (v,p);
3901 s = g (p, va_arg (v,int));
3902 va_end (v);
3903 return s;
3904}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003905
3906/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3907 function prototypes and stuff, but not '\xHH' hex character constants.
3908 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003909 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003910 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3911 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003912 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003913int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3914
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003915/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3916 inside strings and character constants. */
3917#define FOO(x) 'x'
3918int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3919
Skip Montanaro6dead952003-09-25 14:50:04 +00003920int test (int i, double x);
3921struct s1 {int (*f) (int a);};
3922struct s2 {int (*f) (double a);};
3923int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3924int argc;
3925char **argv;
3926int
3927main ()
3928{
3929return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3930 ;
3931 return 0;
3932}
3933_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003934for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3935 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003936do
3937 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00003938 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003939 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00003940fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003941rm -f core conftest.err conftest.$ac_objext
3942 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00003943done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003944rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003945CC=$ac_save_CC
3946
3947fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003948# AC_CACHE_VAL
3949case "x$ac_cv_prog_cc_c89" in
3950 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00003951 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3952$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003953 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00003954 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3955$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003956 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003957 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00003958 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3959$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003960esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003961if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00003962
Matthias Kloseb9621712010-04-24 17:59:49 +00003963fi
Skip Montanaro6dead952003-09-25 14:50:04 +00003964
Martin v. Löwis11437992002-04-12 09:54:03 +00003965ac_ext=c
3966ac_cpp='$CPP $CPPFLAGS'
3967ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3968ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3969ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003970
Victor Stinner00d6a1d2010-03-25 01:02:29 +00003971CFLAGS=$save_CFLAGS
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003972
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003973
3974
Matthias Kloseb9621712010-04-24 17:59:49 +00003975{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
3976$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003977
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003978# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003979if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003980 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003981
3982 case $withval in
3983 no) with_cxx_main=no
3984 MAINCC='$(CC)';;
3985 yes) with_cxx_main=yes
3986 MAINCC='$(CXX)';;
3987 *) with_cxx_main=yes
3988 MAINCC=$withval
3989 if test -z "$CXX"
3990 then
3991 CXX=$withval
3992 fi;;
3993 esac
3994else
3995
3996 with_cxx_main=no
3997 MAINCC='$(CC)'
3998
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003999fi
4000
Matthias Kloseb9621712010-04-24 17:59:49 +00004001{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4002$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004003
4004preset_cxx="$CXX"
4005if test -z "$CXX"
4006then
4007 case "$CC" in
4008 gcc) # Extract the first word of "g++", so it can be a program name with args.
4009set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004010{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4011$as_echo_n "checking for $ac_word... " >&6; }
4012if test "${ac_cv_path_CXX+set}" = set; then :
4013 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004014else
4015 case $CXX in
4016 [\\/]* | ?:[\\/]*)
4017 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4018 ;;
4019 *)
4020 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4021for as_dir in notfound
4022do
4023 IFS=$as_save_IFS
4024 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004025 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004026 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 +00004027 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004028 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004029 break 2
4030 fi
4031done
Matthias Kloseb9621712010-04-24 17:59:49 +00004032 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004033IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004034
4035 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
4036 ;;
4037esac
4038fi
4039CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004040if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004041 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4042$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004043else
Matthias Kloseb9621712010-04-24 17:59:49 +00004044 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4045$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004046fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004047
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004048 ;;
4049 cc) # Extract the first word of "c++", so it can be a program name with args.
4050set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004051{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4052$as_echo_n "checking for $ac_word... " >&6; }
4053if test "${ac_cv_path_CXX+set}" = set; then :
4054 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004055else
4056 case $CXX in
4057 [\\/]* | ?:[\\/]*)
4058 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4059 ;;
4060 *)
4061 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4062for as_dir in notfound
4063do
4064 IFS=$as_save_IFS
4065 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004066 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004067 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 +00004068 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004069 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004070 break 2
4071 fi
4072done
Matthias Kloseb9621712010-04-24 17:59:49 +00004073 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004074IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004075
4076 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
4077 ;;
4078esac
4079fi
4080CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004081if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004082 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4083$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004084else
Matthias Kloseb9621712010-04-24 17:59:49 +00004085 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4086$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004087fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004088
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004089 ;;
4090 esac
4091 if test "$CXX" = "notfound"
4092 then
4093 CXX=""
4094 fi
4095fi
4096if test -z "$CXX"
4097then
4098 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4099do
4100 # Extract the first word of "$ac_prog", so it can be a program name with args.
4101set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4103$as_echo_n "checking for $ac_word... " >&6; }
4104if test "${ac_cv_prog_CXX+set}" = set; then :
4105 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004106else
4107 if test -n "$CXX"; then
4108 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4109else
4110as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4111for as_dir in $PATH
4112do
4113 IFS=$as_save_IFS
4114 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004115 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004116 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 +00004117 ac_cv_prog_CXX="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00004118 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004119 break 2
4120 fi
4121done
Matthias Kloseb9621712010-04-24 17:59:49 +00004122 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004123IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004124
4125fi
4126fi
4127CXX=$ac_cv_prog_CXX
4128if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004129 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4130$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004131else
Matthias Kloseb9621712010-04-24 17:59:49 +00004132 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4133$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004134fi
4135
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004136
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004137 test -n "$CXX" && break
4138done
4139test -n "$CXX" || CXX="notfound"
4140
4141 if test "$CXX" = "notfound"
4142 then
4143 CXX=""
4144 fi
4145fi
4146if test "$preset_cxx" != "$CXX"
4147then
Matthias Kloseb9621712010-04-24 17:59:49 +00004148 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004149
4150 By default, distutils will build C++ extension modules with \"$CXX\".
4151 If this is not intended, then set CXX on the configure command line.
4152 " >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00004153$as_echo "$as_me: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004154
4155 By default, distutils will build C++ extension modules with \"$CXX\".
4156 If this is not intended, then set CXX on the configure command line.
4157 " >&2;}
4158fi
4159
4160
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004161# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004162
4163ac_ext=c
4164ac_cpp='$CPP $CPPFLAGS'
4165ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4166ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4167ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Kloseb9621712010-04-24 17:59:49 +00004168{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4169$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004170# On Suns, sometimes $CPP names a directory.
4171if test -n "$CPP" && test -d "$CPP"; then
4172 CPP=
4173fi
4174if test -z "$CPP"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004175 if test "${ac_cv_prog_CPP+set}" = set; then :
4176 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004177else
Martin v. Löwis11437992002-04-12 09:54:03 +00004178 # Double quotes because CPP needs to be expanded
4179 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4180 do
4181 ac_preproc_ok=false
4182for ac_c_preproc_warn_flag in '' yes
4183do
4184 # Use a header file that comes with gcc, so configuring glibc
4185 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004186 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4187 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004188 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004189 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004190 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004191/* end confdefs.h. */
4192#ifdef __STDC__
4193# include <limits.h>
4194#else
4195# include <assert.h>
4196#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004197 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004198_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004199if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004200
Matthias Kloseb9621712010-04-24 17:59:49 +00004201else
Martin v. Löwis11437992002-04-12 09:54:03 +00004202 # Broken: fails on valid input.
4203continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004204fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004205rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004206
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004207 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004208 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004209 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004210/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004211#include <ac_nonexistent.h>
4212_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004213if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004214 # Broken: success on invalid input.
4215continue
4216else
Martin v. Löwis11437992002-04-12 09:54:03 +00004217 # Passes both tests.
4218ac_preproc_ok=:
4219break
4220fi
4221rm -f conftest.err conftest.$ac_ext
4222
4223done
4224# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4225rm -f conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004226if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004227 break
4228fi
4229
4230 done
4231 ac_cv_prog_CPP=$CPP
4232
4233fi
4234 CPP=$ac_cv_prog_CPP
4235else
4236 ac_cv_prog_CPP=$CPP
4237fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004238{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4239$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004240ac_preproc_ok=false
4241for ac_c_preproc_warn_flag in '' yes
4242do
4243 # Use a header file that comes with gcc, so configuring glibc
4244 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004245 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4246 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004247 # On the NeXT, cc -E runs the code through the compiler's parser,
4248 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004249 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004250/* end confdefs.h. */
4251#ifdef __STDC__
4252# include <limits.h>
4253#else
4254# include <assert.h>
4255#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004256 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004257_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004258if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004259
Matthias Kloseb9621712010-04-24 17:59:49 +00004260else
Martin v. Löwis11437992002-04-12 09:54:03 +00004261 # Broken: fails on valid input.
4262continue
4263fi
4264rm -f conftest.err conftest.$ac_ext
4265
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004266 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004267 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004268 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004269/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004270#include <ac_nonexistent.h>
4271_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004272if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004273 # Broken: success on invalid input.
4274continue
4275else
Martin v. Löwis11437992002-04-12 09:54:03 +00004276 # Passes both tests.
4277ac_preproc_ok=:
4278break
4279fi
4280rm -f conftest.err conftest.$ac_ext
4281
4282done
4283# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4284rm -f conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004285if $ac_preproc_ok; then :
4286
Martin v. Löwis11437992002-04-12 09:54:03 +00004287else
Matthias Kloseb9621712010-04-24 17:59:49 +00004288 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4289$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4290as_fn_error "C preprocessor \"$CPP\" fails sanity check
4291See \`config.log' for more details." "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004292fi
4293
4294ac_ext=c
4295ac_cpp='$CPP $CPPFLAGS'
4296ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4297ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4298ac_compiler_gnu=$ac_cv_c_compiler_gnu
4299
4300
Matthias Kloseb9621712010-04-24 17:59:49 +00004301{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4302$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4303if test "${ac_cv_path_GREP+set}" = set; then :
4304 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004305else
Matthias Kloseb9621712010-04-24 17:59:49 +00004306 if test -z "$GREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004307 ac_path_GREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004308 # Loop through the user's path and test for each of PROGNAME-LIST
4309 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004310for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4311do
4312 IFS=$as_save_IFS
4313 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004314 for ac_prog in grep ggrep; do
4315 for ac_exec_ext in '' $ac_executable_extensions; do
4316 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4317 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
4318# Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004319 # Check for GNU $ac_path_GREP
4320case `"$ac_path_GREP" --version 2>&1` in
4321*GNU*)
4322 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4323*)
4324 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004325 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004326 while :
4327 do
4328 cat "conftest.in" "conftest.in" >"conftest.tmp"
4329 mv "conftest.tmp" "conftest.in"
4330 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00004331 $as_echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004332 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4333 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00004334 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004335 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4336 # Best one so far, save it but keep looking for a better one
4337 ac_cv_path_GREP="$ac_path_GREP"
4338 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00004339 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004340 # 10*(2^10) chars as input seems more than enough
4341 test $ac_count -gt 10 && break
4342 done
4343 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4344esac
4345
Matthias Kloseb9621712010-04-24 17:59:49 +00004346 $ac_path_GREP_found && break 3
4347 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004348 done
Matthias Kloseb9621712010-04-24 17:59:49 +00004349 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004350IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00004351 if test -z "$ac_cv_path_GREP"; then
4352 as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4353 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004354else
4355 ac_cv_path_GREP=$GREP
4356fi
4357
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004358fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004359{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4360$as_echo "$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004361 GREP="$ac_cv_path_GREP"
4362
4363
Matthias Kloseb9621712010-04-24 17:59:49 +00004364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4365$as_echo_n "checking for egrep... " >&6; }
4366if test "${ac_cv_path_EGREP+set}" = set; then :
4367 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004368else
4369 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4370 then ac_cv_path_EGREP="$GREP -E"
4371 else
Matthias Kloseb9621712010-04-24 17:59:49 +00004372 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004373 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004374 # Loop through the user's path and test for each of PROGNAME-LIST
4375 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004376for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4377do
4378 IFS=$as_save_IFS
4379 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004380 for ac_prog in egrep; do
4381 for ac_exec_ext in '' $ac_executable_extensions; do
4382 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4383 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
4384# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004385 # Check for GNU $ac_path_EGREP
4386case `"$ac_path_EGREP" --version 2>&1` in
4387*GNU*)
4388 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4389*)
4390 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004391 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004392 while :
4393 do
4394 cat "conftest.in" "conftest.in" >"conftest.tmp"
4395 mv "conftest.tmp" "conftest.in"
4396 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00004397 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004398 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4399 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00004400 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004401 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4402 # Best one so far, save it but keep looking for a better one
4403 ac_cv_path_EGREP="$ac_path_EGREP"
4404 ac_path_EGREP_max=$ac_count
4405 fi
4406 # 10*(2^10) chars as input seems more than enough
4407 test $ac_count -gt 10 && break
4408 done
4409 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4410esac
4411
Matthias Kloseb9621712010-04-24 17:59:49 +00004412 $ac_path_EGREP_found && break 3
4413 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004414 done
Matthias Kloseb9621712010-04-24 17:59:49 +00004415 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004416IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00004417 if test -z "$ac_cv_path_EGREP"; then
4418 as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4419 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004420else
4421 ac_cv_path_EGREP=$EGREP
4422fi
4423
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004424 fi
4425fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004426{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4427$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004428 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00004429
4430
Matthias Kloseb9621712010-04-24 17:59:49 +00004431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4432$as_echo_n "checking for ANSI C header files... " >&6; }
4433if test "${ac_cv_header_stdc+set}" = set; then :
4434 $as_echo_n "(cached) " >&6
4435else
4436 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004437/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00004438#include <stdlib.h>
4439#include <stdarg.h>
4440#include <string.h>
4441#include <float.h>
4442
4443int
4444main ()
4445{
4446
4447 ;
4448 return 0;
4449}
4450_ACEOF
4451if ac_fn_c_try_compile "$LINENO"; then :
4452 ac_cv_header_stdc=yes
4453else
4454 ac_cv_header_stdc=no
4455fi
4456rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4457
4458if test $ac_cv_header_stdc = yes; then
4459 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4460 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4461/* end confdefs.h. */
4462#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004463
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004464_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004465if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00004466 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004467
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004468else
Matthias Kloseb9621712010-04-24 17:59:49 +00004469 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004470fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00004471rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004472
Matthias Kloseb9621712010-04-24 17:59:49 +00004473fi
4474
4475if test $ac_cv_header_stdc = yes; then
4476 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4477 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4478/* end confdefs.h. */
4479#include <stdlib.h>
4480
4481_ACEOF
4482if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4483 $EGREP "free" >/dev/null 2>&1; then :
4484
4485else
4486 ac_cv_header_stdc=no
4487fi
4488rm -f conftest*
4489
4490fi
4491
4492if test $ac_cv_header_stdc = yes; then
4493 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4494 if test "$cross_compiling" = yes; then :
4495 :
4496else
4497 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4498/* end confdefs.h. */
4499#include <ctype.h>
4500#include <stdlib.h>
4501#if ((' ' & 0x0FF) == 0x020)
4502# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4503# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4504#else
4505# define ISLOWER(c) \
4506 (('a' <= (c) && (c) <= 'i') \
4507 || ('j' <= (c) && (c) <= 'r') \
4508 || ('s' <= (c) && (c) <= 'z'))
4509# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4510#endif
4511
4512#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4513int
4514main ()
4515{
4516 int i;
4517 for (i = 0; i < 256; i++)
4518 if (XOR (islower (i), ISLOWER (i))
4519 || toupper (i) != TOUPPER (i))
4520 return 2;
4521 return 0;
4522}
4523_ACEOF
4524if ac_fn_c_try_run "$LINENO"; then :
4525
4526else
4527 ac_cv_header_stdc=no
4528fi
4529rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4530 conftest.$ac_objext conftest.beam conftest.$ac_ext
4531fi
4532
4533fi
4534fi
4535{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4536$as_echo "$ac_cv_header_stdc" >&6; }
4537if test $ac_cv_header_stdc = yes; then
4538
4539$as_echo "#define STDC_HEADERS 1" >>confdefs.h
4540
4541fi
4542
4543# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4544for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4545 inttypes.h stdint.h unistd.h
4546do :
4547 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4548ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4549"
4550eval as_val=\$$as_ac_Header
4551 if test "x$as_val" = x""yes; then :
4552 cat >>confdefs.h <<_ACEOF
4553#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4554_ACEOF
4555
4556fi
4557
4558done
4559
4560
4561
4562 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
4563if test "x$ac_cv_header_minix_config_h" = x""yes; then :
4564 MINIX=yes
4565else
4566 MINIX=
4567fi
4568
4569
4570 if test "$MINIX" = yes; then
4571
4572$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4573
4574
4575$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4576
4577
4578$as_echo "#define _MINIX 1" >>confdefs.h
4579
4580 fi
4581
4582
4583 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4584$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
4585if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
4586 $as_echo_n "(cached) " >&6
4587else
4588 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4589/* end confdefs.h. */
4590
4591# define __EXTENSIONS__ 1
4592 $ac_includes_default
4593int
4594main ()
4595{
4596
4597 ;
4598 return 0;
4599}
4600_ACEOF
4601if ac_fn_c_try_compile "$LINENO"; then :
4602 ac_cv_safe_to_define___extensions__=yes
4603else
4604 ac_cv_safe_to_define___extensions__=no
4605fi
4606rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4607fi
4608{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4609$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4610 test $ac_cv_safe_to_define___extensions__ = yes &&
4611 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4612
4613 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4614
4615 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4616
4617 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4618
4619 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4620
4621
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004622
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004623# Check for unsupported systems
4624case $ac_sys_system/$ac_sys_release in
4625atheos*|Linux*/1*)
4626 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
4627 echo See README for details.
4628 exit 1;;
4629esac
4630
4631
Matthias Kloseb9621712010-04-24 17:59:49 +00004632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
4633$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004634
4635# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004636if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004637 withval=$with_suffix;
4638 case $withval in
4639 no) EXEEXT=;;
4640 yes) EXEEXT=.exe;;
4641 *) EXEEXT=$withval;;
4642 esac
4643fi
4644
Matthias Kloseb9621712010-04-24 17:59:49 +00004645{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
4646$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004647
4648# Test whether we're running on a non-case-sensitive system, in which
4649# case we give a warning if no ext is given
4650
Matthias Kloseb9621712010-04-24 17:59:49 +00004651{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
4652$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004653if test ! -d CaseSensitiveTestDir; then
4654mkdir CaseSensitiveTestDir
4655fi
4656
4657if test -d casesensitivetestdir
4658then
Matthias Kloseb9621712010-04-24 17:59:49 +00004659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4660$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004661 BUILDEXEEXT=.exe
4662else
Matthias Kloseb9621712010-04-24 17:59:49 +00004663 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4664$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004665 BUILDEXEEXT=$EXEEXT
4666fi
4667rmdir CaseSensitiveTestDir
4668
4669case $MACHDEP in
4670bsdos*)
4671 case $CC in
4672 gcc) CC="$CC -D_HAVE_BSDI";;
4673 esac;;
4674esac
4675
4676case $ac_sys_system in
4677hp*|HP*)
4678 case $CC in
4679 cc|*/cc) CC="$CC -Ae";;
4680 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004681esac
4682
4683
4684
Matthias Kloseb9621712010-04-24 17:59:49 +00004685{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
4686$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004687if test -z "$LIBRARY"
4688then
4689 LIBRARY='libpython$(VERSION).a'
4690fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004691{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
4692$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004693
4694# LDLIBRARY is the name of the library to link against (as opposed to the
4695# name of the library into which to insert object files). BLDLIBRARY is also
4696# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
4697# is blank as the main program is not linked directly against LDLIBRARY.
4698# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
4699# systems without shared libraries, LDLIBRARY is the same as LIBRARY
4700# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
4701# DLLLIBRARY is the shared (i.e., DLL) library.
4702#
4703# RUNSHARED is used to run shared python without installed libraries
4704#
4705# INSTSONAME is the name of the shared library that will be use to install
4706# on the system - some systems like version suffix, others don't
4707
4708
4709
4710
4711
4712
4713LDLIBRARY="$LIBRARY"
4714BLDLIBRARY='$(LDLIBRARY)'
4715INSTSONAME='$(LDLIBRARY)'
4716DLLLIBRARY=''
4717LDLIBRARYDIR=''
4718RUNSHARED=''
4719
4720# LINKCC is the command that links the python executable -- default is $(CC).
4721# If CXX is set, and if it is needed to link a main function that was
4722# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
4723# python might then depend on the C++ runtime
4724# This is altered for AIX in order to build the export list before
4725# linking.
4726
Matthias Kloseb9621712010-04-24 17:59:49 +00004727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
4728$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004729if test -z "$LINKCC"
4730then
4731 LINKCC='$(PURIFY) $(MAINCC)'
4732 case $ac_sys_system in
4733 AIX*)
4734 exp_extra="\"\""
4735 if test $ac_sys_release -ge 5 -o \
4736 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
4737 exp_extra="."
4738 fi
4739 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004740 QNX*)
4741 # qcc must be used because the other compilers do not
4742 # support -N.
4743 LINKCC=qcc;;
4744 esac
4745fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004746{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
4747$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004748
4749# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
4750# make sure we default having it set to "no": this is used by
4751# distutils.unixccompiler to know if it should add --enable-new-dtags
4752# to linker command lines, and failing to detect GNU ld simply results
4753# in the same bahaviour as before.
4754
Matthias Kloseb9621712010-04-24 17:59:49 +00004755{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
4756$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004757ac_prog=ld
4758if test "$GCC" = yes; then
4759 ac_prog=`$CC -print-prog-name=ld`
4760fi
4761case `"$ac_prog" -V 2>&1 < /dev/null` in
4762 *GNU*)
4763 GNULD=yes;;
4764 *)
4765 GNULD=no;;
4766esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004767{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
4768$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004769
Matthias Kloseb9621712010-04-24 17:59:49 +00004770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
4771$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004772# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004773if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004774 enableval=$enable_shared;
4775fi
4776
4777
4778if test -z "$enable_shared"
4779then
4780 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00004781 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004782 enable_shared="yes";;
4783 *)
4784 enable_shared="no";;
4785 esac
4786fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004787{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
4788$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004789
Matthias Kloseb9621712010-04-24 17:59:49 +00004790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
4791$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004792# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004793if test "${enable_profiling+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004794 enableval=$enable_profiling; ac_save_cc="$CC"
4795 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004796 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004797 ac_enable_profiling="no"
4798else
Matthias Kloseb9621712010-04-24 17:59:49 +00004799 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004800/* end confdefs.h. */
4801int main() { return 0; }
4802_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004803if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004804 ac_enable_profiling="yes"
4805else
Matthias Kloseb9621712010-04-24 17:59:49 +00004806 ac_enable_profiling="no"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004807fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004808rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4809 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004810fi
4811
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004812 CC="$ac_save_cc"
4813fi
4814
Matthias Kloseb9621712010-04-24 17:59:49 +00004815{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_profiling" >&5
4816$as_echo "$ac_enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004817
4818case "$ac_enable_profiling" in
4819 "yes")
4820 BASECFLAGS="-pg $BASECFLAGS"
4821 LDFLAGS="-pg $LDFLAGS"
4822 ;;
4823esac
4824
Matthias Kloseb9621712010-04-24 17:59:49 +00004825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
4826$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004827
4828# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4829# library that we build, but we do not want to link against it (we
4830# will find it with a -framework option). For this reason there is an
4831# extra variable BLDLIBRARY against which Python and the extension
4832# modules are linked, BLDLIBRARY. This is normally the same as
4833# LDLIBRARY, but empty for MacOSX framework builds.
4834if test "$enable_framework"
4835then
4836 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
4837 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
4838 BLDLIBRARY=''
4839else
4840 BLDLIBRARY='$(LDLIBRARY)'
4841fi
4842
4843# Other platforms follow
4844if test $enable_shared = "yes"; then
4845
Matthias Kloseb9621712010-04-24 17:59:49 +00004846$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004847
4848 case $ac_sys_system in
4849 CYGWIN*)
4850 LDLIBRARY='libpython$(VERSION).dll.a'
4851 DLLLIBRARY='libpython$(VERSION).dll'
4852 ;;
4853 SunOS*)
4854 LDLIBRARY='libpython$(VERSION).so'
4855 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
4856 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4857 INSTSONAME="$LDLIBRARY".$SOVERSION
4858 ;;
4859 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
4860 LDLIBRARY='libpython$(VERSION).so'
4861 BLDLIBRARY='-L. -lpython$(VERSION)'
4862 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4863 case $ac_sys_system in
4864 FreeBSD*)
4865 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4866 ;;
4867 esac
4868 INSTSONAME="$LDLIBRARY".$SOVERSION
4869 ;;
4870 hp*|HP*)
4871 case `uname -m` in
4872 ia64)
4873 LDLIBRARY='libpython$(VERSION).so'
4874 ;;
4875 *)
4876 LDLIBRARY='libpython$(VERSION).sl'
4877 ;;
4878 esac
4879 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
4880 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
4881 ;;
4882 OSF*)
4883 LDLIBRARY='libpython$(VERSION).so'
4884 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
4885 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4886 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004887 Darwin*)
4888 LDLIBRARY='libpython$(VERSION).dylib'
4889 BLDLIBRARY='-L. -lpython$(VERSION)'
4890 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
4891 ;;
4892
4893 esac
4894else # shared is disabled
4895 case $ac_sys_system in
4896 CYGWIN*)
4897 BLDLIBRARY='$(LIBRARY)'
4898 LDLIBRARY='libpython$(VERSION).dll.a'
4899 ;;
4900 esac
4901fi
4902
Matthias Kloseb9621712010-04-24 17:59:49 +00004903{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
4904$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004905
4906if test -n "$ac_tool_prefix"; then
4907 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4908set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004909{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4910$as_echo_n "checking for $ac_word... " >&6; }
4911if test "${ac_cv_prog_RANLIB+set}" = set; then :
4912 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004913else
4914 if test -n "$RANLIB"; then
4915 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4916else
4917as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4918for as_dir in $PATH
4919do
4920 IFS=$as_save_IFS
4921 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004922 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004923 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4924 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00004925 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004926 break 2
4927 fi
4928done
Matthias Kloseb9621712010-04-24 17:59:49 +00004929 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004930IFS=$as_save_IFS
4931
4932fi
4933fi
4934RANLIB=$ac_cv_prog_RANLIB
4935if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004936 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
4937$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004938else
Matthias Kloseb9621712010-04-24 17:59:49 +00004939 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4940$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004941fi
4942
4943
4944fi
4945if test -z "$ac_cv_prog_RANLIB"; then
4946 ac_ct_RANLIB=$RANLIB
4947 # Extract the first word of "ranlib", so it can be a program name with args.
4948set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004949{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4950$as_echo_n "checking for $ac_word... " >&6; }
4951if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
4952 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004953else
4954 if test -n "$ac_ct_RANLIB"; then
4955 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4956else
4957as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4958for as_dir in $PATH
4959do
4960 IFS=$as_save_IFS
4961 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004962 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004963 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4964 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00004965 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004966 break 2
4967 fi
4968done
Matthias Kloseb9621712010-04-24 17:59:49 +00004969 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004970IFS=$as_save_IFS
4971
4972fi
4973fi
4974ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4975if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004976 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
4977$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004978else
Matthias Kloseb9621712010-04-24 17:59:49 +00004979 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4980$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004981fi
4982
4983 if test "x$ac_ct_RANLIB" = x; then
4984 RANLIB=":"
4985 else
4986 case $cross_compiling:$ac_tool_warned in
4987yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00004988{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4989$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004990ac_tool_warned=yes ;;
4991esac
4992 RANLIB=$ac_ct_RANLIB
4993 fi
4994else
4995 RANLIB="$ac_cv_prog_RANLIB"
4996fi
4997
4998
4999for ac_prog in ar aal
5000do
5001 # Extract the first word of "$ac_prog", so it can be a program name with args.
5002set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005003{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5004$as_echo_n "checking for $ac_word... " >&6; }
5005if test "${ac_cv_prog_AR+set}" = set; then :
5006 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005007else
5008 if test -n "$AR"; then
5009 ac_cv_prog_AR="$AR" # Let the user override the test.
5010else
5011as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5012for as_dir in $PATH
5013do
5014 IFS=$as_save_IFS
5015 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005016 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005017 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5018 ac_cv_prog_AR="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005019 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005020 break 2
5021 fi
5022done
Matthias Kloseb9621712010-04-24 17:59:49 +00005023 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005024IFS=$as_save_IFS
5025
5026fi
5027fi
5028AR=$ac_cv_prog_AR
5029if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005030 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5031$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005032else
Matthias Kloseb9621712010-04-24 17:59:49 +00005033 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5034$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005035fi
5036
5037
5038 test -n "$AR" && break
5039done
5040test -n "$AR" || AR="ar"
5041
5042
5043# tweak ARFLAGS only if the user didn't set it on the command line
5044
5045if test -z "$ARFLAGS"
5046then
5047 ARFLAGS="rc"
5048fi
5049
5050
5051# Extract the first word of "svnversion", so it can be a program name with args.
5052set dummy svnversion; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5054$as_echo_n "checking for $ac_word... " >&6; }
5055if test "${ac_cv_prog_SVNVERSION+set}" = set; then :
5056 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005057else
5058 if test -n "$SVNVERSION"; then
5059 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
5060else
5061as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5062for as_dir in $PATH
5063do
5064 IFS=$as_save_IFS
5065 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005066 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005067 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5068 ac_cv_prog_SVNVERSION="found"
Matthias Kloseb9621712010-04-24 17:59:49 +00005069 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005070 break 2
5071 fi
5072done
Matthias Kloseb9621712010-04-24 17:59:49 +00005073 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005074IFS=$as_save_IFS
5075
5076 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
5077fi
5078fi
5079SVNVERSION=$ac_cv_prog_SVNVERSION
5080if test -n "$SVNVERSION"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005081 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SVNVERSION" >&5
5082$as_echo "$SVNVERSION" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005083else
Matthias Kloseb9621712010-04-24 17:59:49 +00005084 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5085$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005086fi
5087
5088
5089if test $SVNVERSION = found
5090then
5091 SVNVERSION="svnversion \$(srcdir)"
5092else
5093 SVNVERSION="echo Unversioned directory"
5094fi
5095
5096case $MACHDEP in
5097bsdos*|hp*|HP*)
5098 # install -d does not work on BSDI or HP-UX
5099 if test -z "$INSTALL"
5100 then
5101 INSTALL="${srcdir}/install-sh -c"
5102 fi
5103esac
5104ac_aux_dir=
5105for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
Matthias Kloseb9621712010-04-24 17:59:49 +00005106 for ac_t in install-sh install.sh shtool; do
5107 if test -f "$ac_dir/$ac_t"; then
5108 ac_aux_dir=$ac_dir
5109 ac_install_sh="$ac_aux_dir/$ac_t -c"
5110 break 2
5111 fi
5112 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005113done
5114if test -z "$ac_aux_dir"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005115 as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005116fi
5117
5118# These three variables are undocumented and unsupported,
5119# and are intended to be withdrawn in a future Autoconf release.
5120# They can cause serious problems if a builder's source tree is in a directory
5121# whose full name contains unusual characters.
5122ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
5123ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
5124ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
5125
5126
5127# Find a good install program. We prefer a C program (faster),
5128# so one script is as good as another. But avoid the broken or
5129# incompatible versions:
5130# SysV /etc/install, /usr/sbin/install
5131# SunOS /usr/etc/install
5132# IRIX /sbin/install
5133# AIX /bin/install
5134# AmigaOS /C/install, which installs bootblocks on floppy discs
5135# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5136# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5137# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5138# OS/2's system install, which has a completely different semantic
5139# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00005140# Reject install programs that cannot install multiple files.
5141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
5142$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005143if test -z "$INSTALL"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005144if test "${ac_cv_path_install+set}" = set; then :
5145 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005146else
5147 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5148for as_dir in $PATH
5149do
5150 IFS=$as_save_IFS
5151 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005152 # Account for people who put trailing slashes in PATH elements.
5153case $as_dir/ in #((
5154 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005155 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00005156 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005157 /usr/ucb/* ) ;;
5158 *)
5159 # OSF1 and SCO ODT 3.0 have their own names for install.
5160 # Don't use installbsd from OSF since it installs stuff as root
5161 # by default.
5162 for ac_prog in ginstall scoinst install; do
5163 for ac_exec_ext in '' $ac_executable_extensions; do
5164 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
5165 if test $ac_prog = install &&
5166 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5167 # AIX install. It has an incompatible calling convention.
5168 :
5169 elif test $ac_prog = install &&
5170 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5171 # program-specific install script used by HP pwplus--don't use.
5172 :
5173 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005174 rm -rf conftest.one conftest.two conftest.dir
5175 echo one > conftest.one
5176 echo two > conftest.two
5177 mkdir conftest.dir
5178 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5179 test -s conftest.one && test -s conftest.two &&
5180 test -s conftest.dir/conftest.one &&
5181 test -s conftest.dir/conftest.two
5182 then
5183 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5184 break 3
5185 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005186 fi
5187 fi
5188 done
5189 done
5190 ;;
5191esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005192
5193 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005194IFS=$as_save_IFS
5195
Matthias Kloseb9621712010-04-24 17:59:49 +00005196rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005197
5198fi
5199 if test "${ac_cv_path_install+set}" = set; then
5200 INSTALL=$ac_cv_path_install
5201 else
5202 # As a last resort, use the slow shell script. Don't cache a
5203 # value for INSTALL within a source directory, because that will
5204 # break other packages using the cache if that directory is
5205 # removed, or if the value is a relative name.
5206 INSTALL=$ac_install_sh
5207 fi
5208fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005209{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
5210$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005211
5212# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5213# It thinks the first close brace ends the variable substitution.
5214test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5215
5216test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
5217
5218test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5219
5220
5221# Not every filesystem supports hard links
5222
5223if test -z "$LN" ; then
5224 case $ac_sys_system in
5225 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005226 *) LN=ln;;
5227 esac
5228fi
5229
5230# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00005231{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
5232$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005233
5234# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005235if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005236 withval=$with_pydebug;
5237if test "$withval" != no
5238then
5239
Matthias Kloseb9621712010-04-24 17:59:49 +00005240$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005241
Matthias Kloseb9621712010-04-24 17:59:49 +00005242 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5243$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005244 Py_DEBUG='true'
Matthias Kloseb9621712010-04-24 17:59:49 +00005245else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5246$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005247fi
5248else
Matthias Kloseb9621712010-04-24 17:59:49 +00005249 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5250$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005251fi
5252
5253
5254# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
5255# merged with this chunk of code?
5256
5257# Optimizer/debugger flags
5258# ------------------------
5259# (The following bit of code is complicated enough - please keep things
5260# indented properly. Just pretend you're editing Python code. ;-)
5261
5262# There are two parallel sets of case statements below, one that checks to
5263# see if OPT was set and one that does BASECFLAGS setting based upon
5264# compiler and platform. BASECFLAGS tweaks need to be made even if the
5265# user set OPT.
5266
5267# tweak OPT based on compiler and platform, only if the user didn't set
5268# it on the command line
5269
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00005270if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005271then
5272 case $GCC in
5273 yes)
5274 if test "$CC" != 'g++' ; then
5275 STRICT_PROTO="-Wstrict-prototypes"
5276 fi
5277 # For gcc 4.x we need to use -fwrapv so lets check if its supported
5278 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
5279 WRAP="-fwrapv"
5280 fi
5281 case $ac_cv_prog_cc_g in
5282 yes)
5283 if test "$Py_DEBUG" = 'true' ; then
5284 # Optimization messes up debuggers, so turn it off for
5285 # debug builds.
5286 OPT="-g -Wall $STRICT_PROTO"
5287 else
5288 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
5289 fi
5290 ;;
5291 *)
5292 OPT="-O3 -Wall $STRICT_PROTO"
5293 ;;
5294 esac
5295 case $ac_sys_system in
5296 SCO_SV*) OPT="$OPT -m486 -DSCO5"
5297 ;;
5298 esac
5299 ;;
5300
5301 *)
5302 OPT="-O"
5303 ;;
5304 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005305fi
5306
5307
5308
5309# The -arch flags for universal builds on OSX
5310UNIVERSAL_ARCH_FLAGS=
5311
5312
5313# tweak BASECFLAGS based on compiler and platform
5314case $GCC in
5315yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005316 # Python doesn't violate C99 aliasing rules, but older versions of
5317 # GCC produce warnings for legal Python code. Enable
5318 # -fno-strict-aliasing on versions of GCC that support but produce
5319 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00005320 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
5321$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005322 ac_save_cc="$CC"
5323 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005324 save_CFLAGS="$CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +00005325 if test "${ac_cv_no_strict_aliasing+set}" = set; then :
5326 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00005327else
Matthias Kloseb9621712010-04-24 17:59:49 +00005328 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005329/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005330
Matthias Kloseb159a552010-04-25 21:00:44 +00005331
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005332int
5333main ()
5334{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005335int main() { return 0; }
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005336 ;
5337 return 0;
5338}
Matthias Kloseb159a552010-04-25 21:00:44 +00005339
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005340_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005341if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00005342
5343 CC="$ac_save_cc -fstrict-aliasing"
5344 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
5345 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005346/* end confdefs.h. */
5347
Matthias Kloseb159a552010-04-25 21:00:44 +00005348
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005349int
5350main ()
5351{
5352void f(int **x) {} int main() { double *x; f((int **) &x); return 0; }
5353 ;
5354 return 0;
5355}
Matthias Kloseb159a552010-04-25 21:00:44 +00005356
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005357_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005358if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00005359
5360 ac_cv_no_strict_aliasing=no
5361
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005362else
Matthias Kloseb159a552010-04-25 21:00:44 +00005363
5364 ac_cv_no_strict_aliasing=yes
5365
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005366fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005367rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00005368
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005369else
Matthias Kloseb159a552010-04-25 21:00:44 +00005370
5371 ac_cv_no_strict_aliasing=no
5372
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005373fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005374rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00005375fi
5376
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005377 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005378 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00005379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
5380$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005381 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005382 then
5383 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
5384 fi
5385
5386 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
5387 # support. Without this, treatment of subnormals doesn't follow
5388 # the standard.
5389 case $ac_sys_machine in
5390 alpha*)
5391 BASECFLAGS="$BASECFLAGS -mieee"
5392 ;;
5393 esac
5394
5395 case $ac_sys_system in
5396 SCO_SV*)
5397 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
5398 ;;
5399 # is there any other compiler on Darwin besides gcc?
5400 Darwin*)
5401 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
5402 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussoren666028b2010-04-18 19:07:43 +00005403 if test "${CC}" = gcc
5404 then
Matthias Kloseb9621712010-04-24 17:59:49 +00005405 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
5406$as_echo_n "checking which compiler should be used... " >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00005407 case "${UNIVERSALSDK}" in
5408 */MacOSX10.4u.sdk)
5409 # Build using 10.4 SDK, force usage of gcc when the
5410 # compiler is gcc, otherwise the user will get very
5411 # confusing error messages when building on OSX 10.6
5412 CC=gcc-4.0
5413 CPP=cpp-4.0
5414 ;;
5415 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005416 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5417$as_echo "$CC" >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00005418 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005419
5420
5421 if test "${enable_universalsdk}"; then
5422 UNIVERSAL_ARCH_FLAGS=""
5423 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
5424 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
5425 ARCH_RUN_32BIT=""
Benjamin Peterson99f03762010-04-11 22:15:28 +00005426 LIPO_32BIT_FLAGS=""
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005427 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
5428 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005429 LIPO_32BIT_FLAGS=""
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005430 ARCH_RUN_32BIT="true"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005431
5432 elif test "$UNIVERSAL_ARCHS" = "all" ; then
5433 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005434 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005435 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005436
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005437 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
5438 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005439 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005440 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005441
5442 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
5443 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005444 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005445 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005446
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005447 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005448 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 +00005449
5450 fi
5451
5452
Ronald Oussoren666028b2010-04-18 19:07:43 +00005453 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
5454 if test "${UNIVERSALSDK}" != "/"
5455 then
5456 CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
5457 LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren712979d2010-04-20 19:51:33 +00005458 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005459 fi
5460 fi
5461
5462 # Calculate the right deployment target for this build.
5463 #
5464 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
5465 if test ${cur_target} '>' 10.2; then
5466 cur_target=10.3
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005467 if test ${enable_universalsdk}; then
5468 if test "${UNIVERSAL_ARCHS}" = "all"; then
5469 # Ensure that the default platform for a
5470 # 4-way universal build is OSX 10.5,
5471 # that's the first OS release where
5472 # 4-way builds make sense.
5473 cur_target='10.5'
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005474
5475 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
5476 cur_target='10.5'
5477
5478 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
5479 cur_target='10.5'
5480
5481 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
5482 cur_target='10.5'
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005483 fi
5484 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00005485 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005486 # On Intel macs default to a deployment
5487 # target of 10.4, that's the first OSX
5488 # release with Intel support.
5489 cur_target="10.4"
5490 fi
5491 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005492 fi
5493 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
5494
5495 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
5496 # environment with a value that is the same as what we'll use
5497 # in the Makefile to ensure that we'll get the same compiler
5498 # environment during configure and build time.
5499 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
5500 export MACOSX_DEPLOYMENT_TARGET
5501 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
5502
5503 ;;
5504 OSF*)
5505 BASECFLAGS="$BASECFLAGS -mieee"
5506 ;;
5507 esac
5508 ;;
5509
5510*)
5511 case $ac_sys_system in
5512 OpenUNIX*|UnixWare*)
5513 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
5514 ;;
5515 OSF*)
5516 BASECFLAGS="$BASECFLAGS -ieee -std"
5517 ;;
5518 SCO_SV*)
5519 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
5520 ;;
5521 esac
5522 ;;
5523esac
5524
5525if test "$Py_DEBUG" = 'true'; then
5526 :
5527else
5528 OPT="-DNDEBUG $OPT"
5529fi
5530
5531if test "$ac_arch_flags"
5532then
5533 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
5534fi
5535
5536# disable check for icc since it seems to pass, but generates a warning
5537if test "$CC" = icc
5538then
5539 ac_cv_opt_olimit_ok=no
5540fi
5541
Matthias Kloseb9621712010-04-24 17:59:49 +00005542{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -OPT:Olimit=0" >&5
5543$as_echo_n "checking whether $CC accepts -OPT:Olimit=0... " >&6; }
5544if test "${ac_cv_opt_olimit_ok+set}" = set; then :
5545 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005546else
5547 ac_save_cc="$CC"
5548CC="$CC -OPT:Olimit=0"
Matthias Kloseb9621712010-04-24 17:59:49 +00005549cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005550/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005551
5552int
5553main ()
5554{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005555int main() { return 0; }
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005556 ;
5557 return 0;
5558}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005559_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005560if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005561 ac_cv_opt_olimit_ok=yes
5562else
Matthias Kloseb9621712010-04-24 17:59:49 +00005563 ac_cv_opt_olimit_ok=no
Matthias Kloseb159a552010-04-25 21:00:44 +00005564
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005565fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005566rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005567CC="$ac_save_cc"
5568fi
5569
Matthias Kloseb9621712010-04-24 17:59:49 +00005570{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_opt_olimit_ok" >&5
5571$as_echo "$ac_cv_opt_olimit_ok" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005572if test $ac_cv_opt_olimit_ok = yes; then
5573 case $ac_sys_system in
5574 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
5575 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
5576 # environment?
5577 Darwin*)
5578 ;;
5579 *)
5580 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
5581 ;;
5582 esac
5583else
Matthias Kloseb9621712010-04-24 17:59:49 +00005584 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Olimit 1500" >&5
5585$as_echo_n "checking whether $CC accepts -Olimit 1500... " >&6; }
5586 if test "${ac_cv_olimit_ok+set}" = set; then :
5587 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005588else
5589 ac_save_cc="$CC"
5590 CC="$CC -Olimit 1500"
Matthias Kloseb9621712010-04-24 17:59:49 +00005591 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005592/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005593
5594int
5595main ()
5596{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005597int main() { return 0; }
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005598 ;
5599 return 0;
5600}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005601_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005602if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005603 ac_cv_olimit_ok=yes
5604else
Matthias Kloseb9621712010-04-24 17:59:49 +00005605 ac_cv_olimit_ok=no
Matthias Kloseb159a552010-04-25 21:00:44 +00005606
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005607fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005608rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005609 CC="$ac_save_cc"
5610fi
5611
Matthias Kloseb9621712010-04-24 17:59:49 +00005612 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_olimit_ok" >&5
5613$as_echo "$ac_cv_olimit_ok" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005614 if test $ac_cv_olimit_ok = yes; then
5615 BASECFLAGS="$BASECFLAGS -Olimit 1500"
5616 fi
5617fi
5618
5619# Check whether GCC supports PyArg_ParseTuple format
5620if test "$GCC" = "yes"
5621then
Matthias Kloseb9621712010-04-24 17:59:49 +00005622 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5
5623$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005624 save_CFLAGS=$CFLAGS
5625 CFLAGS="$CFLAGS -Werror"
Matthias Kloseb9621712010-04-24 17:59:49 +00005626 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005627/* end confdefs.h. */
5628
5629 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005630int
5631main ()
5632{
5633
5634 ;
5635 return 0;
5636}
Matthias Kloseb159a552010-04-25 21:00:44 +00005637
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005638_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005639if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005640
Matthias Kloseb159a552010-04-25 21:00:44 +00005641
Matthias Kloseb9621712010-04-24 17:59:49 +00005642$as_echo "#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005643
Matthias Kloseb159a552010-04-25 21:00:44 +00005644 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00005645$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00005646
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005647else
Matthias Kloseb159a552010-04-25 21:00:44 +00005648
5649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00005650$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005651
5652fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005653rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5654 CFLAGS=$save_CFLAGS
5655fi
5656
5657# On some compilers, pthreads are available without further options
5658# (e.g. MacOS X). On some of these systems, the compiler will not
5659# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
5660# So we have to see first whether pthreads are available without
5661# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00005662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
5663$as_echo_n "checking whether pthreads are available without options... " >&6; }
5664if test "${ac_cv_pthread_is_default+set}" = set; then :
5665 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005666else
Matthias Kloseb9621712010-04-24 17:59:49 +00005667 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005668 ac_cv_pthread_is_default=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
5688 ac_cv_pthread_is_default=yes
5689 ac_cv_kthread=no
5690 ac_cv_pthread=no
5691
5692else
Matthias Kloseb9621712010-04-24 17:59:49 +00005693 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005694fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005695rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5696 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005697fi
5698
5699
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005700fi
5701
Matthias Kloseb9621712010-04-24 17:59:49 +00005702{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
5703$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005704
5705
5706if test $ac_cv_pthread_is_default = yes
5707then
5708 ac_cv_kpthread=no
5709else
5710# -Kpthread, if available, provides the right #defines
5711# and linker options to make pthread_create available
5712# Some compilers won't report that they do not support -Kpthread,
5713# so we need to run a program to see whether it really made the
5714# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
5716$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
5717if test "${ac_cv_kpthread+set}" = set; then :
5718 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005719else
5720 ac_save_cc="$CC"
5721CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005722if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005723 ac_cv_kpthread=no
5724else
Matthias Kloseb9621712010-04-24 17:59:49 +00005725 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005726/* end confdefs.h. */
5727
5728#include <pthread.h>
5729
5730void* routine(void* p){return NULL;}
5731
5732int main(){
5733 pthread_t p;
5734 if(pthread_create(&p,NULL,routine,NULL)!=0)
5735 return 1;
5736 (void)pthread_detach(p);
5737 return 0;
5738}
5739
5740_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005741if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005742 ac_cv_kpthread=yes
5743else
Matthias Kloseb9621712010-04-24 17:59:49 +00005744 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005745fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005746rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5747 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005748fi
5749
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005750CC="$ac_save_cc"
5751fi
5752
Matthias Kloseb9621712010-04-24 17:59:49 +00005753{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
5754$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005755fi
5756
5757if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
5758then
5759# -Kthread, if available, provides the right #defines
5760# and linker options to make pthread_create available
5761# Some compilers won't report that they do not support -Kthread,
5762# so we need to run a program to see whether it really made the
5763# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005764{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
5765$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
5766if test "${ac_cv_kthread+set}" = set; then :
5767 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005768else
5769 ac_save_cc="$CC"
5770CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005771if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005772 ac_cv_kthread=no
5773else
Matthias Kloseb9621712010-04-24 17:59:49 +00005774 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005775/* end confdefs.h. */
5776
5777#include <pthread.h>
5778
5779void* routine(void* p){return NULL;}
5780
5781int main(){
5782 pthread_t p;
5783 if(pthread_create(&p,NULL,routine,NULL)!=0)
5784 return 1;
5785 (void)pthread_detach(p);
5786 return 0;
5787}
5788
5789_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005790if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005791 ac_cv_kthread=yes
5792else
Matthias Kloseb9621712010-04-24 17:59:49 +00005793 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005794fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005795rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5796 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005797fi
5798
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005799CC="$ac_save_cc"
5800fi
5801
Matthias Kloseb9621712010-04-24 17:59:49 +00005802{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
5803$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005804fi
5805
5806if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
5807then
5808# -pthread, if available, provides the right #defines
5809# and linker options to make pthread_create available
5810# Some compilers won't report that they do not support -pthread,
5811# so we need to run a program to see whether it really made the
5812# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
5814$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
5815if test "${ac_cv_thread+set}" = set; then :
5816 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005817else
5818 ac_save_cc="$CC"
5819CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005820if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005821 ac_cv_pthread=no
5822else
Matthias Kloseb9621712010-04-24 17:59:49 +00005823 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005824/* end confdefs.h. */
5825
5826#include <pthread.h>
5827
5828void* routine(void* p){return NULL;}
5829
5830int main(){
5831 pthread_t p;
5832 if(pthread_create(&p,NULL,routine,NULL)!=0)
5833 return 1;
5834 (void)pthread_detach(p);
5835 return 0;
5836}
5837
5838_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005839if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005840 ac_cv_pthread=yes
5841else
Matthias Kloseb9621712010-04-24 17:59:49 +00005842 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005843fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005844rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5845 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005846fi
5847
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005848CC="$ac_save_cc"
5849fi
5850
Matthias Kloseb9621712010-04-24 17:59:49 +00005851{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
5852$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005853fi
5854
5855# If we have set a CC compiler flag for thread support then
5856# check if it works for CXX, too.
5857ac_cv_cxx_thread=no
5858if test ! -z "$CXX"
5859then
Matthias Kloseb9621712010-04-24 17:59:49 +00005860{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
5861$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005862ac_save_cxx="$CXX"
5863
5864if test "$ac_cv_kpthread" = "yes"
5865then
5866 CXX="$CXX -Kpthread"
5867 ac_cv_cxx_thread=yes
5868elif test "$ac_cv_kthread" = "yes"
5869then
5870 CXX="$CXX -Kthread"
5871 ac_cv_cxx_thread=yes
5872elif test "$ac_cv_pthread" = "yes"
5873then
5874 CXX="$CXX -pthread"
5875 ac_cv_cxx_thread=yes
5876fi
5877
5878if test $ac_cv_cxx_thread = yes
5879then
5880 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5881 $CXX -c conftest.$ac_ext 2>&5
5882 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5883 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5884 then
5885 ac_cv_cxx_thread=yes
5886 else
5887 ac_cv_cxx_thread=no
5888 fi
5889 rm -fr conftest*
5890fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005891{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
5892$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005893fi
5894CXX="$ac_save_cxx"
5895
5896
5897# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00005898{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5899$as_echo_n "checking for ANSI C header files... " >&6; }
5900if test "${ac_cv_header_stdc+set}" = set; then :
5901 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005902else
Matthias Kloseb9621712010-04-24 17:59:49 +00005903 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005904/* end confdefs.h. */
5905#include <stdlib.h>
5906#include <stdarg.h>
5907#include <string.h>
5908#include <float.h>
5909
5910int
5911main ()
5912{
5913
5914 ;
5915 return 0;
5916}
5917_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005918if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005919 ac_cv_header_stdc=yes
5920else
Matthias Kloseb9621712010-04-24 17:59:49 +00005921 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005922fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005923rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5924
5925if test $ac_cv_header_stdc = yes; then
5926 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00005927 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005928/* end confdefs.h. */
5929#include <string.h>
5930
5931_ACEOF
5932if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005933 $EGREP "memchr" >/dev/null 2>&1; then :
5934
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005935else
5936 ac_cv_header_stdc=no
5937fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005938rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005939
5940fi
5941
5942if test $ac_cv_header_stdc = yes; then
5943 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00005944 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005945/* end confdefs.h. */
5946#include <stdlib.h>
5947
5948_ACEOF
5949if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005950 $EGREP "free" >/dev/null 2>&1; then :
5951
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005952else
5953 ac_cv_header_stdc=no
5954fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005955rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005956
5957fi
5958
5959if test $ac_cv_header_stdc = yes; then
5960 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00005961 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005962 :
5963else
Matthias Kloseb9621712010-04-24 17:59:49 +00005964 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005965/* end confdefs.h. */
5966#include <ctype.h>
5967#include <stdlib.h>
5968#if ((' ' & 0x0FF) == 0x020)
5969# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5970# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5971#else
5972# define ISLOWER(c) \
5973 (('a' <= (c) && (c) <= 'i') \
5974 || ('j' <= (c) && (c) <= 'r') \
5975 || ('s' <= (c) && (c) <= 'z'))
5976# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5977#endif
5978
5979#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5980int
5981main ()
5982{
5983 int i;
5984 for (i = 0; i < 256; i++)
5985 if (XOR (islower (i), ISLOWER (i))
5986 || toupper (i) != TOUPPER (i))
5987 return 2;
5988 return 0;
5989}
5990_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005991if ac_fn_c_try_run "$LINENO"; then :
5992
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005993else
Matthias Kloseb9621712010-04-24 17:59:49 +00005994 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005995fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005996rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5997 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005998fi
5999
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006000fi
6001fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006002{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6003$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006004if test $ac_cv_header_stdc = yes; then
6005
Matthias Kloseb9621712010-04-24 17:59:49 +00006006$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006007
6008fi
6009
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006010for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
6011fcntl.h grp.h \
Christian Heimesbbe741d2008-03-28 10:53:29 +00006012ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Thomas Wouters89f507f2006-12-13 04:49:30 +00006013shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00006014unistd.h utime.h \
Christian Heimes4fbc72b2008-03-22 00:47:35 +00006015sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
6016sys/lock.h sys/mkdev.h sys/modem.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006017sys/param.h sys/poll.h sys/select.h sys/socket.h sys/statvfs.h sys/stat.h \
Benjamin Petersonde9c8692008-07-01 18:23:09 +00006018sys/termio.h sys/time.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006019sys/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 +00006020sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Ronald Oussoren755740f2010-02-07 19:56:39 +00006021bluetooth/bluetooth.h linux/tipc.h spawn.h util.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006022do :
6023 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6024ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
6025eval as_val=\$$as_ac_Header
6026 if test "x$as_val" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006027 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006028#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006029_ACEOF
6030
6031fi
6032
Guido van Rossum627b2d71993-12-24 10:39:16 +00006033done
6034
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006035ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006036for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00006037 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
6039$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
6040if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then :
6041 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006042else
Matthias Kloseb9621712010-04-24 17:59:49 +00006043 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006044/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006045#include <sys/types.h>
6046#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00006047
Martin v. Löwis11437992002-04-12 09:54:03 +00006048int
6049main ()
6050{
6051if ((DIR *) 0)
6052return 0;
6053 ;
6054 return 0;
6055}
6056_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006057if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006058 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00006059else
Matthias Kloseb9621712010-04-24 17:59:49 +00006060 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006061fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006062rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006063fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006064eval ac_res=\$$as_ac_Header
6065 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6066$as_echo "$ac_res" >&6; }
6067eval as_val=\$$as_ac_Header
6068 if test "x$as_val" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006069 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006070#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006071_ACEOF
6072
6073ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00006074fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006075
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006076done
6077# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6078if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006079 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6080$as_echo_n "checking for library containing opendir... " >&6; }
6081if test "${ac_cv_search_opendir+set}" = set; then :
6082 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006083else
Martin v. Löwis11437992002-04-12 09:54:03 +00006084 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006085cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006086/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006087
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006088/* Override any GCC internal prototype to avoid an error.
6089 Use char because int might match the return type of a GCC
6090 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006091#ifdef __cplusplus
6092extern "C"
6093#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006094char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006095int
6096main ()
6097{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006098return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006099 ;
6100 return 0;
6101}
6102_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006103for ac_lib in '' dir; do
6104 if test -z "$ac_lib"; then
6105 ac_res="none required"
6106 else
6107 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006108 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006109 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006110 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006111 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006112fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006113rm -f core conftest.err conftest.$ac_objext \
6114 conftest$ac_exeext
6115 if test "${ac_cv_search_opendir+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006116 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006117fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006118done
Matthias Kloseb9621712010-04-24 17:59:49 +00006119if test "${ac_cv_search_opendir+set}" = set; then :
6120
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006121else
6122 ac_cv_search_opendir=no
6123fi
6124rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006125LIBS=$ac_func_search_save_LIBS
6126fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006127{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6128$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006129ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006130if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006131 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00006132
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006133fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006134
Michael W. Hudson54241132001-12-07 15:38:26 +00006135else
Matthias Kloseb9621712010-04-24 17:59:49 +00006136 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6137$as_echo_n "checking for library containing opendir... " >&6; }
6138if test "${ac_cv_search_opendir+set}" = set; then :
6139 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006140else
6141 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006142cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006143/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006144
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006145/* Override any GCC internal prototype to avoid an error.
6146 Use char because int might match the return type of a GCC
6147 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006148#ifdef __cplusplus
6149extern "C"
6150#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006151char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006152int
6153main ()
6154{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006155return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006156 ;
6157 return 0;
6158}
6159_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006160for ac_lib in '' x; do
6161 if test -z "$ac_lib"; then
6162 ac_res="none required"
6163 else
6164 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006165 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006166 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006167 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006168 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006169fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006170rm -f core conftest.err conftest.$ac_objext \
6171 conftest$ac_exeext
6172 if test "${ac_cv_search_opendir+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006173 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006174fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006175done
Matthias Kloseb9621712010-04-24 17:59:49 +00006176if test "${ac_cv_search_opendir+set}" = set; then :
6177
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006178else
6179 ac_cv_search_opendir=no
6180fi
6181rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006182LIBS=$ac_func_search_save_LIBS
6183fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006184{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6185$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006186ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006187if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006188 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006189
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006190fi
6191
6192fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006193
Matthias Kloseb9621712010-04-24 17:59:49 +00006194{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
6195$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
6196if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then :
6197 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006198else
Matthias Kloseb9621712010-04-24 17:59:49 +00006199 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006200/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006201#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006202int
6203main ()
6204{
6205return makedev(0, 0);
6206 ;
6207 return 0;
6208}
6209_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006210if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006211 ac_cv_header_sys_types_h_makedev=yes
6212else
Matthias Kloseb9621712010-04-24 17:59:49 +00006213 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006214fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006215rm -f core conftest.err conftest.$ac_objext \
6216 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006217
6218fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006219{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
6220$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006221
6222if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006223ac_fn_c_check_header_mongrel "$LINENO" "sys/mkdev.h" "ac_cv_header_sys_mkdev_h" "$ac_includes_default"
6224if test "x$ac_cv_header_sys_mkdev_h" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006225
Matthias Kloseb9621712010-04-24 17:59:49 +00006226$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006227
6228fi
6229
6230
6231
6232 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006233 ac_fn_c_check_header_mongrel "$LINENO" "sys/sysmacros.h" "ac_cv_header_sys_sysmacros_h" "$ac_includes_default"
6234if test "x$ac_cv_header_sys_sysmacros_h" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006235
Matthias Kloseb9621712010-04-24 17:59:49 +00006236$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006237
6238fi
6239
6240
6241 fi
6242fi
6243
Michael W. Hudson54241132001-12-07 15:38:26 +00006244
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006245# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006246for ac_header in term.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006247do :
6248 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006249#ifdef HAVE_CURSES_H
6250#include <curses.h>
6251#endif
6252
Matthias Kloseb9621712010-04-24 17:59:49 +00006253"
6254if test "x$ac_cv_header_term_h" = x""yes; then :
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006255 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006256#define HAVE_TERM_H 1
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006257_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006258
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006259fi
6260
6261done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006262
6263
Martin v. Löwis11017b12006-01-14 18:12:57 +00006264# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00006265for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006266do :
6267 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 +00006268#ifdef HAVE_ASM_TYPES_H
6269#include <asm/types.h>
6270#endif
6271#ifdef HAVE_SYS_SOCKET_H
6272#include <sys/socket.h>
6273#endif
6274
Matthias Kloseb9621712010-04-24 17:59:49 +00006275"
6276if test "x$ac_cv_header_linux_netlink_h" = x""yes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00006277 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006278#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006279_ACEOF
6280
6281fi
6282
6283done
6284
6285
Guido van Rossum627b2d71993-12-24 10:39:16 +00006286# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006287was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006288{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
6289$as_echo_n "checking for clock_t in time.h... " >&6; }
6290cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006291/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006292#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006293
6294_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006295if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006296 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00006297 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006298else
Martin v. Löwis11437992002-04-12 09:54:03 +00006299
6300
Matthias Kloseb9621712010-04-24 17:59:49 +00006301$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00006302
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006303
Guido van Rossum627b2d71993-12-24 10:39:16 +00006304fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006305rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006306
Matthias Kloseb9621712010-04-24 17:59:49 +00006307{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
6308$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006309
Neal Norwitz11690112002-07-30 01:08:28 +00006310# Check whether using makedev requires defining _OSF_SOURCE
Matthias Kloseb9621712010-04-24 17:59:49 +00006311{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
6312$as_echo_n "checking for makedev... " >&6; }
6313cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006314/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00006315
Jesus Cea740f53a2010-04-28 11:35:30 +00006316#if defined(MAJOR_IN_MKDEV)
6317#include <sys/mkdev.h>
6318#elif defined(MAJOR_IN_SYSMACROS)
6319#include <sys/sysmacros.h>
6320#else
6321#include <sys/types.h>
6322#endif
6323
Neal Norwitz11690112002-07-30 01:08:28 +00006324int
6325main ()
6326{
Jesus Cea740f53a2010-04-28 11:35:30 +00006327
6328 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00006329 ;
6330 return 0;
6331}
Matthias Kloseb159a552010-04-25 21:00:44 +00006332
Neal Norwitz11690112002-07-30 01:08:28 +00006333_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006334if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006335 ac_cv_has_makedev=yes
6336else
Matthias Kloseb9621712010-04-24 17:59:49 +00006337 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006338fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006339rm -f core conftest.err conftest.$ac_objext \
6340 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006341if test "$ac_cv_has_makedev" = "no"; then
6342 # we didn't link, try if _OSF_SOURCE will allow us to link
Matthias Kloseb9621712010-04-24 17:59:49 +00006343 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006344/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006345
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006346#define _OSF_SOURCE 1
6347#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006348
Neal Norwitz11690112002-07-30 01:08:28 +00006349int
6350main ()
6351{
6352 makedev(0, 0)
6353 ;
6354 return 0;
6355}
6356_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006357if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006358 ac_cv_has_makedev=yes
6359else
Matthias Kloseb9621712010-04-24 17:59:49 +00006360 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006361fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006362rm -f core conftest.err conftest.$ac_objext \
6363 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006364 if test "$ac_cv_has_makedev" = "yes"; then
6365
Matthias Kloseb9621712010-04-24 17:59:49 +00006366$as_echo "#define _OSF_SOURCE 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006367
6368 fi
6369fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006370{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
6371$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006372if test "$ac_cv_has_makedev" = "yes"; then
6373
Matthias Kloseb9621712010-04-24 17:59:49 +00006374$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006375
6376fi
6377
Martin v. Löwis399a6892002-10-04 10:22:02 +00006378# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6379# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6380# defined, but the compiler does not support pragma redefine_extname,
6381# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6382# structures (such as rlimit64) without declaring them. As a
6383# work-around, disable LFS on such configurations
6384
6385use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00006386{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
6387$as_echo_n "checking Solaris LFS bug... " >&6; }
6388cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006389/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006390
6391#define _LARGEFILE_SOURCE 1
6392#define _FILE_OFFSET_BITS 64
6393#include <sys/resource.h>
6394
Martin v. Löwis399a6892002-10-04 10:22:02 +00006395int
6396main ()
6397{
6398struct rlimit foo;
6399 ;
6400 return 0;
6401}
6402_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006403if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00006404 sol_lfs_bug=no
6405else
Matthias Kloseb9621712010-04-24 17:59:49 +00006406 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006407fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006408rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006409{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
6410$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006411if test "$sol_lfs_bug" = "yes"; then
6412 use_lfs=no
6413fi
6414
6415if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006416# Two defines needed to enable largefile support on various platforms
6417# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00006418
Matthias Kloseb9621712010-04-24 17:59:49 +00006419$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006420
6421
Matthias Kloseb9621712010-04-24 17:59:49 +00006422$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00006423
Martin v. Löwis399a6892002-10-04 10:22:02 +00006424fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006425
Guido van Rossum84e7b241996-08-19 21:59:00 +00006426# Add some code to confdefs.h so that the test for off_t works on SCO
6427cat >> confdefs.h <<\EOF
6428#if defined(SCO_DS)
6429#undef _OFF_T
6430#endif
6431EOF
6432
Guido van Rossumef2255b2000-03-10 22:30:29 +00006433# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00006434ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
6435if test "x$ac_cv_type_mode_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006436
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006437else
Martin v. Löwis11437992002-04-12 09:54:03 +00006438
6439cat >>confdefs.h <<_ACEOF
6440#define mode_t int
6441_ACEOF
6442
6443fi
6444
Matthias Kloseb9621712010-04-24 17:59:49 +00006445ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
6446if test "x$ac_cv_type_off_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006447
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006448else
Martin v. Löwis11437992002-04-12 09:54:03 +00006449
6450cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006451#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006452_ACEOF
6453
6454fi
6455
Matthias Kloseb9621712010-04-24 17:59:49 +00006456ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
6457if test "x$ac_cv_type_pid_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006458
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006459else
Martin v. Löwis11437992002-04-12 09:54:03 +00006460
6461cat >>confdefs.h <<_ACEOF
6462#define pid_t int
6463_ACEOF
6464
6465fi
6466
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006467
Martin v. Löwis11437992002-04-12 09:54:03 +00006468cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00006469#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00006470_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006471
Matthias Kloseb9621712010-04-24 17:59:49 +00006472ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
6473if test "x$ac_cv_type_size_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006474
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006475else
Martin v. Löwis11437992002-04-12 09:54:03 +00006476
6477cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006478#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00006479_ACEOF
6480
6481fi
6482
Matthias Kloseb9621712010-04-24 17:59:49 +00006483{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
6484$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
6485if test "${ac_cv_type_uid_t+set}" = set; then :
6486 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006487else
Matthias Kloseb9621712010-04-24 17:59:49 +00006488 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006489/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006490#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006491
6492_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006493if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006494 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006495 ac_cv_type_uid_t=yes
6496else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006497 ac_cv_type_uid_t=no
6498fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006499rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006500
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006501fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006502{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
6503$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00006504if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006505
Matthias Kloseb9621712010-04-24 17:59:49 +00006506$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006507
6508
Matthias Kloseb9621712010-04-24 17:59:49 +00006509$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006510
6511fi
6512
Matthias Kloseb9621712010-04-24 17:59:49 +00006513ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
6514case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006515 no|yes) ;; #(
6516 *)
6517
Matthias Kloseb9621712010-04-24 17:59:49 +00006518$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006519
6520
6521cat >>confdefs.h <<_ACEOF
6522#define uint32_t $ac_cv_c_uint32_t
6523_ACEOF
6524;;
6525 esac
6526
Matthias Kloseb9621712010-04-24 17:59:49 +00006527ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
6528case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006529 no|yes) ;; #(
6530 *)
6531
Matthias Kloseb9621712010-04-24 17:59:49 +00006532$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006533
6534
6535cat >>confdefs.h <<_ACEOF
6536#define uint64_t $ac_cv_c_uint64_t
6537_ACEOF
6538;;
6539 esac
6540
Matthias Kloseb9621712010-04-24 17:59:49 +00006541ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
6542case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006543 no|yes) ;; #(
6544 *)
6545
6546cat >>confdefs.h <<_ACEOF
6547#define int32_t $ac_cv_c_int32_t
6548_ACEOF
6549;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00006550esac
6551
Matthias Kloseb9621712010-04-24 17:59:49 +00006552ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
6553case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006554 no|yes) ;; #(
6555 *)
6556
6557cat >>confdefs.h <<_ACEOF
6558#define int64_t $ac_cv_c_int64_t
6559_ACEOF
6560;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006561esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00006562
Matthias Kloseb9621712010-04-24 17:59:49 +00006563ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
6564if test "x$ac_cv_type_ssize_t" = x""yes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006565
Matthias Kloseb9621712010-04-24 17:59:49 +00006566$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00006567
6568fi
6569
Jack Jansendd19cf82001-12-06 22:36:17 +00006570
Michael W. Hudson54241132001-12-07 15:38:26 +00006571# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00006572# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006573# The cast to long int works around a bug in the HP C Compiler
6574# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6575# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6576# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006577{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
6578$as_echo_n "checking size of int... " >&6; }
6579if test "${ac_cv_sizeof_int+set}" = set; then :
6580 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006581else
Matthias Kloseb9621712010-04-24 17:59:49 +00006582 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 +00006583
Martin v. Löwis11437992002-04-12 09:54:03 +00006584else
Matthias Kloseb9621712010-04-24 17:59:49 +00006585 if test "$ac_cv_type_int" = yes; then
6586 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6587$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6588{ as_fn_set_status 77
6589as_fn_error "cannot compute sizeof (int)
6590See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006591 else
6592 ac_cv_sizeof_int=0
6593 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006594fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006595
Martin v. Löwis11437992002-04-12 09:54:03 +00006596fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006597{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
6598$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006599
6600
6601
Martin v. Löwis11437992002-04-12 09:54:03 +00006602cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006603#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00006604_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006605
6606
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006607# The cast to long int works around a bug in the HP C Compiler
6608# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6609# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6610# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006611{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
6612$as_echo_n "checking size of long... " >&6; }
6613if test "${ac_cv_sizeof_long+set}" = set; then :
6614 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006615else
Matthias Kloseb9621712010-04-24 17:59:49 +00006616 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 +00006617
Martin v. Löwis11437992002-04-12 09:54:03 +00006618else
Matthias Kloseb9621712010-04-24 17:59:49 +00006619 if test "$ac_cv_type_long" = yes; then
6620 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6621$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6622{ as_fn_set_status 77
6623as_fn_error "cannot compute sizeof (long)
6624See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006625 else
6626 ac_cv_sizeof_long=0
6627 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006628fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006629
Martin v. Löwis11437992002-04-12 09:54:03 +00006630fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006631{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
6632$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006633
6634
6635
Martin v. Löwis11437992002-04-12 09:54:03 +00006636cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006637#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006638_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006639
6640
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006641# The cast to long int works around a bug in the HP C Compiler
6642# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6643# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6644# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006645{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
6646$as_echo_n "checking size of void *... " >&6; }
6647if test "${ac_cv_sizeof_void_p+set}" = set; then :
6648 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006649else
Matthias Kloseb9621712010-04-24 17:59:49 +00006650 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 +00006651
Martin v. Löwis11437992002-04-12 09:54:03 +00006652else
Matthias Kloseb9621712010-04-24 17:59:49 +00006653 if test "$ac_cv_type_void_p" = yes; then
6654 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6655$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6656{ as_fn_set_status 77
6657as_fn_error "cannot compute sizeof (void *)
6658See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006659 else
6660 ac_cv_sizeof_void_p=0
6661 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006662fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006663
Martin v. Löwis11437992002-04-12 09:54:03 +00006664fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006665{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
6666$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006667
6668
6669
Martin v. Löwis11437992002-04-12 09:54:03 +00006670cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006671#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00006672_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006673
6674
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006675# The cast to long int works around a bug in the HP C Compiler
6676# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6677# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6678# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006679{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
6680$as_echo_n "checking size of short... " >&6; }
6681if test "${ac_cv_sizeof_short+set}" = set; then :
6682 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006683else
Matthias Kloseb9621712010-04-24 17:59:49 +00006684 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 +00006685
Martin v. Löwis11437992002-04-12 09:54:03 +00006686else
Matthias Kloseb9621712010-04-24 17:59:49 +00006687 if test "$ac_cv_type_short" = yes; then
6688 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6689$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6690{ as_fn_set_status 77
6691as_fn_error "cannot compute sizeof (short)
6692See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006693 else
6694 ac_cv_sizeof_short=0
6695 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006696fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006697
Martin v. Löwis11437992002-04-12 09:54:03 +00006698fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006699{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
6700$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006701
6702
6703
Martin v. Löwis11437992002-04-12 09:54:03 +00006704cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006705#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00006706_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006707
6708
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006709# The cast to long int works around a bug in the HP C Compiler
6710# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6711# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6712# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006713{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
6714$as_echo_n "checking size of float... " >&6; }
6715if test "${ac_cv_sizeof_float+set}" = set; then :
6716 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006717else
Matthias Kloseb9621712010-04-24 17:59:49 +00006718 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 +00006719
Martin v. Löwis11437992002-04-12 09:54:03 +00006720else
Matthias Kloseb9621712010-04-24 17:59:49 +00006721 if test "$ac_cv_type_float" = yes; then
6722 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6723$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6724{ as_fn_set_status 77
6725as_fn_error "cannot compute sizeof (float)
6726See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006727 else
6728 ac_cv_sizeof_float=0
6729 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006730fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006731
Martin v. Löwis11437992002-04-12 09:54:03 +00006732fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006733{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
6734$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006735
6736
6737
Martin v. Löwis11437992002-04-12 09:54:03 +00006738cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006739#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00006740_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006741
6742
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006743# The cast to long int works around a bug in the HP C Compiler
6744# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6745# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6746# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006747{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
6748$as_echo_n "checking size of double... " >&6; }
6749if test "${ac_cv_sizeof_double+set}" = set; then :
6750 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006751else
Matthias Kloseb9621712010-04-24 17:59:49 +00006752 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 +00006753
Martin v. Löwis11437992002-04-12 09:54:03 +00006754else
Matthias Kloseb9621712010-04-24 17:59:49 +00006755 if test "$ac_cv_type_double" = yes; then
6756 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6757$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6758{ as_fn_set_status 77
6759as_fn_error "cannot compute sizeof (double)
6760See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006761 else
6762 ac_cv_sizeof_double=0
6763 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006764fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006765
Martin v. Löwis11437992002-04-12 09:54:03 +00006766fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006767{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
6768$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006769
6770
6771
Martin v. Löwis11437992002-04-12 09:54:03 +00006772cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006773#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00006774_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006775
6776
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006777# The cast to long int works around a bug in the HP C Compiler
6778# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6779# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6780# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
6782$as_echo_n "checking size of fpos_t... " >&6; }
6783if test "${ac_cv_sizeof_fpos_t+set}" = set; then :
6784 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006785else
Matthias Kloseb9621712010-04-24 17:59:49 +00006786 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 +00006787
Martin v. Löwis11437992002-04-12 09:54:03 +00006788else
Matthias Kloseb9621712010-04-24 17:59:49 +00006789 if test "$ac_cv_type_fpos_t" = yes; then
6790 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6791$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6792{ as_fn_set_status 77
6793as_fn_error "cannot compute sizeof (fpos_t)
6794See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006795 else
6796 ac_cv_sizeof_fpos_t=0
6797 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006798fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006799
Martin v. Löwis11437992002-04-12 09:54:03 +00006800fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006801{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
6802$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006803
6804
6805
Martin v. Löwis11437992002-04-12 09:54:03 +00006806cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006807#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00006808_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006809
Michael W. Hudson54241132001-12-07 15:38:26 +00006810
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006811# The cast to long int works around a bug in the HP C Compiler
6812# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6813# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6814# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
6816$as_echo_n "checking size of size_t... " >&6; }
6817if test "${ac_cv_sizeof_size_t+set}" = set; then :
6818 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00006819else
Matthias Kloseb9621712010-04-24 17:59:49 +00006820 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 +00006821
Martin v. Löwis18e16552006-02-15 17:27:45 +00006822else
Matthias Kloseb9621712010-04-24 17:59:49 +00006823 if test "$ac_cv_type_size_t" = yes; then
6824 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6825$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6826{ as_fn_set_status 77
6827as_fn_error "cannot compute sizeof (size_t)
6828See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006829 else
6830 ac_cv_sizeof_size_t=0
6831 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00006832fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006833
Martin v. Löwis18e16552006-02-15 17:27:45 +00006834fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006835{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
6836$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006837
6838
6839
Martin v. Löwis18e16552006-02-15 17:27:45 +00006840cat >>confdefs.h <<_ACEOF
6841#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
6842_ACEOF
6843
6844
Christian Heimes400adb02008-02-01 08:12:03 +00006845# The cast to long int works around a bug in the HP C Compiler
6846# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6847# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6848# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006849{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
6850$as_echo_n "checking size of pid_t... " >&6; }
6851if test "${ac_cv_sizeof_pid_t+set}" = set; then :
6852 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00006853else
Matthias Kloseb9621712010-04-24 17:59:49 +00006854 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 +00006855
Christian Heimes400adb02008-02-01 08:12:03 +00006856else
Matthias Kloseb9621712010-04-24 17:59:49 +00006857 if test "$ac_cv_type_pid_t" = yes; then
6858 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6859$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6860{ as_fn_set_status 77
6861as_fn_error "cannot compute sizeof (pid_t)
6862See \`config.log' for more details." "$LINENO" 5; }; }
Christian Heimes400adb02008-02-01 08:12:03 +00006863 else
6864 ac_cv_sizeof_pid_t=0
6865 fi
6866fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006867
Christian Heimes400adb02008-02-01 08:12:03 +00006868fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006869{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
6870$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00006871
6872
6873
6874cat >>confdefs.h <<_ACEOF
6875#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
6876_ACEOF
6877
6878
Michael W. Hudson54241132001-12-07 15:38:26 +00006879
Matthias Kloseb9621712010-04-24 17:59:49 +00006880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
6881$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006882have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006883cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006884/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006885
Martin v. Löwis11437992002-04-12 09:54:03 +00006886int
6887main ()
6888{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006889long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00006890 ;
6891 return 0;
6892}
6893_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006894if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006895
6896
Matthias Kloseb9621712010-04-24 17:59:49 +00006897$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006898
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006899 have_long_long=yes
6900
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006901fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006902rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006903{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
6904$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00006905if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006906# The cast to long int works around a bug in the HP C Compiler
6907# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6908# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6909# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006910{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
6911$as_echo_n "checking size of long long... " >&6; }
6912if test "${ac_cv_sizeof_long_long+set}" = set; then :
6913 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006914else
Matthias Kloseb9621712010-04-24 17:59:49 +00006915 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 +00006916
Martin v. Löwis11437992002-04-12 09:54:03 +00006917else
Matthias Kloseb9621712010-04-24 17:59:49 +00006918 if test "$ac_cv_type_long_long" = yes; then
6919 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6920$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6921{ as_fn_set_status 77
6922as_fn_error "cannot compute sizeof (long long)
6923See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006924 else
6925 ac_cv_sizeof_long_long=0
6926 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006927fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006928
Martin v. Löwis11437992002-04-12 09:54:03 +00006929fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006930{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
6931$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006932
6933
6934
Martin v. Löwis11437992002-04-12 09:54:03 +00006935cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006936#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006937_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006938
Michael W. Hudson54241132001-12-07 15:38:26 +00006939
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006940fi
6941
Matthias Kloseb9621712010-04-24 17:59:49 +00006942{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
6943$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006944have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006945cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006946/* end confdefs.h. */
6947
6948int
6949main ()
6950{
6951long double x; x = (long double)0;
6952 ;
6953 return 0;
6954}
6955_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006956if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006957
6958
Matthias Kloseb9621712010-04-24 17:59:49 +00006959$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006960
6961 have_long_double=yes
6962
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006963fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006964rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006965{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
6966$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006967if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006968# The cast to long int works around a bug in the HP C Compiler
6969# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6970# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6971# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006972{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
6973$as_echo_n "checking size of long double... " >&6; }
6974if test "${ac_cv_sizeof_long_double+set}" = set; then :
6975 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006976else
Matthias Kloseb9621712010-04-24 17:59:49 +00006977 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 +00006978
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006979else
Matthias Kloseb9621712010-04-24 17:59:49 +00006980 if test "$ac_cv_type_long_double" = yes; then
6981 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6982$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6983{ as_fn_set_status 77
6984as_fn_error "cannot compute sizeof (long double)
6985See \`config.log' for more details." "$LINENO" 5; }; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006986 else
6987 ac_cv_sizeof_long_double=0
6988 fi
6989fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006990
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006991fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006992{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
6993$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006994
6995
6996
6997cat >>confdefs.h <<_ACEOF
6998#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
6999_ACEOF
7000
7001
7002fi
7003
7004
Matthias Kloseb9621712010-04-24 17:59:49 +00007005{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
7006$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007007have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007008cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00007009/* end confdefs.h. */
7010
7011int
7012main ()
7013{
7014_Bool x; x = (_Bool)0;
7015 ;
7016 return 0;
7017}
7018_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007019if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00007020
7021
Matthias Kloseb9621712010-04-24 17:59:49 +00007022$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00007023
7024 have_c99_bool=yes
7025
Thomas Woutersb2137042007-02-01 18:02:27 +00007026fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007027rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007028{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
7029$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007030if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007031# The cast to long int works around a bug in the HP C Compiler
7032# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7033# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7034# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007035{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
7036$as_echo_n "checking size of _Bool... " >&6; }
7037if test "${ac_cv_sizeof__Bool+set}" = set; then :
7038 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00007039else
Matthias Kloseb9621712010-04-24 17:59:49 +00007040 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 +00007041
Thomas Woutersb2137042007-02-01 18:02:27 +00007042else
Matthias Kloseb9621712010-04-24 17:59:49 +00007043 if test "$ac_cv_type__Bool" = yes; then
7044 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7045$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7046{ as_fn_set_status 77
7047as_fn_error "cannot compute sizeof (_Bool)
7048See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007049 else
7050 ac_cv_sizeof__Bool=0
7051 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00007052fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007053
Thomas Woutersb2137042007-02-01 18:02:27 +00007054fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007055{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
7056$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007057
7058
7059
Thomas Woutersb2137042007-02-01 18:02:27 +00007060cat >>confdefs.h <<_ACEOF
7061#define SIZEOF__BOOL $ac_cv_sizeof__Bool
7062_ACEOF
7063
7064
7065fi
7066
Matthias Kloseb9621712010-04-24 17:59:49 +00007067ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00007068 #include <stdint.h>
7069 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00007070"
7071if test "x$ac_cv_type_uintptr_t" = x""yes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00007072
7073cat >>confdefs.h <<_ACEOF
7074#define HAVE_UINTPTR_T 1
7075_ACEOF
7076
Thomas Wouters47b49bf2007-08-30 22:15:33 +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 uintptr_t" >&5
7082$as_echo_n "checking size of uintptr_t... " >&6; }
7083if test "${ac_cv_sizeof_uintptr_t+set}" = set; then :
7084 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007085else
Matthias Kloseb9621712010-04-24 17:59:49 +00007086 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 +00007087
Martin v. Löwis11437992002-04-12 09:54:03 +00007088else
Matthias Kloseb9621712010-04-24 17:59:49 +00007089 if test "$ac_cv_type_uintptr_t" = yes; then
7090 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7091$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7092{ as_fn_set_status 77
7093as_fn_error "cannot compute sizeof (uintptr_t)
7094See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007095 else
7096 ac_cv_sizeof_uintptr_t=0
7097 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007098fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007099
Martin v. Löwis11437992002-04-12 09:54:03 +00007100fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007101{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
7102$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007103
7104
7105
Martin v. Löwis11437992002-04-12 09:54:03 +00007106cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007107#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007108_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007109
Michael W. Hudson54241132001-12-07 15:38:26 +00007110
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007111fi
7112
Thomas Wouters89f507f2006-12-13 04:49:30 +00007113
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007114# The cast to long int works around a bug in the HP C Compiler
7115# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7116# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7117# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007118{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
7119$as_echo_n "checking size of off_t... " >&6; }
7120if test "${ac_cv_sizeof_off_t+set}" = set; then :
7121 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007122else
Matthias Kloseb9621712010-04-24 17:59:49 +00007123 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007124#ifdef HAVE_SYS_TYPES_H
7125#include <sys/types.h>
7126#endif
7127
Matthias Kloseb9621712010-04-24 17:59:49 +00007128"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007129
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007130else
Matthias Kloseb9621712010-04-24 17:59:49 +00007131 if test "$ac_cv_type_off_t" = yes; then
7132 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7133$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7134{ as_fn_set_status 77
7135as_fn_error "cannot compute sizeof (off_t)
7136See \`config.log' for more details." "$LINENO" 5; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007137 else
7138 ac_cv_sizeof_off_t=0
7139 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007140fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007141
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007142fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007143{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
7144$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007145
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007146
7147
Martin v. Löwis11437992002-04-12 09:54:03 +00007148cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007149#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007150_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007151
Michael W. Hudson54241132001-12-07 15:38:26 +00007152
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007153
Matthias Kloseb9621712010-04-24 17:59:49 +00007154{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
7155$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007156if test "$have_long_long" = yes
7157then
7158if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007159 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007160
Matthias Kloseb9621712010-04-24 17:59:49 +00007161$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007162
Matthias Kloseb9621712010-04-24 17:59:49 +00007163 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7164$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007165else
Matthias Kloseb9621712010-04-24 17:59:49 +00007166 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7167$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007168fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00007169else
Matthias Kloseb9621712010-04-24 17:59:49 +00007170 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7171$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007172fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007173
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007174# The cast to long int works around a bug in the HP C Compiler
7175# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7176# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7177# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
7179$as_echo_n "checking size of time_t... " >&6; }
7180if test "${ac_cv_sizeof_time_t+set}" = set; then :
7181 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007182else
Matthias Kloseb9621712010-04-24 17:59:49 +00007183 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007184#ifdef HAVE_SYS_TYPES_H
7185#include <sys/types.h>
7186#endif
7187#ifdef HAVE_TIME_H
7188#include <time.h>
7189#endif
7190
Matthias Kloseb9621712010-04-24 17:59:49 +00007191"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007192
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007193else
Matthias Kloseb9621712010-04-24 17:59:49 +00007194 if test "$ac_cv_type_time_t" = yes; then
7195 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7196$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7197{ as_fn_set_status 77
7198as_fn_error "cannot compute sizeof (time_t)
7199See \`config.log' for more details." "$LINENO" 5; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007200 else
7201 ac_cv_sizeof_time_t=0
7202 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007203fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007204
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007205fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007206{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
7207$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007208
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007209
7210
Martin v. Löwis11437992002-04-12 09:54:03 +00007211cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007212#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007213_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007214
Michael W. Hudson54241132001-12-07 15:38:26 +00007215
7216
Trent Mick635f6fb2000-08-23 21:33:05 +00007217# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007218ac_save_cc="$CC"
7219if test "$ac_cv_kpthread" = "yes"
7220then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00007221elif test "$ac_cv_kthread" = "yes"
7222then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00007223elif test "$ac_cv_pthread" = "yes"
7224then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007225fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007226
Matthias Kloseb9621712010-04-24 17:59:49 +00007227{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
7228$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007229have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007230cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007231/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007232
7233 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007234int
7235main ()
7236{
Guido van Rossum12580492000-09-24 16:47:19 +00007237pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007238 ;
7239 return 0;
7240}
Matthias Kloseb159a552010-04-25 21:00:44 +00007241
Martin v. Löwis11437992002-04-12 09:54:03 +00007242_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007243if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00007244 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00007245fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007246rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007247{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
7248$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007249if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007250 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007251# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7252# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7253# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007254{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
7255$as_echo_n "checking size of pthread_t... " >&6; }
7256if test "${ac_cv_sizeof_pthread_t+set}" = set; then :
7257 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007258else
Matthias Kloseb9621712010-04-24 17:59:49 +00007259 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007260#ifdef HAVE_PTHREAD_H
7261#include <pthread.h>
7262#endif
7263
Matthias Kloseb9621712010-04-24 17:59:49 +00007264"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007265
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007266else
Matthias Kloseb9621712010-04-24 17:59:49 +00007267 if test "$ac_cv_type_pthread_t" = yes; then
7268 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7269$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7270{ as_fn_set_status 77
7271as_fn_error "cannot compute sizeof (pthread_t)
7272See \`config.log' for more details." "$LINENO" 5; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007273 else
7274 ac_cv_sizeof_pthread_t=0
7275 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00007276fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007277
Trent Mick635f6fb2000-08-23 21:33:05 +00007278fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007279{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
7280$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007281
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007282
7283
Martin v. Löwis11437992002-04-12 09:54:03 +00007284cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007285#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007286_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007287
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007288
Trent Mick635f6fb2000-08-23 21:33:05 +00007289fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007290CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00007291
Michael W. Hudson54241132001-12-07 15:38:26 +00007292
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007293case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007294 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007295 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
7296 ;;
7297 Darwin/*)
7298 OTHER_LIBTOOL_OPT=""
7299 ;;
7300esac
7301
7302
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007303ARCH_RUN_32BIT=""
7304
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007305case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007306 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00007307 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
7308 if test "${enable_universalsdk}"; then
7309 :
7310 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007311 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007312 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00007313 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007314 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00007315 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00007316 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007317 if test ${gcc_version} '<' 4.0
7318 then
7319 LIBTOOL_CRUFT="-lcc_dynamic"
7320 else
7321 LIBTOOL_CRUFT=""
7322 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007323 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007324 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007325else
Matthias Kloseb9621712010-04-24 17:59:49 +00007326 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007327/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007328
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007329 #include <unistd.h>
7330 int main(int argc, char*argv[])
7331 {
7332 if (sizeof(long) == 4) {
7333 return 0;
7334 } else {
7335 return 1;
7336 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007337 }
7338
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007339_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007340if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007341 ac_osx_32bit=yes
7342else
Matthias Kloseb9621712010-04-24 17:59:49 +00007343 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007344fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007345rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7346 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007347fi
7348
7349
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007350 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007351 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007352 i386)
7353 MACOSX_DEFAULT_ARCH="i386"
7354 ;;
7355 ppc)
7356 MACOSX_DEFAULT_ARCH="ppc"
7357 ;;
7358 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00007359 as_fn_error "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007360 ;;
7361 esac
7362 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007363 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007364 i386)
7365 MACOSX_DEFAULT_ARCH="x86_64"
7366 ;;
7367 ppc)
7368 MACOSX_DEFAULT_ARCH="ppc64"
7369 ;;
7370 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00007371 as_fn_error "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007372 ;;
7373 esac
7374
7375 #ARCH_RUN_32BIT="true"
7376 fi
7377
7378 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00007379 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007380 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007381esac
7382
Matthias Kloseb9621712010-04-24 17:59:49 +00007383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
7384$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007385if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007386then
Skip Montanarodecc6a42003-01-01 20:07:49 +00007387 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00007388 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00007389 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007390
Matthias Kloseb9621712010-04-24 17:59:49 +00007391$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007392
Matthias Kloseb9621712010-04-24 17:59:49 +00007393 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7394$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00007395 if test $enable_shared = "yes"
7396 then
Matthias Kloseb9621712010-04-24 17:59:49 +00007397 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 +00007398 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007399else
Matthias Kloseb9621712010-04-24 17:59:49 +00007400 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7401$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007402fi
7403
Matthias Kloseb9621712010-04-24 17:59:49 +00007404{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
7405$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007406case $ac_sys_system/$ac_sys_release in
7407 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007408
Matthias Kloseb9621712010-04-24 17:59:49 +00007409$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007410
Matthias Kloseb9621712010-04-24 17:59:49 +00007411 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
7412$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007413 ;;
7414 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00007415 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7416$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007417 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007418esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007419
Guido van Rossum0a516c91994-09-12 10:58:40 +00007420# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00007421
Michael W. Hudson54241132001-12-07 15:38:26 +00007422
7423
7424
7425
Benjamin Peterson99f03762010-04-11 22:15:28 +00007426
Guido van Rossum0a516c91994-09-12 10:58:40 +00007427# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +00007428# -- usually .so, .sl on HP-UX, .dll on Cygwin
Matthias Kloseb9621712010-04-24 17:59:49 +00007429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SO" >&5
7430$as_echo_n "checking SO... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007431if test -z "$SO"
7432then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007433 case $ac_sys_system in
Thomas Wouters477c8d52006-05-27 19:21:47 +00007434 hp*|HP*)
7435 case `uname -m` in
7436 ia64) SO=.so;;
7437 *) SO=.sl;;
7438 esac
7439 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00007440 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +00007441 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007442 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +00007443else
7444 # this might also be a termcap variable, see #610332
7445 echo
7446 echo '====================================================================='
7447 echo '+ +'
7448 echo '+ WARNING: You have set SO in your environment. +'
7449 echo '+ Do you really mean to change the extension for shared libraries? +'
7450 echo '+ Continuing in 10 seconds to let you to ponder. +'
7451 echo '+ +'
7452 echo '====================================================================='
7453 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +00007454fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007455{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SO" >&5
7456$as_echo "$SO" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00007457
Georg Brandlb1441c72009-01-03 22:33:39 +00007458
Thomas Wouters477c8d52006-05-27 19:21:47 +00007459cat >>confdefs.h <<_ACEOF
7460#define SHLIB_EXT "$SO"
7461_ACEOF
7462
Guido van Rossum0a516c91994-09-12 10:58:40 +00007463# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00007464# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007465# (Shared libraries in this instance are shared modules to be loaded into
7466# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00007467{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
7468$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007469if test -z "$LDSHARED"
7470then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007471 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007472 AIX*)
7473 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00007474 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007475 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00007476 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00007477 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00007478 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007479 if test "$GCC" = "yes" ; then
7480 LDSHARED='$(CC) -shared'
7481 LDCXXSHARED='$(CXX) -shared'
7482 else
7483 LDSHARED='$(CC) -G'
7484 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00007485 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007486 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007487 if test "$GCC" = "yes" ; then
7488 LDSHARED='$(CC) -shared'
7489 LDCXXSHARED='$(CXX) -shared'
7490 else
7491 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007492 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +00007493 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +00007494 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +00007495 LDSHARED='$(CC) $(LDFLAGS) -bundle'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007496 LDCXXSHARED='$(CXX) $(LDFLAGS) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +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 Jansena3891ea2001-09-07 14:25:12 +00007502 else
7503 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00007504 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00007505 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00007506 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007507 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Jack Jansene578a632001-08-15 01:27:14 +00007508 LDSHARED='$(CC) $(LDFLAGS) -bundle'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007509 LDCXXSHARED='$(CXX) $(LDFLAGS) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00007510 if test "$enable_framework" ; then
7511 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007512 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7513 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007514 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007515 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00007516 # No framework, use the Python app as bundle-loader
7517 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00007518 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007519 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007520 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007521 Darwin/*)
7522 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
7523 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00007524
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007525 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +00007526 then
Thomas Wouters477c8d52006-05-27 19:21:47 +00007527 if test "${enable_universalsdk}"; then
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007528 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007529 fi
Jack Jansen6b08a402004-06-03 12:41:45 +00007530 LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007531 LDCXXSHARED='$(CXX) $(LDFLAGS) -bundle -undefined dynamic_lookup'
Jack Jansen6b08a402004-06-03 12:41:45 +00007532 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00007533 else
7534 LDSHARED='$(CC) $(LDFLAGS) -bundle'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007535 LDCXXSHARED='$(CXX) $(LDFLAGS) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00007536 if test "$enable_framework" ; then
7537 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007538 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7539 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007540 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007541 else
7542 # No framework, use the Python app as bundle-loader
7543 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
7544 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007545 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007546 fi
7547 fi
7548 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007549 Linux*|GNU*|QNX*)
7550 LDSHARED='$(CC) -shared'
7551 LDCXXSHARED='$(CXX) -shared';;
7552 BSD/OS*/4*)
7553 LDSHARED="gcc -shared"
7554 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007555 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00007556 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00007557 then
Benjamin Petersonab0a7522010-03-14 15:18:25 +00007558 LDSHARED='$(CC) -shared ${LDFLAGS}'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007559 LDCXXSHARED='$(CXX) -shared ${LDFLAGS}'
Guido van Rossum0286ae82000-08-29 15:06:49 +00007560 else
7561 LDSHARED="ld -Bshareable ${LDFLAGS}"
7562 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007563 OpenBSD*)
7564 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7565 then
7566 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007567 LDCXXSHARED='$(CXX) -shared $(CCSHARED) ${LDFLAGS}'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007568 else
7569 case `uname -r` in
7570 [01].* | 2.[0-7] | 2.[0-7].*)
7571 LDSHARED="ld -Bshareable ${LDFLAGS}"
7572 ;;
7573 *)
7574 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007575 LDCXXSHARED='$(CXX) -shared $(CCSHARED) ${LDFLAGS}'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007576 ;;
7577 esac
7578 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007579 NetBSD*|DragonFly*)
7580 LDSHARED="cc -shared ${LDFLAGS}"
7581 LDCXXSHARED="c++ -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007582 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007583 if test "$GCC" = "yes" ; then
7584 LDSHARED='$(CC) -shared'
7585 LDCXXSHARED='$(CXX) -shared'
7586 else
7587 LDSHARED='$(CC) -G'
7588 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00007589 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007590 SCO_SV*)
7591 LDSHARED='$(CC) -Wl,-G,-Bexport'
7592 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
7593 CYGWIN*)
7594 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
7595 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007596 *) LDSHARED="ld";;
7597 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007598fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007599{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
7600$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00007601LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007602BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00007603# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007604# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007605{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
7606$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007607if test -z "$CCSHARED"
7608then
Guido van Rossum07397971997-04-29 21:49:50 +00007609 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00007610 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007611 then CCSHARED="-fPIC";
7612 elif test `uname -p` = sparc;
7613 then CCSHARED="-xcode=pic32";
7614 else CCSHARED="-Kpic";
7615 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00007616 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00007617 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00007618 else CCSHARED="+z";
7619 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007620 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007621 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007622 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007623 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00007624 if test "$GCC" = "yes"
7625 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00007626 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00007627 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007628 SCO_SV*)
7629 if test "$GCC" = "yes"
7630 then CCSHARED="-fPIC"
7631 else CCSHARED="-Kpic -belf"
7632 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007633 IRIX*/6*) case $CC in
7634 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00007635 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007636 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007637 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007638fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007639{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
7640$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007641# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007642# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007643{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
7644$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007645if test -z "$LINKFORSHARED"
7646then
Guido van Rossum07397971997-04-29 21:49:50 +00007647 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007648 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007649 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00007650 LINKFORSHARED="-Wl,-E -Wl,+s";;
7651# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007652 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007653 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007654 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00007655 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00007656 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Jack Jansene578a632001-08-15 01:27:14 +00007657 if test "$enable_framework"
7658 then
Jack Jansenda49e192005-01-07 13:08:22 +00007659 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007660 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007661 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007662 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007663 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00007664 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007665 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00007666 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7667 then
7668 LINKFORSHARED="-Wl,--export-dynamic"
7669 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007670 SunOS/5*) case $CC in
7671 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00007672 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00007673 then
7674 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007675 fi;;
7676 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00007677 CYGWIN*)
7678 if test $enable_shared = "no"
7679 then
7680 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
7681 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00007682 QNX*)
7683 # -Wl,-E causes the symbols to be added to the dynamic
7684 # symbol table so that they can be found when a module
7685 # is loaded. -N 2048K causes the stack size to be set
7686 # to 2048 kilobytes so that the stack doesn't overflow
7687 # when running test_compile.py.
7688 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007689 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007690fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007691{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
7692$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007693
Michael W. Hudson54241132001-12-07 15:38:26 +00007694
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00007695
Matthias Kloseb9621712010-04-24 17:59:49 +00007696{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
7697$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007698if test ! "$LIBRARY" = "$LDLIBRARY"
7699then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00007700 case $ac_sys_system in
7701 CYGWIN*)
7702 # Cygwin needs CCSHARED when building extension DLLs
7703 # but not when building the interpreter DLL.
7704 CFLAGSFORSHARED='';;
7705 *)
7706 CFLAGSFORSHARED='$(CCSHARED)'
7707 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007708fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007709{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
7710$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007711
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007712# SHLIBS are libraries (except -lc and -lm) to link to the python shared
7713# library (with --enable-shared).
7714# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007715# symbols, this must be set to $(LIBS) (expanded by make). We do this even
7716# if it is not required, since it creates a dependency of the shared library
7717# to LIBS. This, in turn, means that applications linking the shared libpython
7718# don't need to link LIBS explicitly. The default should be only changed
7719# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007720
Matthias Kloseb9621712010-04-24 17:59:49 +00007721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
7722$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007723case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007724 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007725 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007726esac
Matthias Kloseb9621712010-04-24 17:59:49 +00007727{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
7728$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007729
7730
Guido van Rossum627b2d71993-12-24 10:39:16 +00007731# checks for libraries
Matthias Kloseb9621712010-04-24 17:59:49 +00007732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
7733$as_echo_n "checking for dlopen in -ldl... " >&6; }
7734if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
7735 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007736else
Martin v. Löwis11437992002-04-12 09:54:03 +00007737 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007738LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007739cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007740/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007741
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007742/* Override any GCC internal prototype to avoid an error.
7743 Use char because int might match the return type of a GCC
7744 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007745#ifdef __cplusplus
7746extern "C"
7747#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007748char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007749int
7750main ()
7751{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007752return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007753 ;
7754 return 0;
7755}
7756_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007757if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007758 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007759else
Matthias Kloseb9621712010-04-24 17:59:49 +00007760 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007761fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007762rm -f core conftest.err conftest.$ac_objext \
7763 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007764LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007765fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007766{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
7767$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
7768if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007769 cat >>confdefs.h <<_ACEOF
7770#define HAVE_LIBDL 1
7771_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007772
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007773 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00007774
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007775fi
7776 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00007777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
7778$as_echo_n "checking for shl_load in -ldld... " >&6; }
7779if test "${ac_cv_lib_dld_shl_load+set}" = set; then :
7780 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007781else
Martin v. Löwis11437992002-04-12 09:54:03 +00007782 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007783LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007784cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007785/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007786
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007787/* Override any GCC internal prototype to avoid an error.
7788 Use char because int might match the return type of a GCC
7789 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007790#ifdef __cplusplus
7791extern "C"
7792#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007793char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007794int
7795main ()
7796{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007797return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007798 ;
7799 return 0;
7800}
7801_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007802if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007803 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007804else
Matthias Kloseb9621712010-04-24 17:59:49 +00007805 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007806fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007807rm -f core conftest.err conftest.$ac_objext \
7808 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007809LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007810fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007811{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
7812$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
7813if test "x$ac_cv_lib_dld_shl_load" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007814 cat >>confdefs.h <<_ACEOF
7815#define HAVE_LIBDLD 1
7816_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007817
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007818 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007819
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007820fi
7821 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00007822
Georg Brandlb1441c72009-01-03 22:33:39 +00007823# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00007824if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007825 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
7826$as_echo_n "checking for library containing sem_init... " >&6; }
7827if test "${ac_cv_search_sem_init+set}" = set; then :
7828 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007829else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00007830 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007831cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007832/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007833
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007834/* Override any GCC internal prototype to avoid an error.
7835 Use char because int might match the return type of a GCC
7836 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007837#ifdef __cplusplus
7838extern "C"
7839#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007840char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007841int
7842main ()
7843{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007844return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007845 ;
7846 return 0;
7847}
7848_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007849for ac_lib in '' pthread rt posix4; do
7850 if test -z "$ac_lib"; then
7851 ac_res="none required"
7852 else
7853 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007854 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007855 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007856 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007857 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007858fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007859rm -f core conftest.err conftest.$ac_objext \
7860 conftest$ac_exeext
7861 if test "${ac_cv_search_sem_init+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007862 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007863fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007864done
Matthias Kloseb9621712010-04-24 17:59:49 +00007865if test "${ac_cv_search_sem_init+set}" = set; then :
7866
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007867else
7868 ac_cv_search_sem_init=no
7869fi
7870rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00007871LIBS=$ac_func_search_save_LIBS
7872fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007873{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
7874$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007875ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00007876if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007877 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007878
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007879fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00007880 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00007881 # posix4 on Solaris 2.6
7882 # pthread (first!) on Linux
7883fi
7884
Martin v. Löwis19d17342003-06-14 21:03:05 +00007885# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00007886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
7887$as_echo_n "checking for textdomain in -lintl... " >&6; }
7888if test "${ac_cv_lib_intl_textdomain+set}" = set; then :
7889 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00007890else
7891 ac_check_lib_save_LIBS=$LIBS
7892LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007893cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007894/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00007895
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007896/* Override any GCC internal prototype to avoid an error.
7897 Use char because int might match the return type of a GCC
7898 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00007899#ifdef __cplusplus
7900extern "C"
7901#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00007902char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00007903int
7904main ()
7905{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007906return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00007907 ;
7908 return 0;
7909}
7910_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007911if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00007912 ac_cv_lib_intl_textdomain=yes
7913else
Matthias Kloseb9621712010-04-24 17:59:49 +00007914 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00007915fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007916rm -f core conftest.err conftest.$ac_objext \
7917 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00007918LIBS=$ac_check_lib_save_LIBS
7919fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007920{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
7921$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
7922if test "x$ac_cv_lib_intl_textdomain" = x""yes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00007923
Matthias Kloseb9621712010-04-24 17:59:49 +00007924$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00007925
Brett Cannonc6d936e2009-06-07 20:09:53 +00007926 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00007927fi
7928
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007929
7930# checks for system dependent C++ extensions support
7931case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00007932 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
7933$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
7934 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007935/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007936
7937 #include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007938int
7939main ()
7940{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007941loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00007942 ;
7943 return 0;
7944}
Matthias Kloseb159a552010-04-25 21:00:44 +00007945
Martin v. Löwis11437992002-04-12 09:54:03 +00007946_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007947if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007948
Matthias Kloseb159a552010-04-25 21:00:44 +00007949
Matthias Kloseb9621712010-04-24 17:59:49 +00007950$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007951
Matthias Kloseb159a552010-04-25 21:00:44 +00007952 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007953$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00007954
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007955else
Matthias Kloseb159a552010-04-25 21:00:44 +00007956
7957 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007958$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00007959
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007960fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007961rm -f core conftest.err conftest.$ac_objext \
7962 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007963 *) ;;
7964esac
7965
Guido van Rossum70c7f481998-03-26 18:44:10 +00007966# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00007967{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
7968$as_echo_n "checking for t_open in -lnsl... " >&6; }
7969if test "${ac_cv_lib_nsl_t_open+set}" = set; then :
7970 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007971else
Martin v. Löwis11437992002-04-12 09:54:03 +00007972 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007973LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007974cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007975/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007976
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007977/* Override any GCC internal prototype to avoid an error.
7978 Use char because int might match the return type of a GCC
7979 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007980#ifdef __cplusplus
7981extern "C"
7982#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007983char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007984int
7985main ()
7986{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007987return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007988 ;
7989 return 0;
7990}
7991_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007992if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007993 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007994else
Matthias Kloseb9621712010-04-24 17:59:49 +00007995 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007996fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007997rm -f core conftest.err conftest.$ac_objext \
7998 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007999LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008000fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008001{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
8002$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
8003if test "x$ac_cv_lib_nsl_t_open" = x""yes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008004 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008005fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00008006 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00008007{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
8008$as_echo_n "checking for socket in -lsocket... " >&6; }
8009if test "${ac_cv_lib_socket_socket+set}" = set; then :
8010 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008011else
Martin v. Löwis11437992002-04-12 09:54:03 +00008012 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008013LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008014cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008015/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008016
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008017/* Override any GCC internal prototype to avoid an error.
8018 Use char because int might match the return type of a GCC
8019 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008020#ifdef __cplusplus
8021extern "C"
8022#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008023char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008024int
8025main ()
8026{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008027return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008028 ;
8029 return 0;
8030}
8031_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008032if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008033 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008034else
Matthias Kloseb9621712010-04-24 17:59:49 +00008035 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008036fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008037rm -f core conftest.err conftest.$ac_objext \
8038 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008039LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008040fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008041{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
8042$as_echo "$ac_cv_lib_socket_socket" >&6; }
8043if test "x$ac_cv_lib_socket_socket" = x""yes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00008044 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00008045fi
8046 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00008047
Matthias Kloseb9621712010-04-24 17:59:49 +00008048{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
8049$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008050
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008051# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008052if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008053 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00008054{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8055$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00008056LIBS="$withval $LIBS"
8057
8058else
Matthias Kloseb9621712010-04-24 17:59:49 +00008059 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8060$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008061fi
8062
Guido van Rossum7f43da71994-08-01 12:15:30 +00008063
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008064if test -n "$ac_tool_prefix"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008065 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
8066set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008067{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8068$as_echo_n "checking for $ac_word... " >&6; }
8069if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
8070 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008071else
8072 case $PKG_CONFIG in
8073 [\\/]* | ?:[\\/]*)
8074 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8075 ;;
8076 *)
8077 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8078for as_dir in $PATH
8079do
8080 IFS=$as_save_IFS
8081 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008082 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Petersond78735d2010-01-01 16:04:23 +00008083 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8084 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008085 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008086 break 2
8087 fi
8088done
Matthias Kloseb9621712010-04-24 17:59:49 +00008089 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008090IFS=$as_save_IFS
8091
8092 ;;
8093esac
8094fi
8095PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8096if test -n "$PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008097 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8098$as_echo "$PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008099else
Matthias Kloseb9621712010-04-24 17:59:49 +00008100 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8101$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008102fi
8103
8104
8105fi
8106if test -z "$ac_cv_path_PKG_CONFIG"; then
8107 ac_pt_PKG_CONFIG=$PKG_CONFIG
8108 # Extract the first word of "pkg-config", so it can be a program name with args.
8109set dummy pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008110{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8111$as_echo_n "checking for $ac_word... " >&6; }
8112if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then :
8113 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008114else
8115 case $ac_pt_PKG_CONFIG in
8116 [\\/]* | ?:[\\/]*)
8117 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
8118 ;;
8119 *)
8120 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8121for as_dir in $PATH
8122do
8123 IFS=$as_save_IFS
8124 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008125 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Petersond78735d2010-01-01 16:04:23 +00008126 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8127 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008128 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008129 break 2
8130 fi
8131done
Matthias Kloseb9621712010-04-24 17:59:49 +00008132 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008133IFS=$as_save_IFS
8134
8135 ;;
8136esac
8137fi
8138ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
8139if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008140 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
8141$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008142else
Matthias Kloseb9621712010-04-24 17:59:49 +00008143 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8144$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008145fi
8146
8147 if test "x$ac_pt_PKG_CONFIG" = x; then
8148 PKG_CONFIG=""
8149 else
8150 case $cross_compiling:$ac_tool_warned in
8151yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00008152{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8153$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Petersond78735d2010-01-01 16:04:23 +00008154ac_tool_warned=yes ;;
8155esac
8156 PKG_CONFIG=$ac_pt_PKG_CONFIG
8157 fi
8158else
8159 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
8160fi
8161
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008162
8163# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00008164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
8165$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008166
8167# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008168if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008169 withval=$with_system_expat;
8170fi
8171
8172
Matthias Kloseb9621712010-04-24 17:59:49 +00008173{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
8174$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008175
8176# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00008177{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
8178$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008179
8180# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008181if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008182 withval=$with_system_ffi;
8183fi
8184
8185
8186if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008187 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
8188else
8189 LIBFFI_INCLUDEDIR=""
8190fi
8191
8192
Matthias Kloseb9621712010-04-24 17:59:49 +00008193{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
8194$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008195
Matthias Klose55708cc2009-04-30 08:06:49 +00008196# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +00008197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
8198$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008199
8200# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008201if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +00008202 withval=$with_dbmliborder;
8203if test x$with_dbmliborder = xyes
8204then
Matthias Kloseb9621712010-04-24 17:59:49 +00008205as_fn_error "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008206else
8207 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
8208 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
8209 then
Matthias Kloseb9621712010-04-24 17:59:49 +00008210 as_fn_error "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008211 fi
8212 done
8213fi
8214fi
8215
Matthias Kloseb9621712010-04-24 17:59:49 +00008216{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
8217$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008218
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00008219# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008220
8221
Matthias Kloseb9621712010-04-24 17:59:49 +00008222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
8223$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008224
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008225# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008226if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008227 withval=$with_signal_module;
8228fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008229
8230
8231if test -z "$with_signal_module"
8232then with_signal_module="yes"
8233fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008234{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
8235$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008236
8237if test "${with_signal_module}" = "yes"; then
8238 USE_SIGNAL_MODULE=""
8239 SIGNAL_OBJS=""
8240else
8241 USE_SIGNAL_MODULE="#"
8242 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
8243fi
8244
Guido van Rossum3d15bd82001-01-10 18:53:48 +00008245# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00008246
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008247USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00008248
Matthias Kloseb9621712010-04-24 17:59:49 +00008249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dec-threads" >&5
8250$as_echo_n "checking for --with-dec-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008251
Guido van Rossumec2f0731997-01-22 20:54:01 +00008252
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008253# Check whether --with-dec-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008254if test "${with_dec_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008255 withval=$with_dec_threads;
Matthias Kloseb9621712010-04-24 17:59:49 +00008256{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8257$as_echo "$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +00008258LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00008259if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00008260 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00008261fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008262else
Matthias Kloseb9621712010-04-24 17:59:49 +00008263 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8264$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008265fi
8266
Martin v. Löwis11437992002-04-12 09:54:03 +00008267
8268# Templates for things AC_DEFINEd more than once.
8269# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00008270
8271
Martin v. Löwis11437992002-04-12 09:54:03 +00008272
8273
Matthias Kloseb9621712010-04-24 17:59:49 +00008274{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
8275$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008276
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008277# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008278if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008279 withval=$with_threads;
8280fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008281
8282
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008283# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00008284
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008285# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008286if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008287 withval=$with_thread; with_threads=$with_thread
8288fi
8289
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008290
8291if test -z "$with_threads"
8292then with_threads="yes"
8293fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008294{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
8295$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008296
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008297
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008298if test "$with_threads" = "no"
8299then
8300 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008301elif test "$ac_cv_pthread_is_default" = yes
8302then
Matthias Kloseb9621712010-04-24 17:59:49 +00008303 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008304
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008305 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +00008306 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008307
8308 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00008309 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008310elif test "$ac_cv_kpthread" = "yes"
8311then
8312 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008313 if test "$ac_cv_cxx_thread" = "yes"; then
8314 CXX="$CXX -Kpthread"
8315 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008316 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00008317
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008318 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008319 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008320elif test "$ac_cv_kthread" = "yes"
8321then
8322 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008323 if test "$ac_cv_cxx_thread" = "yes"; then
8324 CXX="$CXX -Kthread"
8325 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008326 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008327
8328 posix_threads=yes
8329 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008330elif test "$ac_cv_pthread" = "yes"
8331then
8332 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008333 if test "$ac_cv_cxx_thread" = "yes"; then
8334 CXX="$CXX -pthread"
8335 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008336 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008337
8338 posix_threads=yes
8339 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008340else
8341 if test ! -z "$with_threads" -a -d "$with_threads"
8342 then LDFLAGS="$LDFLAGS -L$with_threads"
8343 fi
8344 if test ! -z "$withval" -a -d "$withval"
8345 then LDFLAGS="$LDFLAGS -L$withval"
8346 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008347
8348 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00008349 # define _POSIX_THREADS in unistd.h. Some apparently don't
8350 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +00008351 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
8352$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
8353 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008354/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008355
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008356#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008357#ifdef _POSIX_THREADS
8358yes
8359#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008360
8361_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008362if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008363 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008364 unistd_defines_pthreads=yes
8365else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008366 unistd_defines_pthreads=no
8367fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008368rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008369
Matthias Kloseb9621712010-04-24 17:59:49 +00008370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
8371$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008372
Matthias Kloseb9621712010-04-24 17:59:49 +00008373 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00008374
Matthias Kloseb9621712010-04-24 17:59:49 +00008375 ac_fn_c_check_header_mongrel "$LINENO" "cthreads.h" "ac_cv_header_cthreads_h" "$ac_includes_default"
8376if test "x$ac_cv_header_cthreads_h" = x""yes; then :
8377 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008378
Matthias Kloseb9621712010-04-24 17:59:49 +00008379 $as_echo "#define C_THREADS 1" >>confdefs.h
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008380
Martin v. Löwis11437992002-04-12 09:54:03 +00008381
Matthias Kloseb9621712010-04-24 17:59:49 +00008382$as_echo "#define HURD_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008383
8384 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008385 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008386else
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008387
Matthias Kloseb9621712010-04-24 17:59:49 +00008388 ac_fn_c_check_header_mongrel "$LINENO" "mach/cthreads.h" "ac_cv_header_mach_cthreads_h" "$ac_includes_default"
8389if test "x$ac_cv_header_mach_cthreads_h" = x""yes; then :
8390 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008391
Matthias Kloseb9621712010-04-24 17:59:49 +00008392 $as_echo "#define C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008393
Martin v. Löwis11437992002-04-12 09:54:03 +00008394
Matthias Kloseb9621712010-04-24 17:59:49 +00008395$as_echo "#define MACH_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008396
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008397 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008398else
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008399
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008400 # Just looking for pthread_create in libpthread is not enough:
8401 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
8402 # So we really have to include pthread.h, and then link.
8403 _libs=$LIBS
8404 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00008405 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
8406$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
8407 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008408/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008409#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00008410
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008411void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00008412int
8413main ()
8414{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008415
8416pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00008417 ;
8418 return 0;
8419}
8420_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008421if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008422
Matthias Kloseb9621712010-04-24 17:59:49 +00008423 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8424$as_echo "yes" >&6; }
8425 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00008426
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008427 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008428 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00008429else
Martin v. Löwis11437992002-04-12 09:54:03 +00008430
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008431 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +00008432 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
8433if test "x$ac_cv_func_pthread_detach" = x""yes; then :
8434 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00008435
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008436 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008437 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00008438else
Guido van Rossumad678af1998-10-02 14:42:15 +00008439
Matthias Kloseb9621712010-04-24 17:59:49 +00008440 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
8441$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
8442if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then :
8443 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008444else
Martin v. Löwis11437992002-04-12 09:54:03 +00008445 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008446LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008447cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008448/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008449
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008450/* Override any GCC internal prototype to avoid an error.
8451 Use char because int might match the return type of a GCC
8452 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008453#ifdef __cplusplus
8454extern "C"
8455#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008456char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008457int
8458main ()
8459{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008460return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008461 ;
8462 return 0;
8463}
8464_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008465if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008466 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00008467else
Matthias Kloseb9621712010-04-24 17:59:49 +00008468 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00008469fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008470rm -f core conftest.err conftest.$ac_objext \
8471 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008472LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008473fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008474{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
8475$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
8476if test "x$ac_cv_lib_pthreads_pthread_create" = x""yes; then :
8477 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00008478
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008479 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008480 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008481 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00008482else
Greg Steinadf63d62000-07-05 10:38:09 +00008483
Matthias Kloseb9621712010-04-24 17:59:49 +00008484 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
8485$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
8486if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then :
8487 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00008488else
Martin v. Löwis11437992002-04-12 09:54:03 +00008489 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008490LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008491cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008492/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008493
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008494/* Override any GCC internal prototype to avoid an error.
8495 Use char because int might match the return type of a GCC
8496 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008497#ifdef __cplusplus
8498extern "C"
8499#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008500char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008501int
8502main ()
8503{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008504return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008505 ;
8506 return 0;
8507}
8508_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008509if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008510 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00008511else
Matthias Kloseb9621712010-04-24 17:59:49 +00008512 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00008513fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008514rm -f core conftest.err conftest.$ac_objext \
8515 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008516LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00008517fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008518{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
8519$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
8520if test "x$ac_cv_lib_c_r_pthread_create" = x""yes; then :
8521 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00008522
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008523 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008524 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008525 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008526else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008527
Matthias Kloseb9621712010-04-24 17:59:49 +00008528 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
8529$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
8530if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then :
8531 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008532else
Martin v. Löwis11437992002-04-12 09:54:03 +00008533 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008534LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008535cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008536/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008537
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008538/* Override any GCC internal prototype to avoid an error.
8539 Use char because int might match the return type of a GCC
8540 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008541#ifdef __cplusplus
8542extern "C"
8543#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008544char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008545int
8546main ()
8547{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008548return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008549 ;
8550 return 0;
8551}
8552_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008553if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008554 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008555else
Matthias Kloseb9621712010-04-24 17:59:49 +00008556 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008557fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008558rm -f core conftest.err conftest.$ac_objext \
8559 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008560LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008561fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008562{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
8563$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
8564if test "x$ac_cv_lib_pthread___pthread_create_system" = x""yes; then :
8565 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008566
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008567 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008568 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008569 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008570else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008571
Matthias Kloseb9621712010-04-24 17:59:49 +00008572 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
8573$as_echo_n "checking for pthread_create in -lcma... " >&6; }
8574if test "${ac_cv_lib_cma_pthread_create+set}" = set; then :
8575 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00008576else
Martin v. Löwis11437992002-04-12 09:54:03 +00008577 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008578LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008579cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008580/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008581
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008582/* Override any GCC internal prototype to avoid an error.
8583 Use char because int might match the return type of a GCC
8584 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008585#ifdef __cplusplus
8586extern "C"
8587#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008588char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008589int
8590main ()
8591{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008592return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008593 ;
8594 return 0;
8595}
8596_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008597if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008598 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00008599else
Matthias Kloseb9621712010-04-24 17:59:49 +00008600 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00008601fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008602rm -f core conftest.err conftest.$ac_objext \
8603 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008604LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008605fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008606{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
8607$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
8608if test "x$ac_cv_lib_cma_pthread_create" = x""yes; then :
8609 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00008610
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008611 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008612 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008613 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00008614else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00008615
Martin v. Löwis130fb172001-07-19 11:00:41 +00008616 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00008617fi
8618
Guido van Rossum627b2d71993-12-24 10:39:16 +00008619
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008620fi
8621
Guido van Rossum0be3e491997-05-22 20:33:33 +00008622fi
8623
Guido van Rossum49545951997-12-02 19:28:29 +00008624fi
8625
Guido van Rossumb93a8621998-05-07 13:27:32 +00008626fi
8627
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008628fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008629rm -f core conftest.err conftest.$ac_objext \
8630 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008631fi
8632
Martin v. Löwis11437992002-04-12 09:54:03 +00008633
8634fi
8635
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008636
Michael W. Hudson54241132001-12-07 15:38:26 +00008637
Matthias Kloseb9621712010-04-24 17:59:49 +00008638 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
8639$as_echo_n "checking for usconfig in -lmpc... " >&6; }
8640if test "${ac_cv_lib_mpc_usconfig+set}" = set; then :
8641 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008642else
Martin v. Löwis11437992002-04-12 09:54:03 +00008643 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008644LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008645cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008646/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008647
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008648/* Override any GCC internal prototype to avoid an error.
8649 Use char because int might match the return type of a GCC
8650 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008651#ifdef __cplusplus
8652extern "C"
8653#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008654char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008655int
8656main ()
8657{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008658return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008659 ;
8660 return 0;
8661}
8662_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008663if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008664 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008665else
Matthias Kloseb9621712010-04-24 17:59:49 +00008666 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008667fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008668rm -f core conftest.err conftest.$ac_objext \
8669 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008670LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008671fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008672{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
8673$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
8674if test "x$ac_cv_lib_mpc_usconfig" = x""yes; then :
8675 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008676
Martin v. Löwis130fb172001-07-19 11:00:41 +00008677 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008678 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008679 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008680fi
8681
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008682
Neal Norwitza978ab02002-11-02 16:58:05 +00008683 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008684 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
8685$as_echo_n "checking for thr_create in -lthread... " >&6; }
8686if test "${ac_cv_lib_thread_thr_create+set}" = set; then :
8687 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008688else
Martin v. Löwis11437992002-04-12 09:54:03 +00008689 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008690LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008691cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008692/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008693
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008694/* Override any GCC internal prototype to avoid an error.
8695 Use char because int might match the return type of a GCC
8696 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008697#ifdef __cplusplus
8698extern "C"
8699#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008700char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008701int
8702main ()
8703{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008704return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008705 ;
8706 return 0;
8707}
8708_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008709if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008710 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008711else
Matthias Kloseb9621712010-04-24 17:59:49 +00008712 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008713fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008714rm -f core conftest.err conftest.$ac_objext \
8715 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008716LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008717fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008718{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
8719$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
8720if test "x$ac_cv_lib_thread_thr_create" = x""yes; then :
8721 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008722
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008723 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008724 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008725 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008726fi
8727
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008728 fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008729
Martin v. Löwis130fb172001-07-19 11:00:41 +00008730 if test "$USE_THREAD_MODULE" != "#"
8731 then
8732 # If the above checks didn't disable threads, (at least) OSF1
8733 # needs this '-threads' argument during linking.
8734 case $ac_sys_system in
8735 OSF1) LDLAST=-threads;;
8736 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +00008737 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008738fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008739
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008740if test "$posix_threads" = "yes"; then
8741 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008742
Matthias Kloseb9621712010-04-24 17:59:49 +00008743$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008744
8745 fi
8746
8747 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
8748 case $ac_sys_system/$ac_sys_release in
8749 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +00008750$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008751
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008752 ;;
8753 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +00008754$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008755
8756 ;;
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00008757 AIX/5)
Matthias Kloseb9621712010-04-24 17:59:49 +00008758$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00008759
8760 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008761 esac
8762
Matthias Kloseb9621712010-04-24 17:59:49 +00008763 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
8764$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
8765 if test "${ac_cv_pthread_system_supported+set}" = set; then :
8766 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008767else
Matthias Kloseb9621712010-04-24 17:59:49 +00008768 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008769 ac_cv_pthread_system_supported=no
8770else
Matthias Kloseb9621712010-04-24 17:59:49 +00008771 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008772/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008773#include <pthread.h>
8774 void *foo(void *parm) {
8775 return NULL;
8776 }
8777 main() {
8778 pthread_attr_t attr;
8779 pthread_t id;
8780 if (pthread_attr_init(&attr)) exit(-1);
8781 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
8782 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
8783 exit(0);
8784 }
8785_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008786if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008787 ac_cv_pthread_system_supported=yes
8788else
Matthias Kloseb9621712010-04-24 17:59:49 +00008789 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008790fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008791rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8792 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008793fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008794
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008795
Guido van Rossum627b2d71993-12-24 10:39:16 +00008796fi
8797
Matthias Kloseb9621712010-04-24 17:59:49 +00008798 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
8799$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008800 if test "$ac_cv_pthread_system_supported" = "yes"; then
8801
Matthias Kloseb9621712010-04-24 17:59:49 +00008802$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008803
8804 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008805 for ac_func in pthread_sigmask
8806do :
8807 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
8808if test "x$ac_cv_func_pthread_sigmask" = x""yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008809 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008810#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008811_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +00008812 case $ac_sys_system in
8813 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008814
Matthias Kloseb9621712010-04-24 17:59:49 +00008815$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +00008816
8817 ;;
8818 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008819fi
8820done
8821
8822fi
8823
8824
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008825# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +00008826
Matthias Kloseb9621712010-04-24 17:59:49 +00008827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
8828$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008829# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008830if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008831 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008832 no)
Matthias Kloseb9621712010-04-24 17:59:49 +00008833 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8834$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008835 ipv6=no
8836 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00008837 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8838$as_echo "yes" >&6; }
8839 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008840
8841 ipv6=yes
8842 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008843 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008844else
Martin v. Löwis11437992002-04-12 09:54:03 +00008845
Matthias Kloseb9621712010-04-24 17:59:49 +00008846 if test "$cross_compiling" = yes; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008847
Matthias Kloseb9621712010-04-24 17:59:49 +00008848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8849$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008850 ipv6=no
8851
8852else
Matthias Kloseb9621712010-04-24 17:59:49 +00008853 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008854/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008855 /* AF_INET6 available check */
8856#include <sys/types.h>
8857#include <sys/socket.h>
8858main()
8859{
8860 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
8861 exit(1);
8862 else
8863 exit(0);
8864}
8865
Martin v. Löwis11437992002-04-12 09:54:03 +00008866_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008867if ac_fn_c_try_run "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008868
Matthias Kloseb9621712010-04-24 17:59:49 +00008869 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8870$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008871 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +00008872
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008873else
Matthias Kloseb159a552010-04-25 21:00:44 +00008874
Matthias Kloseb9621712010-04-24 17:59:49 +00008875 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8876$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008877 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +00008878
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008879fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008880rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8881 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008882fi
8883
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008884
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008885if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008886 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
8887$as_echo_n "checking if RFC2553 API is available... " >&6; }
8888 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008889/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008890
8891 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008892#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008893int
8894main ()
8895{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008896struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +00008897 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +00008898 ;
8899 return 0;
8900}
Matthias Kloseb159a552010-04-25 21:00:44 +00008901
Martin v. Löwis11437992002-04-12 09:54:03 +00008902_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008903if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008904
8905 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008906$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008907 ipv6=yes
8908
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008909else
Matthias Kloseb159a552010-04-25 21:00:44 +00008910
8911 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008912$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008913 ipv6=no
8914
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008915fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008916rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008917fi
8918
8919if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008920 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008921
8922fi
8923
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008924fi
8925
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008926
8927ipv6type=unknown
8928ipv6lib=none
8929ipv6trylibc=no
8930
8931if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008932 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
8933$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +00008934 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
8935 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008936 case $i in
8937 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +00008938 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008939/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008940
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008941#include <netinet/in.h>
8942#ifdef IPV6_INRIA_VERSION
8943yes
8944#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008945_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008946if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008947 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00008948 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008949fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008950rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008951
8952 ;;
8953 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +00008954 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008955/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008956
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008957#include <netinet/in.h>
8958#ifdef __KAME__
8959yes
8960#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008961_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008962if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008963 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008964 ipv6type=$i;
8965 ipv6lib=inet6
8966 ipv6libdir=/usr/local/v6/lib
8967 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008968fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008969rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008970
8971 ;;
8972 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +00008973 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008974/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008975
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008976#include <features.h>
8977#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
8978yes
8979#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008980_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008981if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008982 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008983 ipv6type=$i;
8984 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008985fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008986rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008987
8988 ;;
8989 linux-inet6)
8990 if test -d /usr/inet6; then
8991 ipv6type=$i
8992 ipv6lib=inet6
8993 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +00008994 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008995 fi
8996 ;;
8997 solaris)
8998 if test -f /etc/netconfig; then
8999 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
9000 ipv6type=$i
9001 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009002 fi
9003 fi
9004 ;;
9005 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +00009006 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009007/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009008
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009009#include <sys/param.h>
9010#ifdef _TOSHIBA_INET6
9011yes
9012#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009013_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009014if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009015 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009016 ipv6type=$i;
9017 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009018 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009019fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009020rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009021
9022 ;;
9023 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +00009024 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009025/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009026
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009027#include </usr/local/v6/include/sys/v6config.h>
9028#ifdef __V6D__
9029yes
9030#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009031_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009032if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009033 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009034 ipv6type=$i;
9035 ipv6lib=v6;
9036 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +00009037 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009038fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009039rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009040
9041 ;;
9042 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +00009043 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009044/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009045
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009046#include <sys/param.h>
9047#ifdef _ZETA_MINAMI_INET6
9048yes
9049#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009050_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009051if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009052 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009053 ipv6type=$i;
9054 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009055 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009056fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009057rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009058
9059 ;;
9060 esac
9061 if test "$ipv6type" != "unknown"; then
9062 break
9063 fi
9064 done
Matthias Kloseb9621712010-04-24 17:59:49 +00009065 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
9066$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009067fi
9068
9069if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
9070 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
9071 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
9072 echo "using lib$ipv6lib"
9073 else
9074 if test $ipv6trylibc = "yes"; then
9075 echo "using libc"
9076 else
9077 echo 'Fatal: no $ipv6lib library found. cannot continue.'
9078 echo "You need to fetch lib$ipv6lib.a from appropriate"
9079 echo 'ipv6 kit and compile beforehand.'
9080 exit 1
9081 fi
9082 fi
9083fi
9084
Matthias Kloseb9621712010-04-24 17:59:49 +00009085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
9086$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
9087cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009088/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009089
9090 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009091int
9092main ()
9093{
9094FSIORefNum fRef = 0
9095 ;
9096 return 0;
9097}
Matthias Kloseb159a552010-04-25 21:00:44 +00009098
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009099_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009100if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009101
Matthias Kloseb159a552010-04-25 21:00:44 +00009102
Matthias Kloseb9621712010-04-24 17:59:49 +00009103$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009104
Matthias Kloseb9621712010-04-24 17:59:49 +00009105 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9106$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009107
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009108else
Matthias Kloseb159a552010-04-25 21:00:44 +00009109
Matthias Kloseb9621712010-04-24 17:59:49 +00009110 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9111$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009112
9113fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009114rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9115
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009116# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +00009117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
9118$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009119
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009120# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009121if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009122 withval=$with_doc_strings;
9123fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009124
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009125
9126if test -z "$with_doc_strings"
9127then with_doc_strings="yes"
9128fi
9129if test "$with_doc_strings" != "no"
9130then
9131
Matthias Kloseb9621712010-04-24 17:59:49 +00009132$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009133
9134fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009135{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
9136$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009137
Neil Schemenauera35c6882001-02-27 04:45:05 +00009138# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +00009139{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
9140$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009141
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009142# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009143if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009144 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009145if test "$withval" != no
9146then
9147
Matthias Kloseb9621712010-04-24 17:59:49 +00009148$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009149
Matthias Kloseb9621712010-04-24 17:59:49 +00009150 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9151$as_echo "yes" >&6; }
9152else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9153$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009154fi
9155else
Matthias Kloseb9621712010-04-24 17:59:49 +00009156 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9157$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009158fi
9159
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009160
9161# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +00009162{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
9163$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009164
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009165# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009166if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009167 withval=$with_pymalloc;
9168fi
Michael W. Hudson54241132001-12-07 15:38:26 +00009169
Neil Schemenauera35c6882001-02-27 04:45:05 +00009170
Neil Schemenauer16c22972002-03-22 15:34:49 +00009171if test -z "$with_pymalloc"
9172then with_pymalloc="yes"
9173fi
9174if test "$with_pymalloc" != "no"
9175then
Martin v. Löwis11437992002-04-12 09:54:03 +00009176
Matthias Kloseb9621712010-04-24 17:59:49 +00009177$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +00009178
9179fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009180{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
9181$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +00009182
Benjamin Peterson05159c42009-12-03 03:01:27 +00009183# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +00009184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
9185$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009186
9187# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009188if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009189 withval=$with_valgrind;
9190else
9191 with_valgrind=no
9192fi
9193
Matthias Kloseb9621712010-04-24 17:59:49 +00009194{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
9195$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009196if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009197 ac_fn_c_check_header_mongrel "$LINENO" "valgrind/valgrind.h" "ac_cv_header_valgrind_valgrind_h" "$ac_includes_default"
9198if test "x$ac_cv_header_valgrind_valgrind_h" = x""yes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009199
Matthias Kloseb9621712010-04-24 17:59:49 +00009200$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +00009201
9202else
Matthias Kloseb9621712010-04-24 17:59:49 +00009203 as_fn_error "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +00009204
9205fi
9206
9207
9208fi
9209
Barry Warsawef82cd72000-06-30 16:21:01 +00009210# Check for --with-wctype-functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009211{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-wctype-functions" >&5
9212$as_echo_n "checking for --with-wctype-functions... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009213
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009214# Check whether --with-wctype-functions was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009215if test "${with_wctype_functions+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009216 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +00009217if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +00009218then
9219
Matthias Kloseb9621712010-04-24 17:59:49 +00009220$as_echo "#define WANT_WCTYPE_FUNCTIONS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009221
Matthias Kloseb9621712010-04-24 17:59:49 +00009222 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9223$as_echo "yes" >&6; }
9224else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9225$as_echo "no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +00009226fi
9227else
Matthias Kloseb9621712010-04-24 17:59:49 +00009228 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9229$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009230fi
9231
Barry Warsawef82cd72000-06-30 16:21:01 +00009232
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009233# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00009234
Guido van Rossum98935bf2001-09-05 19:13:16 +00009235DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +00009236
Guido van Rossume97ee181999-12-20 21:27:22 +00009237# the dlopen() function means we might want to use dynload_shlib.o. some
9238# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +00009239for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +00009240do :
9241 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
9242if test "x$ac_cv_func_dlopen" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009243 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009244#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009245_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +00009246
Guido van Rossume97ee181999-12-20 21:27:22 +00009247fi
Thomas Wouters3a584202000-08-05 23:28:51 +00009248done
Guido van Rossume97ee181999-12-20 21:27:22 +00009249
Michael W. Hudson54241132001-12-07 15:38:26 +00009250
Guido van Rossume97ee181999-12-20 21:27:22 +00009251# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
9252# loading of modules.
9253
Matthias Kloseb9621712010-04-24 17:59:49 +00009254{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
9255$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009256if test -z "$DYNLOADFILE"
9257then
9258 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00009259 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
9260 if test "$ac_cv_func_dlopen" = yes
9261 then DYNLOADFILE="dynload_shlib.o"
9262 else DYNLOADFILE="dynload_aix.o"
9263 fi
9264 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +00009265 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009266 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
9267 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +00009268 *)
9269 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
9270 # out any dynamic loading
9271 if test "$ac_cv_func_dlopen" = yes
9272 then DYNLOADFILE="dynload_shlib.o"
9273 else DYNLOADFILE="dynload_stub.o"
9274 fi
9275 ;;
9276 esac
9277fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009278{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
9279$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009280if test "$DYNLOADFILE" != "dynload_stub.o"
9281then
Martin v. Löwis11437992002-04-12 09:54:03 +00009282
Matthias Kloseb9621712010-04-24 17:59:49 +00009283$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +00009284
9285fi
9286
Neil Schemenauer4e425612001-06-19 15:44:15 +00009287# MACHDEP_OBJS can be set to platform-specific object files needed by Python
9288
Michael W. Hudson54241132001-12-07 15:38:26 +00009289
Matthias Kloseb9621712010-04-24 17:59:49 +00009290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
9291$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009292if test -z "$MACHDEP_OBJS"
9293then
Jack Jansene578a632001-08-15 01:27:14 +00009294 MACHDEP_OBJS=$extra_machdep_objs
9295else
9296 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +00009297fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009298{ $as_echo "$as_me:${as_lineno-$LINENO}: result: MACHDEP_OBJS" >&5
9299$as_echo "MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009300
Guido van Rossum627b2d71993-12-24 10:39:16 +00009301# checks for library functions
Martin v. Löwis823725e2008-03-24 13:39:54 +00009302for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
9303 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +00009304 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +00009305 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Antoine Pitroub7572f02009-12-02 20:46:48 +00009306 initgroups kill killpg lchmod lchown lstat mbrtowc mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +00009307 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +00009308 putenv readlink realpath \
Benjamin Peterson965ce872009-04-05 21:24:58 +00009309 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
9310 setgid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +00009311 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setuid setvbuf \
9312 sigaction siginterrupt sigrelse snprintf strftime strlcpy \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +00009313 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Martin v. Löwis113a0852009-05-29 17:25:39 +00009314 truncate uname unsetenv utimes waitpid wait3 wait4 \
9315 wcscoll wcsftime wcsxfrm _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +00009316do :
9317 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9318ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
9319eval as_val=\$$as_ac_var
9320 if test "x$as_val" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009321 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009322#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009323_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00009324
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009325fi
9326done
9327
Michael W. Hudson54241132001-12-07 15:38:26 +00009328
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009329# For some functions, having a definition is not sufficient, since
9330# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +00009331{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
9332$as_echo_n "checking for chroot... " >&6; }
9333cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009334/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009335#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009336int
9337main ()
9338{
9339void *x=chroot
9340 ;
9341 return 0;
9342}
9343_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009344if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009345
Matthias Kloseb9621712010-04-24 17:59:49 +00009346$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009347
Matthias Kloseb159a552010-04-25 21:00:44 +00009348 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009349$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009350else
Matthias Kloseb9621712010-04-24 17:59:49 +00009351 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9352$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009353
9354fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009355rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009356{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
9357$as_echo_n "checking for link... " >&6; }
9358cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009359/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009360#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009361int
9362main ()
9363{
9364void *x=link
9365 ;
9366 return 0;
9367}
9368_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009369if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009370
Matthias Kloseb9621712010-04-24 17:59:49 +00009371$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009372
Matthias Kloseb159a552010-04-25 21:00:44 +00009373 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009374$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009375else
Matthias Kloseb9621712010-04-24 17:59:49 +00009376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9377$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009378
9379fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009380rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009381{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
9382$as_echo_n "checking for symlink... " >&6; }
9383cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009384/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009385#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009386int
9387main ()
9388{
9389void *x=symlink
9390 ;
9391 return 0;
9392}
9393_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009394if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009395
Matthias Kloseb9621712010-04-24 17:59:49 +00009396$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009397
Matthias Kloseb159a552010-04-25 21:00:44 +00009398 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009399$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009400else
Matthias Kloseb9621712010-04-24 17:59:49 +00009401 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9402$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009403
9404fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009405rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009406{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
9407$as_echo_n "checking for fchdir... " >&6; }
9408cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009409/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009410#include <unistd.h>
9411int
9412main ()
9413{
9414void *x=fchdir
9415 ;
9416 return 0;
9417}
9418_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009419if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009420
Matthias Kloseb9621712010-04-24 17:59:49 +00009421$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009422
Matthias Kloseb159a552010-04-25 21:00:44 +00009423 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009424$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009425else
Matthias Kloseb9621712010-04-24 17:59:49 +00009426 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9427$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009428
9429fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009430rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
9432$as_echo_n "checking for fsync... " >&6; }
9433cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009434/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009435#include <unistd.h>
9436int
9437main ()
9438{
9439void *x=fsync
9440 ;
9441 return 0;
9442}
9443_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009444if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009445
Matthias Kloseb9621712010-04-24 17:59:49 +00009446$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009447
Matthias Kloseb159a552010-04-25 21:00:44 +00009448 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009449$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009450else
Matthias Kloseb9621712010-04-24 17:59:49 +00009451 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9452$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009453
9454fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009455rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009456{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
9457$as_echo_n "checking for fdatasync... " >&6; }
9458cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009459/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009460#include <unistd.h>
9461int
9462main ()
9463{
9464void *x=fdatasync
9465 ;
9466 return 0;
9467}
9468_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009469if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009470
Matthias Kloseb9621712010-04-24 17:59:49 +00009471$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009472
Matthias Kloseb159a552010-04-25 21:00:44 +00009473 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009474$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009475else
Matthias Kloseb9621712010-04-24 17:59:49 +00009476 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9477$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009478
9479fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009480rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
9482$as_echo_n "checking for epoll... " >&6; }
9483cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009484/* end confdefs.h. */
9485#include <sys/epoll.h>
9486int
9487main ()
9488{
9489void *x=epoll_create
9490 ;
9491 return 0;
9492}
9493_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009494if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009495
Matthias Kloseb9621712010-04-24 17:59:49 +00009496$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009497
Matthias Kloseb159a552010-04-25 21:00:44 +00009498 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009499$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009500else
Matthias Kloseb9621712010-04-24 17:59:49 +00009501 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9502$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009503
9504fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009505rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009506{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
9507$as_echo_n "checking for kqueue... " >&6; }
9508cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009509/* end confdefs.h. */
9510
9511#include <sys/types.h>
9512#include <sys/event.h>
9513
9514int
9515main ()
9516{
9517int x=kqueue()
9518 ;
9519 return 0;
9520}
9521_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009522if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009523
Matthias Kloseb9621712010-04-24 17:59:49 +00009524$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009525
Matthias Kloseb159a552010-04-25 21:00:44 +00009526 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009527$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009528else
Matthias Kloseb9621712010-04-24 17:59:49 +00009529 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9530$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009531
9532fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009533rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +00009534# On some systems (eg. FreeBSD 5), we would find a definition of the
9535# functions ctermid_r, setgroups in the library, but no prototype
9536# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
9537# address to avoid compiler warnings and potential miscompilations
9538# because of the missing prototypes.
9539
Matthias Kloseb9621712010-04-24 17:59:49 +00009540{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
9541$as_echo_n "checking for ctermid_r... " >&6; }
9542cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009543/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +00009544
9545#include "confdefs.h"
9546#include <stdio.h>
9547
Martin v. Löwisd5843682002-11-21 20:41:28 +00009548int
9549main ()
9550{
9551void* p = ctermid_r
9552 ;
9553 return 0;
9554}
9555_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009556if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +00009557
Matthias Kloseb9621712010-04-24 17:59:49 +00009558$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +00009559
Matthias Kloseb159a552010-04-25 21:00:44 +00009560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009561$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009562else
Matthias Kloseb9621712010-04-24 17:59:49 +00009563 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9564$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009565
9566fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009567rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9568
Matthias Kloseb9621712010-04-24 17:59:49 +00009569{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock" >&5
9570$as_echo_n "checking for flock... " >&6; }
9571cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009572/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009573
9574#include "confdefs.h"
9575#include <sys/file.h>
9576
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009577int
9578main ()
9579{
9580void* p = flock
9581 ;
9582 return 0;
9583}
9584_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009585if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009586
Matthias Kloseb9621712010-04-24 17:59:49 +00009587$as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009588
Matthias Kloseb159a552010-04-25 21:00:44 +00009589 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009590$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009591else
Matthias Kloseb9621712010-04-24 17:59:49 +00009592 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9593$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009594
9595fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009596rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9597
Matthias Kloseb9621712010-04-24 17:59:49 +00009598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
9599$as_echo_n "checking for getpagesize... " >&6; }
9600cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009601/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009602
9603#include "confdefs.h"
9604#include <unistd.h>
9605
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009606int
9607main ()
9608{
9609void* p = getpagesize
9610 ;
9611 return 0;
9612}
9613_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009614if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009615
Matthias Kloseb9621712010-04-24 17:59:49 +00009616$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009617
Matthias Kloseb159a552010-04-25 21:00:44 +00009618 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009619$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009620else
Matthias Kloseb9621712010-04-24 17:59:49 +00009621 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9622$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009623
9624fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009625rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009626
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009627for ac_prog in true
9628do
9629 # Extract the first word of "$ac_prog", so it can be a program name with args.
9630set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00009631{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9632$as_echo_n "checking for $ac_word... " >&6; }
9633if test "${ac_cv_prog_TRUE+set}" = set; then :
9634 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009635else
9636 if test -n "$TRUE"; then
9637 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
9638else
9639as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9640for as_dir in $PATH
9641do
9642 IFS=$as_save_IFS
9643 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009644 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009645 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 +00009646 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00009647 $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 +00009648 break 2
9649 fi
9650done
Matthias Kloseb9621712010-04-24 17:59:49 +00009651 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009652IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009653
9654fi
9655fi
9656TRUE=$ac_cv_prog_TRUE
9657if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009658 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
9659$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009660else
Matthias Kloseb9621712010-04-24 17:59:49 +00009661 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9662$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009663fi
9664
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009665
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009666 test -n "$TRUE" && break
9667done
9668test -n "$TRUE" || TRUE="/bin/true"
9669
9670
Matthias Kloseb9621712010-04-24 17:59:49 +00009671{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
9672$as_echo_n "checking for inet_aton in -lc... " >&6; }
9673if test "${ac_cv_lib_c_inet_aton+set}" = set; then :
9674 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009675else
9676 ac_check_lib_save_LIBS=$LIBS
9677LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009678cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009679/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009680
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009681/* Override any GCC internal prototype to avoid an error.
9682 Use char because int might match the return type of a GCC
9683 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009684#ifdef __cplusplus
9685extern "C"
9686#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009687char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009688int
9689main ()
9690{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009691return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009692 ;
9693 return 0;
9694}
9695_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009696if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009697 ac_cv_lib_c_inet_aton=yes
9698else
Matthias Kloseb9621712010-04-24 17:59:49 +00009699 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009700fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009701rm -f core conftest.err conftest.$ac_objext \
9702 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009703LIBS=$ac_check_lib_save_LIBS
9704fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009705{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
9706$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
9707if test "x$ac_cv_lib_c_inet_aton" = x""yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009708 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009709else
Matthias Kloseb9621712010-04-24 17:59:49 +00009710 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
9711$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
9712if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then :
9713 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009714else
9715 ac_check_lib_save_LIBS=$LIBS
9716LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009717cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009718/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009719
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009720/* Override any GCC internal prototype to avoid an error.
9721 Use char because int might match the return type of a GCC
9722 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009723#ifdef __cplusplus
9724extern "C"
9725#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009726char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009727int
9728main ()
9729{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009730return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009731 ;
9732 return 0;
9733}
9734_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009735if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009736 ac_cv_lib_resolv_inet_aton=yes
9737else
Matthias Kloseb9621712010-04-24 17:59:49 +00009738 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009739fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009740rm -f core conftest.err conftest.$ac_objext \
9741 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009742LIBS=$ac_check_lib_save_LIBS
9743fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009744{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
9745$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
9746if test "x$ac_cv_lib_resolv_inet_aton" = x""yes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009747 cat >>confdefs.h <<_ACEOF
9748#define HAVE_LIBRESOLV 1
9749_ACEOF
9750
9751 LIBS="-lresolv $LIBS"
9752
9753fi
9754
9755
9756fi
9757
9758
Christian Heimesd0764e22007-12-04 15:00:33 +00009759# On Tru64, chflags seems to be present, but calling it will
9760# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +00009761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
9762$as_echo_n "checking for chflags... " >&6; }
9763if test "${ac_cv_have_chflags+set}" = set; then :
9764 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009765else
Matthias Kloseb9621712010-04-24 17:59:49 +00009766 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009767 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +00009768else
Matthias Kloseb9621712010-04-24 17:59:49 +00009769 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +00009770/* end confdefs.h. */
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009771[
Christian Heimesd0764e22007-12-04 15:00:33 +00009772#include <sys/stat.h>
9773#include <unistd.h>
9774int main(int argc, char*argv[])
9775{
9776 if(chflags(argv[0], 0) != 0)
9777 return 1;
9778 return 0;
9779}
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009780]
Christian Heimesd0764e22007-12-04 15:00:33 +00009781_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009782if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009783 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009784else
Matthias Kloseb9621712010-04-24 17:59:49 +00009785 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009786fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009787rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9788 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009789fi
9790
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009791
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009792fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009793{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
9794$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009795if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009796 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
9797if test "x$ac_cv_func_chflags" = x""yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009798 ac_cv_have_chflags="yes"
9799else
9800 ac_cv_have_chflags="no"
9801fi
9802
9803fi
9804if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009805
Matthias Kloseb9621712010-04-24 17:59:49 +00009806$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009807
9808fi
9809
Matthias Kloseb9621712010-04-24 17:59:49 +00009810{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
9811$as_echo_n "checking for lchflags... " >&6; }
9812if test "${ac_cv_have_lchflags+set}" = set; then :
9813 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009814else
Matthias Kloseb9621712010-04-24 17:59:49 +00009815 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009816 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +00009817else
Matthias Kloseb9621712010-04-24 17:59:49 +00009818 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +00009819/* end confdefs.h. */
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009820[
Christian Heimesd0764e22007-12-04 15:00:33 +00009821#include <sys/stat.h>
9822#include <unistd.h>
9823int main(int argc, char*argv[])
9824{
9825 if(lchflags(argv[0], 0) != 0)
9826 return 1;
9827 return 0;
9828}
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009829]
Christian Heimesd0764e22007-12-04 15:00:33 +00009830_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009831if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009832 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009833else
Matthias Kloseb9621712010-04-24 17:59:49 +00009834 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +00009835fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009836rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9837 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009838fi
9839
9840
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009841fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009842{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
9843$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009844if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009845 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
9846if test "x$ac_cv_func_lchflags" = x""yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009847 ac_cv_have_lchflags="yes"
9848else
9849 ac_cv_have_lchflags="no"
9850fi
9851
9852fi
9853if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009854
Matthias Kloseb9621712010-04-24 17:59:49 +00009855$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009856
9857fi
9858
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009859case $ac_sys_system/$ac_sys_release in
9860Darwin/*)
9861 _CUR_CFLAGS="${CFLAGS}"
9862 _CUR_LDFLAGS="${LDFLAGS}"
9863 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
9864 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
9865 ;;
9866esac
9867
Matthias Kloseb9621712010-04-24 17:59:49 +00009868{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
9869$as_echo_n "checking for inflateCopy in -lz... " >&6; }
9870if test "${ac_cv_lib_z_inflateCopy+set}" = set; then :
9871 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009872else
9873 ac_check_lib_save_LIBS=$LIBS
9874LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009875cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009876/* end confdefs.h. */
9877
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009878/* Override any GCC internal prototype to avoid an error.
9879 Use char because int might match the return type of a GCC
9880 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009881#ifdef __cplusplus
9882extern "C"
9883#endif
9884char inflateCopy ();
9885int
9886main ()
9887{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009888return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009889 ;
9890 return 0;
9891}
9892_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009893if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009894 ac_cv_lib_z_inflateCopy=yes
9895else
Matthias Kloseb9621712010-04-24 17:59:49 +00009896 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009897fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009898rm -f core conftest.err conftest.$ac_objext \
9899 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009900LIBS=$ac_check_lib_save_LIBS
9901fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009902{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
9903$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
9904if test "x$ac_cv_lib_z_inflateCopy" = x""yes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009905
Matthias Kloseb9621712010-04-24 17:59:49 +00009906$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009907
9908fi
9909
9910
9911case $ac_sys_system/$ac_sys_release in
9912Darwin/*)
9913 CFLAGS="${_CUR_CFLAGS}"
9914 LDFLAGS="${_CUR_LDFLAGS}"
9915 ;;
9916esac
9917
Matthias Kloseb9621712010-04-24 17:59:49 +00009918{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
9919$as_echo_n "checking for hstrerror... " >&6; }
9920cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009921/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +00009922
9923#include "confdefs.h"
9924#include <netdb.h>
9925
Martin v. Löwise9416172003-05-03 10:12:45 +00009926int
9927main ()
9928{
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009929void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +00009930 ;
9931 return 0;
9932}
9933_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009934if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +00009935
Matthias Kloseb9621712010-04-24 17:59:49 +00009936$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +00009937
Matthias Kloseb159a552010-04-25 21:00:44 +00009938 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009939$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +00009940else
Matthias Kloseb9621712010-04-24 17:59:49 +00009941 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9942$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +00009943
9944fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009945rm -f core conftest.err conftest.$ac_objext \
9946 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009947
Matthias Kloseb9621712010-04-24 17:59:49 +00009948{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
9949$as_echo_n "checking for inet_aton... " >&6; }
9950cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009951/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +00009952
9953#include "confdefs.h"
Martin v. Löwis86d66262006-02-17 08:40:11 +00009954#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +00009955#include <sys/socket.h>
9956#include <netinet/in.h>
9957#include <arpa/inet.h>
9958
Martin v. Löwise9416172003-05-03 10:12:45 +00009959int
9960main ()
9961{
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009962void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +00009963 ;
9964 return 0;
9965}
9966_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009967if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +00009968
Matthias Kloseb9621712010-04-24 17:59:49 +00009969$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +00009970
Matthias Kloseb159a552010-04-25 21:00:44 +00009971 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009972$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +00009973else
Matthias Kloseb9621712010-04-24 17:59:49 +00009974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9975$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +00009976
9977fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009978rm -f core conftest.err conftest.$ac_objext \
9979 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009980
Matthias Kloseb9621712010-04-24 17:59:49 +00009981{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
9982$as_echo_n "checking for inet_pton... " >&6; }
9983cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009984/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +00009985
9986#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +00009987#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +00009988#include <sys/socket.h>
9989#include <netinet/in.h>
9990#include <arpa/inet.h>
9991
Martin v. Löwise9416172003-05-03 10:12:45 +00009992int
9993main ()
9994{
9995void* p = inet_pton
9996 ;
9997 return 0;
9998}
9999_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010000if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010001
Matthias Kloseb9621712010-04-24 17:59:49 +000010002$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010003
Matthias Kloseb159a552010-04-25 21:00:44 +000010004 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010005$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010006else
Matthias Kloseb9621712010-04-24 17:59:49 +000010007 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10008$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010009
10010fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010011rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000010012
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010013# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000010014{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
10015$as_echo_n "checking for setgroups... " >&6; }
10016cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010017/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010018
10019#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010020#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010021#ifdef HAVE_GRP_H
10022#include <grp.h>
10023#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000010024
Martin v. Löwisd5843682002-11-21 20:41:28 +000010025int
10026main ()
10027{
10028void* p = setgroups
10029 ;
10030 return 0;
10031}
10032_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010033if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010034
Matthias Kloseb9621712010-04-24 17:59:49 +000010035$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010036
Matthias Kloseb159a552010-04-25 21:00:44 +000010037 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010038$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010039else
Matthias Kloseb9621712010-04-24 17:59:49 +000010040 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10041$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010042
10043fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010044rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010045
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010046# check for openpty and forkpty
10047
10048for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010049do :
10050 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
10051if test "x$ac_cv_func_openpty" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010052 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010053#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010054_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010055
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010056else
Matthias Kloseb9621712010-04-24 17:59:49 +000010057 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
10058$as_echo_n "checking for openpty in -lutil... " >&6; }
10059if test "${ac_cv_lib_util_openpty+set}" = set; then :
10060 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010061else
Martin v. Löwis11437992002-04-12 09:54:03 +000010062 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010063LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010064cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010065/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010066
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010067/* Override any GCC internal prototype to avoid an error.
10068 Use char because int might match the return type of a GCC
10069 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010070#ifdef __cplusplus
10071extern "C"
10072#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010073char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010074int
10075main ()
10076{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010077return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010078 ;
10079 return 0;
10080}
10081_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010082if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010083 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010084else
Matthias Kloseb9621712010-04-24 17:59:49 +000010085 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010086fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010087rm -f core conftest.err conftest.$ac_objext \
10088 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010089LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010090fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010091{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
10092$as_echo "$ac_cv_lib_util_openpty" >&6; }
10093if test "x$ac_cv_lib_util_openpty" = x""yes; then :
10094 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010095 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010096else
Matthias Kloseb9621712010-04-24 17:59:49 +000010097 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
10098$as_echo_n "checking for openpty in -lbsd... " >&6; }
10099if test "${ac_cv_lib_bsd_openpty+set}" = set; then :
10100 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010101else
10102 ac_check_lib_save_LIBS=$LIBS
10103LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010104cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010105/* end confdefs.h. */
10106
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010107/* Override any GCC internal prototype to avoid an error.
10108 Use char because int might match the return type of a GCC
10109 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010110#ifdef __cplusplus
10111extern "C"
10112#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010113char openpty ();
10114int
10115main ()
10116{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010117return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010118 ;
10119 return 0;
10120}
10121_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010122if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010123 ac_cv_lib_bsd_openpty=yes
10124else
Matthias Kloseb9621712010-04-24 17:59:49 +000010125 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010126fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010127rm -f core conftest.err conftest.$ac_objext \
10128 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010129LIBS=$ac_check_lib_save_LIBS
10130fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010131{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
10132$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
10133if test "x$ac_cv_lib_bsd_openpty" = x""yes; then :
10134 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010135 LIBS="$LIBS -lbsd"
10136fi
10137
10138
10139fi
10140
Fred Drake8cef4cf2000-06-28 16:40:38 +000010141
10142fi
10143done
10144
10145for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010146do :
10147 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
10148if test "x$ac_cv_func_forkpty" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010149 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010150#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010151_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010152
Fred Drake8cef4cf2000-06-28 16:40:38 +000010153else
Matthias Kloseb9621712010-04-24 17:59:49 +000010154 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
10155$as_echo_n "checking for forkpty in -lutil... " >&6; }
10156if test "${ac_cv_lib_util_forkpty+set}" = set; then :
10157 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010158else
Martin v. Löwis11437992002-04-12 09:54:03 +000010159 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010160LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010161cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010162/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010163
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010164/* Override any GCC internal prototype to avoid an error.
10165 Use char because int might match the return type of a GCC
10166 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010167#ifdef __cplusplus
10168extern "C"
10169#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010170char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010171int
10172main ()
10173{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010174return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010175 ;
10176 return 0;
10177}
10178_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010179if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010180 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010181else
Matthias Kloseb9621712010-04-24 17:59:49 +000010182 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010183fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010184rm -f core conftest.err conftest.$ac_objext \
10185 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010186LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010187fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010188{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
10189$as_echo "$ac_cv_lib_util_forkpty" >&6; }
10190if test "x$ac_cv_lib_util_forkpty" = x""yes; then :
10191 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010192 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010193else
Matthias Kloseb9621712010-04-24 17:59:49 +000010194 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
10195$as_echo_n "checking for forkpty in -lbsd... " >&6; }
10196if test "${ac_cv_lib_bsd_forkpty+set}" = set; then :
10197 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010198else
10199 ac_check_lib_save_LIBS=$LIBS
10200LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010201cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010202/* end confdefs.h. */
10203
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010204/* Override any GCC internal prototype to avoid an error.
10205 Use char because int might match the return type of a GCC
10206 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010207#ifdef __cplusplus
10208extern "C"
10209#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010210char forkpty ();
10211int
10212main ()
10213{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010214return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010215 ;
10216 return 0;
10217}
10218_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010219if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010220 ac_cv_lib_bsd_forkpty=yes
10221else
Matthias Kloseb9621712010-04-24 17:59:49 +000010222 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010223fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010224rm -f core conftest.err conftest.$ac_objext \
10225 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010226LIBS=$ac_check_lib_save_LIBS
10227fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010228{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
10229$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
10230if test "x$ac_cv_lib_bsd_forkpty" = x""yes; then :
10231 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010232 LIBS="$LIBS -lbsd"
10233fi
10234
10235
10236fi
10237
Fred Drake8cef4cf2000-06-28 16:40:38 +000010238
10239fi
10240done
10241
Jack Jansendd19cf82001-12-06 22:36:17 +000010242
Christian Heimesb186d002008-03-18 15:15:01 +000010243# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000010244for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000010245do :
10246 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
10247if test "x$ac_cv_func_memmove" = x""yes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000010248 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010249#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000010250_ACEOF
10251
10252fi
10253done
10254
10255
Michael W. Hudson54241132001-12-07 15:38:26 +000010256# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000010257for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000010258do :
10259 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10260ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10261eval as_val=\$$as_ac_var
10262 if test "x$as_val" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010263 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010264#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010265_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000010266
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010267fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000010268done
10269
Michael W. Hudson54241132001-12-07 15:38:26 +000010270
Christian Heimesb186d002008-03-18 15:15:01 +000010271for ac_func in dup2 getcwd strdup
Matthias Kloseb9621712010-04-24 17:59:49 +000010272do :
10273 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10274ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10275eval as_val=\$$as_ac_var
10276 if test "x$as_val" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010277 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010278#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010279_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000010280
Martin v. Löwis1142de32002-03-29 16:28:31 +000010281else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010282 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000010283 *" $ac_func.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010284 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
10285 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010286esac
10287
Martin v. Löwis1142de32002-03-29 16:28:31 +000010288fi
10289done
10290
10291
10292for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010293do :
10294 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
10295if test "x$ac_cv_func_getpgrp" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010296 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010297#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010298_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010299 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010300/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010301#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010302int
10303main ()
10304{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010305getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010306 ;
10307 return 0;
10308}
10309_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010310if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010311
Matthias Kloseb9621712010-04-24 17:59:49 +000010312$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +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 Rossum627b2d71993-12-24 10:39:16 +000010317fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010318done
Guido van Rossum627b2d71993-12-24 10:39:16 +000010319
Jack Jansen150753c2003-03-29 22:07:47 +000010320for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010321do :
10322 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
10323if test "x$ac_cv_func_setpgrp" = x""yes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000010324 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010325#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000010326_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010327 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010328/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000010329#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000010330int
10331main ()
10332{
10333setpgrp(0,0);
10334 ;
10335 return 0;
10336}
10337_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010338if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010339
Matthias Kloseb9621712010-04-24 17:59:49 +000010340$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010341
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010342fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010343rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000010344
10345fi
10346done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010347
Thomas Wouters3a584202000-08-05 23:28:51 +000010348for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000010349do :
10350 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
10351if test "x$ac_cv_func_gettimeofday" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010352 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010353#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010354_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010355 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010356/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010357#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010358int
10359main ()
10360{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010361gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010362 ;
10363 return 0;
10364}
10365_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010366if ac_fn_c_try_compile "$LINENO"; then :
10367
Guido van Rossum627b2d71993-12-24 10:39:16 +000010368else
Skip Montanaro6dead952003-09-25 14:50:04 +000010369
Matthias Kloseb9621712010-04-24 17:59:49 +000010370$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010371
Martin v. Löwis11437992002-04-12 09:54:03 +000010372
Guido van Rossum627b2d71993-12-24 10:39:16 +000010373fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010374rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010375
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010376fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010377done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010378
Michael W. Hudson54241132001-12-07 15:38:26 +000010379
Matthias Kloseb9621712010-04-24 17:59:49 +000010380{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
10381$as_echo_n "checking for major... " >&6; }
10382cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010383/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010384
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010385#if defined(MAJOR_IN_MKDEV)
10386#include <sys/mkdev.h>
10387#elif defined(MAJOR_IN_SYSMACROS)
10388#include <sys/sysmacros.h>
10389#else
10390#include <sys/types.h>
10391#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010392
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010393int
10394main ()
10395{
10396
10397 makedev(major(0),minor(0));
10398
10399 ;
10400 return 0;
10401}
10402_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010403if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010404
10405
Matthias Kloseb9621712010-04-24 17:59:49 +000010406$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010407
Matthias Kloseb9621712010-04-24 17:59:49 +000010408 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10409$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010410
10411else
Skip Montanaro6dead952003-09-25 14:50:04 +000010412
Matthias Kloseb9621712010-04-24 17:59:49 +000010413 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10414$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010415
10416fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010417rm -f core conftest.err conftest.$ac_objext \
10418 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010419
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010420# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000010421# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000010422{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
10423$as_echo_n "checking for getaddrinfo... " >&6; }
10424cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010425/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010426
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010427#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010428#include <sys/socket.h>
10429#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010430#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010431
Martin v. Löwis11437992002-04-12 09:54:03 +000010432int
10433main ()
10434{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010435getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000010436 ;
10437 return 0;
10438}
10439_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010440if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010441 have_getaddrinfo=yes
10442else
Matthias Kloseb9621712010-04-24 17:59:49 +000010443 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010444fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010445rm -f core conftest.err conftest.$ac_objext \
10446 conftest$ac_exeext conftest.$ac_ext
10447{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
10448$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010449if test $have_getaddrinfo = yes
10450then
Matthias Kloseb9621712010-04-24 17:59:49 +000010451 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
10452$as_echo_n "checking getaddrinfo bug... " >&6; }
10453 if test "${ac_cv_buggy_getaddrinfo+set}" = set; then :
10454 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010455else
Matthias Kloseb9621712010-04-24 17:59:49 +000010456 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010457 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010458else
Matthias Kloseb9621712010-04-24 17:59:49 +000010459 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010460/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010461
10462#include <sys/types.h>
10463#include <netdb.h>
10464#include <string.h>
10465#include <sys/socket.h>
10466#include <netinet/in.h>
10467
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010468int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010469{
10470 int passive, gaierr, inet4 = 0, inet6 = 0;
10471 struct addrinfo hints, *ai, *aitop;
10472 char straddr[INET6_ADDRSTRLEN], strport[16];
10473
10474 for (passive = 0; passive <= 1; passive++) {
10475 memset(&hints, 0, sizeof(hints));
10476 hints.ai_family = AF_UNSPEC;
10477 hints.ai_flags = passive ? AI_PASSIVE : 0;
10478 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000010479 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010480 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
10481 (void)gai_strerror(gaierr);
10482 goto bad;
10483 }
10484 for (ai = aitop; ai; ai = ai->ai_next) {
10485 if (ai->ai_addr == NULL ||
10486 ai->ai_addrlen == 0 ||
10487 getnameinfo(ai->ai_addr, ai->ai_addrlen,
10488 straddr, sizeof(straddr), strport, sizeof(strport),
10489 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
10490 goto bad;
10491 }
10492 switch (ai->ai_family) {
10493 case AF_INET:
10494 if (strcmp(strport, "54321") != 0) {
10495 goto bad;
10496 }
10497 if (passive) {
10498 if (strcmp(straddr, "0.0.0.0") != 0) {
10499 goto bad;
10500 }
10501 } else {
10502 if (strcmp(straddr, "127.0.0.1") != 0) {
10503 goto bad;
10504 }
10505 }
10506 inet4++;
10507 break;
10508 case AF_INET6:
10509 if (strcmp(strport, "54321") != 0) {
10510 goto bad;
10511 }
10512 if (passive) {
10513 if (strcmp(straddr, "::") != 0) {
10514 goto bad;
10515 }
10516 } else {
10517 if (strcmp(straddr, "::1") != 0) {
10518 goto bad;
10519 }
10520 }
10521 inet6++;
10522 break;
10523 case AF_UNSPEC:
10524 goto bad;
10525 break;
10526 default:
10527 /* another family support? */
10528 break;
10529 }
10530 }
10531 }
10532
10533 if (!(inet4 == 0 || inet4 == 2))
10534 goto bad;
10535 if (!(inet6 == 0 || inet6 == 2))
10536 goto bad;
10537
10538 if (aitop)
10539 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010540 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010541
10542 bad:
10543 if (aitop)
10544 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010545 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010546}
10547
Martin v. Löwis11437992002-04-12 09:54:03 +000010548_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010549if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010550 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010551else
Matthias Kloseb9621712010-04-24 17:59:49 +000010552 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010553fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010554rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10555 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010556fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010557
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010558fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010559
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010560fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010561
Mark Dickinson2df5d282009-12-31 21:22:50 +000010562if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010563then
10564 if test $ipv6 = yes
10565 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010566 echo 'Fatal: You must get working getaddrinfo() function.'
10567 echo ' or you can specify "--disable-ipv6"'.
10568 exit 1
10569 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010570else
Martin v. Löwis11437992002-04-12 09:54:03 +000010571
Matthias Kloseb9621712010-04-24 17:59:49 +000010572$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010573
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010574fi
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010575for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000010576do :
10577 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
10578if test "x$ac_cv_func_getnameinfo" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010579 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010580#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010581_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010582
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010583fi
10584done
10585
Michael W. Hudson54241132001-12-07 15:38:26 +000010586
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010587# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000010588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
10589$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
10590if test "${ac_cv_header_time+set}" = set; then :
10591 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010592else
Matthias Kloseb9621712010-04-24 17:59:49 +000010593 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010594/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010595#include <sys/types.h>
10596#include <sys/time.h>
10597#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010598
Martin v. Löwis11437992002-04-12 09:54:03 +000010599int
10600main ()
10601{
10602if ((struct tm *) 0)
10603return 0;
10604 ;
10605 return 0;
10606}
10607_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010608if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010609 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000010610else
Matthias Kloseb9621712010-04-24 17:59:49 +000010611 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010612fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010613rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010614fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010615{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
10616$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010617if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010618
Matthias Kloseb9621712010-04-24 17:59:49 +000010619$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010620
10621fi
10622
Matthias Kloseb9621712010-04-24 17:59:49 +000010623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
10624$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
10625if test "${ac_cv_struct_tm+set}" = set; then :
10626 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010627else
Matthias Kloseb9621712010-04-24 17:59:49 +000010628 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010629/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010630#include <sys/types.h>
10631#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010632
Martin v. Löwis11437992002-04-12 09:54:03 +000010633int
10634main ()
10635{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010636struct tm tm;
10637 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000010638 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000010639 ;
10640 return 0;
10641}
10642_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010643if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010644 ac_cv_struct_tm=time.h
10645else
Matthias Kloseb9621712010-04-24 17:59:49 +000010646 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010647fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010648rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010649fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010650{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
10651$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010652if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010653
Matthias Kloseb9621712010-04-24 17:59:49 +000010654$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010655
10656fi
10657
Matthias Kloseb9621712010-04-24 17:59:49 +000010658ac_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 +000010659#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000010660
Matthias Kloseb9621712010-04-24 17:59:49 +000010661"
10662if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010663
10664cat >>confdefs.h <<_ACEOF
10665#define HAVE_STRUCT_TM_TM_ZONE 1
10666_ACEOF
10667
10668
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010669fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010670
Martin v. Löwis11437992002-04-12 09:54:03 +000010671if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
10672
Matthias Kloseb9621712010-04-24 17:59:49 +000010673$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010674
10675else
Matthias Kloseb9621712010-04-24 17:59:49 +000010676 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
10677"
10678if test "x$ac_cv_have_decl_tzname" = x""yes; then :
10679 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010680else
Matthias Kloseb9621712010-04-24 17:59:49 +000010681 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010682fi
10683
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010684cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010685#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010686_ACEOF
10687
Matthias Kloseb9621712010-04-24 17:59:49 +000010688 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
10689$as_echo_n "checking for tzname... " >&6; }
10690if test "${ac_cv_var_tzname+set}" = set; then :
10691 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010692else
Matthias Kloseb9621712010-04-24 17:59:49 +000010693 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010694/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010695#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010696#if !HAVE_DECL_TZNAME
10697extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000010698#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010699
Martin v. Löwis11437992002-04-12 09:54:03 +000010700int
10701main ()
10702{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010703return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000010704 ;
10705 return 0;
10706}
10707_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010708if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010709 ac_cv_var_tzname=yes
10710else
Matthias Kloseb9621712010-04-24 17:59:49 +000010711 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010712fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010713rm -f core conftest.err conftest.$ac_objext \
10714 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000010715fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010716{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
10717$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010718 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010719
Matthias Kloseb9621712010-04-24 17:59:49 +000010720$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010721
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010722 fi
10723fi
10724
Matthias Kloseb9621712010-04-24 17:59:49 +000010725ac_fn_c_check_member "$LINENO" "struct stat" "st_rdev" "ac_cv_member_struct_stat_st_rdev" "$ac_includes_default"
10726if test "x$ac_cv_member_struct_stat_st_rdev" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010727
10728cat >>confdefs.h <<_ACEOF
10729#define HAVE_STRUCT_STAT_ST_RDEV 1
10730_ACEOF
10731
10732
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010733fi
10734
Matthias Kloseb9621712010-04-24 17:59:49 +000010735ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
10736if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000010737
Martin v. Löwis11437992002-04-12 09:54:03 +000010738cat >>confdefs.h <<_ACEOF
10739#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
10740_ACEOF
10741
10742
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010743fi
10744
Matthias Kloseb9621712010-04-24 17:59:49 +000010745ac_fn_c_check_member "$LINENO" "struct stat" "st_flags" "ac_cv_member_struct_stat_st_flags" "$ac_includes_default"
10746if test "x$ac_cv_member_struct_stat_st_flags" = x""yes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000010747
10748cat >>confdefs.h <<_ACEOF
10749#define HAVE_STRUCT_STAT_ST_FLAGS 1
10750_ACEOF
10751
10752
10753fi
10754
Matthias Kloseb9621712010-04-24 17:59:49 +000010755ac_fn_c_check_member "$LINENO" "struct stat" "st_gen" "ac_cv_member_struct_stat_st_gen" "$ac_includes_default"
10756if test "x$ac_cv_member_struct_stat_st_gen" = x""yes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000010757
10758cat >>confdefs.h <<_ACEOF
10759#define HAVE_STRUCT_STAT_ST_GEN 1
10760_ACEOF
10761
10762
10763fi
10764
Matthias Kloseb9621712010-04-24 17:59:49 +000010765ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtime" "ac_cv_member_struct_stat_st_birthtime" "$ac_includes_default"
10766if test "x$ac_cv_member_struct_stat_st_birthtime" = x""yes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000010767
10768cat >>confdefs.h <<_ACEOF
10769#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
10770_ACEOF
10771
10772
10773fi
10774
Matthias Kloseb9621712010-04-24 17:59:49 +000010775ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
10776if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000010777
Martin v. Löwis11437992002-04-12 09:54:03 +000010778cat >>confdefs.h <<_ACEOF
10779#define HAVE_STRUCT_STAT_ST_BLOCKS 1
10780_ACEOF
10781
10782
Matthias Kloseb9621712010-04-24 17:59:49 +000010783$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010784
10785else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010786 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000010787 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010788 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
10789 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010790esac
10791
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010792fi
10793
Michael W. Hudson54241132001-12-07 15:38:26 +000010794
Martin v. Löwis11437992002-04-12 09:54:03 +000010795
Matthias Kloseb9621712010-04-24 17:59:49 +000010796{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
10797$as_echo_n "checking for time.h that defines altzone... " >&6; }
10798if test "${ac_cv_header_time_altzone+set}" = set; then :
10799 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010800else
Matthias Kloseb159a552010-04-25 21:00:44 +000010801
Matthias Kloseb9621712010-04-24 17:59:49 +000010802 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010803/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000010804#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010805int
10806main ()
10807{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010808return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000010809 ;
10810 return 0;
10811}
10812_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010813if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010814 ac_cv_header_time_altzone=yes
10815else
Matthias Kloseb9621712010-04-24 17:59:49 +000010816 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000010817fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010818rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000010819
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010820fi
10821
Matthias Kloseb9621712010-04-24 17:59:49 +000010822{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
10823$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010824if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010825
Matthias Kloseb9621712010-04-24 17:59:49 +000010826$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010827
10828fi
10829
Guido van Rossumda88dad1995-01-26 00:46:29 +000010830was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000010831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
10832$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
10833cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010834/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000010835
10836#include <sys/types.h>
10837#include <sys/select.h>
10838#include <sys/time.h>
10839
Martin v. Löwis11437992002-04-12 09:54:03 +000010840int
10841main ()
10842{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010843;
Martin v. Löwis11437992002-04-12 09:54:03 +000010844 ;
10845 return 0;
10846}
10847_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010848if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010849
10850
Matthias Kloseb9621712010-04-24 17:59:49 +000010851$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000010852
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010853 was_it_defined=yes
10854
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010855fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010856rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010857{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
10858$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010859
Matthias Kloseb9621712010-04-24 17:59:49 +000010860{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
10861$as_echo_n "checking for addrinfo... " >&6; }
10862if test "${ac_cv_struct_addrinfo+set}" = set; then :
10863 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010864else
Matthias Kloseb9621712010-04-24 17:59:49 +000010865 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010866/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010867#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010868int
10869main ()
10870{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010871struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000010872 ;
10873 return 0;
10874}
10875_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010876if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010877 ac_cv_struct_addrinfo=yes
10878else
Matthias Kloseb9621712010-04-24 17:59:49 +000010879 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010880fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010881rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10882fi
10883
Matthias Kloseb9621712010-04-24 17:59:49 +000010884{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
10885$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010886if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010887
Matthias Kloseb9621712010-04-24 17:59:49 +000010888$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010889
10890fi
10891
Matthias Kloseb9621712010-04-24 17:59:49 +000010892{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
10893$as_echo_n "checking for sockaddr_storage... " >&6; }
10894if test "${ac_cv_struct_sockaddr_storage+set}" = set; then :
10895 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010896else
Matthias Kloseb9621712010-04-24 17:59:49 +000010897 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010898/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010899
10900# include <sys/types.h>
10901# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010902int
10903main ()
10904{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010905struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000010906 ;
10907 return 0;
10908}
10909_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010910if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010911 ac_cv_struct_sockaddr_storage=yes
10912else
Matthias Kloseb9621712010-04-24 17:59:49 +000010913 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010914fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010915rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10916fi
10917
Matthias Kloseb9621712010-04-24 17:59:49 +000010918{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
10919$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010920if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010921
Matthias Kloseb9621712010-04-24 17:59:49 +000010922$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010923
10924fi
10925
Guido van Rossum627b2d71993-12-24 10:39:16 +000010926# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000010927
Matthias Kloseb9621712010-04-24 17:59:49 +000010928{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
10929$as_echo_n "checking whether char is unsigned... " >&6; }
10930if test "${ac_cv_c_char_unsigned+set}" = set; then :
10931 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000010932else
Matthias Kloseb9621712010-04-24 17:59:49 +000010933 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010934/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010935$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000010936int
10937main ()
10938{
10939static int test_array [1 - 2 * !(((char) -1) < 0)];
10940test_array [0] = 0
10941
10942 ;
10943 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000010944}
Martin v. Löwis11437992002-04-12 09:54:03 +000010945_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010946if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000010947 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000010948else
Matthias Kloseb9621712010-04-24 17:59:49 +000010949 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010950fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010951rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010952fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010953{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
10954$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010955if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010956 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010957
10958fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000010959
Matthias Kloseb9621712010-04-24 17:59:49 +000010960{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
10961$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
10962if test "${ac_cv_c_const+set}" = set; then :
10963 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000010964else
Matthias Kloseb9621712010-04-24 17:59:49 +000010965 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010966/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010967
Martin v. Löwis11437992002-04-12 09:54:03 +000010968int
10969main ()
10970{
10971/* FIXME: Include the comments suggested by Paul. */
10972#ifndef __cplusplus
10973 /* Ultrix mips cc rejects this. */
10974 typedef int charset[2];
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010975 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000010976 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010977 char const *const *pcpcc;
10978 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000010979 /* NEC SVR4.0.2 mips cc rejects this. */
10980 struct point {int x, y;};
10981 static struct point const zero = {0,0};
10982 /* AIX XL C 1.02.0.0 rejects this.
10983 It does not let you subtract one const X* pointer from another in
10984 an arm of an if-expression whose if-part is not a constant
10985 expression */
10986 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010987 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010988 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010989 ++pcpcc;
10990 ppc = (char**) pcpcc;
10991 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000010992 { /* SCO 3.2v4 cc rejects this. */
10993 char *t;
10994 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010995
Martin v. Löwis11437992002-04-12 09:54:03 +000010996 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010997 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010998 }
10999 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
11000 int x[] = {25, 17};
11001 const int *foo = &x[0];
11002 ++foo;
11003 }
11004 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11005 typedef const int *iptr;
11006 iptr p = 0;
11007 ++p;
11008 }
11009 { /* AIX XL C 1.02.0.0 rejects this saying
11010 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11011 struct s { int j; const int *ap[3]; };
11012 struct s *b; b->j = 5;
11013 }
11014 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11015 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011016 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011017 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011018 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000011019#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000011020
Martin v. Löwis11437992002-04-12 09:54:03 +000011021 ;
11022 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000011023}
Martin v. Löwis11437992002-04-12 09:54:03 +000011024_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011025if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011026 ac_cv_c_const=yes
11027else
Matthias Kloseb9621712010-04-24 17:59:49 +000011028 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011029fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011030rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011031fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011032{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
11033$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011034if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011035
Matthias Kloseb9621712010-04-24 17:59:49 +000011036$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011037
11038fi
11039
Michael W. Hudson54241132001-12-07 15:38:26 +000011040
Guido van Rossumda88dad1995-01-26 00:46:29 +000011041works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011042{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
11043$as_echo_n "checking for working volatile... " >&6; }
11044cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011045/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011046
Martin v. Löwis11437992002-04-12 09:54:03 +000011047int
11048main ()
11049{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011050volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011051 ;
11052 return 0;
11053}
11054_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011055if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011056 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011057else
Skip Montanaro6dead952003-09-25 14:50:04 +000011058
Matthias Kloseb9621712010-04-24 17:59:49 +000011059$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011060
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011061
Guido van Rossum627b2d71993-12-24 10:39:16 +000011062fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011063rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011064{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11065$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011066
Guido van Rossumda88dad1995-01-26 00:46:29 +000011067works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011068{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
11069$as_echo_n "checking for working signed char... " >&6; }
11070cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011071/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011072
Martin v. Löwis11437992002-04-12 09:54:03 +000011073int
11074main ()
11075{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011076signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000011077 ;
11078 return 0;
11079}
11080_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011081if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011082 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011083else
Skip Montanaro6dead952003-09-25 14:50:04 +000011084
Matthias Kloseb9621712010-04-24 17:59:49 +000011085$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000011086
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011087
Guido van Rossum7f43da71994-08-01 12:15:30 +000011088fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011089rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011090{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11091$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011092
Guido van Rossumda88dad1995-01-26 00:46:29 +000011093have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
11095$as_echo_n "checking for prototypes... " >&6; }
11096cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011097/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011098int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011099int
11100main ()
11101{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011102return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000011103 ;
11104 return 0;
11105}
11106_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011107if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011108
Matthias Kloseb9621712010-04-24 17:59:49 +000011109$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011110
Matthias Kloseb159a552010-04-25 21:00:44 +000011111 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011112fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011113rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011114{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
11115$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011116
Guido van Rossumda88dad1995-01-26 00:46:29 +000011117works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011118{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
11119$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
11120cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011121/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011122
11123#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000011124int foo(int x, ...) {
11125 va_list va;
11126 va_start(va, x);
11127 va_arg(va, int);
11128 va_arg(va, char *);
11129 va_arg(va, double);
11130 return 0;
11131}
Guido van Rossum7f43da71994-08-01 12:15:30 +000011132
Martin v. Löwis11437992002-04-12 09:54:03 +000011133int
11134main ()
11135{
Guido van Rossum90eea071996-08-30 20:58:57 +000011136return foo(10, "", 3.14);
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 :
Martin v. Löwis11437992002-04-12 09:54:03 +000011142
11143
Matthias Kloseb9621712010-04-24 17:59:49 +000011144$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011145
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011146 works=yes
11147
Guido van Rossum627b2d71993-12-24 10:39:16 +000011148fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011149rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011150{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11151$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011152
Martin v. Löwisd6320502004-08-12 13:45:08 +000011153# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000011154{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
11155$as_echo_n "checking for socketpair... " >&6; }
11156cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011157/* end confdefs.h. */
11158
11159#include <sys/types.h>
11160#include <sys/socket.h>
11161
11162int
11163main ()
11164{
11165void *x=socketpair
11166 ;
11167 return 0;
11168}
11169_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011170if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000011171
Matthias Kloseb9621712010-04-24 17:59:49 +000011172$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000011173
Matthias Kloseb159a552010-04-25 21:00:44 +000011174 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011175$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011176else
Matthias Kloseb9621712010-04-24 17:59:49 +000011177 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11178$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011179
11180fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011181rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011182
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011183# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000011184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
11185$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
11186cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011187/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011188#include <sys/types.h>
11189#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011190int
11191main ()
11192{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011193struct sockaddr x;
11194x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011195 ;
11196 return 0;
11197}
11198_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011199if ac_fn_c_try_compile "$LINENO"; then :
11200 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11201$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011202
Matthias Kloseb9621712010-04-24 17:59:49 +000011203$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011204
11205else
Matthias Kloseb9621712010-04-24 17:59:49 +000011206 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11207$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011208
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011209fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011210rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011211
Guido van Rossumda88dad1995-01-26 00:46:29 +000011212va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011213{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
11214$as_echo_n "checking whether va_list is an array... " >&6; }
11215cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011216/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011217
11218#ifdef HAVE_STDARG_PROTOTYPES
11219#include <stdarg.h>
11220#else
11221#include <varargs.h>
11222#endif
11223
Martin v. Löwis11437992002-04-12 09:54:03 +000011224int
11225main ()
11226{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011227va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000011228 ;
11229 return 0;
11230}
11231_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011232if ac_fn_c_try_compile "$LINENO"; then :
11233
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011234else
Skip Montanaro6dead952003-09-25 14:50:04 +000011235
Martin v. Löwis11437992002-04-12 09:54:03 +000011236
Matthias Kloseb9621712010-04-24 17:59:49 +000011237$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011238
Guido van Rossumda88dad1995-01-26 00:46:29 +000011239 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011240
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011241fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011242rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011243{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
11244$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011245
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011246# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000011247
11248
Matthias Kloseb9621712010-04-24 17:59:49 +000011249ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
11250if test "x$ac_cv_func_gethostbyname_r" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011251
Matthias Kloseb9621712010-04-24 17:59:49 +000011252 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000011253
Matthias Kloseb9621712010-04-24 17:59:49 +000011254 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
11255$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011256 OLD_CFLAGS=$CFLAGS
11257 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011258 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011259/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011260
11261# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011262
Martin v. Löwis11437992002-04-12 09:54:03 +000011263int
11264main ()
11265{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011266
11267 char *name;
11268 struct hostent *he, *res;
11269 char buffer[2048];
11270 int buflen = 2048;
11271 int h_errnop;
11272
11273 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011274
11275 ;
11276 return 0;
11277}
11278_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011279if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011280
Matthias Kloseb9621712010-04-24 17:59:49 +000011281 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011282
Martin v. Löwis11437992002-04-12 09:54:03 +000011283
Matthias Kloseb9621712010-04-24 17:59:49 +000011284$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011285
Matthias Kloseb9621712010-04-24 17:59:49 +000011286 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11287$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011288
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011289else
Skip Montanaro6dead952003-09-25 14:50:04 +000011290
Matthias Kloseb9621712010-04-24 17:59:49 +000011291 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11292$as_echo "no" >&6; }
11293 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
11294$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
11295 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011296/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011297
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011298# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011299
Martin v. Löwis11437992002-04-12 09:54:03 +000011300int
11301main ()
11302{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011303
11304 char *name;
11305 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000011306 char buffer[2048];
11307 int buflen = 2048;
11308 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011309
Matthias Kloseb159a552010-04-25 21:00:44 +000011310 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011311
11312 ;
11313 return 0;
11314}
11315_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011316if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011317
Matthias Kloseb9621712010-04-24 17:59:49 +000011318 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011319
Martin v. Löwis11437992002-04-12 09:54:03 +000011320
Matthias Kloseb159a552010-04-25 21:00:44 +000011321$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011322
Matthias Kloseb9621712010-04-24 17:59:49 +000011323 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11324$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011325
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011326else
Skip Montanaro6dead952003-09-25 14:50:04 +000011327
Matthias Kloseb9621712010-04-24 17:59:49 +000011328 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11329$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011330 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
11331$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
11332 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11333/* end confdefs.h. */
11334
11335# include <netdb.h>
11336
11337int
11338main ()
11339{
11340
11341 char *name;
11342 struct hostent *he;
11343 struct hostent_data data;
11344
11345 (void) gethostbyname_r(name, he, &data);
11346
11347 ;
11348 return 0;
11349}
11350_ACEOF
11351if ac_fn_c_try_compile "$LINENO"; then :
11352
11353 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
11354
11355
11356$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
11357
11358 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11359$as_echo "yes" >&6; }
11360
11361else
11362
11363 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11364$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011365
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011366fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011367rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011368
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011369fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011370rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011371
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011372fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011373rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011374 CFLAGS=$OLD_CFLAGS
11375
11376else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011377
Matthias Kloseb9621712010-04-24 17:59:49 +000011378 for ac_func in gethostbyname
11379do :
11380 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
11381if test "x$ac_cv_func_gethostbyname" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011382 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011383#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011384_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011385
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011386fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011387done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011388
Michael W. Hudson54241132001-12-07 15:38:26 +000011389
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011390fi
11391
Michael W. Hudson54241132001-12-07 15:38:26 +000011392
11393
11394
11395
11396
11397
Guido van Rossum627b2d71993-12-24 10:39:16 +000011398# checks for system services
11399# (none yet)
11400
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011401# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000011402ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
11403if test "x$ac_cv_func___fpu_control" = x""yes; then :
11404
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011405else
Matthias Kloseb9621712010-04-24 17:59:49 +000011406 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
11407$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
11408if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then :
11409 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011410else
Martin v. Löwis11437992002-04-12 09:54:03 +000011411 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011412LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011413cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011414/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011415
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011416/* Override any GCC internal prototype to avoid an error.
11417 Use char because int might match the return type of a GCC
11418 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011419#ifdef __cplusplus
11420extern "C"
11421#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011422char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011423int
11424main ()
11425{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011426return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011427 ;
11428 return 0;
11429}
11430_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011431if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011432 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011433else
Matthias Kloseb9621712010-04-24 17:59:49 +000011434 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011435fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011436rm -f core conftest.err conftest.$ac_objext \
11437 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011438LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011439fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011440{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
11441$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
11442if test "x$ac_cv_lib_ieee___fpu_control" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011443 cat >>confdefs.h <<_ACEOF
11444#define HAVE_LIBIEEE 1
11445_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011446
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011447 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011448
Guido van Rossum627b2d71993-12-24 10:39:16 +000011449fi
11450
Michael W. Hudson54241132001-12-07 15:38:26 +000011451
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011452fi
11453
Michael W. Hudson54241132001-12-07 15:38:26 +000011454
Guido van Rossum7f253911997-05-09 02:42:48 +000011455# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000011456{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
11457$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011458
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011459# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011460if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011461 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000011462if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000011463then
11464
Matthias Kloseb9621712010-04-24 17:59:49 +000011465$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011466
Matthias Kloseb9621712010-04-24 17:59:49 +000011467 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11468$as_echo "yes" >&6; }
11469else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11470$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011471fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000011472else
Matthias Kloseb9621712010-04-24 17:59:49 +000011473 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11474$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011475fi
11476
Guido van Rossum7f253911997-05-09 02:42:48 +000011477
Guido van Rossum7f43da71994-08-01 12:15:30 +000011478# check for --with-libm=...
11479
Guido van Rossum563e7081996-09-10 18:20:48 +000011480case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000011481Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000011482*) LIBM=-lm
11483esac
Matthias Kloseb9621712010-04-24 17:59:49 +000011484{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
11485$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011486
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011487# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011488if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011489 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000011490if test "$withval" = no
11491then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000011492 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
11493$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011494elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011495then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000011496 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
11497$as_echo "set LIBM=\"$withval\"" >&6; }
11498else as_fn_error "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011499fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011500else
Matthias Kloseb9621712010-04-24 17:59:49 +000011501 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
11502$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011503fi
11504
Guido van Rossum7f43da71994-08-01 12:15:30 +000011505
11506# check for --with-libc=...
11507
Matthias Kloseb9621712010-04-24 17:59:49 +000011508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
11509$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011510
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011511# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011512if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011513 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000011514if test "$withval" = no
11515then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000011516 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
11517$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011518elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011519then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000011520 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
11521$as_echo "set LIBC=\"$withval\"" >&6; }
11522else as_fn_error "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011523fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011524else
Matthias Kloseb9621712010-04-24 17:59:49 +000011525 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
11526$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011527fi
11528
Guido van Rossum7f43da71994-08-01 12:15:30 +000011529
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011530# **************************************************
11531# * Check for various properties of floating point *
11532# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011533
Matthias Kloseb9621712010-04-24 17:59:49 +000011534{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
11535$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
11536if test "${ac_cv_little_endian_double+set}" = set; then :
11537 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011538else
11539
Matthias Kloseb9621712010-04-24 17:59:49 +000011540if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011541 ac_cv_little_endian_double=no
11542else
Matthias Kloseb9621712010-04-24 17:59:49 +000011543 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011544/* end confdefs.h. */
11545
11546#include <string.h>
11547int main() {
11548 double x = 9006104071832581.0;
11549 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
11550 return 0;
11551 else
11552 return 1;
11553}
11554
11555_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011556if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011557 ac_cv_little_endian_double=yes
11558else
Matthias Kloseb9621712010-04-24 17:59:49 +000011559 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011560fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011561rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11562 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011563fi
11564
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011565fi
11566
Matthias Kloseb9621712010-04-24 17:59:49 +000011567{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
11568$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011569if test "$ac_cv_little_endian_double" = yes
11570then
11571
Matthias Kloseb9621712010-04-24 17:59:49 +000011572$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011573
11574fi
11575
Matthias Kloseb9621712010-04-24 17:59:49 +000011576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
11577$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
11578if test "${ac_cv_big_endian_double+set}" = set; then :
11579 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011580else
11581
Matthias Kloseb9621712010-04-24 17:59:49 +000011582if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011583 ac_cv_big_endian_double=no
11584else
Matthias Kloseb9621712010-04-24 17:59:49 +000011585 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011586/* end confdefs.h. */
11587
11588#include <string.h>
11589int main() {
11590 double x = 9006104071832581.0;
11591 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
11592 return 0;
11593 else
11594 return 1;
11595}
11596
11597_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011598if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011599 ac_cv_big_endian_double=yes
11600else
Matthias Kloseb9621712010-04-24 17:59:49 +000011601 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011602fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011603rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11604 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011605fi
11606
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011607fi
11608
Matthias Kloseb9621712010-04-24 17:59:49 +000011609{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
11610$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011611if test "$ac_cv_big_endian_double" = yes
11612then
11613
Matthias Kloseb9621712010-04-24 17:59:49 +000011614$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011615
11616fi
11617
11618# Some ARM platforms use a mixed-endian representation for doubles.
11619# While Python doesn't currently have full support for these platforms
11620# (see e.g., issue 1762561), we can at least make sure that float <-> string
11621# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000011622{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
11623$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
11624if test "${ac_cv_mixed_endian_double+set}" = set; then :
11625 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011626else
11627
Matthias Kloseb9621712010-04-24 17:59:49 +000011628if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011629 ac_cv_mixed_endian_double=no
11630else
Matthias Kloseb9621712010-04-24 17:59:49 +000011631 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011632/* end confdefs.h. */
11633
11634#include <string.h>
11635int main() {
11636 double x = 9006104071832581.0;
11637 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
11638 return 0;
11639 else
11640 return 1;
11641}
11642
11643_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011644if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011645 ac_cv_mixed_endian_double=yes
11646else
Matthias Kloseb9621712010-04-24 17:59:49 +000011647 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011648fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011649rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11650 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011651fi
11652
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011653fi
11654
Matthias Kloseb9621712010-04-24 17:59:49 +000011655{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
11656$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011657if test "$ac_cv_mixed_endian_double" = yes
11658then
11659
Matthias Kloseb9621712010-04-24 17:59:49 +000011660$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011661
11662fi
11663
Mark Dickinson7abf8d42009-04-18 20:17:52 +000011664# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000011665# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000011666# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000011667# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011668# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000011669# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011670
11671# This inline assembler syntax may also work for suncc and icc,
11672# so we try it on all platforms.
11673
Matthias Kloseb9621712010-04-24 17:59:49 +000011674{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
11675$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
11676cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011677/* end confdefs.h. */
11678
11679int
11680main ()
11681{
11682
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011683 unsigned short cw;
11684 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
11685 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011686
11687 ;
11688 return 0;
11689}
11690_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011691if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011692 have_gcc_asm_for_x87=yes
11693else
Matthias Kloseb9621712010-04-24 17:59:49 +000011694 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011695fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011696rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011697{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
11698$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011699if test "$have_gcc_asm_for_x87" = yes
11700then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011701
Matthias Kloseb9621712010-04-24 17:59:49 +000011702$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011703
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011704fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011705
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011706# Detect whether system arithmetic is subject to x87-style double
11707# rounding issues. The result of this test has little meaning on non
11708# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
11709# mode is round-to-nearest and double rounding issues are present, and
11710# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000011711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
11712$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011713# $BASECFLAGS may affect the result
11714ac_save_cc="$CC"
11715CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011716if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011717 ac_cv_x87_double_rounding=no
11718else
Matthias Kloseb9621712010-04-24 17:59:49 +000011719 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011720/* end confdefs.h. */
11721
11722#include <stdlib.h>
11723#include <math.h>
11724int main() {
11725 volatile double x, y, z;
11726 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
11727 x = 0.99999999999999989; /* 1-2**-53 */
11728 y = 1./x;
11729 if (y != 1.)
11730 exit(0);
11731 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
11732 x = 1e16;
11733 y = 2.99999;
11734 z = x + y;
11735 if (z != 1e16+4.)
11736 exit(0);
11737 /* both tests show evidence of double rounding */
11738 exit(1);
11739}
11740
11741_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011742if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011743 ac_cv_x87_double_rounding=no
11744else
Matthias Kloseb9621712010-04-24 17:59:49 +000011745 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011746fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011747rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11748 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011749fi
11750
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011751CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000011752{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
11753$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011754if test "$ac_cv_x87_double_rounding" = yes
11755then
11756
Matthias Kloseb9621712010-04-24 17:59:49 +000011757$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011758
11759fi
11760
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011761# ************************************
11762# * Check for mathematical functions *
11763# ************************************
11764
11765LIBS_SAVE=$LIBS
11766LIBS="$LIBS $LIBM"
11767
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011768# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
11769# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000011770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
11771$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
11772if test "${ac_cv_tanh_preserves_zero_sign+set}" = set; then :
11773 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011774else
11775
Matthias Kloseb9621712010-04-24 17:59:49 +000011776if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011777 ac_cv_tanh_preserves_zero_sign=no
11778else
Matthias Kloseb9621712010-04-24 17:59:49 +000011779 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011780/* end confdefs.h. */
11781
11782#include <math.h>
11783#include <stdlib.h>
11784int main() {
11785 /* return 0 if either negative zeros don't exist
11786 on this platform or if negative zeros exist
11787 and tanh(-0.) == -0. */
11788 if (atan2(0., -1.) == atan2(-0., -1.) ||
11789 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
11790 else exit(1);
11791}
11792
11793_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011794if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011795 ac_cv_tanh_preserves_zero_sign=yes
11796else
Matthias Kloseb9621712010-04-24 17:59:49 +000011797 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011798fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011799rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11800 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011801fi
11802
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011803fi
11804
Matthias Kloseb9621712010-04-24 17:59:49 +000011805{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
11806$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011807if test "$ac_cv_tanh_preserves_zero_sign" = yes
11808then
11809
Matthias Kloseb9621712010-04-24 17:59:49 +000011810$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011811
11812fi
11813
Mark Dickinson9c113362009-09-05 10:36:23 +000011814for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
Matthias Kloseb9621712010-04-24 17:59:49 +000011815do :
11816 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11817ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11818eval as_val=\$$as_ac_var
11819 if test "x$as_val" = x""yes; then :
Mark Dickinson9c113362009-09-05 10:36:23 +000011820 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011821#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Mark Dickinson9c113362009-09-05 10:36:23 +000011822_ACEOF
11823
11824fi
11825done
11826
Mark Dickinson9c113362009-09-05 10:36:23 +000011827for ac_func in hypot lgamma log1p round tgamma
Matthias Kloseb9621712010-04-24 17:59:49 +000011828do :
11829 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11830ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11831eval as_val=\$$as_ac_var
11832 if test "x$as_val" = x""yes; then :
Christian Heimes99170a52007-12-19 02:07:34 +000011833 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011834#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimes99170a52007-12-19 02:07:34 +000011835_ACEOF
11836
11837fi
11838done
11839
Matthias Kloseb9621712010-04-24 17:59:49 +000011840ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
11841"
11842if test "x$ac_cv_have_decl_isinf" = x""yes; then :
11843 ac_have_decl=1
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011844else
Matthias Kloseb9621712010-04-24 17:59:49 +000011845 ac_have_decl=0
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011846fi
11847
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011848cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011849#define HAVE_DECL_ISINF $ac_have_decl
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011850_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011851ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
11852"
11853if test "x$ac_cv_have_decl_isnan" = x""yes; then :
11854 ac_have_decl=1
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011855else
Matthias Kloseb9621712010-04-24 17:59:49 +000011856 ac_have_decl=0
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011857fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011858
11859cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011860#define HAVE_DECL_ISNAN $ac_have_decl
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011861_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011862ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
11863"
11864if test "x$ac_cv_have_decl_isfinite" = x""yes; then :
11865 ac_have_decl=1
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011866else
Matthias Kloseb9621712010-04-24 17:59:49 +000011867 ac_have_decl=0
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011868fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011869
11870cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011871#define HAVE_DECL_ISFINITE $ac_have_decl
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011872_ACEOF
11873
11874
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000011875LIBS=$LIBS_SAVE
11876
Mark Dickinsona614f042009-11-28 12:48:43 +000011877# For multiprocessing module, check that sem_open
11878# actually works. For FreeBSD versions <= 7.2,
11879# the kernel module that provides POSIX semaphores
11880# isn't loaded by default, so an attempt to call
11881# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000011882{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
11883$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
11884if test "${ac_cv_posix_semaphores_enabled+set}" = set; then :
11885 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000011886else
Matthias Kloseb9621712010-04-24 17:59:49 +000011887 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000011888 ac_cv_posix_semaphores_enabled=yes
11889else
Matthias Kloseb9621712010-04-24 17:59:49 +000011890 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000011891/* end confdefs.h. */
11892
11893#include <unistd.h>
11894#include <fcntl.h>
11895#include <stdio.h>
11896#include <semaphore.h>
11897#include <sys/stat.h>
11898
11899int main(void) {
11900 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
11901 if (a == SEM_FAILED) {
11902 perror("sem_open");
11903 return 1;
11904 }
11905 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000011906 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000011907 return 0;
11908}
11909
11910_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011911if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000011912 ac_cv_posix_semaphores_enabled=yes
11913else
Matthias Kloseb9621712010-04-24 17:59:49 +000011914 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000011915fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011916rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11917 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000011918fi
11919
11920
Mark Dickinsona614f042009-11-28 12:48:43 +000011921fi
11922
Matthias Kloseb9621712010-04-24 17:59:49 +000011923{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
11924$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000011925if test $ac_cv_posix_semaphores_enabled = no
11926then
11927
Matthias Kloseb9621712010-04-24 17:59:49 +000011928$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000011929
11930fi
11931
Mark Dickinson10683072009-04-18 21:18:19 +000011932# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000011933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
11934$as_echo_n "checking for broken sem_getvalue... " >&6; }
11935if test "${ac_cv_broken_sem_getvalue+set}" = set; then :
11936 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011937else
Matthias Kloseb9621712010-04-24 17:59:49 +000011938 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011939 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000011940else
Matthias Kloseb9621712010-04-24 17:59:49 +000011941 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000011942/* end confdefs.h. */
11943
11944#include <unistd.h>
11945#include <fcntl.h>
11946#include <stdio.h>
11947#include <semaphore.h>
11948#include <sys/stat.h>
11949
11950int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000011951 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000011952 int count;
11953 int res;
11954 if(a==SEM_FAILED){
11955 perror("sem_open");
11956 return 1;
11957
11958 }
11959 res = sem_getvalue(a, &count);
11960 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000011961 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000011962 return res==-1 ? 1 : 0;
11963}
11964
Mark Dickinson10683072009-04-18 21:18:19 +000011965_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011966if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011967 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000011968else
Matthias Kloseb9621712010-04-24 17:59:49 +000011969 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011970fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011971rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11972 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011973fi
11974
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011975
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011976fi
11977
Matthias Kloseb9621712010-04-24 17:59:49 +000011978{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
11979$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011980if test $ac_cv_broken_sem_getvalue = yes
11981then
11982
Matthias Kloseb9621712010-04-24 17:59:49 +000011983$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011984
11985fi
11986
Mark Dickinsonbd792642009-03-18 20:06:12 +000011987# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000011988{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
11989$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000011990# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011991if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000011992 enableval=$enable_big_digits; case $enable_big_digits in
11993yes)
11994 enable_big_digits=30 ;;
11995no)
11996 enable_big_digits=15 ;;
1199715|30)
11998 ;;
11999*)
Matthias Kloseb9621712010-04-24 17:59:49 +000012000 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 +000012001esac
Matthias Kloseb9621712010-04-24 17:59:49 +000012002{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
12003$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012004
12005cat >>confdefs.h <<_ACEOF
12006#define PYLONG_BITS_IN_DIGIT $enable_big_digits
12007_ACEOF
12008
12009
12010else
Matthias Kloseb9621712010-04-24 17:59:49 +000012011 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
12012$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012013fi
12014
12015
Guido van Rossumef2255b2000-03-10 22:30:29 +000012016# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012017ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
12018if test "x$ac_cv_header_wchar_h" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012019
12020
Matthias Kloseb9621712010-04-24 17:59:49 +000012021$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012022
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012023 wchar_h="yes"
12024
Guido van Rossumef2255b2000-03-10 22:30:29 +000012025else
Martin v. Löwis11437992002-04-12 09:54:03 +000012026 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000012027
12028fi
12029
Michael W. Hudson54241132001-12-07 15:38:26 +000012030
Martin v. Löwis11437992002-04-12 09:54:03 +000012031
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012032# determine wchar_t size
12033if test "$wchar_h" = yes
12034then
Matthias Kloseb9621712010-04-24 17:59:49 +000012035 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012036# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12037# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12038# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000012039{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
12040$as_echo_n "checking size of wchar_t... " >&6; }
12041if test "${ac_cv_sizeof_wchar_t+set}" = set; then :
12042 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012043else
Matthias Kloseb9621712010-04-24 17:59:49 +000012044 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
12045"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012046
Martin v. Löwis11437992002-04-12 09:54:03 +000012047else
Matthias Kloseb9621712010-04-24 17:59:49 +000012048 if test "$ac_cv_type_wchar_t" = yes; then
12049 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12050$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
12051{ as_fn_set_status 77
12052as_fn_error "cannot compute sizeof (wchar_t)
12053See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012054 else
12055 ac_cv_sizeof_wchar_t=0
12056 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012057fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012058
Martin v. Löwis11437992002-04-12 09:54:03 +000012059fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012060{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
12061$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012062
12063
12064
Martin v. Löwis11437992002-04-12 09:54:03 +000012065cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012066#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012067_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012068
Michael W. Hudson54241132001-12-07 15:38:26 +000012069
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012070fi
12071
Matthias Kloseb9621712010-04-24 17:59:49 +000012072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
12073$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012074have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012075cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012076/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012077
12078#include <tcl.h>
12079#if TCL_UTF_MAX != 6
12080# error "NOT UCS4_TCL"
12081#endif
12082int
12083main ()
12084{
12085
12086 ;
12087 return 0;
12088}
12089_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012090if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012091
12092
Matthias Kloseb9621712010-04-24 17:59:49 +000012093$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012094
12095 have_ucs4_tcl=yes
12096
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012097fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012098rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012099{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
12100$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012101
Skip Montanaro6dead952003-09-25 14:50:04 +000012102# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012103if test "$wchar_h" = yes
12104then
12105 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000012106 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
12107$as_echo_n "checking whether wchar_t is signed... " >&6; }
12108 if test "${ac_cv_wchar_t_signed+set}" = set; then :
12109 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012110else
12111
Matthias Kloseb9621712010-04-24 17:59:49 +000012112 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012113 ac_cv_wchar_t_signed=yes
12114else
Matthias Kloseb9621712010-04-24 17:59:49 +000012115 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012116/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012117
12118 #include <wchar.h>
12119 int main()
12120 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000012121 /* Success: exit code 0 */
12122 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012123 }
12124
12125_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012126if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012127 ac_cv_wchar_t_signed=yes
12128else
Matthias Kloseb9621712010-04-24 17:59:49 +000012129 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012130fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012131rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12132 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012133fi
12134
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012135fi
12136
Matthias Kloseb9621712010-04-24 17:59:49 +000012137 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
12138$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012139fi
12140
Matthias Kloseb9621712010-04-24 17:59:49 +000012141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what type to use for str" >&5
12142$as_echo_n "checking what type to use for str... " >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000012143
12144# Check whether --with-wide-unicode was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012145if test "${with_wide_unicode+set}" = set; then :
Georg Brandl52d168a2008-01-07 18:10:24 +000012146 withval=$with_wide_unicode;
12147if test "$withval" != no
12148then unicode_size="4"
12149else unicode_size="2"
12150fi
12151
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012152else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012153
Georg Brandl52d168a2008-01-07 18:10:24 +000012154case "$have_ucs4_tcl" in
12155 yes) unicode_size="4" ;;
12156 *) unicode_size="2" ;;
12157esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012158
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012159fi
12160
Martin v. Löwis0036cba2002-04-12 09:58:45 +000012161
12162
Georg Brandl52d168a2008-01-07 18:10:24 +000012163case "$unicode_size" in
Matthias Kloseb9621712010-04-24 17:59:49 +000012164 4) $as_echo "#define Py_UNICODE_SIZE 4" >>confdefs.h
Georg Brandl52d168a2008-01-07 18:10:24 +000012165 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000012166 *) $as_echo "#define Py_UNICODE_SIZE 2" >>confdefs.h
Georg Brandl52d168a2008-01-07 18:10:24 +000012167 ;;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012168esac
12169
Michael W. Hudson54241132001-12-07 15:38:26 +000012170
Martin v. Löwis11437992002-04-12 09:54:03 +000012171
Georg Brandl52d168a2008-01-07 18:10:24 +000012172# wchar_t is only usable if it maps to an unsigned type
12173if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000012174 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000012175then
12176 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012177
Matthias Kloseb9621712010-04-24 17:59:49 +000012178$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012179
Matthias Kloseb9621712010-04-24 17:59:49 +000012180 $as_echo "#define PY_UNICODE_TYPE wchar_t" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012181
Georg Brandl52d168a2008-01-07 18:10:24 +000012182elif test "$ac_cv_sizeof_short" = "$unicode_size"
12183then
12184 PY_UNICODE_TYPE="unsigned short"
Matthias Kloseb9621712010-04-24 17:59:49 +000012185 $as_echo "#define PY_UNICODE_TYPE unsigned short" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012186
Georg Brandl52d168a2008-01-07 18:10:24 +000012187elif test "$ac_cv_sizeof_long" = "$unicode_size"
12188then
12189 PY_UNICODE_TYPE="unsigned long"
Matthias Kloseb9621712010-04-24 17:59:49 +000012190 $as_echo "#define PY_UNICODE_TYPE unsigned long" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012191
Georg Brandl52d168a2008-01-07 18:10:24 +000012192else
12193 PY_UNICODE_TYPE="no type found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012194fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012195{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PY_UNICODE_TYPE" >&5
12196$as_echo "$PY_UNICODE_TYPE" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000012197
12198# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000012199 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12200$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
12201if test "${ac_cv_c_bigendian+set}" = set; then :
12202 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000012203else
Matthias Kloseb9621712010-04-24 17:59:49 +000012204 ac_cv_c_bigendian=unknown
12205 # See if we're dealing with a universal compiler.
12206 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12207/* end confdefs.h. */
12208#ifndef __APPLE_CC__
12209 not a universal capable compiler
12210 #endif
12211 typedef int dummy;
12212
Skip Montanaro6dead952003-09-25 14:50:04 +000012213_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012214if ac_fn_c_try_compile "$LINENO"; then :
12215
12216 # Check for potential -arch flags. It is not universal unless
12217 # there are at least two -arch flags with different values.
12218 ac_arch=
12219 ac_prev=
12220 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12221 if test -n "$ac_prev"; then
12222 case $ac_word in
12223 i?86 | x86_64 | ppc | ppc64)
12224 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12225 ac_arch=$ac_word
12226 else
12227 ac_cv_c_bigendian=universal
12228 break
12229 fi
12230 ;;
12231 esac
12232 ac_prev=
12233 elif test "x$ac_word" = "x-arch"; then
12234 ac_prev=arch
12235 fi
12236 done
12237fi
12238rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12239 if test $ac_cv_c_bigendian = unknown; then
12240 # See if sys/param.h defines the BYTE_ORDER macro.
12241 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012242/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012243#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012244 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012245
Martin v. Löwis11437992002-04-12 09:54:03 +000012246int
12247main ()
12248{
Matthias Kloseb9621712010-04-24 17:59:49 +000012249#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12250 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12251 && LITTLE_ENDIAN)
12252 bogus endian macros
12253 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012254
12255 ;
12256 return 0;
12257}
12258_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012259if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012260 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000012261 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012262/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012263#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012264 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012265
Martin v. Löwis11437992002-04-12 09:54:03 +000012266int
12267main ()
12268{
Guido van Rossumef2255b2000-03-10 22:30:29 +000012269#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000012270 not big endian
12271 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012272
12273 ;
12274 return 0;
12275}
12276_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012277if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012278 ac_cv_c_bigendian=yes
12279else
Matthias Kloseb9621712010-04-24 17:59:49 +000012280 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000012281fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012282rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012283fi
12284rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12285 fi
12286 if test $ac_cv_c_bigendian = unknown; then
12287 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12288 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012289/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000012290#include <limits.h>
12291
Martin v. Löwis11437992002-04-12 09:54:03 +000012292int
12293main ()
12294{
Matthias Kloseb9621712010-04-24 17:59:49 +000012295#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12296 bogus endian macros
12297 #endif
12298
Martin v. Löwis11437992002-04-12 09:54:03 +000012299 ;
12300 return 0;
12301}
12302_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012303if ac_fn_c_try_compile "$LINENO"; then :
12304 # It does; now see whether it defined to _BIG_ENDIAN or not.
12305 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12306/* end confdefs.h. */
12307#include <limits.h>
12308
12309int
12310main ()
12311{
12312#ifndef _BIG_ENDIAN
12313 not big endian
12314 #endif
12315
12316 ;
12317 return 0;
12318}
12319_ACEOF
12320if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012321 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012322else
Matthias Kloseb9621712010-04-24 17:59:49 +000012323 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012324fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012325rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12326fi
12327rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12328 fi
12329 if test $ac_cv_c_bigendian = unknown; then
12330 # Compile a test program.
12331 if test "$cross_compiling" = yes; then :
12332 # Try to guess by grepping values from an object file.
12333 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12334/* end confdefs.h. */
12335short int ascii_mm[] =
12336 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12337 short int ascii_ii[] =
12338 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12339 int use_ascii (int i) {
12340 return ascii_mm[i] + ascii_ii[i];
12341 }
12342 short int ebcdic_ii[] =
12343 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12344 short int ebcdic_mm[] =
12345 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12346 int use_ebcdic (int i) {
12347 return ebcdic_mm[i] + ebcdic_ii[i];
12348 }
12349 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012350
Matthias Kloseb9621712010-04-24 17:59:49 +000012351int
12352main ()
12353{
12354return use_ascii (foo) == use_ebcdic (foo);
12355 ;
12356 return 0;
12357}
12358_ACEOF
12359if ac_fn_c_try_compile "$LINENO"; then :
12360 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12361 ac_cv_c_bigendian=yes
12362 fi
12363 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12364 if test "$ac_cv_c_bigendian" = unknown; then
12365 ac_cv_c_bigendian=no
12366 else
12367 # finding both strings is unlikely to happen, but who knows?
12368 ac_cv_c_bigendian=unknown
12369 fi
12370 fi
12371fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012372rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012373else
Matthias Kloseb9621712010-04-24 17:59:49 +000012374 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012375/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012376$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012377int
12378main ()
12379{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012380
Matthias Kloseb9621712010-04-24 17:59:49 +000012381 /* Are we little or big endian? From Harbison&Steele. */
12382 union
12383 {
12384 long int l;
12385 char c[sizeof (long int)];
12386 } u;
12387 u.l = 1;
12388 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012389
12390 ;
12391 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000012392}
Martin v. Löwis11437992002-04-12 09:54:03 +000012393_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012394if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012395 ac_cv_c_bigendian=no
12396else
Matthias Kloseb9621712010-04-24 17:59:49 +000012397 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000012398fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012399rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12400 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000012401fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012402
Matthias Kloseb9621712010-04-24 17:59:49 +000012403 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012404fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012405{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12406$as_echo "$ac_cv_c_bigendian" >&6; }
12407 case $ac_cv_c_bigendian in #(
12408 yes)
12409 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12410;; #(
12411 no)
12412 ;; #(
12413 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012414
Matthias Kloseb9621712010-04-24 17:59:49 +000012415$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012416
Matthias Kloseb9621712010-04-24 17:59:49 +000012417 ;; #(
12418 *)
12419 as_fn_error "unknown endianness
12420 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
12421 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000012422
Michael W. Hudson54241132001-12-07 15:38:26 +000012423
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012424# Check whether right shifting a negative integer extends the sign bit
12425# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000012426{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
12427$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
12428if test "${ac_cv_rshift_extends_sign+set}" = set; then :
12429 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000012430else
Martin v. Löwis11437992002-04-12 09:54:03 +000012431
Matthias Kloseb9621712010-04-24 17:59:49 +000012432if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000012433 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012434else
Matthias Kloseb9621712010-04-24 17:59:49 +000012435 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012436/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012437
12438int main()
12439{
Vladimir Marangozova6180282000-07-12 05:05:06 +000012440 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012441}
12442
Martin v. Löwis11437992002-04-12 09:54:03 +000012443_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012444if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000012445 ac_cv_rshift_extends_sign=yes
12446else
Matthias Kloseb9621712010-04-24 17:59:49 +000012447 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000012448fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012449rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12450 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000012451fi
12452
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012453fi
12454
Matthias Kloseb9621712010-04-24 17:59:49 +000012455{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
12456$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000012457if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012458then
Martin v. Löwis11437992002-04-12 09:54:03 +000012459
Matthias Kloseb9621712010-04-24 17:59:49 +000012460$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012461
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012462fi
12463
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012464# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000012465{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
12466$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
12467if test "${ac_cv_have_getc_unlocked+set}" = set; then :
12468 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012469else
Martin v. Löwis11437992002-04-12 09:54:03 +000012470
Matthias Kloseb9621712010-04-24 17:59:49 +000012471cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012472/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012473#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012474int
12475main ()
12476{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012477
12478 FILE *f = fopen("/dev/null", "r");
12479 flockfile(f);
12480 getc_unlocked(f);
12481 funlockfile(f);
12482
Martin v. Löwis11437992002-04-12 09:54:03 +000012483 ;
12484 return 0;
12485}
12486_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012487if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012488 ac_cv_have_getc_unlocked=yes
12489else
Matthias Kloseb9621712010-04-24 17:59:49 +000012490 ac_cv_have_getc_unlocked=no
12491fi
12492rm -f core conftest.err conftest.$ac_objext \
12493 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012494fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012495
Matthias Kloseb9621712010-04-24 17:59:49 +000012496{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
12497$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012498if test "$ac_cv_have_getc_unlocked" = yes
12499then
Martin v. Löwis11437992002-04-12 09:54:03 +000012500
Matthias Kloseb9621712010-04-24 17:59:49 +000012501$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012502
12503fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012504
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012505# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000012506# save the value of LIBS so we don't actually link Python with readline
12507LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012508
Gregory P. Smith18820942008-09-07 06:24:49 +000012509# On some systems we need to link readline to a termcap compatible
12510# library. NOTE: Keep the precedence of listed libraries synchronised
12511# with setup.py.
12512py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012513{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
12514$as_echo_n "checking how to link readline libs... " >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012515for py_libtermcap in "" ncursesw ncurses curses termcap; do
12516 if test -z "$py_libtermcap"; then
12517 READLINE_LIBS="-lreadline"
12518 else
12519 READLINE_LIBS="-lreadline -l$py_libtermcap"
12520 fi
12521 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000012522 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012523/* end confdefs.h. */
12524
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012525/* Override any GCC internal prototype to avoid an error.
12526 Use char because int might match the return type of a GCC
12527 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012528#ifdef __cplusplus
12529extern "C"
12530#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012531char readline ();
12532int
12533main ()
12534{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012535return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012536 ;
12537 return 0;
12538}
12539_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012540if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000012541 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012542fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012543rm -f core conftest.err conftest.$ac_objext \
12544 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000012545 if test $py_cv_lib_readline = yes; then
12546 break
12547 fi
12548done
12549# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
12550#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000012551if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012552 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
12553$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012554else
Matthias Kloseb9621712010-04-24 17:59:49 +000012555 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
12556$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012557
Matthias Kloseb9621712010-04-24 17:59:49 +000012558$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012559
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012560fi
12561
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012562# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000012563{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
12564$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
12565if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then :
12566 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012567else
12568 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012569LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012570cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012571/* end confdefs.h. */
12572
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012573/* Override any GCC internal prototype to avoid an error.
12574 Use char because int might match the return type of a GCC
12575 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012576#ifdef __cplusplus
12577extern "C"
12578#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012579char rl_callback_handler_install ();
12580int
12581main ()
12582{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012583return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012584 ;
12585 return 0;
12586}
12587_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012588if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012589 ac_cv_lib_readline_rl_callback_handler_install=yes
12590else
Matthias Kloseb9621712010-04-24 17:59:49 +000012591 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012592fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012593rm -f core conftest.err conftest.$ac_objext \
12594 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012595LIBS=$ac_check_lib_save_LIBS
12596fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012597{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
12598$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
12599if test "x$ac_cv_lib_readline_rl_callback_handler_install" = x""yes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012600
Matthias Kloseb9621712010-04-24 17:59:49 +000012601$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012602
12603fi
12604
12605
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012606# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000012607cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012608/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012609#include <readline/readline.h>
12610_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012611if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012612 have_readline=yes
12613else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012614 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000012615
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012616fi
12617rm -f conftest.err conftest.$ac_ext
12618if test $have_readline = yes
12619then
Matthias Kloseb9621712010-04-24 17:59:49 +000012620 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012621/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012622#include <readline/readline.h>
12623
12624_ACEOF
12625if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012626 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012627
Matthias Kloseb9621712010-04-24 17:59:49 +000012628$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012629
12630fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012631rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012632
Matthias Kloseb9621712010-04-24 17:59:49 +000012633 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000012634/* end confdefs.h. */
12635#include <readline/readline.h>
12636
12637_ACEOF
12638if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012639 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000012640
Matthias Kloseb9621712010-04-24 17:59:49 +000012641$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000012642
12643fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012644rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000012645
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012646fi
12647
Martin v. Löwis0daad592001-09-30 21:09:59 +000012648# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000012649{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
12650$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
12651if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then :
12652 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000012653else
Martin v. Löwis11437992002-04-12 09:54:03 +000012654 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012655LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012656cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012657/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012658
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012659/* Override any GCC internal prototype to avoid an error.
12660 Use char because int might match the return type of a GCC
12661 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012662#ifdef __cplusplus
12663extern "C"
12664#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012665char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012666int
12667main ()
12668{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012669return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012670 ;
12671 return 0;
12672}
12673_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012674if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012675 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000012676else
Matthias Kloseb9621712010-04-24 17:59:49 +000012677 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000012678fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012679rm -f core conftest.err conftest.$ac_objext \
12680 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012681LIBS=$ac_check_lib_save_LIBS
12682fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012683{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
12684$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
12685if test "x$ac_cv_lib_readline_rl_pre_input_hook" = x""yes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012686
Matthias Kloseb9621712010-04-24 17:59:49 +000012687$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000012688
Martin v. Löwis0daad592001-09-30 21:09:59 +000012689fi
12690
Michael W. Hudson54241132001-12-07 15:38:26 +000012691
Thomas Wouters89d996e2007-09-08 17:39:28 +000012692# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000012693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
12694$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
12695if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then :
12696 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000012697else
12698 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012699LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012700cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000012701/* end confdefs.h. */
12702
12703/* Override any GCC internal prototype to avoid an error.
12704 Use char because int might match the return type of a GCC
12705 builtin and then its argument prototype would still apply. */
12706#ifdef __cplusplus
12707extern "C"
12708#endif
12709char rl_completion_display_matches_hook ();
12710int
12711main ()
12712{
12713return rl_completion_display_matches_hook ();
12714 ;
12715 return 0;
12716}
12717_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012718if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000012719 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
12720else
Matthias Kloseb9621712010-04-24 17:59:49 +000012721 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000012722fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012723rm -f core conftest.err conftest.$ac_objext \
12724 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000012725LIBS=$ac_check_lib_save_LIBS
12726fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012727{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
12728$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
12729if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = x""yes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000012730
Matthias Kloseb9621712010-04-24 17:59:49 +000012731$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000012732
12733fi
12734
12735
Martin v. Löwis0daad592001-09-30 21:09:59 +000012736# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000012737{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
12738$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
12739if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then :
12740 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000012741else
Martin v. Löwis11437992002-04-12 09:54:03 +000012742 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012743LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012744cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012745/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012746
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012747/* Override any GCC internal prototype to avoid an error.
12748 Use char because int might match the return type of a GCC
12749 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012750#ifdef __cplusplus
12751extern "C"
12752#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012753char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012754int
12755main ()
12756{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012757return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012758 ;
12759 return 0;
12760}
12761_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012762if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012763 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000012764else
Matthias Kloseb9621712010-04-24 17:59:49 +000012765 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000012766fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012767rm -f core conftest.err conftest.$ac_objext \
12768 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012769LIBS=$ac_check_lib_save_LIBS
12770fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012771{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
12772$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
12773if test "x$ac_cv_lib_readline_rl_completion_matches" = x""yes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012774
Matthias Kloseb9621712010-04-24 17:59:49 +000012775$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000012776
Guido van Rossum353ae582001-07-10 16:45:32 +000012777fi
12778
Jack Jansendd19cf82001-12-06 22:36:17 +000012779
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012780# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000012781cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012782/* end confdefs.h. */
12783#include <readline/readline.h>
12784_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012785if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012786 have_readline=yes
12787else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012788 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000012789
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012790fi
12791rm -f conftest.err conftest.$ac_ext
12792if test $have_readline = yes
12793then
Matthias Kloseb9621712010-04-24 17:59:49 +000012794 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012795/* end confdefs.h. */
12796#include <readline/readline.h>
12797
12798_ACEOF
12799if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012800 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012801
Matthias Kloseb9621712010-04-24 17:59:49 +000012802$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012803
12804fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012805rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012806
12807fi
12808
Martin v. Löwis82bca632006-02-10 20:49:30 +000012809# End of readline checks: restore LIBS
12810LIBS=$LIBS_no_readline
12811
Matthias Kloseb9621712010-04-24 17:59:49 +000012812{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
12813$as_echo_n "checking for broken nice()... " >&6; }
12814if test "${ac_cv_broken_nice+set}" = set; then :
12815 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000012816else
Martin v. Löwis11437992002-04-12 09:54:03 +000012817
Matthias Kloseb9621712010-04-24 17:59:49 +000012818if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000012819 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012820else
Matthias Kloseb9621712010-04-24 17:59:49 +000012821 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012822/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012823
12824int main()
12825{
12826 int val1 = nice(1);
12827 if (val1 != -1 && val1 == nice(2))
12828 exit(0);
12829 exit(1);
12830}
12831
Martin v. Löwis11437992002-04-12 09:54:03 +000012832_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012833if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012834 ac_cv_broken_nice=yes
12835else
Matthias Kloseb9621712010-04-24 17:59:49 +000012836 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012837fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012838rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12839 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012840fi
12841
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012842fi
12843
Matthias Kloseb9621712010-04-24 17:59:49 +000012844{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
12845$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012846if test "$ac_cv_broken_nice" = yes
12847then
Martin v. Löwis11437992002-04-12 09:54:03 +000012848
Matthias Kloseb9621712010-04-24 17:59:49 +000012849$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012850
12851fi
12852
Matthias Kloseb9621712010-04-24 17:59:49 +000012853{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
12854$as_echo_n "checking for broken poll()... " >&6; }
12855if test "${ac_cv_broken_poll+set}" = set; then :
12856 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012857else
Matthias Kloseb9621712010-04-24 17:59:49 +000012858 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012859 ac_cv_broken_poll=no
12860else
Matthias Kloseb9621712010-04-24 17:59:49 +000012861 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012862/* end confdefs.h. */
12863
12864#include <poll.h>
12865
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012866int main()
12867{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012868 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012869 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012870
12871 close (42);
12872
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012873 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012874 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012875 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012876 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012877 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012878 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012879 return 1;
12880}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012881
12882_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012883if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012884 ac_cv_broken_poll=yes
12885else
Matthias Kloseb9621712010-04-24 17:59:49 +000012886 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012887fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012888rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12889 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012890fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012891
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012892fi
12893
Matthias Kloseb9621712010-04-24 17:59:49 +000012894{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
12895$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012896if test "$ac_cv_broken_poll" = yes
12897then
12898
Matthias Kloseb9621712010-04-24 17:59:49 +000012899$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012900
12901fi
12902
Brett Cannon43802422005-02-10 20:48:03 +000012903# 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 +000012904# (which is not required by ISO C or UNIX spec) and/or if we support
12905# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000012906ac_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 +000012907#include <$ac_cv_struct_tm>
12908
Matthias Kloseb9621712010-04-24 17:59:49 +000012909"
12910if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then :
Brett Cannon43802422005-02-10 20:48:03 +000012911
12912cat >>confdefs.h <<_ACEOF
12913#define HAVE_STRUCT_TM_TM_ZONE 1
12914_ACEOF
12915
12916
12917fi
12918
12919if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
12920
Matthias Kloseb9621712010-04-24 17:59:49 +000012921$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000012922
12923else
Matthias Kloseb9621712010-04-24 17:59:49 +000012924 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
12925"
12926if test "x$ac_cv_have_decl_tzname" = x""yes; then :
12927 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012928else
Matthias Kloseb9621712010-04-24 17:59:49 +000012929 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012930fi
12931
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012932cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012933#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012934_ACEOF
12935
Matthias Kloseb9621712010-04-24 17:59:49 +000012936 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
12937$as_echo_n "checking for tzname... " >&6; }
12938if test "${ac_cv_var_tzname+set}" = set; then :
12939 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012940else
Matthias Kloseb9621712010-04-24 17:59:49 +000012941 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000012942/* end confdefs.h. */
12943#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012944#if !HAVE_DECL_TZNAME
12945extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000012946#endif
12947
12948int
12949main ()
12950{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012951return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000012952 ;
12953 return 0;
12954}
12955_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012956if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000012957 ac_cv_var_tzname=yes
12958else
Matthias Kloseb9621712010-04-24 17:59:49 +000012959 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000012960fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012961rm -f core conftest.err conftest.$ac_objext \
12962 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000012963fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012964{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
12965$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000012966 if test $ac_cv_var_tzname = yes; then
12967
Matthias Kloseb9621712010-04-24 17:59:49 +000012968$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000012969
12970 fi
12971fi
12972
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012973
Martin v. Löwis1d459062005-03-14 21:23:33 +000012974# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000012975{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
12976$as_echo_n "checking for working tzset()... " >&6; }
12977if test "${ac_cv_working_tzset+set}" = set; then :
12978 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000012979else
12980
Matthias Kloseb9621712010-04-24 17:59:49 +000012981if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000012982 ac_cv_working_tzset=no
12983else
Matthias Kloseb9621712010-04-24 17:59:49 +000012984 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012985/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000012986
12987#include <stdlib.h>
12988#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000012989#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000012990
12991#if HAVE_TZNAME
12992extern char *tzname[];
12993#endif
12994
Guido van Rossumd11b62e2003-03-14 21:51:36 +000012995int main()
12996{
Brett Cannon18367812003-09-19 00:59:16 +000012997 /* Note that we need to ensure that not only does tzset(3)
12998 do 'something' with localtime, but it works as documented
12999 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000013000 This includes making sure that tzname is set properly if
13001 tm->tm_zone does not exist since it is the alternative way
13002 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000013003
13004 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000013005 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000013006 */
13007
Martin v. Löwis1d459062005-03-14 21:23:33 +000013008 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000013009 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
13010
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013011 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013012 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013013 if (localtime(&groundhogday)->tm_hour != 0)
13014 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013015#if HAVE_TZNAME
13016 /* For UTC, tzname[1] is sometimes "", sometimes " " */
13017 if (strcmp(tzname[0], "UTC") ||
13018 (tzname[1][0] != 0 && tzname[1][0] != ' '))
13019 exit(1);
13020#endif
Brett Cannon18367812003-09-19 00:59:16 +000013021
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013022 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013023 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013024 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013025 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013026#if HAVE_TZNAME
13027 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
13028 exit(1);
13029#endif
Brett Cannon18367812003-09-19 00:59:16 +000013030
13031 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
13032 tzset();
13033 if (localtime(&groundhogday)->tm_hour != 11)
13034 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013035#if HAVE_TZNAME
13036 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
13037 exit(1);
13038#endif
13039
13040#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000013041 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
13042 exit(1);
13043 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
13044 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013045#endif
Brett Cannon18367812003-09-19 00:59:16 +000013046
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013047 exit(0);
13048}
13049
13050_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013051if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013052 ac_cv_working_tzset=yes
13053else
Matthias Kloseb9621712010-04-24 17:59:49 +000013054 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013055fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013056rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13057 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013058fi
13059
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013060fi
13061
Matthias Kloseb9621712010-04-24 17:59:49 +000013062{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
13063$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013064if test "$ac_cv_working_tzset" = yes
13065then
13066
Matthias Kloseb9621712010-04-24 17:59:49 +000013067$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013068
13069fi
13070
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013071# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
13073$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
13074if test "${ac_cv_stat_tv_nsec+set}" = set; then :
13075 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013076else
Matthias Kloseb9621712010-04-24 17:59:49 +000013077 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013078/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013079#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013080int
13081main ()
13082{
13083
13084struct stat st;
13085st.st_mtim.tv_nsec = 1;
13086
13087 ;
13088 return 0;
13089}
13090_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013091if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000013092 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013093else
Matthias Kloseb9621712010-04-24 17:59:49 +000013094 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013095fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013096rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13097fi
13098
Matthias Kloseb9621712010-04-24 17:59:49 +000013099{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
13100$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013101if test "$ac_cv_stat_tv_nsec" = yes
13102then
13103
Matthias Kloseb9621712010-04-24 17:59:49 +000013104$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013105
13106fi
13107
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013108# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
13110$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
13111if test "${ac_cv_stat_tv_nsec2+set}" = set; then :
13112 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013113else
Matthias Kloseb9621712010-04-24 17:59:49 +000013114 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013115/* end confdefs.h. */
13116#include <sys/stat.h>
13117int
13118main ()
13119{
13120
13121struct stat st;
13122st.st_mtimespec.tv_nsec = 1;
13123
13124 ;
13125 return 0;
13126}
13127_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013128if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013129 ac_cv_stat_tv_nsec2=yes
13130else
Matthias Kloseb9621712010-04-24 17:59:49 +000013131 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013132fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013133rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13134fi
13135
Matthias Kloseb9621712010-04-24 17:59:49 +000013136{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
13137$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013138if test "$ac_cv_stat_tv_nsec2" = yes
13139then
13140
Matthias Kloseb9621712010-04-24 17:59:49 +000013141$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013142
13143fi
13144
Jack Jansen666b1e72001-10-31 12:11:48 +000013145# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000013146{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
13147$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
13148if test "${ac_cv_mvwdelch_is_expression+set}" = set; then :
13149 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013150else
Matthias Kloseb9621712010-04-24 17:59:49 +000013151 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013152/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013153#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013154int
13155main ()
13156{
Jack Jansen666b1e72001-10-31 12:11:48 +000013157
13158 int rtn;
13159 rtn = mvwdelch(0,0,0);
13160
Martin v. Löwis11437992002-04-12 09:54:03 +000013161 ;
13162 return 0;
13163}
13164_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013165if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013166 ac_cv_mvwdelch_is_expression=yes
13167else
Matthias Kloseb9621712010-04-24 17:59:49 +000013168 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013169fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013170rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13171fi
13172
Matthias Kloseb9621712010-04-24 17:59:49 +000013173{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
13174$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000013175
13176if test "$ac_cv_mvwdelch_is_expression" = yes
13177then
Martin v. Löwis11437992002-04-12 09:54:03 +000013178
Matthias Kloseb9621712010-04-24 17:59:49 +000013179$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013180
13181fi
13182
Matthias Kloseb9621712010-04-24 17:59:49 +000013183{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
13184$as_echo_n "checking whether WINDOW has _flags... " >&6; }
13185if test "${ac_cv_window_has_flags+set}" = set; then :
13186 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013187else
Matthias Kloseb9621712010-04-24 17:59:49 +000013188 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013189/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013190#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013191int
13192main ()
13193{
Jack Jansen666b1e72001-10-31 12:11:48 +000013194
13195 WINDOW *w;
13196 w->_flags = 0;
13197
Martin v. Löwis11437992002-04-12 09:54:03 +000013198 ;
13199 return 0;
13200}
13201_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013202if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013203 ac_cv_window_has_flags=yes
13204else
Matthias Kloseb9621712010-04-24 17:59:49 +000013205 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013206fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013207rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13208fi
13209
Matthias Kloseb9621712010-04-24 17:59:49 +000013210{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
13211$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013212
Jack Jansen666b1e72001-10-31 12:11:48 +000013213
13214if test "$ac_cv_window_has_flags" = yes
13215then
Martin v. Löwis11437992002-04-12 09:54:03 +000013216
Matthias Kloseb9621712010-04-24 17:59:49 +000013217$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013218
13219fi
13220
Matthias Kloseb9621712010-04-24 17:59:49 +000013221{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
13222$as_echo_n "checking for is_term_resized... " >&6; }
13223cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013224/* end confdefs.h. */
13225#include <curses.h>
13226int
13227main ()
13228{
13229void *x=is_term_resized
13230 ;
13231 return 0;
13232}
13233_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013234if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013235
Matthias Kloseb9621712010-04-24 17:59:49 +000013236$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013237
Matthias Kloseb159a552010-04-25 21:00:44 +000013238 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013239$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013240else
Matthias Kloseb9621712010-04-24 17:59:49 +000013241 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13242$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013243
13244fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013245rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13246
Matthias Kloseb9621712010-04-24 17:59:49 +000013247{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
13248$as_echo_n "checking for resize_term... " >&6; }
13249cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013250/* end confdefs.h. */
13251#include <curses.h>
13252int
13253main ()
13254{
13255void *x=resize_term
13256 ;
13257 return 0;
13258}
13259_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013260if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013261
Matthias Kloseb9621712010-04-24 17:59:49 +000013262$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013263
Matthias Kloseb159a552010-04-25 21:00:44 +000013264 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013265$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013266else
Matthias Kloseb9621712010-04-24 17:59:49 +000013267 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13268$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013269
13270fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013271rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13272
Matthias Kloseb9621712010-04-24 17:59:49 +000013273{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
13274$as_echo_n "checking for resizeterm... " >&6; }
13275cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013276/* end confdefs.h. */
13277#include <curses.h>
13278int
13279main ()
13280{
13281void *x=resizeterm
13282 ;
13283 return 0;
13284}
13285_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013286if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013287
Matthias Kloseb9621712010-04-24 17:59:49 +000013288$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013289
Matthias Kloseb159a552010-04-25 21:00:44 +000013290 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013291$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013292else
Matthias Kloseb9621712010-04-24 17:59:49 +000013293 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13294$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013295
13296fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013297rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13298
Matthias Kloseb9621712010-04-24 17:59:49 +000013299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
13300$as_echo_n "checking for /dev/ptmx... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013301
13302if test -r /dev/ptmx
13303then
Matthias Kloseb9621712010-04-24 17:59:49 +000013304 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13305$as_echo "yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013306
Matthias Kloseb9621712010-04-24 17:59:49 +000013307$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013308
Thomas Wouters89f507f2006-12-13 04:49:30 +000013309else
Matthias Kloseb9621712010-04-24 17:59:49 +000013310 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13311$as_echo "no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013312fi
13313
Matthias Kloseb9621712010-04-24 17:59:49 +000013314{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
13315$as_echo_n "checking for /dev/ptc... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013316
13317if test -r /dev/ptc
13318then
Matthias Kloseb9621712010-04-24 17:59:49 +000013319 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13320$as_echo "yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013321
Matthias Kloseb9621712010-04-24 17:59:49 +000013322$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000013323
Thomas Wouters89f507f2006-12-13 04:49:30 +000013324else
Matthias Kloseb9621712010-04-24 17:59:49 +000013325 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13326$as_echo "no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013327fi
13328
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013329if test "$have_long_long" = yes
13330then
Matthias Kloseb9621712010-04-24 17:59:49 +000013331 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
13332$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
13333 if test "${ac_cv_have_long_long_format+set}" = set; then :
13334 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013335else
Matthias Kloseb9621712010-04-24 17:59:49 +000013336 if test "$cross_compiling" = yes; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013337 ac_cv_have_long_long_format=no
13338else
Matthias Kloseb9621712010-04-24 17:59:49 +000013339 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013340/* end confdefs.h. */
13341
13342 #include <stdio.h>
13343 #include <stddef.h>
13344 #include <string.h>
13345
13346 #ifdef HAVE_SYS_TYPES_H
13347 #include <sys/types.h>
13348 #endif
13349
13350 int main()
13351 {
13352 char buffer[256];
13353
13354 if (sprintf(buffer, "%lld", (long long)123) < 0)
13355 return 1;
13356 if (strcmp(buffer, "123"))
13357 return 1;
13358
13359 if (sprintf(buffer, "%lld", (long long)-123) < 0)
13360 return 1;
13361 if (strcmp(buffer, "-123"))
13362 return 1;
13363
13364 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
13365 return 1;
13366 if (strcmp(buffer, "123"))
13367 return 1;
13368
13369 return 0;
13370 }
13371
13372_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013373if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013374 ac_cv_have_long_long_format=yes
13375else
Matthias Kloseb9621712010-04-24 17:59:49 +000013376 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013377fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013378rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13379 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013380fi
13381
13382
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013383fi
13384
Matthias Kloseb9621712010-04-24 17:59:49 +000013385 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
13386$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013387fi
13388
Mark Dickinson89d7d412009-12-31 20:50:59 +000013389if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013390then
13391
Matthias Kloseb9621712010-04-24 17:59:49 +000013392$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013393
13394fi
13395
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000013396if test $ac_sys_system = Darwin
13397then
13398 LIBS="$LIBS -framework CoreFoundation"
13399fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013400
Matthias Kloseb9621712010-04-24 17:59:49 +000013401{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
13402$as_echo_n "checking for %zd printf() format support... " >&6; }
13403if test "${ac_cv_have_size_t_format+set}" = set; then :
13404 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013405else
Matthias Kloseb9621712010-04-24 17:59:49 +000013406 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000013407 ac_cv_have_size_t_format="cross -- assuming yes"
13408
Thomas Wouters477c8d52006-05-27 19:21:47 +000013409else
Matthias Kloseb9621712010-04-24 17:59:49 +000013410 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000013411/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013412
Thomas Wouters477c8d52006-05-27 19:21:47 +000013413#include <stdio.h>
13414#include <stddef.h>
13415#include <string.h>
13416
Christian Heimes2c181612007-12-17 20:04:13 +000013417#ifdef HAVE_SYS_TYPES_H
13418#include <sys/types.h>
13419#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000013420
13421#ifdef HAVE_SSIZE_T
13422typedef ssize_t Py_ssize_t;
13423#elif SIZEOF_VOID_P == SIZEOF_LONG
13424typedef long Py_ssize_t;
13425#else
13426typedef int Py_ssize_t;
13427#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000013428
Christian Heimes2c181612007-12-17 20:04:13 +000013429int main()
13430{
13431 char buffer[256];
13432
Thomas Wouters477c8d52006-05-27 19:21:47 +000013433 if(sprintf(buffer, "%zd", (size_t)123) < 0)
13434 return 1;
13435
Thomas Wouters89f507f2006-12-13 04:49:30 +000013436 if (strcmp(buffer, "123"))
13437 return 1;
13438
13439 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
13440 return 1;
13441
13442 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000013443 return 1;
13444
13445 return 0;
13446}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013447
Thomas Wouters477c8d52006-05-27 19:21:47 +000013448_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013449if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013450 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013451else
Matthias Kloseb9621712010-04-24 17:59:49 +000013452 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013453fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013454rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13455 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013456fi
13457
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013458fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013459{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
13460$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000013461if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013462
Matthias Kloseb9621712010-04-24 17:59:49 +000013463$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013464
13465fi
13466
Matthias Kloseb9621712010-04-24 17:59:49 +000013467ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000013468#ifdef HAVE_SYS_TYPES_H
13469#include <sys/types.h>
13470#endif
13471#ifdef HAVE_SYS_SOCKET_H
13472#include <sys/socket.h>
13473#endif
13474
Matthias Kloseb9621712010-04-24 17:59:49 +000013475"
13476if test "x$ac_cv_type_socklen_t" = x""yes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000013477
Martin v. Löwis11437992002-04-12 09:54:03 +000013478else
Guido van Rossum95713eb2000-05-18 20:53:31 +000013479
Matthias Kloseb9621712010-04-24 17:59:49 +000013480$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000013481
13482fi
13483
Michael W. Hudson54241132001-12-07 15:38:26 +000013484
Matthias Kloseb9621712010-04-24 17:59:49 +000013485{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
13486$as_echo_n "checking for broken mbstowcs... " >&6; }
13487if test "${ac_cv_broken_mbstowcs+set}" = set; then :
13488 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013489else
Matthias Kloseb9621712010-04-24 17:59:49 +000013490 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000013491 ac_cv_broken_mbstowcs=no
13492else
Matthias Kloseb9621712010-04-24 17:59:49 +000013493 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000013494/* end confdefs.h. */
13495
13496#include<stdlib.h>
13497int main() {
13498 size_t len = -1;
13499 const char *str = "text";
13500 len = mbstowcs(NULL, str, 0);
13501 return (len != 4);
13502}
13503
13504_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013505if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000013506 ac_cv_broken_mbstowcs=no
13507else
Matthias Kloseb9621712010-04-24 17:59:49 +000013508 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000013509fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013510rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13511 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000013512fi
13513
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013514fi
13515
Matthias Kloseb9621712010-04-24 17:59:49 +000013516{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
13517$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000013518if test "$ac_cv_broken_mbstowcs" = yes
13519then
13520
Matthias Kloseb9621712010-04-24 17:59:49 +000013521$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000013522
13523fi
13524
Antoine Pitroub52ec782009-01-25 16:34:23 +000013525# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000013526{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
13527$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013528
13529# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013530if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000013531 withval=$with_computed_gotos;
13532if test "$withval" != no
13533then
13534
Matthias Kloseb9621712010-04-24 17:59:49 +000013535$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000013536
Matthias Kloseb9621712010-04-24 17:59:49 +000013537 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13538$as_echo "yes" >&6; }
13539else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13540$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013541fi
13542else
Matthias Kloseb9621712010-04-24 17:59:49 +000013543 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13544$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013545fi
13546
13547
13548
Michael W. Hudson54241132001-12-07 15:38:26 +000013549
13550
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000013551for h in `(cd $srcdir;echo Python/thread_*.h)`
13552do
13553 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
13554done
13555
Michael W. Hudson54241132001-12-07 15:38:26 +000013556
Neal Norwitzd24499d2005-12-18 21:36:39 +000013557SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Kloseb9621712010-04-24 17:59:49 +000013558{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
13559$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013560for dir in $SRCDIRS; do
13561 if test ! -d $dir; then
13562 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000013563 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013564done
Matthias Kloseb9621712010-04-24 17:59:49 +000013565{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
13566$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000013567
Guido van Rossum627b2d71993-12-24 10:39:16 +000013568# generate output files
Antoine Pitrou20327222009-05-24 20:39:11 +000013569ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000013570
Martin v. Löwis11437992002-04-12 09:54:03 +000013571cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013572# This file is a shell script that caches the results of configure
13573# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000013574# scripts and configure runs, see configure's option --config-cache.
13575# It is not useful on other systems. If it contains results you don't
13576# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013577#
Martin v. Löwis11437992002-04-12 09:54:03 +000013578# config.status only pays attention to the cache file if you give it
13579# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013580#
Skip Montanaro6dead952003-09-25 14:50:04 +000013581# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000013582# loading this file, other *unset* `ac_cv_foo' will be assigned the
13583# following values.
13584
13585_ACEOF
13586
Guido van Rossumf78abae1997-01-21 22:02:36 +000013587# The following way of writing the cache mishandles newlines in values,
13588# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013589# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013590# Ultrix sh set writes to stderr and can't be redirected directly,
13591# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013592(
13593 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
13594 eval ac_val=\$$ac_var
13595 case $ac_val in #(
13596 *${as_nl}*)
13597 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000013598 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
13599$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013600 esac
13601 case $ac_var in #(
13602 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000013603 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
13604 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013605 esac ;;
13606 esac
13607 done
13608
Martin v. Löwis11437992002-04-12 09:54:03 +000013609 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013610 case $as_nl`(ac_space=' '; set) 2>&1` in #(
13611 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000013612 # `set' does not quote correctly, so add quotes: double-quote
13613 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000013614 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013615 "s/'/'\\\\''/g;
13616 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013617 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000013618 *)
13619 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013620 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000013621 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013622 esac |
13623 sort
13624) |
Martin v. Löwis11437992002-04-12 09:54:03 +000013625 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013626 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000013627 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013628 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000013629 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
13630 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013631 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
13632 :end' >>confcache
13633if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
13634 if test -w "$cache_file"; then
13635 test "x$cache_file" != "x/dev/null" &&
Matthias Kloseb9621712010-04-24 17:59:49 +000013636 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
13637$as_echo "$as_me: updating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000013638 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013639 else
Matthias Kloseb9621712010-04-24 17:59:49 +000013640 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
13641$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013642 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013643fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013644rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000013645
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013646test "x$prefix" = xNONE && prefix=$ac_default_prefix
13647# Let make expand exec_prefix.
13648test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000013649
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013650DEFS=-DHAVE_CONFIG_H
13651
Skip Montanaro6dead952003-09-25 14:50:04 +000013652ac_libobjs=
13653ac_ltlibobjs=
13654for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
13655 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013656 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000013657 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013658 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
13659 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000013660 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
13661 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000013662done
13663LIBOBJS=$ac_libobjs
13664
13665LTLIBOBJS=$ac_ltlibobjs
13666
13667
Martin v. Löwis11437992002-04-12 09:54:03 +000013668
Matthias Kloseb9621712010-04-24 17:59:49 +000013669
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013670: ${CONFIG_STATUS=./config.status}
Matthias Kloseb9621712010-04-24 17:59:49 +000013671ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000013672ac_clean_files_save=$ac_clean_files
13673ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013674{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
13675$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
13676as_write_fail=0
13677cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000013678#! $SHELL
13679# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000013680# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013681# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000013682# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000013683
Martin v. Löwis11437992002-04-12 09:54:03 +000013684debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000013685ac_cs_recheck=false
13686ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000013687
Matthias Kloseb9621712010-04-24 17:59:49 +000013688SHELL=\${CONFIG_SHELL-$SHELL}
13689export SHELL
13690_ASEOF
13691cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
13692## -------------------- ##
13693## M4sh Initialization. ##
13694## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000013695
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013696# Be more Bourne compatible
13697DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000013698if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013699 emulate sh
13700 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000013701 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000013702 # is contrary to our usage. Disable this feature.
13703 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013704 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013705else
Matthias Kloseb9621712010-04-24 17:59:49 +000013706 case `(set -o) 2>/dev/null` in #(
13707 *posix*) :
13708 set -o posix ;; #(
13709 *) :
13710 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013711esac
Michael W. Hudson54241132001-12-07 15:38:26 +000013712fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000013713
13714
Matthias Kloseb9621712010-04-24 17:59:49 +000013715as_nl='
13716'
13717export as_nl
13718# Printing a long string crashes Solaris 7 /usr/bin/printf.
13719as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
13720as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
13721as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
13722# Prefer a ksh shell builtin over an external printf program on Solaris,
13723# but without wasting forks for bash or zsh.
13724if test -z "$BASH_VERSION$ZSH_VERSION" \
13725 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
13726 as_echo='print -r --'
13727 as_echo_n='print -rn --'
13728elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
13729 as_echo='printf %s\n'
13730 as_echo_n='printf %s'
13731else
13732 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
13733 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
13734 as_echo_n='/usr/ucb/echo -n'
13735 else
13736 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
13737 as_echo_n_body='eval
13738 arg=$1;
13739 case $arg in #(
13740 *"$as_nl"*)
13741 expr "X$arg" : "X\\(.*\\)$as_nl";
13742 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
13743 esac;
13744 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
13745 '
13746 export as_echo_n_body
13747 as_echo_n='sh -c $as_echo_n_body as_echo'
13748 fi
13749 export as_echo_body
13750 as_echo='sh -c $as_echo_body as_echo'
13751fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013752
13753# The user is always right.
13754if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013755 PATH_SEPARATOR=:
13756 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
13757 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
13758 PATH_SEPARATOR=';'
13759 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013760fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013761
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013762
13763# IFS
13764# We need space, tab and new line, in precisely that order. Quoting is
13765# there to prevent editors from complaining about space-tab.
13766# (If _AS_PATH_WALK were called with IFS unset, it would disable word
13767# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013768IFS=" "" $as_nl"
13769
13770# Find who we are. Look in the path if we contain no directory separator.
Matthias Kloseb9621712010-04-24 17:59:49 +000013771case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013772 *[\\/]* ) as_myself=$0 ;;
13773 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000013774for as_dir in $PATH
13775do
13776 IFS=$as_save_IFS
13777 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000013778 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
13779 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013780IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000013781
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013782 ;;
13783esac
13784# We did not find ourselves, most probably we were run as `sh COMMAND'
13785# in which case we are not to be found in the path.
13786if test "x$as_myself" = x; then
13787 as_myself=$0
13788fi
13789if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013790 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
13791 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013792fi
13793
Matthias Kloseb9621712010-04-24 17:59:49 +000013794# Unset variables that we do not need and which cause bugs (e.g. in
13795# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
13796# suppresses any "Segmentation fault" message there. '((' could
13797# trigger a bug in pdksh 5.2.14.
13798for as_var in BASH_ENV ENV MAIL MAILPATH
13799do eval test x\${$as_var+set} = xset \
13800 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013801done
13802PS1='$ '
13803PS2='> '
13804PS4='+ '
13805
13806# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000013807LC_ALL=C
13808export LC_ALL
13809LANGUAGE=C
13810export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013811
Matthias Kloseb9621712010-04-24 17:59:49 +000013812# CDPATH.
13813(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
13814
13815
13816# as_fn_error ERROR [LINENO LOG_FD]
13817# ---------------------------------
13818# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
13819# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
13820# script with status $?, using 1 if that was 0.
13821as_fn_error ()
13822{
13823 as_status=$?; test $as_status -eq 0 && as_status=1
13824 if test "$3"; then
13825 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
13826 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
13827 fi
13828 $as_echo "$as_me: error: $1" >&2
13829 as_fn_exit $as_status
13830} # as_fn_error
13831
13832
13833# as_fn_set_status STATUS
13834# -----------------------
13835# Set $? to STATUS, without forking.
13836as_fn_set_status ()
13837{
13838 return $1
13839} # as_fn_set_status
13840
13841# as_fn_exit STATUS
13842# -----------------
13843# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
13844as_fn_exit ()
13845{
13846 set +e
13847 as_fn_set_status $1
13848 exit $1
13849} # as_fn_exit
13850
13851# as_fn_unset VAR
13852# ---------------
13853# Portably unset VAR.
13854as_fn_unset ()
13855{
13856 { eval $1=; unset $1;}
13857}
13858as_unset=as_fn_unset
13859# as_fn_append VAR VALUE
13860# ----------------------
13861# Append the text in VALUE to the end of the definition contained in VAR. Take
13862# advantage of any shell optimizations that allow amortized linear growth over
13863# repeated appends, instead of the typical quadratic growth present in naive
13864# implementations.
13865if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
13866 eval 'as_fn_append ()
13867 {
13868 eval $1+=\$2
13869 }'
13870else
13871 as_fn_append ()
13872 {
13873 eval $1=\$$1\$2
13874 }
13875fi # as_fn_append
13876
13877# as_fn_arith ARG...
13878# ------------------
13879# Perform arithmetic evaluation on the ARGs, and store the result in the
13880# global $as_val. Take advantage of shells that can avoid forks. The arguments
13881# must be portable across $(()) and expr.
13882if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
13883 eval 'as_fn_arith ()
13884 {
13885 as_val=$(( $* ))
13886 }'
13887else
13888 as_fn_arith ()
13889 {
13890 as_val=`expr "$@" || test $? -eq 1`
13891 }
13892fi # as_fn_arith
13893
13894
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013895if expr a : '\(a\)' >/dev/null 2>&1 &&
13896 test "X`expr 00001 : '.*\(...\)'`" = X001; then
13897 as_expr=expr
13898else
13899 as_expr=false
13900fi
13901
13902if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
13903 as_basename=basename
13904else
13905 as_basename=false
13906fi
13907
Matthias Kloseb9621712010-04-24 17:59:49 +000013908if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
13909 as_dirname=dirname
13910else
13911 as_dirname=false
13912fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013913
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013914as_me=`$as_basename -- "$0" ||
13915$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
13916 X"$0" : 'X\(//\)$' \| \
13917 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000013918$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013919 sed '/^.*\/\([^/][^/]*\)\/*$/{
13920 s//\1/
13921 q
13922 }
13923 /^X\/\(\/\/\)$/{
13924 s//\1/
13925 q
13926 }
13927 /^X\/\(\/\).*/{
13928 s//\1/
13929 q
13930 }
13931 s/.*/./; q'`
13932
Matthias Kloseb9621712010-04-24 17:59:49 +000013933# Avoid depending upon Character Ranges.
13934as_cr_letters='abcdefghijklmnopqrstuvwxyz'
13935as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
13936as_cr_Letters=$as_cr_letters$as_cr_LETTERS
13937as_cr_digits='0123456789'
13938as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013939
13940ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000013941case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013942-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000013943 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013944 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000013945 xy) ECHO_C='\c';;
13946 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
13947 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013948 esac;;
13949*)
13950 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000013951esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013952
Martin v. Löwis11437992002-04-12 09:54:03 +000013953rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013954if test -d conf$$.dir; then
13955 rm -f conf$$.dir/conf$$.file
13956else
13957 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000013958 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013959fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013960if (echo >conf$$.file) 2>/dev/null; then
13961 if ln -s conf$$.file conf$$ 2>/dev/null; then
13962 as_ln_s='ln -s'
13963 # ... but there are two gotchas:
13964 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
13965 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
13966 # In both cases, we have to default to `cp -p'.
13967 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
13968 as_ln_s='cp -p'
13969 elif ln conf$$.file conf$$ 2>/dev/null; then
13970 as_ln_s=ln
13971 else
Martin v. Löwis11437992002-04-12 09:54:03 +000013972 as_ln_s='cp -p'
Matthias Kloseb9621712010-04-24 17:59:49 +000013973 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013974else
13975 as_ln_s='cp -p'
13976fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013977rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
13978rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000013979
Matthias Kloseb9621712010-04-24 17:59:49 +000013980
13981# as_fn_mkdir_p
13982# -------------
13983# Create "$as_dir" as a directory, including parents if necessary.
13984as_fn_mkdir_p ()
13985{
13986
13987 case $as_dir in #(
13988 -*) as_dir=./$as_dir;;
13989 esac
13990 test -d "$as_dir" || eval $as_mkdir_p || {
13991 as_dirs=
13992 while :; do
13993 case $as_dir in #(
13994 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
13995 *) as_qdir=$as_dir;;
13996 esac
13997 as_dirs="'$as_qdir' $as_dirs"
13998 as_dir=`$as_dirname -- "$as_dir" ||
13999$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
14000 X"$as_dir" : 'X\(//\)[^/]' \| \
14001 X"$as_dir" : 'X\(//\)$' \| \
14002 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
14003$as_echo X"$as_dir" |
14004 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14005 s//\1/
14006 q
14007 }
14008 /^X\(\/\/\)[^/].*/{
14009 s//\1/
14010 q
14011 }
14012 /^X\(\/\/\)$/{
14013 s//\1/
14014 q
14015 }
14016 /^X\(\/\).*/{
14017 s//\1/
14018 q
14019 }
14020 s/.*/./; q'`
14021 test -d "$as_dir" && break
14022 done
14023 test -z "$as_dirs" || eval "mkdir $as_dirs"
14024 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
14025
14026
14027} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000014028if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014029 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000014030else
Skip Montanarof0d5f792004-08-15 14:08:23 +000014031 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000014032 as_mkdir_p=false
14033fi
14034
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014035if test -x / >/dev/null 2>&1; then
14036 as_test_x='test -x'
14037else
14038 if ls -dL / >/dev/null 2>&1; then
14039 as_ls_L_option=L
14040 else
14041 as_ls_L_option=
14042 fi
14043 as_test_x='
14044 eval sh -c '\''
14045 if test -d "$1"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014046 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014047 else
Matthias Kloseb9621712010-04-24 17:59:49 +000014048 case $1 in #(
14049 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014050 esac;
Matthias Kloseb9621712010-04-24 17:59:49 +000014051 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014052 ???[sx]*):;;*)false;;esac;fi
14053 '\'' sh
14054 '
14055fi
14056as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000014057
14058# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014059as_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 +000014060
14061# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014062as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014063
14064
Martin v. Löwis11437992002-04-12 09:54:03 +000014065exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000014066## ----------------------------------- ##
14067## Main body of $CONFIG_STATUS script. ##
14068## ----------------------------------- ##
14069_ASEOF
14070test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014071
Matthias Kloseb9621712010-04-24 17:59:49 +000014072cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14073# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000014074# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014075# values after options handling.
14076ac_log="
Benjamin Peterson46ea4f72009-06-27 21:40:27 +000014077This file was extended by python $as_me 3.2, which was
Matthias Kloseb9621712010-04-24 17:59:49 +000014078generated by GNU Autoconf 2.65. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000014079
14080 CONFIG_FILES = $CONFIG_FILES
14081 CONFIG_HEADERS = $CONFIG_HEADERS
14082 CONFIG_LINKS = $CONFIG_LINKS
14083 CONFIG_COMMANDS = $CONFIG_COMMANDS
14084 $ $0 $@
14085
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014086on `(hostname || uname -n) 2>/dev/null | sed 1q`
14087"
14088
Martin v. Löwis11437992002-04-12 09:54:03 +000014089_ACEOF
14090
Matthias Kloseb9621712010-04-24 17:59:49 +000014091case $ac_config_files in *"
14092"*) set x $ac_config_files; shift; ac_config_files=$*;;
14093esac
14094
14095case $ac_config_headers in *"
14096"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
14097esac
14098
14099
14100cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014101# Files that config.status was made for.
Martin v. Löwis113a0852009-05-29 17:25:39 +000014102config_files="$ac_config_files"
14103config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000014104
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014105_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014106
Matthias Kloseb9621712010-04-24 17:59:49 +000014107cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014108ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000014109\`$as_me' instantiates files and other configuration actions
14110from templates according to the current configuration. Unless the files
14111and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000014112
Matthias Kloseb9621712010-04-24 17:59:49 +000014113Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000014114
14115 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014116 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000014117 --config print configuration, then exit
14118 -q, --quiet, --silent
14119 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000014120 -d, --debug don't remove temporary files
14121 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000014122 --file=FILE[:TEMPLATE]
14123 instantiate the configuration file FILE
14124 --header=FILE[:TEMPLATE]
14125 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000014126
14127Configuration files:
14128$config_files
14129
14130Configuration headers:
14131$config_headers
14132
Matthias Kloseb9621712010-04-24 17:59:49 +000014133Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014134
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014135_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014136cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14137ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000014138ac_cs_version="\\
Benjamin Peterson46ea4f72009-06-27 21:40:27 +000014139python config.status 3.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014140configured by $0, generated by GNU Autoconf 2.65,
14141 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000014142
Matthias Kloseb9621712010-04-24 17:59:49 +000014143Copyright (C) 2009 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000014144This config.status script is free software; the Free Software Foundation
14145gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014146
14147ac_pwd='$ac_pwd'
14148srcdir='$srcdir'
14149INSTALL='$INSTALL'
Matthias Kloseb9621712010-04-24 17:59:49 +000014150test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000014151_ACEOF
14152
Matthias Kloseb9621712010-04-24 17:59:49 +000014153cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14154# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000014155ac_need_defaults=:
14156while test $# != 0
14157do
14158 case $1 in
14159 --*=*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014160 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14161 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000014162 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000014163 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014164 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000014165 ac_option=$1
14166 ac_optarg=$2
14167 ac_shift=shift
14168 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014169 esac
14170
Skip Montanaro6dead952003-09-25 14:50:04 +000014171 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000014172 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000014173 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14174 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014175 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000014176 $as_echo "$ac_cs_version"; exit ;;
14177 --config | --confi | --conf | --con | --co | --c )
14178 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014179 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000014180 debug=: ;;
14181 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000014182 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014183 case $ac_optarg in
14184 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14185 esac
14186 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014187 ac_need_defaults=false;;
14188 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000014189 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014190 case $ac_optarg in
14191 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14192 esac
14193 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014194 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014195 --he | --h)
14196 # Conflict between --help and --header
Matthias Kloseb9621712010-04-24 17:59:49 +000014197 as_fn_error "ambiguous option: \`$1'
14198Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014199 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000014200 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000014201 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
14202 | -silent | --silent | --silen | --sile | --sil | --si | --s)
14203 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014204
14205 # This is an error.
Matthias Kloseb9621712010-04-24 17:59:49 +000014206 -*) as_fn_error "unrecognized option: \`$1'
14207Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014208
Matthias Kloseb9621712010-04-24 17:59:49 +000014209 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014210 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014211
14212 esac
14213 shift
14214done
14215
Skip Montanaro6dead952003-09-25 14:50:04 +000014216ac_configure_extra_args=
14217
14218if $ac_cs_silent; then
14219 exec 6>/dev/null
14220 ac_configure_extra_args="$ac_configure_extra_args --silent"
14221fi
14222
14223_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014224cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000014225if \$ac_cs_recheck; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014226 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
14227 shift
14228 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
14229 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014230 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000014231 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000014232fi
14233
Martin v. Löwis11437992002-04-12 09:54:03 +000014234_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014235cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014236exec 5>>config.log
14237{
14238 echo
14239 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
14240## Running $as_me. ##
14241_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000014242 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014243} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014244
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014245_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014246cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014247_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014248
Matthias Kloseb9621712010-04-24 17:59:49 +000014249cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014250
14251# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000014252for ac_config_target in $ac_config_targets
14253do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014254 case $ac_config_target in
14255 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
14256 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
14257 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014258 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
14259 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014260 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
14261 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000014262 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014263
Matthias Kloseb9621712010-04-24 17:59:49 +000014264 *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014265 esac
14266done
14267
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014268
Martin v. Löwis11437992002-04-12 09:54:03 +000014269# If the user did not use the arguments to specify the items to instantiate,
14270# then the envvar interface is used. Set only those that are not.
14271# We use the long form for the default assignment because of an extremely
14272# bizarre bug on SunOS 4.1.3.
14273if $ac_need_defaults; then
14274 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
14275 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
14276fi
14277
Skip Montanaro6dead952003-09-25 14:50:04 +000014278# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014279# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000014280# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014281# Hook for its removal unless debugging.
14282# Note that there is a small window in which the directory will not be cleaned:
14283# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000014284$debug ||
14285{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014286 tmp=
14287 trap 'exit_status=$?
14288 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
14289' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000014290 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000014291}
Martin v. Löwis11437992002-04-12 09:54:03 +000014292# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000014293
Martin v. Löwis11437992002-04-12 09:54:03 +000014294{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014295 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000014296 test -n "$tmp" && test -d "$tmp"
14297} ||
14298{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014299 tmp=./conf$$-$RANDOM
14300 (umask 077 && mkdir "$tmp")
Matthias Kloseb9621712010-04-24 17:59:49 +000014301} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000014302
Matthias Kloseb9621712010-04-24 17:59:49 +000014303# Set up the scripts for CONFIG_FILES section.
14304# No need to generate them if there are no CONFIG_FILES.
14305# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014306if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014307
Matthias Kloseb9621712010-04-24 17:59:49 +000014308
14309ac_cr=`echo X | tr X '\015'`
14310# On cygwin, bash can eat \r inside `` if the user requested igncr.
14311# But we know of no other shell where ac_cr would be empty at this
14312# point, so we can use a bashism as a fallback.
14313if test "x$ac_cr" = x; then
14314 eval ac_cr=\$\'\\r\'
14315fi
14316ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
14317if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
14318 ac_cs_awk_cr='\r'
14319else
14320 ac_cs_awk_cr=$ac_cr
14321fi
14322
14323echo 'BEGIN {' >"$tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000014324_ACEOF
14325
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014326
Matthias Kloseb9621712010-04-24 17:59:49 +000014327{
14328 echo "cat >conf$$subs.awk <<_ACEOF" &&
14329 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
14330 echo "_ACEOF"
14331} >conf$$subs.sh ||
14332 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
14333ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014334ac_delim='%!_!# '
14335for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000014336 . ./conf$$subs.sh ||
14337 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014338
Matthias Kloseb9621712010-04-24 17:59:49 +000014339 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
14340 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014341 break
14342 elif $ac_last_try; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014343 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014344 else
14345 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000014346 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014347done
Matthias Kloseb9621712010-04-24 17:59:49 +000014348rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014349
Matthias Kloseb9621712010-04-24 17:59:49 +000014350cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14351cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014352_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014353sed -n '
14354h
14355s/^/S["/; s/!.*/"]=/
14356p
14357g
14358s/^[^!]*!//
14359:repl
14360t repl
14361s/'"$ac_delim"'$//
14362t delim
14363:nl
14364h
14365s/\(.\{148\}\)..*/\1/
14366t more1
14367s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
14368p
14369n
14370b repl
14371:more1
14372s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14373p
14374g
14375s/.\{148\}//
14376t nl
14377:delim
14378h
14379s/\(.\{148\}\)..*/\1/
14380t more2
14381s/["\\]/\\&/g; s/^/"/; s/$/"/
14382p
14383b
14384:more2
14385s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14386p
14387g
14388s/.\{148\}//
14389t delim
14390' <conf$$subs.awk | sed '
14391/^[^""]/{
14392 N
14393 s/\n//
14394}
14395' >>$CONFIG_STATUS || ac_write_fail=1
14396rm -f conf$$subs.awk
14397cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14398_ACAWK
14399cat >>"\$tmp/subs1.awk" <<_ACAWK &&
14400 for (key in S) S_is_set[key] = 1
14401 FS = ""
14402
14403}
14404{
14405 line = $ 0
14406 nfields = split(line, field, "@")
14407 substed = 0
14408 len = length(field[1])
14409 for (i = 2; i < nfields; i++) {
14410 key = field[i]
14411 keylen = length(key)
14412 if (S_is_set[key]) {
14413 value = S[key]
14414 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
14415 len += length(value) + length(field[++i])
14416 substed = 1
14417 } else
14418 len += 1 + keylen
14419 }
14420
14421 print line
14422}
14423
14424_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014425_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014426cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14427if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
14428 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
14429else
14430 cat
14431fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
14432 || as_fn_error "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014433_ACEOF
14434
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014435# VPATH may cause trouble with some makes, so we remove $(srcdir),
14436# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
14437# trailing colons and then remove the whole line if VPATH becomes empty
14438# (actually we leave an empty line to preserve line numbers).
14439if test "x$srcdir" = x.; then
14440 ac_vpsub='/^[ ]*VPATH[ ]*=/{
14441s/:*\$(srcdir):*/:/
14442s/:*\${srcdir}:*/:/
14443s/:*@srcdir@:*/:/
14444s/^\([^=]*=[ ]*\):*/\1/
14445s/:*$//
14446s/^[^=]*=[ ]*$//
14447}'
14448fi
14449
Matthias Kloseb9621712010-04-24 17:59:49 +000014450cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014451fi # test -n "$CONFIG_FILES"
14452
Matthias Kloseb9621712010-04-24 17:59:49 +000014453# Set up the scripts for CONFIG_HEADERS section.
14454# No need to generate them if there are no CONFIG_HEADERS.
14455# This happens for instance with `./config.status Makefile'.
14456if test -n "$CONFIG_HEADERS"; then
14457cat >"$tmp/defines.awk" <<\_ACAWK ||
14458BEGIN {
14459_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014460
Matthias Kloseb9621712010-04-24 17:59:49 +000014461# Transform confdefs.h into an awk script `defines.awk', embedded as
14462# here-document in config.status, that substitutes the proper values into
14463# config.h.in to produce config.h.
14464
14465# Create a delimiter string that does not exist in confdefs.h, to ease
14466# handling of long lines.
14467ac_delim='%!_!# '
14468for ac_last_try in false false :; do
14469 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
14470 if test -z "$ac_t"; then
14471 break
14472 elif $ac_last_try; then
14473 as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
14474 else
14475 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
14476 fi
14477done
14478
14479# For the awk script, D is an array of macro values keyed by name,
14480# likewise P contains macro parameters if any. Preserve backslash
14481# newline sequences.
14482
14483ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
14484sed -n '
14485s/.\{148\}/&'"$ac_delim"'/g
14486t rset
14487:rset
14488s/^[ ]*#[ ]*define[ ][ ]*/ /
14489t def
14490d
14491:def
14492s/\\$//
14493t bsnl
14494s/["\\]/\\&/g
14495s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14496D["\1"]=" \3"/p
14497s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
14498d
14499:bsnl
14500s/["\\]/\\&/g
14501s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14502D["\1"]=" \3\\\\\\n"\\/p
14503t cont
14504s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
14505t cont
14506d
14507:cont
14508n
14509s/.\{148\}/&'"$ac_delim"'/g
14510t clear
14511:clear
14512s/\\$//
14513t bsnlc
14514s/["\\]/\\&/g; s/^/"/; s/$/"/p
14515d
14516:bsnlc
14517s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
14518b cont
14519' <confdefs.h | sed '
14520s/'"$ac_delim"'/"\\\
14521"/g' >>$CONFIG_STATUS || ac_write_fail=1
14522
14523cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14524 for (key in D) D_is_set[key] = 1
14525 FS = ""
14526}
14527/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
14528 line = \$ 0
14529 split(line, arg, " ")
14530 if (arg[1] == "#") {
14531 defundef = arg[2]
14532 mac1 = arg[3]
14533 } else {
14534 defundef = substr(arg[1], 2)
14535 mac1 = arg[2]
14536 }
14537 split(mac1, mac2, "(") #)
14538 macro = mac2[1]
14539 prefix = substr(line, 1, index(line, defundef) - 1)
14540 if (D_is_set[macro]) {
14541 # Preserve the white space surrounding the "#".
14542 print prefix "define", macro P[macro] D[macro]
14543 next
14544 } else {
14545 # Replace #undef with comments. This is necessary, for example,
14546 # in the case of _POSIX_SOURCE, which is predefined and required
14547 # on some systems where configure will not decide to define it.
14548 if (defundef == "undef") {
14549 print "/*", prefix defundef, macro, "*/"
14550 next
14551 }
14552 }
14553}
14554{ print }
14555_ACAWK
14556_ACEOF
14557cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14558 as_fn_error "could not setup config headers machinery" "$LINENO" 5
14559fi # test -n "$CONFIG_HEADERS"
14560
14561
14562eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
14563shift
14564for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014565do
14566 case $ac_tag in
14567 :[FHLC]) ac_mode=$ac_tag; continue;;
14568 esac
14569 case $ac_mode$ac_tag in
14570 :[FHL]*:*);;
Matthias Kloseb9621712010-04-24 17:59:49 +000014571 :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014572 :[FH]-) ac_tag=-:-;;
14573 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
14574 esac
14575 ac_save_IFS=$IFS
14576 IFS=:
14577 set x $ac_tag
14578 IFS=$ac_save_IFS
14579 shift
14580 ac_file=$1
14581 shift
14582
14583 case $ac_mode in
14584 :L) ac_source=$1;;
14585 :[FH])
14586 ac_file_inputs=
14587 for ac_f
14588 do
14589 case $ac_f in
14590 -) ac_f="$tmp/stdin";;
14591 *) # Look for the file first in the build tree, then in the source tree
14592 # (if the path is not absolute). The absolute path cannot be DOS-style,
14593 # because $ac_f cannot contain `:'.
14594 test -f "$ac_f" ||
14595 case $ac_f in
14596 [\\/$]*) false;;
14597 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
14598 esac ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014599 as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014600 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014601 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
14602 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014603 done
14604
14605 # Let's still pretend it is `configure' which instantiates (i.e., don't
14606 # use $as_me), people would be surprised to read:
14607 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014608 configure_input='Generated from '`
14609 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
14610 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014611 if test x"$ac_file" != x-; then
14612 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000014613 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
14614$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014615 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014616 # Neutralize special characters interpreted by sed in replacement strings.
14617 case $configure_input in #(
14618 *\&* | *\|* | *\\* )
14619 ac_sed_conf_input=`$as_echo "$configure_input" |
14620 sed 's/[\\\\&|]/\\\\&/g'`;; #(
14621 *) ac_sed_conf_input=$configure_input;;
14622 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014623
14624 case $ac_tag in
Matthias Kloseb9621712010-04-24 17:59:49 +000014625 *:-:* | *:-) cat >"$tmp/stdin" \
14626 || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014627 esac
14628 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014629 esac
14630
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014631 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000014632$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014633 X"$ac_file" : 'X\(//\)[^/]' \| \
14634 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014635 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014636$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014637 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14638 s//\1/
14639 q
14640 }
14641 /^X\(\/\/\)[^/].*/{
14642 s//\1/
14643 q
14644 }
14645 /^X\(\/\/\)$/{
14646 s//\1/
14647 q
14648 }
14649 /^X\(\/\).*/{
14650 s//\1/
14651 q
14652 }
14653 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000014654 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000014655 ac_builddir=.
14656
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014657case "$ac_dir" in
14658.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
14659*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014660 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014661 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000014662 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014663 case $ac_top_builddir_sub in
14664 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
14665 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
14666 esac ;;
14667esac
14668ac_abs_top_builddir=$ac_pwd
14669ac_abs_builddir=$ac_pwd$ac_dir_suffix
14670# for backward compatibility:
14671ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000014672
14673case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014674 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000014675 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014676 ac_top_srcdir=$ac_top_builddir_sub
14677 ac_abs_top_srcdir=$ac_pwd ;;
14678 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000014679 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014680 ac_top_srcdir=$srcdir
14681 ac_abs_top_srcdir=$srcdir ;;
14682 *) # Relative name.
14683 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
14684 ac_top_srcdir=$ac_top_build_prefix$srcdir
14685 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014686esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014687ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000014688
Martin v. Löwis11437992002-04-12 09:54:03 +000014689
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014690 case $ac_mode in
14691 :F)
14692 #
14693 # CONFIG_FILE
14694 #
Martin v. Löwis11437992002-04-12 09:54:03 +000014695
14696 case $INSTALL in
14697 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014698 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014699 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000014700_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014701
Matthias Kloseb9621712010-04-24 17:59:49 +000014702cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014703# If the template does not know about datarootdir, expand it.
14704# FIXME: This hack should be removed a few years after 2.60.
14705ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000014706ac_sed_dataroot='
14707/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014708 p
14709 q
14710}
14711/@datadir@/p
14712/@docdir@/p
14713/@infodir@/p
14714/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000014715/@mandir@/p'
14716case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014717*datarootdir*) ac_datarootdir_seen=yes;;
14718*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014719 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
14720$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014721_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014722cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014723 ac_datarootdir_hack='
14724 s&@datadir@&$datadir&g
14725 s&@docdir@&$docdir&g
14726 s&@infodir@&$infodir&g
14727 s&@localedir@&$localedir&g
14728 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000014729 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014730esac
14731_ACEOF
14732
14733# Neutralize VPATH when `$srcdir' = `.'.
14734# Shell code in configure.ac might set extrasub.
14735# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000014736cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14737ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000014738$extrasub
14739_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014740cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014741:t
14742/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000014743s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014744s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000014745s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014746s&@srcdir@&$ac_srcdir&;t t
14747s&@abs_srcdir@&$ac_abs_srcdir&;t t
14748s&@top_srcdir@&$ac_top_srcdir&;t t
14749s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
14750s&@builddir@&$ac_builddir&;t t
14751s&@abs_builddir@&$ac_abs_builddir&;t t
14752s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
14753s&@INSTALL@&$ac_INSTALL&;t t
14754$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000014755"
14756eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
14757 || as_fn_error "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014758
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014759test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
14760 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
14761 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000014762 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014763which seems to be undefined. Please make sure it is defined." >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014764$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014765which seems to be undefined. Please make sure it is defined." >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014766
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014767 rm -f "$tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000014768 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +000014769 -) cat "$tmp/out" && rm -f "$tmp/out";;
14770 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
14771 esac \
14772 || as_fn_error "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014773 ;;
14774 :H)
14775 #
14776 # CONFIG_HEADER
14777 #
Martin v. Löwis11437992002-04-12 09:54:03 +000014778 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014779 {
14780 $as_echo "/* $configure_input */" \
14781 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
14782 } >"$tmp/config.h" \
14783 || as_fn_error "could not create $ac_file" "$LINENO" 5
14784 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
14785 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
14786$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000014787 else
Matthias Kloseb9621712010-04-24 17:59:49 +000014788 rm -f "$ac_file"
14789 mv "$tmp/config.h" "$ac_file" \
14790 || as_fn_error "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000014791 fi
14792 else
Matthias Kloseb9621712010-04-24 17:59:49 +000014793 $as_echo "/* $configure_input */" \
14794 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
14795 || as_fn_error "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000014796 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014797 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000014798
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014799
14800 esac
14801
14802done # for ac_tag
14803
Guido van Rossum627b2d71993-12-24 10:39:16 +000014804
Matthias Kloseb9621712010-04-24 17:59:49 +000014805as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000014806_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014807ac_clean_files=$ac_clean_files_save
14808
Matthias Kloseb9621712010-04-24 17:59:49 +000014809test $ac_write_fail = 0 ||
14810 as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
14811
Martin v. Löwis11437992002-04-12 09:54:03 +000014812
14813# configure is writing to config.log, and then calls config.status.
14814# config.status does its own redirection, appending to config.log.
14815# Unfortunately, on DOS this fails, as config.log is still kept open
14816# by configure, so config.status won't be able to write to it; its
14817# output is simply discarded. So we exec the FD to /dev/null,
14818# effectively closing config.log, so it can be properly (re)opened and
14819# appended to by config.status. When coming back to configure, we
14820# need to make the FD available again.
14821if test "$no_create" != yes; then
14822 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000014823 ac_config_status_args=
14824 test "$silent" = yes &&
14825 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000014826 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000014827 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000014828 exec 5>>config.log
14829 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
14830 # would make configure fail if this is the last instruction.
Matthias Kloseb9621712010-04-24 17:59:49 +000014831 $ac_cs_success || as_fn_exit $?
14832fi
14833if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
14834 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
14835$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000014836fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000014837
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014838
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014839echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014840if test ! -f Modules/Setup
14841then
14842 cp $srcdir/Modules/Setup.dist Modules/Setup
14843fi
14844
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014845echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014846if test ! -f Modules/Setup.local
14847then
14848 echo "# Edit this file for local setup changes" >Modules/Setup.local
14849fi
14850
14851echo "creating Makefile"
14852$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
14853 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000014854 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000014855mv config.c Modules