blob: 0199ba0d52f2d1be5ff6cd25edb08b9e316d5465 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Antoine Pitrouf6350d22010-09-21 15:19:14 +00002# From configure.in Revision: 84752 .
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Benjamin Petersond7f73e92010-09-05 00:09:07 +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,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000010# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
11# Inc.
Matthias Kloseb9621712010-04-24 17:59:49 +000012#
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"
Benjamin Petersond7f73e92010-09-05 00:09:07 +0000323 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +0000324
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
Benjamin Petersond7f73e92010-09-05 00:09:07 +0000363# as_fn_error ERROR [LINENO LOG_FD]
364# ---------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +0000365# 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
Benjamin Petersond7f73e92010-09-05 00:09:07 +0000367# script with status $?, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +0000368as_fn_error ()
369{
Benjamin Petersond7f73e92010-09-05 00:09:07 +0000370 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
Matthias Kloseb9621712010-04-24 17:59:49 +0000374 fi
Benjamin Petersond7f73e92010-09-05 00:09:07 +0000375 $as_echo "$as_me: error: $1" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +0000376 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.
Benjamin Petersond7f73e92010-09-05 00:09:07 +0000537# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
Martin v. Löwis11437992002-04-12 09:54:03 +0000538# 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
Barry Warsaw35f3a2c2010-09-03 18:30:30 +0000601SOABI
Matthias Kloseb9621712010-04-24 17:59:49 +0000602LIBC
603LIBM
604HAVE_GETHOSTBYNAME
605HAVE_GETHOSTBYNAME_R
606HAVE_GETHOSTBYNAME_R_3_ARG
607HAVE_GETHOSTBYNAME_R_5_ARG
608HAVE_GETHOSTBYNAME_R_6_ARG
609LIBOBJS
610TRUE
611MACHDEP_OBJS
612DYNLOADFILE
613DLINCLDIR
614THREADOBJ
615LDLAST
616USE_THREAD_MODULE
617SIGNAL_OBJS
618USE_SIGNAL_MODULE
619LIBFFI_INCLUDEDIR
620PKG_CONFIG
621SHLIBS
622CFLAGSFORSHARED
623LINKFORSHARED
624CCSHARED
625BLDSHARED
626LDCXXSHARED
627LDSHARED
628SO
629LIBTOOL_CRUFT
630OTHER_LIBTOOL_OPT
631UNIVERSAL_ARCH_FLAGS
632BASECFLAGS
633OPT
634LN
635INSTALL_DATA
636INSTALL_SCRIPT
637INSTALL_PROGRAM
638SVNVERSION
639ARFLAGS
640AR
641RANLIB
Daniel Stutzbacha606faa2010-08-31 19:51:07 +0000642USE_INLINE
Matthias Kloseb9621712010-04-24 17:59:49 +0000643GNULD
644LINKCC
645RUNSHARED
646INSTSONAME
647LDLIBRARYDIR
648BLDLIBRARY
649DLLLIBRARY
650LDLIBRARY
651LIBRARY
652BUILDEXEEXT
653EGREP
654GREP
655CPP
656MAINCC
657CXX
658OBJEXT
659EXEEXT
660ac_ct_CC
661CPPFLAGS
662LDFLAGS
663CFLAGS
664CC
665EXPORT_MACOSX_DEPLOYMENT_TARGET
666CONFIGURE_MACOSX_DEPLOYMENT_TARGET
667SGI_ABI
668MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000669FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000670FRAMEWORKUNIXTOOLSPREFIX
671FRAMEWORKALTINSTALLLAST
672FRAMEWORKALTINSTALLFIRST
673FRAMEWORKINSTALLLAST
674FRAMEWORKINSTALLFIRST
675PYTHONFRAMEWORKINSTALLDIR
676PYTHONFRAMEWORKPREFIX
677PYTHONFRAMEWORKDIR
678PYTHONFRAMEWORKIDENTIFIER
679PYTHONFRAMEWORK
680LIPO_32BIT_FLAGS
681ARCH_RUN_32BIT
682UNIVERSALSDK
683CONFIG_ARGS
684SOVERSION
685VERSION
686target_alias
687host_alias
688build_alias
689LIBS
690ECHO_T
691ECHO_N
692ECHO_C
693DEFS
694mandir
695localedir
696libdir
697psdir
698pdfdir
699dvidir
700htmldir
701infodir
702docdir
703oldincludedir
704includedir
705localstatedir
706sharedstatedir
707sysconfdir
708datadir
709datarootdir
710libexecdir
711sbindir
712bindir
713program_transform_name
714prefix
715exec_prefix
716PACKAGE_URL
717PACKAGE_BUGREPORT
718PACKAGE_STRING
719PACKAGE_VERSION
720PACKAGE_TARNAME
721PACKAGE_NAME
722PATH_SEPARATOR
723SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000724ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000725ac_user_opts='
726enable_option_checking
727enable_universalsdk
728with_universal_archs
729with_framework_name
730enable_framework
731with_gcc
732with_cxx_main
733with_suffix
734enable_shared
735enable_profiling
736with_pydebug
737with_libs
738with_system_expat
739with_system_ffi
740with_dbmliborder
741with_signal_module
742with_dec_threads
743with_threads
744with_thread
745enable_ipv6
746with_doc_strings
747with_tsc
748with_pymalloc
749with_valgrind
Matthias Kloseb9621712010-04-24 17:59:49 +0000750with_fpectl
751with_libm
752with_libc
753enable_big_digits
754with_wide_unicode
755with_computed_gotos
756'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000757 ac_precious_vars='build_alias
758host_alias
759target_alias
760CC
761CFLAGS
762LDFLAGS
763LIBS
764CPPFLAGS
765CPP'
766
Guido van Rossum627b2d71993-12-24 10:39:16 +0000767
Guido van Rossum7f43da71994-08-01 12:15:30 +0000768# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000769ac_init_help=
770ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000771ac_unrecognized_opts=
772ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000773# The variables have the same names as the options, with
774# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000775cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000776exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000777no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000778no_recursion=
779prefix=NONE
780program_prefix=NONE
781program_suffix=NONE
782program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000783silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000784site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000785srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000786verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000787x_includes=NONE
788x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000789
790# Installation directory options.
791# These are left unexpanded so users can "make install exec_prefix=/foo"
792# and all the variables that are supposed to be based on exec_prefix
793# by default will actually change.
794# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000795# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000796bindir='${exec_prefix}/bin'
797sbindir='${exec_prefix}/sbin'
798libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000799datarootdir='${prefix}/share'
800datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000801sysconfdir='${prefix}/etc'
802sharedstatedir='${prefix}/com'
803localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000804includedir='${prefix}/include'
805oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000806docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
807infodir='${datarootdir}/info'
808htmldir='${docdir}'
809dvidir='${docdir}'
810pdfdir='${docdir}'
811psdir='${docdir}'
812libdir='${exec_prefix}/lib'
813localedir='${datarootdir}/locale'
814mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000815
Guido van Rossum7f43da71994-08-01 12:15:30 +0000816ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000817ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000818for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000819do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000820 # If the previous option needs an argument, assign it.
821 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000822 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000823 ac_prev=
824 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000825 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000826
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000827 case $ac_option in
Benjamin Petersond7f73e92010-09-05 00:09:07 +0000828 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
829 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000830 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000831
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000832 # Accept the important Cygnus configure options, so we can diagnose typos.
833
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000834 case $ac_dashdash$ac_option in
835 --)
836 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000837
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000838 -bindir | --bindir | --bindi | --bind | --bin | --bi)
839 ac_prev=bindir ;;
840 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000841 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000842
843 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000844 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000845 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000846 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000847
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000848 -cache-file | --cache-file | --cache-fil | --cache-fi \
849 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
850 ac_prev=cache_file ;;
851 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
852 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000853 cache_file=$ac_optarg ;;
854
855 --config-cache | -C)
856 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000857
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000858 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000859 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000860 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000861 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000862
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000863 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
864 | --dataroo | --dataro | --datar)
865 ac_prev=datarootdir ;;
866 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
867 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
868 datarootdir=$ac_optarg ;;
869
Guido van Rossum7f43da71994-08-01 12:15:30 +0000870 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000871 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000872 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000873 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Benjamin Petersond7f73e92010-09-05 00:09:07 +0000874 as_fn_error "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000875 ac_useropt_orig=$ac_useropt
876 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
877 case $ac_user_opts in
878 *"
879"enable_$ac_useropt"
880"*) ;;
881 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
882 ac_unrecognized_sep=', ';;
883 esac
884 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000885
886 -docdir | --docdir | --docdi | --doc | --do)
887 ac_prev=docdir ;;
888 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
889 docdir=$ac_optarg ;;
890
891 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
892 ac_prev=dvidir ;;
893 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
894 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000895
896 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000897 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000898 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000899 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Benjamin Petersond7f73e92010-09-05 00:09:07 +0000900 as_fn_error "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000901 ac_useropt_orig=$ac_useropt
902 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
903 case $ac_user_opts in
904 *"
905"enable_$ac_useropt"
906"*) ;;
907 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
908 ac_unrecognized_sep=', ';;
909 esac
910 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000911
Guido van Rossum7f43da71994-08-01 12:15:30 +0000912 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
913 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
914 | --exec | --exe | --ex)
915 ac_prev=exec_prefix ;;
916 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
917 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
918 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000919 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000920
921 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000922 # Obsolete; use --with-gas.
923 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000924
Martin v. Löwis11437992002-04-12 09:54:03 +0000925 -help | --help | --hel | --he | -h)
926 ac_init_help=long ;;
927 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
928 ac_init_help=recursive ;;
929 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
930 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000931
932 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000933 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000934 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000935 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000936
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000937 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
938 ac_prev=htmldir ;;
939 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
940 | --ht=*)
941 htmldir=$ac_optarg ;;
942
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000943 -includedir | --includedir | --includedi | --included | --include \
944 | --includ | --inclu | --incl | --inc)
945 ac_prev=includedir ;;
946 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
947 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000948 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000949
950 -infodir | --infodir | --infodi | --infod | --info | --inf)
951 ac_prev=infodir ;;
952 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000953 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000954
955 -libdir | --libdir | --libdi | --libd)
956 ac_prev=libdir ;;
957 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000958 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000959
960 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
961 | --libexe | --libex | --libe)
962 ac_prev=libexecdir ;;
963 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
964 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000965 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000966
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000967 -localedir | --localedir | --localedi | --localed | --locale)
968 ac_prev=localedir ;;
969 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
970 localedir=$ac_optarg ;;
971
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000972 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000973 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000974 ac_prev=localstatedir ;;
975 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000976 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000977 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000978
979 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
980 ac_prev=mandir ;;
981 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000982 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000983
Guido van Rossum7f43da71994-08-01 12:15:30 +0000984 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000985 # Obsolete; use --without-fp.
986 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000987
988 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +0000989 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000990 no_create=yes ;;
991
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000992 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
993 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
994 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000995
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000996 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
997 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
998 | --oldin | --oldi | --old | --ol | --o)
999 ac_prev=oldincludedir ;;
1000 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1001 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1002 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001003 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001004
Guido van Rossum7f43da71994-08-01 12:15:30 +00001005 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1006 ac_prev=prefix ;;
1007 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001008 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001009
1010 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1011 | --program-pre | --program-pr | --program-p)
1012 ac_prev=program_prefix ;;
1013 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1014 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001015 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001016
1017 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1018 | --program-suf | --program-su | --program-s)
1019 ac_prev=program_suffix ;;
1020 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1021 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001022 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001023
1024 -program-transform-name | --program-transform-name \
1025 | --program-transform-nam | --program-transform-na \
1026 | --program-transform-n | --program-transform- \
1027 | --program-transform | --program-transfor \
1028 | --program-transfo | --program-transf \
1029 | --program-trans | --program-tran \
1030 | --progr-tra | --program-tr | --program-t)
1031 ac_prev=program_transform_name ;;
1032 -program-transform-name=* | --program-transform-name=* \
1033 | --program-transform-nam=* | --program-transform-na=* \
1034 | --program-transform-n=* | --program-transform-=* \
1035 | --program-transform=* | --program-transfor=* \
1036 | --program-transfo=* | --program-transf=* \
1037 | --program-trans=* | --program-tran=* \
1038 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001039 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001040
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001041 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1042 ac_prev=pdfdir ;;
1043 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1044 pdfdir=$ac_optarg ;;
1045
1046 -psdir | --psdir | --psdi | --psd | --ps)
1047 ac_prev=psdir ;;
1048 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1049 psdir=$ac_optarg ;;
1050
Guido van Rossum7f43da71994-08-01 12:15:30 +00001051 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1052 | -silent | --silent | --silen | --sile | --sil)
1053 silent=yes ;;
1054
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001055 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1056 ac_prev=sbindir ;;
1057 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1058 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001059 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001060
1061 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1062 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1063 | --sharedst | --shareds | --shared | --share | --shar \
1064 | --sha | --sh)
1065 ac_prev=sharedstatedir ;;
1066 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1067 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1068 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1069 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001070 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001071
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001072 -site | --site | --sit)
1073 ac_prev=site ;;
1074 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001075 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001076
Guido van Rossum7f43da71994-08-01 12:15:30 +00001077 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1078 ac_prev=srcdir ;;
1079 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001080 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001081
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001082 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1083 | --syscon | --sysco | --sysc | --sys | --sy)
1084 ac_prev=sysconfdir ;;
1085 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1086 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001087 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001088
Guido van Rossum7f43da71994-08-01 12:15:30 +00001089 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001090 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001091 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001092 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001093
1094 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1095 verbose=yes ;;
1096
Martin v. Löwis11437992002-04-12 09:54:03 +00001097 -version | --version | --versio | --versi | --vers | -V)
1098 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001099
1100 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001101 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001102 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001103 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Benjamin Petersond7f73e92010-09-05 00:09:07 +00001104 as_fn_error "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001105 ac_useropt_orig=$ac_useropt
1106 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1107 case $ac_user_opts in
1108 *"
1109"with_$ac_useropt"
1110"*) ;;
1111 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1112 ac_unrecognized_sep=', ';;
1113 esac
1114 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001115
1116 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001117 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001118 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001119 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Benjamin Petersond7f73e92010-09-05 00:09:07 +00001120 as_fn_error "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001121 ac_useropt_orig=$ac_useropt
1122 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1123 case $ac_user_opts in
1124 *"
1125"with_$ac_useropt"
1126"*) ;;
1127 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1128 ac_unrecognized_sep=', ';;
1129 esac
1130 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001131
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001132 --x)
1133 # Obsolete; use --with-x.
1134 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001135
1136 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1137 | --x-incl | --x-inc | --x-in | --x-i)
1138 ac_prev=x_includes ;;
1139 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1140 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001141 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001142
1143 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1144 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1145 ac_prev=x_libraries ;;
1146 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1147 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001148 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001149
Benjamin Petersond7f73e92010-09-05 00:09:07 +00001150 -*) as_fn_error "unrecognized option: \`$ac_option'
1151Try \`$0 --help' for more information."
Guido van Rossum7f43da71994-08-01 12:15:30 +00001152 ;;
1153
Martin v. Löwis11437992002-04-12 09:54:03 +00001154 *=*)
1155 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1156 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001157 case $ac_envvar in #(
1158 '' | [0-9]* | *[!_$as_cr_alnum]* )
Benjamin Petersond7f73e92010-09-05 00:09:07 +00001159 as_fn_error "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001160 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001161 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001162 export $ac_envvar ;;
1163
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001164 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001165 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001166 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001167 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001168 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001169 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
Guido van Rossum7f43da71994-08-01 12:15:30 +00001170 ;;
1171
1172 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001173done
1174
Guido van Rossum7f43da71994-08-01 12:15:30 +00001175if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001176 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Benjamin Petersond7f73e92010-09-05 00:09:07 +00001177 as_fn_error "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001178fi
1179
Matthias Kloseb9621712010-04-24 17:59:49 +00001180if test -n "$ac_unrecognized_opts"; then
1181 case $enable_option_checking in
1182 no) ;;
Benjamin Petersond7f73e92010-09-05 00:09:07 +00001183 fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001184 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1185 esac
1186fi
1187
1188# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001189for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1190 datadir sysconfdir sharedstatedir localstatedir includedir \
1191 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1192 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001193do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001194 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001195 # Remove trailing slashes.
1196 case $ac_val in
1197 */ )
1198 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1199 eval $ac_var=\$ac_val;;
1200 esac
1201 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001202 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001203 [\\/$]* | ?:[\\/]* ) continue;;
1204 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001205 esac
Benjamin Petersond7f73e92010-09-05 00:09:07 +00001206 as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001207done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001208
Martin v. Löwis11437992002-04-12 09:54:03 +00001209# There might be people who depend on the old broken behavior: `$host'
1210# used to hold the argument of --host etc.
1211# FIXME: To remove some day.
1212build=$build_alias
1213host=$host_alias
1214target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001215
Martin v. Löwis11437992002-04-12 09:54:03 +00001216# FIXME: To remove some day.
1217if test "x$host_alias" != x; then
1218 if test "x$build_alias" = x; then
1219 cross_compiling=maybe
Benjamin Petersond7f73e92010-09-05 00:09:07 +00001220 $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
1221 If a cross compiler is detected then cross compile mode will be used." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001222 elif test "x$build_alias" != "x$host_alias"; then
1223 cross_compiling=yes
1224 fi
1225fi
1226
1227ac_tool_prefix=
1228test -n "$host_alias" && ac_tool_prefix=$host_alias-
1229
1230test "$silent" = yes && exec 6>/dev/null
1231
Guido van Rossum627b2d71993-12-24 10:39:16 +00001232
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001233ac_pwd=`pwd` && test -n "$ac_pwd" &&
1234ac_ls_di=`ls -di .` &&
1235ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Benjamin Petersond7f73e92010-09-05 00:09:07 +00001236 as_fn_error "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001237test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Benjamin Petersond7f73e92010-09-05 00:09:07 +00001238 as_fn_error "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001239
1240
Guido van Rossum627b2d71993-12-24 10:39:16 +00001241# Find the source files, if location was not specified.
1242if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001243 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001244 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001245 ac_confdir=`$as_dirname -- "$as_myself" ||
1246$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1247 X"$as_myself" : 'X\(//\)[^/]' \| \
1248 X"$as_myself" : 'X\(//\)$' \| \
1249 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1250$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001251 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1252 s//\1/
1253 q
1254 }
1255 /^X\(\/\/\)[^/].*/{
1256 s//\1/
1257 q
1258 }
1259 /^X\(\/\/\)$/{
1260 s//\1/
1261 q
1262 }
1263 /^X\(\/\).*/{
1264 s//\1/
1265 q
1266 }
1267 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001268 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001269 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001270 srcdir=..
1271 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001272else
1273 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001274fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001275if test ! -r "$srcdir/$ac_unique_file"; then
1276 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Benjamin Petersond7f73e92010-09-05 00:09:07 +00001277 as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001278fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001279ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1280ac_abs_confdir=`(
Benjamin Petersond7f73e92010-09-05 00:09:07 +00001281 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001282 pwd)`
1283# When building in place, set srcdir=.
1284if test "$ac_abs_confdir" = "$ac_pwd"; then
1285 srcdir=.
1286fi
1287# Remove unnecessary trailing slashes from srcdir.
1288# Double slashes in file names in object file debugging info
1289# mess up M-x gdb in Emacs.
1290case $srcdir in
1291*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1292esac
1293for ac_var in $ac_precious_vars; do
1294 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1295 eval ac_env_${ac_var}_value=\$${ac_var}
1296 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1297 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1298done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001299
Martin v. Löwis11437992002-04-12 09:54:03 +00001300#
1301# Report the --help message.
1302#
1303if test "$ac_init_help" = "long"; then
1304 # Omit some internal or obsolete options to make the list less imposing.
1305 # This message is too long to be a string in the A/UX 3.1 sh.
1306 cat <<_ACEOF
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001307\`configure' configures python 3.2 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001308
1309Usage: $0 [OPTION]... [VAR=VALUE]...
1310
1311To assign environment variables (e.g., CC, CFLAGS...), specify them as
1312VAR=VALUE. See below for descriptions of some of the useful variables.
1313
1314Defaults for the options are specified in brackets.
1315
1316Configuration:
1317 -h, --help display this help and exit
1318 --help=short display options specific to this package
1319 --help=recursive display the short help of all the included packages
1320 -V, --version display version information and exit
Benjamin Petersond7f73e92010-09-05 00:09:07 +00001321 -q, --quiet, --silent do not print \`checking...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001322 --cache-file=FILE cache test results in FILE [disabled]
1323 -C, --config-cache alias for \`--cache-file=config.cache'
1324 -n, --no-create do not create output files
1325 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1326
Martin v. Löwis11437992002-04-12 09:54:03 +00001327Installation directories:
1328 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001329 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001330 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001331 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001332
1333By default, \`make install' will install all the files in
1334\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1335an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1336for instance \`--prefix=\$HOME'.
1337
1338For better control, use the options below.
1339
1340Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001341 --bindir=DIR user executables [EPREFIX/bin]
1342 --sbindir=DIR system admin executables [EPREFIX/sbin]
1343 --libexecdir=DIR program executables [EPREFIX/libexec]
1344 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1345 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1346 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1347 --libdir=DIR object code libraries [EPREFIX/lib]
1348 --includedir=DIR C header files [PREFIX/include]
1349 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1350 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1351 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1352 --infodir=DIR info documentation [DATAROOTDIR/info]
1353 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1354 --mandir=DIR man documentation [DATAROOTDIR/man]
1355 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1356 --htmldir=DIR html documentation [DOCDIR]
1357 --dvidir=DIR dvi documentation [DOCDIR]
1358 --pdfdir=DIR pdf documentation [DOCDIR]
1359 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001360_ACEOF
1361
1362 cat <<\_ACEOF
1363_ACEOF
1364fi
1365
1366if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001367 case $ac_init_help in
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001368 short | recursive ) echo "Configuration of python 3.2:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001369 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001370 cat <<\_ACEOF
1371
1372Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001373 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001374 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1375 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001376 --enable-universalsdk[=SDKDIR]
Christian Heimes292d3512008-02-03 16:51:08 +00001377 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001378 --enable-framework[=INSTALLDIR]
1379 Build (MacOSX|Darwin) framework
1380 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001381 --enable-profiling enable C-level code profiling
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001382 --enable-ipv6 Enable ipv6 (with ipv4) support
1383 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001384 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001385 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001386
1387Optional Packages:
1388 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1389 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001390 --with-universal-archs=ARCH
1391 select architectures for universal build ("32-bit",
Ronald Oussoren3c064c12009-09-08 07:12:42 +00001392 "64-bit", "3-way", "intel" or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001393 --with-framework-name=FRAMEWORK
1394 specify an alternate name of the framework built
1395 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001396 --without-gcc never use gcc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001397 --with-cxx-main=<compiler>
1398 compile main() and link python executable with C++
1399 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001400 --with-suffix=.exe set executable suffix
1401 --with-pydebug build with Py_DEBUG defined
1402 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001403 --with-system-expat build pyexpat module using an installed expat
1404 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001405 --with-system-ffi build _ctypes module using an installed ffi library
Matthias Klose55708cc2009-04-30 08:06:49 +00001406 --with-dbmliborder=db1:db2:...
1407 order to check db backends for dbm. Valid value is a
1408 colon separated string with the backend names
1409 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001410 --with-signal-module disable/enable signal module
1411 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1412 --with(out)-threads[=DIRECTORY]
1413 disable/enable thread support
1414 --with(out)-thread[=DIRECTORY]
1415 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001416 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001417 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001418 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001419 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001420 --with-fpectl enable SIGFPE catching
1421 --with-libm=STRING math library
1422 --with-libc=STRING C library
Georg Brandl52d168a2008-01-07 18:10:24 +00001423 --with-wide-unicode Use 4-byte Unicode characters (default is 2 bytes)
Antoine Pitrou042b1282010-08-13 21:15:58 +00001424 --with(out)-computed-gotos
1425 Use computed gotos in evaluation loop (enabled by
1426 default on supported compilers)
Martin v. Löwis11437992002-04-12 09:54:03 +00001427
1428Some influential environment variables:
1429 CC C compiler command
1430 CFLAGS C compiler flags
1431 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1432 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001433 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001434 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001435 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001436 CPP C preprocessor
1437
1438Use these variables to override the choices made by `configure' or to help
1439it to find libraries and programs with nonstandard names/locations.
1440
Georg Brandle2e15612009-05-20 18:25:10 +00001441Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001442_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001443ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001444fi
1445
1446if test "$ac_init_help" = "recursive"; then
1447 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001448 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001449 test -d "$ac_dir" ||
1450 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1451 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001452 ac_builddir=.
1453
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001454case "$ac_dir" in
1455.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1456*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001457 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001458 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001459 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001460 case $ac_top_builddir_sub in
1461 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1462 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1463 esac ;;
1464esac
1465ac_abs_top_builddir=$ac_pwd
1466ac_abs_builddir=$ac_pwd$ac_dir_suffix
1467# for backward compatibility:
1468ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001469
1470case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001471 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001472 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001473 ac_top_srcdir=$ac_top_builddir_sub
1474 ac_abs_top_srcdir=$ac_pwd ;;
1475 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001476 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001477 ac_top_srcdir=$srcdir
1478 ac_abs_top_srcdir=$srcdir ;;
1479 *) # Relative name.
1480 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1481 ac_top_srcdir=$ac_top_build_prefix$srcdir
1482 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001483esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001484ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001485
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001486 cd "$ac_dir" || { ac_status=$?; continue; }
1487 # Check for guested configure.
1488 if test -f "$ac_srcdir/configure.gnu"; then
1489 echo &&
1490 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1491 elif test -f "$ac_srcdir/configure"; then
1492 echo &&
1493 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001494 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001495 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001496 fi || ac_status=$?
1497 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001498 done
1499fi
1500
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001501test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001502if $ac_init_version; then
1503 cat <<\_ACEOF
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001504python configure 3.2
Benjamin Petersond7f73e92010-09-05 00:09:07 +00001505generated by GNU Autoconf 2.65
Martin v. Löwis11437992002-04-12 09:54:03 +00001506
Benjamin Petersond7f73e92010-09-05 00:09:07 +00001507Copyright (C) 2009 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001508This configure script is free software; the Free Software Foundation
1509gives unlimited permission to copy, distribute and modify it.
1510_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001511 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001512fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001513
1514## ------------------------ ##
1515## Autoconf initialization. ##
1516## ------------------------ ##
1517
1518# ac_fn_c_try_compile LINENO
1519# --------------------------
1520# Try to compile conftest.$ac_ext, and return whether this succeeded.
1521ac_fn_c_try_compile ()
1522{
1523 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1524 rm -f conftest.$ac_objext
1525 if { { ac_try="$ac_compile"
1526case "(($ac_try" in
1527 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1528 *) ac_try_echo=$ac_try;;
1529esac
1530eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1531$as_echo "$ac_try_echo"; } >&5
1532 (eval "$ac_compile") 2>conftest.err
1533 ac_status=$?
1534 if test -s conftest.err; then
1535 grep -v '^ *+' conftest.err >conftest.er1
1536 cat conftest.er1 >&5
1537 mv -f conftest.er1 conftest.err
1538 fi
1539 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1540 test $ac_status = 0; } && {
1541 test -z "$ac_c_werror_flag" ||
1542 test ! -s conftest.err
1543 } && test -s conftest.$ac_objext; then :
1544 ac_retval=0
1545else
1546 $as_echo "$as_me: failed program was:" >&5
1547sed 's/^/| /' conftest.$ac_ext >&5
1548
1549 ac_retval=1
1550fi
1551 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1552 as_fn_set_status $ac_retval
1553
1554} # ac_fn_c_try_compile
1555
1556# ac_fn_c_try_cpp LINENO
1557# ----------------------
1558# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1559ac_fn_c_try_cpp ()
1560{
1561 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1562 if { { ac_try="$ac_cpp conftest.$ac_ext"
1563case "(($ac_try" in
1564 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1565 *) ac_try_echo=$ac_try;;
1566esac
1567eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1568$as_echo "$ac_try_echo"; } >&5
1569 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1570 ac_status=$?
1571 if test -s conftest.err; then
1572 grep -v '^ *+' conftest.err >conftest.er1
1573 cat conftest.er1 >&5
1574 mv -f conftest.er1 conftest.err
1575 fi
1576 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Benjamin Petersond7f73e92010-09-05 00:09:07 +00001577 test $ac_status = 0; } >/dev/null && {
Matthias Kloseb9621712010-04-24 17:59:49 +00001578 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1579 test ! -s conftest.err
1580 }; then :
1581 ac_retval=0
1582else
1583 $as_echo "$as_me: failed program was:" >&5
1584sed 's/^/| /' conftest.$ac_ext >&5
1585
1586 ac_retval=1
1587fi
1588 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1589 as_fn_set_status $ac_retval
1590
1591} # ac_fn_c_try_cpp
1592
1593# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1594# -------------------------------------------------------
1595# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1596# the include files in INCLUDES and setting the cache variable VAR
1597# accordingly.
1598ac_fn_c_check_header_mongrel ()
1599{
1600 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Benjamin Petersond7f73e92010-09-05 00:09:07 +00001601 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001602 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1603$as_echo_n "checking for $2... " >&6; }
Benjamin Petersond7f73e92010-09-05 00:09:07 +00001604if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001605 $as_echo_n "(cached) " >&6
1606fi
1607eval ac_res=\$$3
1608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1609$as_echo "$ac_res" >&6; }
1610else
1611 # Is the header compilable?
1612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1613$as_echo_n "checking $2 usability... " >&6; }
1614cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1615/* end confdefs.h. */
1616$4
1617#include <$2>
1618_ACEOF
1619if ac_fn_c_try_compile "$LINENO"; then :
1620 ac_header_compiler=yes
1621else
1622 ac_header_compiler=no
1623fi
1624rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1625{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1626$as_echo "$ac_header_compiler" >&6; }
1627
1628# Is the header present?
1629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1630$as_echo_n "checking $2 presence... " >&6; }
1631cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1632/* end confdefs.h. */
1633#include <$2>
1634_ACEOF
1635if ac_fn_c_try_cpp "$LINENO"; then :
1636 ac_header_preproc=yes
1637else
1638 ac_header_preproc=no
1639fi
Benjamin Petersond7f73e92010-09-05 00:09:07 +00001640rm -f conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001641{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1642$as_echo "$ac_header_preproc" >&6; }
1643
1644# So? What about this header?
1645case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1646 yes:no: )
1647 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1648$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1649 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1650$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1651 ;;
1652 no:yes:* )
1653 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1654$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1655 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1656$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1657 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1658$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1659 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1660$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1661 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1662$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Benjamin Petersond7f73e92010-09-05 00:09:07 +00001663( cat <<\_ASBOX
1664## -------------------------------------- ##
Matthias Kloseb9621712010-04-24 17:59:49 +00001665## Report this to http://bugs.python.org/ ##
Benjamin Petersond7f73e92010-09-05 00:09:07 +00001666## -------------------------------------- ##
1667_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +00001668 ) | sed "s/^/$as_me: WARNING: /" >&2
1669 ;;
1670esac
1671 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1672$as_echo_n "checking for $2... " >&6; }
Benjamin Petersond7f73e92010-09-05 00:09:07 +00001673if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001674 $as_echo_n "(cached) " >&6
1675else
1676 eval "$3=\$ac_header_compiler"
1677fi
1678eval ac_res=\$$3
1679 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1680$as_echo "$ac_res" >&6; }
1681fi
1682 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1683
1684} # ac_fn_c_check_header_mongrel
1685
1686# ac_fn_c_try_run LINENO
1687# ----------------------
1688# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1689# that executables *can* be run.
1690ac_fn_c_try_run ()
1691{
1692 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1693 if { { ac_try="$ac_link"
1694case "(($ac_try" in
1695 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1696 *) ac_try_echo=$ac_try;;
1697esac
1698eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1699$as_echo "$ac_try_echo"; } >&5
1700 (eval "$ac_link") 2>&5
1701 ac_status=$?
1702 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1703 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1704 { { case "(($ac_try" in
1705 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1706 *) ac_try_echo=$ac_try;;
1707esac
1708eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1709$as_echo "$ac_try_echo"; } >&5
1710 (eval "$ac_try") 2>&5
1711 ac_status=$?
1712 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1713 test $ac_status = 0; }; }; then :
1714 ac_retval=0
1715else
1716 $as_echo "$as_me: program exited with status $ac_status" >&5
1717 $as_echo "$as_me: failed program was:" >&5
1718sed 's/^/| /' conftest.$ac_ext >&5
1719
1720 ac_retval=$ac_status
1721fi
1722 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1723 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1724 as_fn_set_status $ac_retval
1725
1726} # ac_fn_c_try_run
1727
1728# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1729# -------------------------------------------------------
1730# Tests whether HEADER exists and can be compiled using the include files in
1731# INCLUDES, setting the cache variable VAR accordingly.
1732ac_fn_c_check_header_compile ()
1733{
1734 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1735 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1736$as_echo_n "checking for $2... " >&6; }
Benjamin Petersond7f73e92010-09-05 00:09:07 +00001737if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001738 $as_echo_n "(cached) " >&6
1739else
1740 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1741/* end confdefs.h. */
1742$4
1743#include <$2>
1744_ACEOF
1745if ac_fn_c_try_compile "$LINENO"; then :
1746 eval "$3=yes"
1747else
1748 eval "$3=no"
1749fi
1750rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1751fi
1752eval ac_res=\$$3
1753 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1754$as_echo "$ac_res" >&6; }
1755 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1756
1757} # ac_fn_c_check_header_compile
1758
1759# ac_fn_c_try_link LINENO
1760# -----------------------
1761# Try to link conftest.$ac_ext, and return whether this succeeded.
1762ac_fn_c_try_link ()
1763{
1764 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1765 rm -f conftest.$ac_objext conftest$ac_exeext
1766 if { { ac_try="$ac_link"
1767case "(($ac_try" in
1768 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1769 *) ac_try_echo=$ac_try;;
1770esac
1771eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1772$as_echo "$ac_try_echo"; } >&5
1773 (eval "$ac_link") 2>conftest.err
1774 ac_status=$?
1775 if test -s conftest.err; then
1776 grep -v '^ *+' conftest.err >conftest.er1
1777 cat conftest.er1 >&5
1778 mv -f conftest.er1 conftest.err
1779 fi
1780 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1781 test $ac_status = 0; } && {
1782 test -z "$ac_c_werror_flag" ||
1783 test ! -s conftest.err
1784 } && test -s conftest$ac_exeext && {
1785 test "$cross_compiling" = yes ||
1786 $as_test_x conftest$ac_exeext
1787 }; then :
1788 ac_retval=0
1789else
1790 $as_echo "$as_me: failed program was:" >&5
1791sed 's/^/| /' conftest.$ac_ext >&5
1792
1793 ac_retval=1
1794fi
1795 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1796 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1797 # interfere with the next link command; also delete a directory that is
1798 # left behind by Apple's compiler. We do this before executing the actions.
1799 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1800 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1801 as_fn_set_status $ac_retval
1802
1803} # ac_fn_c_try_link
1804
1805# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1806# -------------------------------------------
1807# Tests whether TYPE exists after having included INCLUDES, setting cache
1808# variable VAR accordingly.
1809ac_fn_c_check_type ()
1810{
1811 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1812 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1813$as_echo_n "checking for $2... " >&6; }
Benjamin Petersond7f73e92010-09-05 00:09:07 +00001814if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001815 $as_echo_n "(cached) " >&6
1816else
1817 eval "$3=no"
1818 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1819/* end confdefs.h. */
1820$4
1821int
1822main ()
1823{
1824if (sizeof ($2))
1825 return 0;
1826 ;
1827 return 0;
1828}
1829_ACEOF
1830if ac_fn_c_try_compile "$LINENO"; then :
1831 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1832/* end confdefs.h. */
1833$4
1834int
1835main ()
1836{
1837if (sizeof (($2)))
1838 return 0;
1839 ;
1840 return 0;
1841}
1842_ACEOF
1843if ac_fn_c_try_compile "$LINENO"; then :
1844
1845else
1846 eval "$3=yes"
1847fi
1848rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1849fi
1850rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1851fi
1852eval ac_res=\$$3
1853 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1854$as_echo "$ac_res" >&6; }
1855 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1856
1857} # ac_fn_c_check_type
1858
1859# ac_fn_c_find_uintX_t LINENO BITS VAR
1860# ------------------------------------
1861# Finds an unsigned integer type with width BITS, setting cache variable VAR
1862# accordingly.
1863ac_fn_c_find_uintX_t ()
1864{
1865 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1866 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1867$as_echo_n "checking for uint$2_t... " >&6; }
Benjamin Petersond7f73e92010-09-05 00:09:07 +00001868if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001869 $as_echo_n "(cached) " >&6
1870else
1871 eval "$3=no"
1872 # Order is important - never check a type that is potentially smaller
1873 # than half of the expected target width.
1874 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1875 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1876 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1877/* end confdefs.h. */
1878$ac_includes_default
1879int
1880main ()
1881{
1882static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
1883test_array [0] = 0
1884
1885 ;
1886 return 0;
1887}
1888_ACEOF
1889if ac_fn_c_try_compile "$LINENO"; then :
1890 case $ac_type in #(
1891 uint$2_t) :
1892 eval "$3=yes" ;; #(
1893 *) :
1894 eval "$3=\$ac_type" ;;
1895esac
1896fi
1897rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Petersond7f73e92010-09-05 00:09:07 +00001898 eval as_val=\$$3
1899 if test "x$as_val" = x""no; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001900
1901else
1902 break
1903fi
1904 done
1905fi
1906eval ac_res=\$$3
1907 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1908$as_echo "$ac_res" >&6; }
1909 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1910
1911} # ac_fn_c_find_uintX_t
1912
1913# ac_fn_c_find_intX_t LINENO BITS VAR
1914# -----------------------------------
1915# Finds a signed integer type with width BITS, setting cache variable VAR
1916# accordingly.
1917ac_fn_c_find_intX_t ()
1918{
1919 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1920 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
1921$as_echo_n "checking for int$2_t... " >&6; }
Benjamin Petersond7f73e92010-09-05 00:09:07 +00001922if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001923 $as_echo_n "(cached) " >&6
1924else
1925 eval "$3=no"
1926 # Order is important - never check a type that is potentially smaller
1927 # than half of the expected target width.
1928 for ac_type in int$2_t 'int' 'long int' \
1929 'long long int' 'short int' 'signed char'; do
1930 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1931/* end confdefs.h. */
1932$ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00001933int
1934main ()
1935{
Benjamin Petersond7f73e92010-09-05 00:09:07 +00001936static int test_array [1 - 2 * !(enum { N = $2 / 2 - 1 };
1937 0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
Matthias Kloseb9621712010-04-24 17:59:49 +00001938test_array [0] = 0
1939
1940 ;
1941 return 0;
1942}
1943_ACEOF
1944if ac_fn_c_try_compile "$LINENO"; then :
1945 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1946/* end confdefs.h. */
1947$ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00001948int
1949main ()
1950{
Benjamin Petersond7f73e92010-09-05 00:09:07 +00001951static int test_array [1 - 2 * !(enum { N = $2 / 2 - 1 };
1952 ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Kloseb9621712010-04-24 17:59:49 +00001953 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
1954test_array [0] = 0
1955
1956 ;
1957 return 0;
1958}
1959_ACEOF
1960if ac_fn_c_try_compile "$LINENO"; then :
1961
1962else
1963 case $ac_type in #(
1964 int$2_t) :
1965 eval "$3=yes" ;; #(
1966 *) :
1967 eval "$3=\$ac_type" ;;
1968esac
1969fi
1970rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1971fi
1972rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Petersond7f73e92010-09-05 00:09:07 +00001973 eval as_val=\$$3
1974 if test "x$as_val" = x""no; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001975
1976else
1977 break
1978fi
1979 done
1980fi
1981eval ac_res=\$$3
1982 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1983$as_echo "$ac_res" >&6; }
1984 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1985
1986} # ac_fn_c_find_intX_t
1987
1988# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1989# --------------------------------------------
1990# Tries to find the compile-time value of EXPR in a program that includes
1991# INCLUDES, setting VAR accordingly. Returns whether the value could be
1992# computed
1993ac_fn_c_compute_int ()
1994{
1995 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1996 if test "$cross_compiling" = yes; then
1997 # Depending upon the size, compute the lo and hi bounds.
1998cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1999/* end confdefs.h. */
2000$4
2001int
2002main ()
2003{
2004static int test_array [1 - 2 * !(($2) >= 0)];
2005test_array [0] = 0
2006
2007 ;
2008 return 0;
2009}
2010_ACEOF
2011if ac_fn_c_try_compile "$LINENO"; then :
2012 ac_lo=0 ac_mid=0
2013 while :; do
2014 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2015/* end confdefs.h. */
2016$4
2017int
2018main ()
2019{
2020static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2021test_array [0] = 0
2022
2023 ;
2024 return 0;
2025}
2026_ACEOF
2027if ac_fn_c_try_compile "$LINENO"; then :
2028 ac_hi=$ac_mid; break
2029else
2030 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2031 if test $ac_lo -le $ac_mid; then
2032 ac_lo= ac_hi=
2033 break
2034 fi
2035 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2036fi
2037rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2038 done
2039else
2040 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2041/* end confdefs.h. */
2042$4
2043int
2044main ()
2045{
2046static int test_array [1 - 2 * !(($2) < 0)];
2047test_array [0] = 0
2048
2049 ;
2050 return 0;
2051}
2052_ACEOF
2053if ac_fn_c_try_compile "$LINENO"; then :
2054 ac_hi=-1 ac_mid=-1
2055 while :; do
2056 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2057/* end confdefs.h. */
2058$4
2059int
2060main ()
2061{
2062static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2063test_array [0] = 0
2064
2065 ;
2066 return 0;
2067}
2068_ACEOF
2069if ac_fn_c_try_compile "$LINENO"; then :
2070 ac_lo=$ac_mid; break
2071else
2072 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2073 if test $ac_mid -le $ac_hi; then
2074 ac_lo= ac_hi=
2075 break
2076 fi
2077 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2078fi
2079rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2080 done
2081else
2082 ac_lo= ac_hi=
2083fi
2084rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2085fi
2086rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2087# Binary search between lo and hi bounds.
2088while test "x$ac_lo" != "x$ac_hi"; do
2089 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2090 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2091/* end confdefs.h. */
2092$4
2093int
2094main ()
2095{
2096static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2097test_array [0] = 0
2098
2099 ;
2100 return 0;
2101}
2102_ACEOF
2103if ac_fn_c_try_compile "$LINENO"; then :
2104 ac_hi=$ac_mid
2105else
2106 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2107fi
2108rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2109done
2110case $ac_lo in #((
2111?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2112'') ac_retval=1 ;;
2113esac
2114 else
2115 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2116/* end confdefs.h. */
2117$4
2118static long int longval () { return $2; }
2119static unsigned long int ulongval () { return $2; }
2120#include <stdio.h>
2121#include <stdlib.h>
2122int
2123main ()
2124{
2125
2126 FILE *f = fopen ("conftest.val", "w");
2127 if (! f)
2128 return 1;
2129 if (($2) < 0)
2130 {
2131 long int i = longval ();
2132 if (i != ($2))
2133 return 1;
2134 fprintf (f, "%ld", i);
2135 }
2136 else
2137 {
2138 unsigned long int i = ulongval ();
2139 if (i != ($2))
2140 return 1;
2141 fprintf (f, "%lu", i);
2142 }
2143 /* Do not output a trailing newline, as this causes \r\n confusion
2144 on some platforms. */
2145 return ferror (f) || fclose (f) != 0;
2146
2147 ;
2148 return 0;
2149}
2150_ACEOF
2151if ac_fn_c_try_run "$LINENO"; then :
2152 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2153else
2154 ac_retval=1
2155fi
2156rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2157 conftest.$ac_objext conftest.beam conftest.$ac_ext
2158rm -f conftest.val
2159
2160 fi
2161 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2162 as_fn_set_status $ac_retval
2163
2164} # ac_fn_c_compute_int
2165
2166# ac_fn_c_check_func LINENO FUNC VAR
2167# ----------------------------------
2168# Tests whether FUNC exists, setting the cache variable VAR accordingly
2169ac_fn_c_check_func ()
2170{
2171 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2172 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2173$as_echo_n "checking for $2... " >&6; }
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002174if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002175 $as_echo_n "(cached) " >&6
2176else
2177 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2178/* end confdefs.h. */
2179/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2180 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2181#define $2 innocuous_$2
2182
2183/* System header to define __stub macros and hopefully few prototypes,
2184 which can conflict with char $2 (); below.
2185 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2186 <limits.h> exists even on freestanding compilers. */
2187
2188#ifdef __STDC__
2189# include <limits.h>
2190#else
2191# include <assert.h>
2192#endif
2193
2194#undef $2
2195
2196/* Override any GCC internal prototype to avoid an error.
2197 Use char because int might match the return type of a GCC
2198 builtin and then its argument prototype would still apply. */
2199#ifdef __cplusplus
2200extern "C"
2201#endif
2202char $2 ();
2203/* The GNU C library defines this for functions which it implements
2204 to always fail with ENOSYS. Some functions are actually named
2205 something starting with __ and the normal name is an alias. */
2206#if defined __stub_$2 || defined __stub___$2
2207choke me
2208#endif
2209
2210int
2211main ()
2212{
2213return $2 ();
2214 ;
2215 return 0;
2216}
2217_ACEOF
2218if ac_fn_c_try_link "$LINENO"; then :
2219 eval "$3=yes"
2220else
2221 eval "$3=no"
2222fi
2223rm -f core conftest.err conftest.$ac_objext \
2224 conftest$ac_exeext conftest.$ac_ext
2225fi
2226eval ac_res=\$$3
2227 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2228$as_echo "$ac_res" >&6; }
2229 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2230
2231} # ac_fn_c_check_func
2232
2233# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2234# ----------------------------------------------------
2235# Tries to find if the field MEMBER exists in type AGGR, after including
2236# INCLUDES, setting cache variable VAR accordingly.
2237ac_fn_c_check_member ()
2238{
2239 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2240 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2241$as_echo_n "checking for $2.$3... " >&6; }
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002242if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002243 $as_echo_n "(cached) " >&6
2244else
2245 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2246/* end confdefs.h. */
2247$5
2248int
2249main ()
2250{
2251static $2 ac_aggr;
2252if (ac_aggr.$3)
2253return 0;
2254 ;
2255 return 0;
2256}
2257_ACEOF
2258if ac_fn_c_try_compile "$LINENO"; then :
2259 eval "$4=yes"
2260else
2261 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2262/* end confdefs.h. */
2263$5
2264int
2265main ()
2266{
2267static $2 ac_aggr;
2268if (sizeof ac_aggr.$3)
2269return 0;
2270 ;
2271 return 0;
2272}
2273_ACEOF
2274if ac_fn_c_try_compile "$LINENO"; then :
2275 eval "$4=yes"
2276else
2277 eval "$4=no"
2278fi
2279rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2280fi
2281rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2282fi
2283eval ac_res=\$$4
2284 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2285$as_echo "$ac_res" >&6; }
2286 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2287
2288} # ac_fn_c_check_member
2289
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002290# ac_fn_c_check_decl LINENO SYMBOL VAR
2291# ------------------------------------
2292# Tests whether SYMBOL is declared, setting cache variable VAR accordingly.
Matthias Kloseb9621712010-04-24 17:59:49 +00002293ac_fn_c_check_decl ()
2294{
2295 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002296 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $2 is declared" >&5
2297$as_echo_n "checking whether $2 is declared... " >&6; }
2298if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002299 $as_echo_n "(cached) " >&6
2300else
2301 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2302/* end confdefs.h. */
2303$4
2304int
2305main ()
2306{
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002307#ifndef $2
2308 (void) $2;
Matthias Kloseb9621712010-04-24 17:59:49 +00002309#endif
2310
2311 ;
2312 return 0;
2313}
2314_ACEOF
2315if ac_fn_c_try_compile "$LINENO"; then :
2316 eval "$3=yes"
2317else
2318 eval "$3=no"
2319fi
2320rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2321fi
2322eval ac_res=\$$3
2323 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2324$as_echo "$ac_res" >&6; }
2325 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2326
2327} # ac_fn_c_check_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002328cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002329This file contains any messages produced by compilers while
2330running configure, to aid debugging if configure makes a mistake.
2331
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00002332It was created by python $as_me 3.2, which was
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002333generated by GNU Autoconf 2.65. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002334
2335 $ $0 $@
2336
2337_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002338exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002339{
2340cat <<_ASUNAME
2341## --------- ##
2342## Platform. ##
2343## --------- ##
2344
2345hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2346uname -m = `(uname -m) 2>/dev/null || echo unknown`
2347uname -r = `(uname -r) 2>/dev/null || echo unknown`
2348uname -s = `(uname -s) 2>/dev/null || echo unknown`
2349uname -v = `(uname -v) 2>/dev/null || echo unknown`
2350
2351/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2352/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2353
2354/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2355/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2356/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002357/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002358/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2359/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2360/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2361
2362_ASUNAME
2363
2364as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2365for as_dir in $PATH
2366do
2367 IFS=$as_save_IFS
2368 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002369 $as_echo "PATH: $as_dir"
2370 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002371IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002372
2373} >&5
2374
2375cat >&5 <<_ACEOF
2376
2377
2378## ----------- ##
2379## Core tests. ##
2380## ----------- ##
2381
2382_ACEOF
2383
2384
2385# Keep a trace of the command line.
2386# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002387# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002388# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002389# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002390ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002391ac_configure_args0=
2392ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002393ac_must_keep_next=false
2394for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002395do
Skip Montanaro6dead952003-09-25 14:50:04 +00002396 for ac_arg
2397 do
2398 case $ac_arg in
2399 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2400 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2401 | -silent | --silent | --silen | --sile | --sil)
2402 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002403 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002404 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002405 esac
2406 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002407 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002408 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002409 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002410 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002411 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002412 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002413 case $ac_arg in
2414 *=* | --config-cache | -C | -disable-* | --disable-* \
2415 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2416 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2417 | -with-* | --with-* | -without-* | --without-* | --x)
2418 case "$ac_configure_args0 " in
2419 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2420 esac
2421 ;;
2422 -* ) ac_must_keep_next=true ;;
2423 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002424 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002425 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002426 ;;
2427 esac
2428 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002429done
Matthias Kloseb9621712010-04-24 17:59:49 +00002430{ ac_configure_args0=; unset ac_configure_args0;}
2431{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002432
2433# When interrupted or exit'd, cleanup temporary files, and complete
2434# config.log. We remove comments because anyway the quotes in there
2435# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002436# WARNING: Use '\'' to represent an apostrophe within the trap.
2437# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
Martin v. Löwis11437992002-04-12 09:54:03 +00002438trap 'exit_status=$?
2439 # Save into config.log some information that might help in debugging.
2440 {
2441 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002442
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002443 cat <<\_ASBOX
2444## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002445## Cache variables. ##
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002446## ---------------- ##
2447_ASBOX
Martin v. Löwis11437992002-04-12 09:54:03 +00002448 echo
2449 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002450(
2451 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2452 eval ac_val=\$$ac_var
2453 case $ac_val in #(
2454 *${as_nl}*)
2455 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002456 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2457$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002458 esac
2459 case $ac_var in #(
2460 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002461 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2462 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002463 esac ;;
2464 esac
2465 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002466 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002467 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2468 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002469 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002470 "s/'\''/'\''\\\\'\'''\''/g;
2471 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2472 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002473 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002474 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002475 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002476 esac |
2477 sort
2478)
Martin v. Löwis11437992002-04-12 09:54:03 +00002479 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002480
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002481 cat <<\_ASBOX
2482## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002483## Output variables. ##
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002484## ----------------- ##
2485_ASBOX
Skip Montanaro6dead952003-09-25 14:50:04 +00002486 echo
2487 for ac_var in $ac_subst_vars
2488 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002489 eval ac_val=\$$ac_var
2490 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002491 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002492 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002493 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002494 done | sort
2495 echo
2496
2497 if test -n "$ac_subst_files"; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002498 cat <<\_ASBOX
2499## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002500## File substitutions. ##
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002501## ------------------- ##
2502_ASBOX
Skip Montanaro6dead952003-09-25 14:50:04 +00002503 echo
2504 for ac_var in $ac_subst_files
2505 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002506 eval ac_val=\$$ac_var
2507 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002508 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002509 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002510 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002511 done | sort
2512 echo
2513 fi
2514
Martin v. Löwis11437992002-04-12 09:54:03 +00002515 if test -s confdefs.h; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002516 cat <<\_ASBOX
2517## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002518## confdefs.h. ##
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002519## ----------- ##
2520_ASBOX
Martin v. Löwis11437992002-04-12 09:54:03 +00002521 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002522 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002523 echo
2524 fi
2525 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002526 $as_echo "$as_me: caught signal $ac_signal"
2527 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002528 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002529 rm -f core *.core core.conftest.* &&
2530 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002531 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002532' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002533for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002534 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002535done
2536ac_signal=0
2537
2538# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002539rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002540
Matthias Kloseb9621712010-04-24 17:59:49 +00002541$as_echo "/* confdefs.h */" > confdefs.h
2542
Martin v. Löwis11437992002-04-12 09:54:03 +00002543# Predefined preprocessor variables.
2544
2545cat >>confdefs.h <<_ACEOF
2546#define PACKAGE_NAME "$PACKAGE_NAME"
2547_ACEOF
2548
Martin v. Löwis11437992002-04-12 09:54:03 +00002549cat >>confdefs.h <<_ACEOF
2550#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2551_ACEOF
2552
Martin v. Löwis11437992002-04-12 09:54:03 +00002553cat >>confdefs.h <<_ACEOF
2554#define PACKAGE_VERSION "$PACKAGE_VERSION"
2555_ACEOF
2556
Martin v. Löwis11437992002-04-12 09:54:03 +00002557cat >>confdefs.h <<_ACEOF
2558#define PACKAGE_STRING "$PACKAGE_STRING"
2559_ACEOF
2560
Martin v. Löwis11437992002-04-12 09:54:03 +00002561cat >>confdefs.h <<_ACEOF
2562#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2563_ACEOF
2564
Matthias Kloseb9621712010-04-24 17:59:49 +00002565cat >>confdefs.h <<_ACEOF
2566#define PACKAGE_URL "$PACKAGE_URL"
2567_ACEOF
2568
Martin v. Löwis11437992002-04-12 09:54:03 +00002569
2570# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002571# Prefer an explicitly selected file to automatically selected ones.
2572ac_site_file1=NONE
2573ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002574if test -n "$CONFIG_SITE"; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002575 ac_site_file1=$CONFIG_SITE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002576elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002577 ac_site_file1=$prefix/share/config.site
2578 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002579else
Matthias Kloseb9621712010-04-24 17:59:49 +00002580 ac_site_file1=$ac_default_prefix/share/config.site
2581 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002582fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002583for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002584do
Matthias Kloseb9621712010-04-24 17:59:49 +00002585 test "x$ac_site_file" = xNONE && continue
2586 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2587 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2588$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002589 sed 's/^/| /' "$ac_site_file" >&5
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002590 . "$ac_site_file"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002591 fi
2592done
2593
2594if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002595 # Some versions of bash will fail to source /dev/null (special files
2596 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2597 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2598 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2599$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002600 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002601 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2602 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002603 esac
2604 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002605else
Matthias Kloseb9621712010-04-24 17:59:49 +00002606 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2607$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002608 >$cache_file
2609fi
2610
2611# Check that the precious variables saved in the cache have kept the same
2612# value.
2613ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002614for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002615 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2616 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002617 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2618 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002619 case $ac_old_set,$ac_new_set in
2620 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002621 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2622$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002623 ac_cache_corrupted=: ;;
2624 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002625 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2626$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002627 ac_cache_corrupted=: ;;
2628 ,);;
2629 *)
2630 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002631 # differences in whitespace do not lead to failure.
2632 ac_old_val_w=`echo x $ac_old_val`
2633 ac_new_val_w=`echo x $ac_new_val`
2634 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2635 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2636$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2637 ac_cache_corrupted=:
2638 else
2639 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2640$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2641 eval $ac_var=\$ac_old_val
2642 fi
2643 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2644$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2645 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2646$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002647 fi;;
2648 esac
2649 # Pass precious variables to config.status.
2650 if test "$ac_new_set" = set; then
2651 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002652 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002653 *) ac_arg=$ac_var=$ac_new_val ;;
2654 esac
2655 case " $ac_configure_args " in
2656 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002657 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002658 esac
2659 fi
2660done
2661if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002662 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2663$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2664 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2665$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002666 as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002667fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002668## -------------------- ##
2669## Main body of script. ##
2670## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002671
Guido van Rossum7f43da71994-08-01 12:15:30 +00002672ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002673ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002674ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2675ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2676ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002677
Guido van Rossum627b2d71993-12-24 10:39:16 +00002678
Michael W. Hudson54241132001-12-07 15:38:26 +00002679
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002680ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002681
2682
Martin v. Löwis11437992002-04-12 09:54:03 +00002683
Benjamin Petersond23f8222009-04-05 19:13:16 +00002684if test "$prefix" != "/"; then
2685 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2686fi
2687
2688
Martin v. Löwis11437992002-04-12 09:54:03 +00002689
2690
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002691# We don't use PACKAGE_ variables, and they cause conflicts
2692# with other autoconf-based packages that include Python.h
2693grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2694rm confdefs.h
2695mv confdefs.h.new confdefs.h
2696
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002697
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00002698VERSION=3.2
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002699
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002700# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002701
2702SOVERSION=1.0
2703
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002704# The later defininition of _XOPEN_SOURCE disables certain features
2705# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2706
Matthias Kloseb9621712010-04-24 17:59:49 +00002707$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002708
2709
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002710# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2711# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2712# them.
2713
Matthias Kloseb9621712010-04-24 17:59:49 +00002714$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002715
2716
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002717# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2718# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2719# them.
2720
Matthias Kloseb9621712010-04-24 17:59:49 +00002721$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002722
2723
Martin v. Löwisd6320502004-08-12 13:45:08 +00002724# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2725# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
2726
Matthias Kloseb9621712010-04-24 17:59:49 +00002727$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00002728
2729
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002730# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2731# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2732# them.
2733
Matthias Kloseb9621712010-04-24 17:59:49 +00002734$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002735
2736
2737
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002738define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002739
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00002740# Arguments passed to configure.
2741
2742CONFIG_ARGS="$ac_configure_args"
2743
Matthias Kloseb9621712010-04-24 17:59:49 +00002744{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
2745$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002746# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002747if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002748 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00002749 case $enableval in
2750 yes)
2751 enableval=/Developer/SDKs/MacOSX10.4u.sdk
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002752 if test ! -d "${enableval}"
2753 then
2754 enableval=/
2755 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002756 ;;
2757 esac
2758 case $enableval in
2759 no)
2760 UNIVERSALSDK=
2761 enable_universalsdk=
2762 ;;
2763 *)
2764 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002765 if test ! -d "${UNIVERSALSDK}"
2766 then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002767 as_fn_error "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002768 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002769 ;;
2770 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002771
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002772
Thomas Wouters477c8d52006-05-27 19:21:47 +00002773else
2774
2775 UNIVERSALSDK=
2776 enable_universalsdk=
2777
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002778fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002779
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002780if test -n "${UNIVERSALSDK}"
2781then
Matthias Kloseb9621712010-04-24 17:59:49 +00002782 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
2783$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002784else
Matthias Kloseb9621712010-04-24 17:59:49 +00002785 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2786$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002787fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002788
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002789
Benjamin Peterson6794aa32008-07-16 20:33:37 +00002790
2791
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002792UNIVERSAL_ARCHS="32-bit"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00002793
Matthias Kloseb9621712010-04-24 17:59:49 +00002794{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
2795$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002796
2797# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002798if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002799 withval=$with_universal_archs;
Matthias Kloseb9621712010-04-24 17:59:49 +00002800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
2801$as_echo "$withval" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002802 UNIVERSAL_ARCHS="$withval"
2803
2804else
2805
Matthias Kloseb9621712010-04-24 17:59:49 +00002806 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 32-bit" >&5
2807$as_echo "32-bit" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002808
2809fi
2810
2811
2812
2813
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002814
2815# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002816if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002817 withval=$with_framework_name;
2818 PYTHONFRAMEWORK=${withval}
2819 PYTHONFRAMEWORKDIR=${withval}.framework
2820 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
2821
2822else
2823
2824 PYTHONFRAMEWORK=Python
2825 PYTHONFRAMEWORKDIR=Python.framework
2826 PYTHONFRAMEWORKIDENTIFIER=org.python.python
2827
2828fi
2829
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002830# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002831if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002832 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00002833 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00002834 yes)
Jack Jansene578a632001-08-15 01:27:14 +00002835 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00002836 esac
2837 case $enableval in
2838 no)
2839 PYTHONFRAMEWORK=
2840 PYTHONFRAMEWORKDIR=no-framework
2841 PYTHONFRAMEWORKPREFIX=
2842 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002843 FRAMEWORKINSTALLFIRST=
2844 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002845 FRAMEWORKALTINSTALLFIRST=
2846 FRAMEWORKALTINSTALLLAST=
2847 if test "x${prefix}" = "xNONE"; then
2848 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2849 else
2850 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2851 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00002852 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00002853 ;;
2854 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002855 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00002856 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00002857 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00002858 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00002859 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
2860 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002861 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002862
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002863 if test "x${prefix}" = "xNONE" ; then
2864 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002865
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002866 else
2867 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2868 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002869
2870 case "${enableval}" in
2871 /System*)
2872 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2873 if test "${prefix}" = "NONE" ; then
2874 # See below
2875 FRAMEWORKUNIXTOOLSPREFIX="/usr"
2876 fi
2877 ;;
2878
2879 /Library*)
2880 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2881 ;;
2882
2883 */Library/Frameworks)
2884 MDIR="`dirname "${enableval}"`"
2885 MDIR="`dirname "${MDIR}"`"
2886 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
2887
2888 if test "${prefix}" = "NONE"; then
2889 # User hasn't specified the
2890 # --prefix option, but wants to install
2891 # the framework in a non-default location,
2892 # ensure that the compatibility links get
2893 # installed relative to that prefix as well
2894 # instead of in /usr/local.
2895 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
2896 fi
2897 ;;
2898
2899 *)
2900 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2901 ;;
2902 esac
2903
Jack Jansen127e56e2001-09-11 14:41:54 +00002904 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00002905
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002906 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00002907 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002908 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002909
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002910 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002911
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002912 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
2913
2914 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
2915
Jack Jansene578a632001-08-15 01:27:14 +00002916 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002917
Guido van Rossum563e7081996-09-10 18:20:48 +00002918else
Martin v. Löwis11437992002-04-12 09:54:03 +00002919
Jack Jansene578a632001-08-15 01:27:14 +00002920 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00002921 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00002922 PYTHONFRAMEWORKPREFIX=
2923 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002924 FRAMEWORKINSTALLFIRST=
2925 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002926 FRAMEWORKALTINSTALLFIRST=
2927 FRAMEWORKALTINSTALLLAST=
2928 if test "x${prefix}" = "xNONE" ; then
2929 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2930 else
2931 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2932 fi
Jack Jansene578a632001-08-15 01:27:14 +00002933 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002934
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002935
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002936fi
2937
Thomas Wouters477c8d52006-05-27 19:21:47 +00002938
2939
Michael W. Hudson54241132001-12-07 15:38:26 +00002940
2941
2942
2943
Jack Jansene578a632001-08-15 01:27:14 +00002944
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002945
2946
2947
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002948
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002949
Jack Jansene578a632001-08-15 01:27:14 +00002950##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00002951## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00002952## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00002953##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002954# Set name for machine-dependent library files
2955
Matthias Kloseb9621712010-04-24 17:59:49 +00002956{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
2957$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002958if test -z "$MACHDEP"
2959then
Guido van Rossum563e7081996-09-10 18:20:48 +00002960 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002961 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00002962 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00002963 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002964 else
Guido van Rossum563e7081996-09-10 18:20:48 +00002965 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002966 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00002967 ac_md_system=`echo $ac_sys_system |
2968 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
2969 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00002970 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00002971 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00002972
Guido van Rossum07397971997-04-29 21:49:50 +00002973 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002974 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002975 darwin*) MACHDEP="darwin";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00002976 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00002977 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002978 esac
2979fi
Guido van Rossum91922671997-10-09 20:24:13 +00002980
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002981# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
2982# disable features if it is defined, without any means to access these
2983# features as extensions. For these systems, we skip the definition of
2984# _XOPEN_SOURCE. Before adding a system to the list to gain access to
2985# some feature, make sure there is no alternative way to access this
2986# feature. Also, when using wildcards, make sure you have verified the
2987# need for not defining _XOPEN_SOURCE on all systems matching the
2988# wildcard, and that the wildcard does not include future systems
2989# (which may remove their limitations).
2990case $ac_sys_system/$ac_sys_release in
2991 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
2992 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00002993 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00002994 # In addition, Stefan Krah confirms that issue #1244610 exists through
2995 # OpenBSD 4.6, but is fixed in 4.7.
2996 OpenBSD/2.* | OpenBSD/3.[0123456789] | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00002997 define_xopen_source=no
2998 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
2999 # also defined. This can be overridden by defining _BSD_SOURCE
3000 # As this has a different meaning on Linux, only define it on OpenBSD
3001
Matthias Kloseb9621712010-04-24 17:59:49 +00003002$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003003
3004 ;;
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003005 OpenBSD/4.[789])
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003006 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3007 # also defined. This can be overridden by defining _BSD_SOURCE
3008 # As this has a different meaning on Linux, only define it on OpenBSD
3009
Matthias Kloseb9621712010-04-24 17:59:49 +00003010$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003011
3012 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003013 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3014 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3015 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003016 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 +00003017 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003018 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3019 # request to enable features supported by the standard as a request
3020 # to disable features not supported by the standard. The best way
3021 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3022 # entirely and define __EXTENSIONS__ instead.
3023 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003024 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003025 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3026 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003027 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003028 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003029 define_xopen_source=no;;
3030 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003031 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003032 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003033 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003034 # On FreeBSD 4, the math functions C89 does not cover are never defined
3035 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3036 FreeBSD/4.*)
3037 define_xopen_source=no;;
3038 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3039 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3040 # identifies itself as Darwin/7.*
3041 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3042 # disables platform specific features beyond repair.
3043 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3044 # has no effect, don't bother defining them
3045 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003046 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003047 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003048 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003049 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3050 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3051 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003052 AIX/4)
3053 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003054 AIX/5)
3055 if test `uname -r` -eq 1; then
3056 define_xopen_source=no
3057 fi
3058 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003059 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3060 # defining NI_NUMERICHOST.
3061 QNX/6.3.2)
3062 define_xopen_source=no
3063 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003064
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003065esac
3066
3067if test $define_xopen_source = yes
3068then
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003069
Matthias Kloseb9621712010-04-24 17:59:49 +00003070$as_echo "#define _XOPEN_SOURCE 600" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003071
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003072
3073 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3074 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3075 # several APIs are not declared. Since this is also needed in some
3076 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003077
Matthias Kloseb9621712010-04-24 17:59:49 +00003078$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003079
3080
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003081
Matthias Kloseb9621712010-04-24 17:59:49 +00003082$as_echo "#define _POSIX_C_SOURCE 200112L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003083
3084
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003085fi
3086
Guido van Rossum91922671997-10-09 20:24:13 +00003087#
3088# SGI compilers allow the specification of the both the ABI and the
3089# ISA on the command line. Depending on the values of these switches,
3090# different and often incompatable code will be generated.
3091#
3092# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3093# thus supply support for various ABI/ISA combinations. The MACHDEP
3094# variable is also adjusted.
3095#
3096
3097if test ! -z "$SGI_ABI"
3098then
3099 CC="cc $SGI_ABI"
3100 LDFLAGS="$SGI_ABI $LDFLAGS"
3101 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3102fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003103{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3104$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003105
Jack Jansen6b08a402004-06-03 12:41:45 +00003106# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3107# it may influence the way we can build extensions, so distutils
3108# needs to check it
3109
Thomas Wouters477c8d52006-05-27 19:21:47 +00003110
Jack Jansen6b08a402004-06-03 12:41:45 +00003111CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003112EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003113
Matthias Kloseb9621712010-04-24 17:59:49 +00003114{ $as_echo "$as_me:${as_lineno-$LINENO}: checking machine type as reported by uname -m" >&5
3115$as_echo_n "checking machine type as reported by uname -m... " >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00003116ac_sys_machine=`uname -m`
Matthias Kloseb9621712010-04-24 17:59:49 +00003117{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_sys_machine" >&5
3118$as_echo "$ac_sys_machine" >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00003119
Guido van Rossum627b2d71993-12-24 10:39:16 +00003120# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003121
3122# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3123# for debug/optimization stuff. BASECFLAGS is for flags that are required
3124# just to get things to compile and link. Users are free to override OPT
3125# when running configure or make. The build should not break if they do.
3126# BASECFLAGS should generally not be messed with, however.
3127
3128# XXX shouldn't some/most/all of this code be merged with the stuff later
3129# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003130{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3131$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003132
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003133# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003134if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003135 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003136 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003137 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003138 without_gcc=yes;;
3139 yes) CC=gcc
3140 without_gcc=no;;
3141 *) CC=$withval
3142 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003143 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003144else
Martin v. Löwis11437992002-04-12 09:54:03 +00003145
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003146 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003147 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003148 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003149 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003150 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003151fi
3152
Matthias Kloseb9621712010-04-24 17:59:49 +00003153{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3154$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003155
Guido van Rossum8b131c51995-03-09 14:10:13 +00003156# If the user switches compilers, we can't believe the cache
3157if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3158then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00003159 as_fn_error "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003160(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003161fi
3162
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003163# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3164# when the compiler supports them, but we don't always want -O2, and
3165# we set -g later.
3166if test -z "$CFLAGS"; then
3167 CFLAGS=
3168fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003169ac_ext=c
3170ac_cpp='$CPP $CPPFLAGS'
3171ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3172ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3173ac_compiler_gnu=$ac_cv_c_compiler_gnu
3174if test -n "$ac_tool_prefix"; then
3175 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3176set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003177{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3178$as_echo_n "checking for $ac_word... " >&6; }
3179if test "${ac_cv_prog_CC+set}" = set; then :
3180 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003181else
3182 if test -n "$CC"; then
3183 ac_cv_prog_CC="$CC" # Let the user override the test.
3184else
Martin v. Löwis11437992002-04-12 09:54:03 +00003185as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3186for as_dir in $PATH
3187do
3188 IFS=$as_save_IFS
3189 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003190 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003191 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 +00003192 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003193 $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 +00003194 break 2
3195 fi
3196done
Matthias Kloseb9621712010-04-24 17:59:49 +00003197 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003198IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003199
Jack Jansendd19cf82001-12-06 22:36:17 +00003200fi
3201fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003202CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003203if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003204 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3205$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003206else
Matthias Kloseb9621712010-04-24 17:59:49 +00003207 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3208$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003209fi
3210
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003211
Martin v. Löwis11437992002-04-12 09:54:03 +00003212fi
3213if test -z "$ac_cv_prog_CC"; then
3214 ac_ct_CC=$CC
3215 # Extract the first word of "gcc", so it can be a program name with args.
3216set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003217{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3218$as_echo_n "checking for $ac_word... " >&6; }
3219if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
3220 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003221else
3222 if test -n "$ac_ct_CC"; then
3223 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3224else
3225as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3226for as_dir in $PATH
3227do
3228 IFS=$as_save_IFS
3229 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003230 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003231 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 +00003232 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003233 $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 +00003234 break 2
3235 fi
3236done
Matthias Kloseb9621712010-04-24 17:59:49 +00003237 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003238IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003239
3240fi
3241fi
3242ac_ct_CC=$ac_cv_prog_ac_ct_CC
3243if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003244 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3245$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003246else
Matthias Kloseb9621712010-04-24 17:59:49 +00003247 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3248$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003249fi
3250
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003251 if test "x$ac_ct_CC" = x; then
3252 CC=""
3253 else
3254 case $cross_compiling:$ac_tool_warned in
3255yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003256{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3257$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003258ac_tool_warned=yes ;;
3259esac
3260 CC=$ac_ct_CC
3261 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003262else
3263 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003264fi
3265
Jack Jansendd19cf82001-12-06 22:36:17 +00003266if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003267 if test -n "$ac_tool_prefix"; then
3268 # 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 +00003269set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003270{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3271$as_echo_n "checking for $ac_word... " >&6; }
3272if test "${ac_cv_prog_CC+set}" = set; then :
3273 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003274else
3275 if test -n "$CC"; then
3276 ac_cv_prog_CC="$CC" # Let the user override the test.
3277else
Martin v. Löwis11437992002-04-12 09:54:03 +00003278as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3279for as_dir in $PATH
3280do
3281 IFS=$as_save_IFS
3282 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003283 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003284 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 +00003285 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003286 $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 +00003287 break 2
3288 fi
3289done
Matthias Kloseb9621712010-04-24 17:59:49 +00003290 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003291IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003292
3293fi
3294fi
3295CC=$ac_cv_prog_CC
3296if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003297 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3298$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003299else
Matthias Kloseb9621712010-04-24 17:59:49 +00003300 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3301$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003302fi
3303
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003304
Martin v. Löwis11437992002-04-12 09:54:03 +00003305 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003306fi
3307if test -z "$CC"; then
3308 # Extract the first word of "cc", so it can be a program name with args.
3309set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3311$as_echo_n "checking for $ac_word... " >&6; }
3312if test "${ac_cv_prog_CC+set}" = set; then :
3313 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003314else
3315 if test -n "$CC"; then
3316 ac_cv_prog_CC="$CC" # Let the user override the test.
3317else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003318 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003319as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3320for as_dir in $PATH
3321do
3322 IFS=$as_save_IFS
3323 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003324 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003325 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 +00003326 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3327 ac_prog_rejected=yes
3328 continue
3329 fi
3330 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003331 $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 +00003332 break 2
3333 fi
3334done
Matthias Kloseb9621712010-04-24 17:59:49 +00003335 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003336IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003337
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003338if test $ac_prog_rejected = yes; then
3339 # We found a bogon in the path, so make sure we never use it.
3340 set dummy $ac_cv_prog_CC
3341 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003342 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003343 # We chose a different compiler from the bogus one.
3344 # However, it has the same basename, so the bogon will be chosen
3345 # first if we set CC to just the basename; use the full file name.
3346 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003347 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003348 fi
3349fi
3350fi
3351fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003352CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003353if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003354 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3355$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003356else
Matthias Kloseb9621712010-04-24 17:59:49 +00003357 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3358$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003359fi
3360
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003361
Martin v. Löwis11437992002-04-12 09:54:03 +00003362fi
3363if test -z "$CC"; then
3364 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003365 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003366 do
3367 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3368set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003369{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3370$as_echo_n "checking for $ac_word... " >&6; }
3371if test "${ac_cv_prog_CC+set}" = set; then :
3372 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003373else
3374 if test -n "$CC"; then
3375 ac_cv_prog_CC="$CC" # Let the user override the test.
3376else
Martin v. Löwis11437992002-04-12 09:54:03 +00003377as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3378for as_dir in $PATH
3379do
3380 IFS=$as_save_IFS
3381 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003382 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003383 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 +00003384 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003385 $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 +00003386 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003387 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003388done
Matthias Kloseb9621712010-04-24 17:59:49 +00003389 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003390IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003391
3392fi
3393fi
3394CC=$ac_cv_prog_CC
3395if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003396 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3397$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003398else
Matthias Kloseb9621712010-04-24 17:59:49 +00003399 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3400$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003401fi
3402
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003403
Martin v. Löwis11437992002-04-12 09:54:03 +00003404 test -n "$CC" && break
3405 done
3406fi
3407if test -z "$CC"; then
3408 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003409 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003410do
3411 # Extract the first word of "$ac_prog", so it can be a program name with args.
3412set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003413{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3414$as_echo_n "checking for $ac_word... " >&6; }
3415if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
3416 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003417else
3418 if test -n "$ac_ct_CC"; then
3419 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3420else
3421as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3422for as_dir in $PATH
3423do
3424 IFS=$as_save_IFS
3425 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003426 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003427 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 +00003428 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003429 $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 +00003430 break 2
3431 fi
3432done
Matthias Kloseb9621712010-04-24 17:59:49 +00003433 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003434IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003435
Martin v. Löwis11437992002-04-12 09:54:03 +00003436fi
3437fi
3438ac_ct_CC=$ac_cv_prog_ac_ct_CC
3439if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003440 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3441$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003442else
Matthias Kloseb9621712010-04-24 17:59:49 +00003443 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3444$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003445fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003446
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003447
Martin v. Löwis11437992002-04-12 09:54:03 +00003448 test -n "$ac_ct_CC" && break
3449done
Michael W. Hudson54241132001-12-07 15:38:26 +00003450
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003451 if test "x$ac_ct_CC" = x; then
3452 CC=""
3453 else
3454 case $cross_compiling:$ac_tool_warned in
3455yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003456{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3457$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003458ac_tool_warned=yes ;;
3459esac
3460 CC=$ac_ct_CC
3461 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003462fi
3463
3464fi
3465
3466
Matthias Kloseb9621712010-04-24 17:59:49 +00003467test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3468$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Petersond7f73e92010-09-05 00:09:07 +00003469as_fn_error "no acceptable C compiler found in \$PATH
3470See \`config.log' for more details." "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003471
3472# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003473$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3474set X $ac_compile
3475ac_compiler=$2
3476for ac_option in --version -v -V -qversion; do
3477 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003478case "(($ac_try" in
3479 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3480 *) ac_try_echo=$ac_try;;
3481esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003482eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3483$as_echo "$ac_try_echo"; } >&5
3484 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003485 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003486 if test -s conftest.err; then
3487 sed '10a\
3488... rest of stderr output deleted ...
3489 10q' conftest.err >conftest.er1
3490 cat conftest.er1 >&5
3491 fi
3492 rm -f conftest.er1 conftest.err
3493 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3494 test $ac_status = 0; }
3495done
Martin v. Löwis11437992002-04-12 09:54:03 +00003496
Matthias Kloseb9621712010-04-24 17:59:49 +00003497cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003498/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003499
Martin v. Löwis11437992002-04-12 09:54:03 +00003500int
3501main ()
3502{
3503
3504 ;
3505 return 0;
3506}
3507_ACEOF
3508ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003509ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003510# Try to create an executable without -o first, disregard a.out.
3511# It will help us diagnose broken compilers, and finding out an intuition
3512# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003513{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3514$as_echo_n "checking whether the C compiler works... " >&6; }
3515ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3516
3517# The possible output files:
3518ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3519
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003520ac_rmfiles=
3521for ac_file in $ac_files
3522do
3523 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003524 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003525 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3526 esac
3527done
3528rm -f $ac_rmfiles
3529
Matthias Kloseb9621712010-04-24 17:59:49 +00003530if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003531case "(($ac_try" in
3532 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3533 *) ac_try_echo=$ac_try;;
3534esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003535eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3536$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003537 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003538 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003539 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3540 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003541 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3542# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3543# in a Makefile. We should not override ac_cv_exeext if it was cached,
3544# so that the user can short-circuit this test for compilers unknown to
3545# Autoconf.
3546for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003547do
3548 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003549 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003550 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003551 ;;
3552 [ab].out )
3553 # We found the default executable, but exeext='' is most
3554 # certainly right.
3555 break;;
3556 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003557 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003558 then :; else
3559 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3560 fi
3561 # We set ac_cv_exeext here because the later test for it is not
3562 # safe: cross compilers may not add the suffix if given an `-o'
3563 # argument, so we may need to know it at that point already.
3564 # Even if this section looks crufty: it has the advantage of
3565 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003566 break;;
3567 * )
3568 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003569 esac
3570done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003571test "$ac_cv_exeext" = no && ac_cv_exeext=
3572
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003573else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003574 ac_file=''
3575fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003576if test -z "$ac_file"; then :
3577 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3578$as_echo "no" >&6; }
3579$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003580sed 's/^/| /' conftest.$ac_ext >&5
3581
Matthias Kloseb9621712010-04-24 17:59:49 +00003582{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3583$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Petersond7f73e92010-09-05 00:09:07 +00003584{ as_fn_set_status 77
3585as_fn_error "C compiler cannot create executables
3586See \`config.log' for more details." "$LINENO" 5; }; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003587else
3588 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3589$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003590fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003591{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3592$as_echo_n "checking for C compiler default output file name... " >&6; }
3593{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3594$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003595ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003596
Matthias Kloseb9621712010-04-24 17:59:49 +00003597rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003598ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00003599{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3600$as_echo_n "checking for suffix of executables... " >&6; }
3601if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003602case "(($ac_try" in
3603 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3604 *) ac_try_echo=$ac_try;;
3605esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003606eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3607$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003608 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003609 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003610 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3611 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003612 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3613# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3614# work properly (i.e., refer to `conftest.exe'), while it won't with
3615# `rm'.
3616for ac_file in conftest.exe conftest conftest.*; do
3617 test -f "$ac_file" || continue
3618 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003619 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003620 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3621 break;;
3622 * ) break;;
3623 esac
3624done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003625else
Matthias Kloseb9621712010-04-24 17:59:49 +00003626 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3627$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Petersond7f73e92010-09-05 00:09:07 +00003628as_fn_error "cannot compute suffix of executables: cannot compile and link
3629See \`config.log' for more details." "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003630fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003631rm -f conftest conftest$ac_cv_exeext
3632{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3633$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003634
3635rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003636EXEEXT=$ac_cv_exeext
3637ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003638cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3639/* end confdefs.h. */
3640#include <stdio.h>
3641int
3642main ()
3643{
3644FILE *f = fopen ("conftest.out", "w");
3645 return ferror (f) || fclose (f) != 0;
3646
3647 ;
3648 return 0;
3649}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003650_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003651ac_clean_files="$ac_clean_files conftest.out"
3652# Check that the compiler produces executables we can run. If not, either
3653# the compiler is broken, or we cross compile.
3654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3655$as_echo_n "checking whether we are cross compiling... " >&6; }
3656if test "$cross_compiling" != yes; then
3657 { { ac_try="$ac_link"
3658case "(($ac_try" in
3659 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3660 *) ac_try_echo=$ac_try;;
3661esac
3662eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3663$as_echo "$ac_try_echo"; } >&5
3664 (eval "$ac_link") 2>&5
3665 ac_status=$?
3666 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3667 test $ac_status = 0; }
3668 if { ac_try='./conftest$ac_cv_exeext'
3669 { { case "(($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_try") 2>&5
3676 ac_status=$?
3677 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3678 test $ac_status = 0; }; }; then
3679 cross_compiling=no
3680 else
3681 if test "$cross_compiling" = maybe; then
3682 cross_compiling=yes
3683 else
3684 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3685$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Petersond7f73e92010-09-05 00:09:07 +00003686as_fn_error "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00003687If you meant to cross compile, use \`--host'.
Benjamin Petersond7f73e92010-09-05 00:09:07 +00003688See \`config.log' for more details." "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003689 fi
3690 fi
3691fi
3692{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3693$as_echo "$cross_compiling" >&6; }
3694
3695rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3696ac_clean_files=$ac_clean_files_save
3697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3698$as_echo_n "checking for suffix of object files... " >&6; }
3699if test "${ac_cv_objext+set}" = set; then :
3700 $as_echo_n "(cached) " >&6
3701else
3702 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003703/* end confdefs.h. */
3704
3705int
3706main ()
3707{
3708
3709 ;
3710 return 0;
3711}
3712_ACEOF
3713rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00003714if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003715case "(($ac_try" in
3716 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3717 *) ac_try_echo=$ac_try;;
3718esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003719eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3720$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003721 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003722 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003723 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3724 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003725 for ac_file in conftest.o conftest.obj conftest.*; do
3726 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00003727 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003728 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003729 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3730 break;;
3731 esac
3732done
3733else
Matthias Kloseb9621712010-04-24 17:59:49 +00003734 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003735sed 's/^/| /' conftest.$ac_ext >&5
3736
Matthias Kloseb9621712010-04-24 17:59:49 +00003737{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3738$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Petersond7f73e92010-09-05 00:09:07 +00003739as_fn_error "cannot compute suffix of object files: cannot compile
3740See \`config.log' for more details." "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003741fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003742rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003743fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003744{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3745$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003746OBJEXT=$ac_cv_objext
3747ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3749$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3750if test "${ac_cv_c_compiler_gnu+set}" = set; then :
3751 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003752else
Matthias Kloseb9621712010-04-24 17:59:49 +00003753 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003754/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003755
Martin v. Löwis11437992002-04-12 09:54:03 +00003756int
3757main ()
3758{
3759#ifndef __GNUC__
3760 choke me
3761#endif
3762
3763 ;
3764 return 0;
3765}
3766_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003767if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00003768 ac_compiler_gnu=yes
3769else
Matthias Kloseb9621712010-04-24 17:59:49 +00003770 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003771fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003772rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003773ac_cv_c_compiler_gnu=$ac_compiler_gnu
3774
3775fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003776{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3777$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3778if test $ac_compiler_gnu = yes; then
3779 GCC=yes
3780else
3781 GCC=
3782fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003783ac_test_CFLAGS=${CFLAGS+set}
3784ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00003785{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3786$as_echo_n "checking whether $CC accepts -g... " >&6; }
3787if test "${ac_cv_prog_cc_g+set}" = set; then :
3788 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003789else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003790 ac_save_c_werror_flag=$ac_c_werror_flag
3791 ac_c_werror_flag=yes
3792 ac_cv_prog_cc_g=no
3793 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00003794 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003795/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003796
Martin v. Löwis11437992002-04-12 09:54:03 +00003797int
3798main ()
3799{
3800
3801 ;
3802 return 0;
3803}
3804_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003805if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00003806 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003807else
Matthias Kloseb9621712010-04-24 17:59:49 +00003808 CFLAGS=""
3809 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003810/* end confdefs.h. */
3811
3812int
3813main ()
3814{
3815
3816 ;
3817 return 0;
3818}
3819_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003820if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003821
Matthias Kloseb9621712010-04-24 17:59:49 +00003822else
3823 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003824 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00003825 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003826/* end confdefs.h. */
3827
3828int
3829main ()
3830{
3831
3832 ;
3833 return 0;
3834}
3835_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003836if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003837 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00003838fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003839rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003840fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003841rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3842fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003843rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3844 ac_c_werror_flag=$ac_save_c_werror_flag
3845fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003846{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3847$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003848if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003849 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003850elif test $ac_cv_prog_cc_g = yes; then
3851 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003852 CFLAGS="-g -O2"
3853 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003854 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003855 fi
3856else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003857 if test "$GCC" = yes; then
3858 CFLAGS="-O2"
3859 else
3860 CFLAGS=
3861 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003862fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003863{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3864$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3865if test "${ac_cv_prog_cc_c89+set}" = set; then :
3866 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003867else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003868 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003869ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00003870cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003871/* end confdefs.h. */
3872#include <stdarg.h>
3873#include <stdio.h>
3874#include <sys/types.h>
3875#include <sys/stat.h>
3876/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3877struct buf { int x; };
3878FILE * (*rcsopen) (struct buf *, struct stat *, int);
3879static char *e (p, i)
3880 char **p;
3881 int i;
3882{
3883 return p[i];
3884}
3885static char *f (char * (*g) (char **, int), char **p, ...)
3886{
3887 char *s;
3888 va_list v;
3889 va_start (v,p);
3890 s = g (p, va_arg (v,int));
3891 va_end (v);
3892 return s;
3893}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003894
3895/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3896 function prototypes and stuff, but not '\xHH' hex character constants.
3897 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003898 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003899 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3900 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003901 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003902int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3903
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003904/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3905 inside strings and character constants. */
3906#define FOO(x) 'x'
3907int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3908
Skip Montanaro6dead952003-09-25 14:50:04 +00003909int test (int i, double x);
3910struct s1 {int (*f) (int a);};
3911struct s2 {int (*f) (double a);};
3912int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3913int argc;
3914char **argv;
3915int
3916main ()
3917{
3918return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3919 ;
3920 return 0;
3921}
3922_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003923for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3924 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003925do
3926 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00003927 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003928 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00003929fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003930rm -f core conftest.err conftest.$ac_objext
3931 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00003932done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003933rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003934CC=$ac_save_CC
3935
3936fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003937# AC_CACHE_VAL
3938case "x$ac_cv_prog_cc_c89" in
3939 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00003940 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3941$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003942 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00003943 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3944$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003945 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003946 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00003947 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3948$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003949esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003950if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00003951
Matthias Kloseb9621712010-04-24 17:59:49 +00003952fi
Skip Montanaro6dead952003-09-25 14:50:04 +00003953
Martin v. Löwis11437992002-04-12 09:54:03 +00003954ac_ext=c
3955ac_cpp='$CPP $CPPFLAGS'
3956ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3957ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3958ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003959
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003960
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003961
3962
Matthias Kloseb9621712010-04-24 17:59:49 +00003963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
3964$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003965
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003966# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003967if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003968 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003969
3970 case $withval in
3971 no) with_cxx_main=no
3972 MAINCC='$(CC)';;
3973 yes) with_cxx_main=yes
3974 MAINCC='$(CXX)';;
3975 *) with_cxx_main=yes
3976 MAINCC=$withval
3977 if test -z "$CXX"
3978 then
3979 CXX=$withval
3980 fi;;
3981 esac
3982else
3983
3984 with_cxx_main=no
3985 MAINCC='$(CC)'
3986
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003987fi
3988
Matthias Kloseb9621712010-04-24 17:59:49 +00003989{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
3990$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003991
3992preset_cxx="$CXX"
3993if test -z "$CXX"
3994then
3995 case "$CC" in
3996 gcc) # Extract the first word of "g++", so it can be a program name with args.
3997set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003998{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3999$as_echo_n "checking for $ac_word... " >&6; }
4000if test "${ac_cv_path_CXX+set}" = set; then :
4001 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004002else
4003 case $CXX in
4004 [\\/]* | ?:[\\/]*)
4005 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4006 ;;
4007 *)
4008 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4009for as_dir in notfound
4010do
4011 IFS=$as_save_IFS
4012 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004013 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004014 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 +00004015 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004016 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004017 break 2
4018 fi
4019done
Matthias Kloseb9621712010-04-24 17:59:49 +00004020 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004021IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004022
4023 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
4024 ;;
4025esac
4026fi
4027CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004028if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004029 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4030$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004031else
Matthias Kloseb9621712010-04-24 17:59:49 +00004032 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4033$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004034fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004035
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004036 ;;
4037 cc) # Extract the first word of "c++", so it can be a program name with args.
4038set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004039{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4040$as_echo_n "checking for $ac_word... " >&6; }
4041if test "${ac_cv_path_CXX+set}" = set; then :
4042 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004043else
4044 case $CXX in
4045 [\\/]* | ?:[\\/]*)
4046 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4047 ;;
4048 *)
4049 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4050for as_dir in notfound
4051do
4052 IFS=$as_save_IFS
4053 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004054 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004055 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 +00004056 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004057 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004058 break 2
4059 fi
4060done
Matthias Kloseb9621712010-04-24 17:59:49 +00004061 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004062IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004063
4064 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
4065 ;;
4066esac
4067fi
4068CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004069if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004070 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4071$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004072else
Matthias Kloseb9621712010-04-24 17:59:49 +00004073 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4074$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004075fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004076
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004077 ;;
4078 esac
4079 if test "$CXX" = "notfound"
4080 then
4081 CXX=""
4082 fi
4083fi
4084if test -z "$CXX"
4085then
4086 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4087do
4088 # Extract the first word of "$ac_prog", so it can be a program name with args.
4089set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4091$as_echo_n "checking for $ac_word... " >&6; }
4092if test "${ac_cv_prog_CXX+set}" = set; then :
4093 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004094else
4095 if test -n "$CXX"; then
4096 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4097else
4098as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4099for as_dir in $PATH
4100do
4101 IFS=$as_save_IFS
4102 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004103 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004104 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 +00004105 ac_cv_prog_CXX="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00004106 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004107 break 2
4108 fi
4109done
Matthias Kloseb9621712010-04-24 17:59:49 +00004110 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004111IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004112
4113fi
4114fi
4115CXX=$ac_cv_prog_CXX
4116if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004117 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4118$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004119else
Matthias Kloseb9621712010-04-24 17:59:49 +00004120 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4121$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004122fi
4123
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004124
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004125 test -n "$CXX" && break
4126done
4127test -n "$CXX" || CXX="notfound"
4128
4129 if test "$CXX" = "notfound"
4130 then
4131 CXX=""
4132 fi
4133fi
4134if test "$preset_cxx" != "$CXX"
4135then
Matthias Kloseb9621712010-04-24 17:59:49 +00004136 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004137
4138 By default, distutils will build C++ extension modules with \"$CXX\".
4139 If this is not intended, then set CXX on the configure command line.
4140 " >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00004141$as_echo "$as_me: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004142
4143 By default, distutils will build C++ extension modules with \"$CXX\".
4144 If this is not intended, then set CXX on the configure command line.
4145 " >&2;}
4146fi
4147
4148
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004149# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004150
4151ac_ext=c
4152ac_cpp='$CPP $CPPFLAGS'
4153ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4154ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4155ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Kloseb9621712010-04-24 17:59:49 +00004156{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4157$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004158# On Suns, sometimes $CPP names a directory.
4159if test -n "$CPP" && test -d "$CPP"; then
4160 CPP=
4161fi
4162if test -z "$CPP"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004163 if test "${ac_cv_prog_CPP+set}" = set; then :
4164 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004165else
Martin v. Löwis11437992002-04-12 09:54:03 +00004166 # Double quotes because CPP needs to be expanded
4167 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4168 do
4169 ac_preproc_ok=false
4170for ac_c_preproc_warn_flag in '' yes
4171do
4172 # Use a header file that comes with gcc, so configuring glibc
4173 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004174 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4175 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004176 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004177 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004178 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004179/* end confdefs.h. */
4180#ifdef __STDC__
4181# include <limits.h>
4182#else
4183# include <assert.h>
4184#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004185 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004186_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004187if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004188
Matthias Kloseb9621712010-04-24 17:59:49 +00004189else
Martin v. Löwis11437992002-04-12 09:54:03 +00004190 # Broken: fails on valid input.
4191continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004192fi
Benjamin Petersond7f73e92010-09-05 00:09:07 +00004193rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004194
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004195 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004196 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004197 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004198/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004199#include <ac_nonexistent.h>
4200_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004201if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004202 # Broken: success on invalid input.
4203continue
4204else
Martin v. Löwis11437992002-04-12 09:54:03 +00004205 # Passes both tests.
4206ac_preproc_ok=:
4207break
4208fi
Benjamin Petersond7f73e92010-09-05 00:09:07 +00004209rm -f conftest.err conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004210
4211done
4212# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Benjamin Petersond7f73e92010-09-05 00:09:07 +00004213rm -f conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004214if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004215 break
4216fi
4217
4218 done
4219 ac_cv_prog_CPP=$CPP
4220
4221fi
4222 CPP=$ac_cv_prog_CPP
4223else
4224 ac_cv_prog_CPP=$CPP
4225fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004226{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4227$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004228ac_preproc_ok=false
4229for ac_c_preproc_warn_flag in '' yes
4230do
4231 # Use a header file that comes with gcc, so configuring glibc
4232 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004233 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4234 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004235 # On the NeXT, cc -E runs the code through the compiler's parser,
4236 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004237 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004238/* end confdefs.h. */
4239#ifdef __STDC__
4240# include <limits.h>
4241#else
4242# include <assert.h>
4243#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004244 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004245_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004246if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004247
Matthias Kloseb9621712010-04-24 17:59:49 +00004248else
Martin v. Löwis11437992002-04-12 09:54:03 +00004249 # Broken: fails on valid input.
4250continue
4251fi
Benjamin Petersond7f73e92010-09-05 00:09:07 +00004252rm -f conftest.err conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004253
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004254 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004255 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004256 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004257/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004258#include <ac_nonexistent.h>
4259_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004260if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004261 # Broken: success on invalid input.
4262continue
4263else
Martin v. Löwis11437992002-04-12 09:54:03 +00004264 # Passes both tests.
4265ac_preproc_ok=:
4266break
4267fi
Benjamin Petersond7f73e92010-09-05 00:09:07 +00004268rm -f conftest.err conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004269
4270done
4271# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Benjamin Petersond7f73e92010-09-05 00:09:07 +00004272rm -f conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004273if $ac_preproc_ok; then :
4274
Martin v. Löwis11437992002-04-12 09:54:03 +00004275else
Matthias Kloseb9621712010-04-24 17:59:49 +00004276 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4277$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Petersond7f73e92010-09-05 00:09:07 +00004278as_fn_error "C preprocessor \"$CPP\" fails sanity check
4279See \`config.log' for more details." "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004280fi
4281
4282ac_ext=c
4283ac_cpp='$CPP $CPPFLAGS'
4284ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4285ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4286ac_compiler_gnu=$ac_cv_c_compiler_gnu
4287
4288
Matthias Kloseb9621712010-04-24 17:59:49 +00004289{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4290$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4291if test "${ac_cv_path_GREP+set}" = set; then :
4292 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004293else
Matthias Kloseb9621712010-04-24 17:59:49 +00004294 if test -z "$GREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004295 ac_path_GREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004296 # Loop through the user's path and test for each of PROGNAME-LIST
4297 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004298for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4299do
4300 IFS=$as_save_IFS
4301 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004302 for ac_prog in grep ggrep; do
4303 for ac_exec_ext in '' $ac_executable_extensions; do
4304 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4305 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
4306# Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004307 # Check for GNU $ac_path_GREP
4308case `"$ac_path_GREP" --version 2>&1` in
4309*GNU*)
4310 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4311*)
4312 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004313 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004314 while :
4315 do
4316 cat "conftest.in" "conftest.in" >"conftest.tmp"
4317 mv "conftest.tmp" "conftest.in"
4318 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00004319 $as_echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004320 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4321 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00004322 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004323 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4324 # Best one so far, save it but keep looking for a better one
4325 ac_cv_path_GREP="$ac_path_GREP"
4326 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00004327 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004328 # 10*(2^10) chars as input seems more than enough
4329 test $ac_count -gt 10 && break
4330 done
4331 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4332esac
4333
Matthias Kloseb9621712010-04-24 17:59:49 +00004334 $ac_path_GREP_found && break 3
4335 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004336 done
Matthias Kloseb9621712010-04-24 17:59:49 +00004337 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004338IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00004339 if test -z "$ac_cv_path_GREP"; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00004340 as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +00004341 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004342else
4343 ac_cv_path_GREP=$GREP
4344fi
4345
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004346fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004347{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4348$as_echo "$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004349 GREP="$ac_cv_path_GREP"
4350
4351
Matthias Kloseb9621712010-04-24 17:59:49 +00004352{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4353$as_echo_n "checking for egrep... " >&6; }
4354if test "${ac_cv_path_EGREP+set}" = set; then :
4355 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004356else
4357 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4358 then ac_cv_path_EGREP="$GREP -E"
4359 else
Matthias Kloseb9621712010-04-24 17:59:49 +00004360 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004361 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004362 # Loop through the user's path and test for each of PROGNAME-LIST
4363 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004364for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4365do
4366 IFS=$as_save_IFS
4367 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004368 for ac_prog in egrep; do
4369 for ac_exec_ext in '' $ac_executable_extensions; do
4370 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4371 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
4372# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004373 # Check for GNU $ac_path_EGREP
4374case `"$ac_path_EGREP" --version 2>&1` in
4375*GNU*)
4376 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4377*)
4378 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004379 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004380 while :
4381 do
4382 cat "conftest.in" "conftest.in" >"conftest.tmp"
4383 mv "conftest.tmp" "conftest.in"
4384 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00004385 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004386 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4387 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00004388 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004389 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4390 # Best one so far, save it but keep looking for a better one
4391 ac_cv_path_EGREP="$ac_path_EGREP"
4392 ac_path_EGREP_max=$ac_count
4393 fi
4394 # 10*(2^10) chars as input seems more than enough
4395 test $ac_count -gt 10 && break
4396 done
4397 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4398esac
4399
Matthias Kloseb9621712010-04-24 17:59:49 +00004400 $ac_path_EGREP_found && break 3
4401 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004402 done
Matthias Kloseb9621712010-04-24 17:59:49 +00004403 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004404IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00004405 if test -z "$ac_cv_path_EGREP"; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00004406 as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +00004407 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004408else
4409 ac_cv_path_EGREP=$EGREP
4410fi
4411
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004412 fi
4413fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004414{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4415$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004416 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00004417
4418
Matthias Kloseb9621712010-04-24 17:59:49 +00004419{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4420$as_echo_n "checking for ANSI C header files... " >&6; }
4421if test "${ac_cv_header_stdc+set}" = set; then :
4422 $as_echo_n "(cached) " >&6
4423else
4424 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004425/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00004426#include <stdlib.h>
4427#include <stdarg.h>
4428#include <string.h>
4429#include <float.h>
4430
4431int
4432main ()
4433{
4434
4435 ;
4436 return 0;
4437}
4438_ACEOF
4439if ac_fn_c_try_compile "$LINENO"; then :
4440 ac_cv_header_stdc=yes
4441else
4442 ac_cv_header_stdc=no
4443fi
4444rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4445
4446if test $ac_cv_header_stdc = yes; then
4447 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4448 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4449/* end confdefs.h. */
4450#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004451
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004452_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004453if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00004454 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004455
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004456else
Matthias Kloseb9621712010-04-24 17:59:49 +00004457 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004458fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00004459rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004460
Matthias Kloseb9621712010-04-24 17:59:49 +00004461fi
4462
4463if test $ac_cv_header_stdc = yes; then
4464 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4465 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4466/* end confdefs.h. */
4467#include <stdlib.h>
4468
4469_ACEOF
4470if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4471 $EGREP "free" >/dev/null 2>&1; then :
4472
4473else
4474 ac_cv_header_stdc=no
4475fi
4476rm -f conftest*
4477
4478fi
4479
4480if test $ac_cv_header_stdc = yes; then
4481 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4482 if test "$cross_compiling" = yes; then :
4483 :
4484else
4485 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4486/* end confdefs.h. */
4487#include <ctype.h>
4488#include <stdlib.h>
4489#if ((' ' & 0x0FF) == 0x020)
4490# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4491# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4492#else
4493# define ISLOWER(c) \
4494 (('a' <= (c) && (c) <= 'i') \
4495 || ('j' <= (c) && (c) <= 'r') \
4496 || ('s' <= (c) && (c) <= 'z'))
4497# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4498#endif
4499
4500#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4501int
4502main ()
4503{
4504 int i;
4505 for (i = 0; i < 256; i++)
4506 if (XOR (islower (i), ISLOWER (i))
4507 || toupper (i) != TOUPPER (i))
4508 return 2;
4509 return 0;
4510}
4511_ACEOF
4512if ac_fn_c_try_run "$LINENO"; then :
4513
4514else
4515 ac_cv_header_stdc=no
4516fi
4517rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4518 conftest.$ac_objext conftest.beam conftest.$ac_ext
4519fi
4520
4521fi
4522fi
4523{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4524$as_echo "$ac_cv_header_stdc" >&6; }
4525if test $ac_cv_header_stdc = yes; then
4526
4527$as_echo "#define STDC_HEADERS 1" >>confdefs.h
4528
4529fi
4530
4531# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4532for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4533 inttypes.h stdint.h unistd.h
4534do :
4535 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4536ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4537"
Benjamin Petersond7f73e92010-09-05 00:09:07 +00004538eval as_val=\$$as_ac_Header
4539 if test "x$as_val" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004540 cat >>confdefs.h <<_ACEOF
4541#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4542_ACEOF
4543
4544fi
4545
4546done
4547
4548
4549
4550 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
4551if test "x$ac_cv_header_minix_config_h" = x""yes; then :
4552 MINIX=yes
4553else
4554 MINIX=
4555fi
4556
4557
4558 if test "$MINIX" = yes; then
4559
4560$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4561
4562
4563$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4564
4565
4566$as_echo "#define _MINIX 1" >>confdefs.h
4567
4568 fi
4569
4570
4571 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4572$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
4573if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
4574 $as_echo_n "(cached) " >&6
4575else
4576 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4577/* end confdefs.h. */
4578
4579# define __EXTENSIONS__ 1
4580 $ac_includes_default
4581int
4582main ()
4583{
4584
4585 ;
4586 return 0;
4587}
4588_ACEOF
4589if ac_fn_c_try_compile "$LINENO"; then :
4590 ac_cv_safe_to_define___extensions__=yes
4591else
4592 ac_cv_safe_to_define___extensions__=no
4593fi
4594rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4595fi
4596{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4597$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4598 test $ac_cv_safe_to_define___extensions__ = yes &&
4599 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4600
4601 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4602
4603 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4604
4605 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4606
4607 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4608
4609
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004610
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004611# Check for unsupported systems
4612case $ac_sys_system/$ac_sys_release in
4613atheos*|Linux*/1*)
4614 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
4615 echo See README for details.
4616 exit 1;;
4617esac
4618
4619
Matthias Kloseb9621712010-04-24 17:59:49 +00004620{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
4621$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004622
4623# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004624if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004625 withval=$with_suffix;
4626 case $withval in
4627 no) EXEEXT=;;
4628 yes) EXEEXT=.exe;;
4629 *) EXEEXT=$withval;;
4630 esac
4631fi
4632
Matthias Kloseb9621712010-04-24 17:59:49 +00004633{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
4634$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004635
4636# Test whether we're running on a non-case-sensitive system, in which
4637# case we give a warning if no ext is given
4638
Matthias Kloseb9621712010-04-24 17:59:49 +00004639{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
4640$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004641if test ! -d CaseSensitiveTestDir; then
4642mkdir CaseSensitiveTestDir
4643fi
4644
4645if test -d casesensitivetestdir
4646then
Matthias Kloseb9621712010-04-24 17:59:49 +00004647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4648$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004649 BUILDEXEEXT=.exe
4650else
Matthias Kloseb9621712010-04-24 17:59:49 +00004651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4652$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004653 BUILDEXEEXT=$EXEEXT
4654fi
4655rmdir CaseSensitiveTestDir
4656
4657case $MACHDEP in
4658bsdos*)
4659 case $CC in
4660 gcc) CC="$CC -D_HAVE_BSDI";;
4661 esac;;
4662esac
4663
4664case $ac_sys_system in
4665hp*|HP*)
4666 case $CC in
4667 cc|*/cc) CC="$CC -Ae";;
4668 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004669esac
4670
4671
4672
Matthias Kloseb9621712010-04-24 17:59:49 +00004673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
4674$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004675if test -z "$LIBRARY"
4676then
4677 LIBRARY='libpython$(VERSION).a'
4678fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004679{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
4680$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004681
4682# LDLIBRARY is the name of the library to link against (as opposed to the
4683# name of the library into which to insert object files). BLDLIBRARY is also
4684# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
4685# is blank as the main program is not linked directly against LDLIBRARY.
4686# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
4687# systems without shared libraries, LDLIBRARY is the same as LIBRARY
4688# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
4689# DLLLIBRARY is the shared (i.e., DLL) library.
4690#
4691# RUNSHARED is used to run shared python without installed libraries
4692#
4693# INSTSONAME is the name of the shared library that will be use to install
4694# on the system - some systems like version suffix, others don't
4695
4696
4697
4698
4699
4700
4701LDLIBRARY="$LIBRARY"
4702BLDLIBRARY='$(LDLIBRARY)'
4703INSTSONAME='$(LDLIBRARY)'
4704DLLLIBRARY=''
4705LDLIBRARYDIR=''
4706RUNSHARED=''
4707
4708# LINKCC is the command that links the python executable -- default is $(CC).
4709# If CXX is set, and if it is needed to link a main function that was
4710# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
4711# python might then depend on the C++ runtime
4712# This is altered for AIX in order to build the export list before
4713# linking.
4714
Matthias Kloseb9621712010-04-24 17:59:49 +00004715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
4716$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004717if test -z "$LINKCC"
4718then
4719 LINKCC='$(PURIFY) $(MAINCC)'
4720 case $ac_sys_system in
4721 AIX*)
4722 exp_extra="\"\""
4723 if test $ac_sys_release -ge 5 -o \
4724 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
4725 exp_extra="."
4726 fi
4727 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004728 QNX*)
4729 # qcc must be used because the other compilers do not
4730 # support -N.
4731 LINKCC=qcc;;
4732 esac
4733fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004734{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
4735$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004736
4737# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
4738# make sure we default having it set to "no": this is used by
4739# distutils.unixccompiler to know if it should add --enable-new-dtags
4740# to linker command lines, and failing to detect GNU ld simply results
4741# in the same bahaviour as before.
4742
Matthias Kloseb9621712010-04-24 17:59:49 +00004743{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
4744$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004745ac_prog=ld
4746if test "$GCC" = yes; then
4747 ac_prog=`$CC -print-prog-name=ld`
4748fi
4749case `"$ac_prog" -V 2>&1 < /dev/null` in
4750 *GNU*)
4751 GNULD=yes;;
4752 *)
4753 GNULD=no;;
4754esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004755{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
4756$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004757
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004758{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
4759$as_echo_n "checking for inline... " >&6; }
4760if test "${ac_cv_c_inline+set}" = set; then :
4761 $as_echo_n "(cached) " >&6
4762else
4763 ac_cv_c_inline=no
4764for ac_kw in inline __inline__ __inline; do
4765 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4766/* end confdefs.h. */
4767#ifndef __cplusplus
4768typedef int foo_t;
4769static $ac_kw foo_t static_foo () {return 0; }
4770$ac_kw foo_t foo () {return 0; }
4771#endif
4772
4773_ACEOF
4774if ac_fn_c_try_compile "$LINENO"; then :
4775 ac_cv_c_inline=$ac_kw
4776fi
4777rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4778 test "$ac_cv_c_inline" != no && break
4779done
4780
4781fi
4782{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
4783$as_echo "$ac_cv_c_inline" >&6; }
4784
4785case $ac_cv_c_inline in
4786 inline | yes) ;;
4787 *)
4788 case $ac_cv_c_inline in
4789 no) ac_val=;;
4790 *) ac_val=$ac_cv_c_inline;;
4791 esac
4792 cat >>confdefs.h <<_ACEOF
4793#ifndef __cplusplus
4794#define inline $ac_val
4795#endif
4796_ACEOF
4797 ;;
4798esac
4799
4800if test "$ac_cv_c_inline" != no ; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00004801
4802$as_echo "#define USE_INLINE 1" >>confdefs.h
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004803
4804
4805fi
4806
4807
Matthias Kloseb9621712010-04-24 17:59:49 +00004808{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
4809$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004810# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004811if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004812 enableval=$enable_shared;
4813fi
4814
4815
4816if test -z "$enable_shared"
4817then
4818 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00004819 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004820 enable_shared="yes";;
4821 *)
4822 enable_shared="no";;
4823 esac
4824fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004825{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
4826$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004827
Matthias Kloseb9621712010-04-24 17:59:49 +00004828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
4829$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004830# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004831if test "${enable_profiling+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004832 enableval=$enable_profiling; ac_save_cc="$CC"
4833 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004834 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004835 ac_enable_profiling="no"
4836else
Matthias Kloseb9621712010-04-24 17:59:49 +00004837 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004838/* end confdefs.h. */
4839int main() { return 0; }
4840_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004841if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004842 ac_enable_profiling="yes"
4843else
Matthias Kloseb9621712010-04-24 17:59:49 +00004844 ac_enable_profiling="no"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004845fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004846rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4847 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004848fi
4849
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004850 CC="$ac_save_cc"
4851fi
4852
Matthias Kloseb9621712010-04-24 17:59:49 +00004853{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_profiling" >&5
4854$as_echo "$ac_enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004855
4856case "$ac_enable_profiling" in
4857 "yes")
4858 BASECFLAGS="-pg $BASECFLAGS"
4859 LDFLAGS="-pg $LDFLAGS"
4860 ;;
4861esac
4862
Matthias Kloseb9621712010-04-24 17:59:49 +00004863{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
4864$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004865
4866# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4867# library that we build, but we do not want to link against it (we
4868# will find it with a -framework option). For this reason there is an
4869# extra variable BLDLIBRARY against which Python and the extension
4870# modules are linked, BLDLIBRARY. This is normally the same as
4871# LDLIBRARY, but empty for MacOSX framework builds.
4872if test "$enable_framework"
4873then
4874 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
4875 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
4876 BLDLIBRARY=''
4877else
4878 BLDLIBRARY='$(LDLIBRARY)'
4879fi
4880
4881# Other platforms follow
4882if test $enable_shared = "yes"; then
4883
Matthias Kloseb9621712010-04-24 17:59:49 +00004884$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004885
4886 case $ac_sys_system in
4887 CYGWIN*)
4888 LDLIBRARY='libpython$(VERSION).dll.a'
4889 DLLLIBRARY='libpython$(VERSION).dll'
4890 ;;
4891 SunOS*)
4892 LDLIBRARY='libpython$(VERSION).so'
4893 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
4894 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4895 INSTSONAME="$LDLIBRARY".$SOVERSION
4896 ;;
4897 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
4898 LDLIBRARY='libpython$(VERSION).so'
4899 BLDLIBRARY='-L. -lpython$(VERSION)'
4900 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4901 case $ac_sys_system in
4902 FreeBSD*)
4903 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4904 ;;
4905 esac
4906 INSTSONAME="$LDLIBRARY".$SOVERSION
4907 ;;
4908 hp*|HP*)
4909 case `uname -m` in
4910 ia64)
4911 LDLIBRARY='libpython$(VERSION).so'
4912 ;;
4913 *)
4914 LDLIBRARY='libpython$(VERSION).sl'
4915 ;;
4916 esac
4917 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
4918 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
4919 ;;
4920 OSF*)
4921 LDLIBRARY='libpython$(VERSION).so'
4922 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
4923 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4924 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004925 Darwin*)
4926 LDLIBRARY='libpython$(VERSION).dylib'
4927 BLDLIBRARY='-L. -lpython$(VERSION)'
4928 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
4929 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00004930 AIX*)
4931 LDLIBRARY='libpython$(VERSION).so'
4932 RUNSHARED=LIBPATH=`pwd`:${LIBPATH}
4933 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004934
4935 esac
4936else # shared is disabled
4937 case $ac_sys_system in
4938 CYGWIN*)
4939 BLDLIBRARY='$(LIBRARY)'
4940 LDLIBRARY='libpython$(VERSION).dll.a'
4941 ;;
4942 esac
4943fi
4944
Matthias Kloseb9621712010-04-24 17:59:49 +00004945{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
4946$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004947
4948if test -n "$ac_tool_prefix"; then
4949 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4950set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004951{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4952$as_echo_n "checking for $ac_word... " >&6; }
4953if test "${ac_cv_prog_RANLIB+set}" = set; then :
4954 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004955else
4956 if test -n "$RANLIB"; then
4957 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4958else
4959as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4960for as_dir in $PATH
4961do
4962 IFS=$as_save_IFS
4963 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004964 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004965 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4966 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00004967 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004968 break 2
4969 fi
4970done
Matthias Kloseb9621712010-04-24 17:59:49 +00004971 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004972IFS=$as_save_IFS
4973
4974fi
4975fi
4976RANLIB=$ac_cv_prog_RANLIB
4977if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004978 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
4979$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004980else
Matthias Kloseb9621712010-04-24 17:59:49 +00004981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4982$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004983fi
4984
4985
4986fi
4987if test -z "$ac_cv_prog_RANLIB"; then
4988 ac_ct_RANLIB=$RANLIB
4989 # Extract the first word of "ranlib", so it can be a program name with args.
4990set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4992$as_echo_n "checking for $ac_word... " >&6; }
4993if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
4994 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004995else
4996 if test -n "$ac_ct_RANLIB"; then
4997 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4998else
4999as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5000for as_dir in $PATH
5001do
5002 IFS=$as_save_IFS
5003 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005004 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005005 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5006 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005007 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005008 break 2
5009 fi
5010done
Matthias Kloseb9621712010-04-24 17:59:49 +00005011 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005012IFS=$as_save_IFS
5013
5014fi
5015fi
5016ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5017if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005018 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5019$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005020else
Matthias Kloseb9621712010-04-24 17:59:49 +00005021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5022$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005023fi
5024
5025 if test "x$ac_ct_RANLIB" = x; then
5026 RANLIB=":"
5027 else
5028 case $cross_compiling:$ac_tool_warned in
5029yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00005030{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5031$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005032ac_tool_warned=yes ;;
5033esac
5034 RANLIB=$ac_ct_RANLIB
5035 fi
5036else
5037 RANLIB="$ac_cv_prog_RANLIB"
5038fi
5039
5040
5041for ac_prog in ar aal
5042do
5043 # Extract the first word of "$ac_prog", so it can be a program name with args.
5044set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005045{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5046$as_echo_n "checking for $ac_word... " >&6; }
5047if test "${ac_cv_prog_AR+set}" = set; then :
5048 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005049else
5050 if test -n "$AR"; then
5051 ac_cv_prog_AR="$AR" # Let the user override the test.
5052else
5053as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5054for as_dir in $PATH
5055do
5056 IFS=$as_save_IFS
5057 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005058 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005059 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5060 ac_cv_prog_AR="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005061 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005062 break 2
5063 fi
5064done
Matthias Kloseb9621712010-04-24 17:59:49 +00005065 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005066IFS=$as_save_IFS
5067
5068fi
5069fi
5070AR=$ac_cv_prog_AR
5071if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005072 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5073$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005074else
Matthias Kloseb9621712010-04-24 17:59:49 +00005075 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5076$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005077fi
5078
5079
5080 test -n "$AR" && break
5081done
5082test -n "$AR" || AR="ar"
5083
5084
5085# tweak ARFLAGS only if the user didn't set it on the command line
5086
5087if test -z "$ARFLAGS"
5088then
5089 ARFLAGS="rc"
5090fi
5091
5092
5093# Extract the first word of "svnversion", so it can be a program name with args.
5094set dummy svnversion; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005095{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5096$as_echo_n "checking for $ac_word... " >&6; }
5097if test "${ac_cv_prog_SVNVERSION+set}" = set; then :
5098 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005099else
5100 if test -n "$SVNVERSION"; then
5101 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
5102else
5103as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5104for as_dir in $PATH
5105do
5106 IFS=$as_save_IFS
5107 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005108 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005109 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5110 ac_cv_prog_SVNVERSION="found"
Matthias Kloseb9621712010-04-24 17:59:49 +00005111 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005112 break 2
5113 fi
5114done
Matthias Kloseb9621712010-04-24 17:59:49 +00005115 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005116IFS=$as_save_IFS
5117
5118 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
5119fi
5120fi
5121SVNVERSION=$ac_cv_prog_SVNVERSION
5122if test -n "$SVNVERSION"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005123 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SVNVERSION" >&5
5124$as_echo "$SVNVERSION" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005125else
Matthias Kloseb9621712010-04-24 17:59:49 +00005126 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5127$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005128fi
5129
5130
5131if test $SVNVERSION = found
5132then
5133 SVNVERSION="svnversion \$(srcdir)"
5134else
5135 SVNVERSION="echo Unversioned directory"
5136fi
5137
5138case $MACHDEP in
5139bsdos*|hp*|HP*)
5140 # install -d does not work on BSDI or HP-UX
5141 if test -z "$INSTALL"
5142 then
5143 INSTALL="${srcdir}/install-sh -c"
5144 fi
5145esac
5146ac_aux_dir=
5147for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
Benjamin Petersond7f73e92010-09-05 00:09:07 +00005148 for ac_t in install-sh install.sh shtool; do
5149 if test -f "$ac_dir/$ac_t"; then
5150 ac_aux_dir=$ac_dir
5151 ac_install_sh="$ac_aux_dir/$ac_t -c"
5152 break 2
5153 fi
5154 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005155done
5156if test -z "$ac_aux_dir"; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00005157 as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005158fi
5159
5160# These three variables are undocumented and unsupported,
5161# and are intended to be withdrawn in a future Autoconf release.
5162# They can cause serious problems if a builder's source tree is in a directory
5163# whose full name contains unusual characters.
5164ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
5165ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
5166ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
5167
5168
5169# Find a good install program. We prefer a C program (faster),
5170# so one script is as good as another. But avoid the broken or
5171# incompatible versions:
5172# SysV /etc/install, /usr/sbin/install
5173# SunOS /usr/etc/install
5174# IRIX /sbin/install
5175# AIX /bin/install
5176# AmigaOS /C/install, which installs bootblocks on floppy discs
5177# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5178# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5179# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5180# OS/2's system install, which has a completely different semantic
5181# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00005182# Reject install programs that cannot install multiple files.
5183{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
5184$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005185if test -z "$INSTALL"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005186if test "${ac_cv_path_install+set}" = set; then :
5187 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005188else
5189 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5190for as_dir in $PATH
5191do
5192 IFS=$as_save_IFS
5193 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005194 # Account for people who put trailing slashes in PATH elements.
5195case $as_dir/ in #((
5196 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005197 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00005198 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005199 /usr/ucb/* ) ;;
5200 *)
5201 # OSF1 and SCO ODT 3.0 have their own names for install.
5202 # Don't use installbsd from OSF since it installs stuff as root
5203 # by default.
5204 for ac_prog in ginstall scoinst install; do
5205 for ac_exec_ext in '' $ac_executable_extensions; do
5206 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
5207 if test $ac_prog = install &&
5208 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5209 # AIX install. It has an incompatible calling convention.
5210 :
5211 elif test $ac_prog = install &&
5212 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5213 # program-specific install script used by HP pwplus--don't use.
5214 :
5215 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005216 rm -rf conftest.one conftest.two conftest.dir
5217 echo one > conftest.one
5218 echo two > conftest.two
5219 mkdir conftest.dir
5220 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5221 test -s conftest.one && test -s conftest.two &&
5222 test -s conftest.dir/conftest.one &&
5223 test -s conftest.dir/conftest.two
5224 then
5225 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5226 break 3
5227 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005228 fi
5229 fi
5230 done
5231 done
5232 ;;
5233esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005234
5235 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005236IFS=$as_save_IFS
5237
Matthias Kloseb9621712010-04-24 17:59:49 +00005238rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005239
5240fi
5241 if test "${ac_cv_path_install+set}" = set; then
5242 INSTALL=$ac_cv_path_install
5243 else
5244 # As a last resort, use the slow shell script. Don't cache a
5245 # value for INSTALL within a source directory, because that will
5246 # break other packages using the cache if that directory is
5247 # removed, or if the value is a relative name.
5248 INSTALL=$ac_install_sh
5249 fi
5250fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005251{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
5252$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005253
5254# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5255# It thinks the first close brace ends the variable substitution.
5256test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5257
5258test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
5259
5260test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5261
5262
5263# Not every filesystem supports hard links
5264
5265if test -z "$LN" ; then
5266 case $ac_sys_system in
5267 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005268 *) LN=ln;;
5269 esac
5270fi
5271
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00005272# For calculating the .so ABI tag.
5273SOABI_QUALIFIERS=""
5274
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005275# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00005276{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
5277$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005278
5279# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005280if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005281 withval=$with_pydebug;
5282if test "$withval" != no
5283then
5284
Matthias Kloseb9621712010-04-24 17:59:49 +00005285$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005286
Matthias Kloseb9621712010-04-24 17:59:49 +00005287 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5288$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005289 Py_DEBUG='true'
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00005290 SOABI_QUALIFIERS="${SOABI_QUALIFIERS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00005291else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5292$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005293fi
5294else
Matthias Kloseb9621712010-04-24 17:59:49 +00005295 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5296$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005297fi
5298
5299
5300# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
5301# merged with this chunk of code?
5302
5303# Optimizer/debugger flags
5304# ------------------------
5305# (The following bit of code is complicated enough - please keep things
5306# indented properly. Just pretend you're editing Python code. ;-)
5307
5308# There are two parallel sets of case statements below, one that checks to
5309# see if OPT was set and one that does BASECFLAGS setting based upon
5310# compiler and platform. BASECFLAGS tweaks need to be made even if the
5311# user set OPT.
5312
5313# tweak OPT based on compiler and platform, only if the user didn't set
5314# it on the command line
5315
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00005316if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005317then
5318 case $GCC in
5319 yes)
5320 if test "$CC" != 'g++' ; then
5321 STRICT_PROTO="-Wstrict-prototypes"
5322 fi
5323 # For gcc 4.x we need to use -fwrapv so lets check if its supported
5324 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
5325 WRAP="-fwrapv"
5326 fi
5327 case $ac_cv_prog_cc_g in
5328 yes)
5329 if test "$Py_DEBUG" = 'true' ; then
5330 # Optimization messes up debuggers, so turn it off for
5331 # debug builds.
Mark Dickinsonb2153e92010-05-05 22:31:36 +00005332 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005333 else
5334 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
5335 fi
5336 ;;
5337 *)
5338 OPT="-O3 -Wall $STRICT_PROTO"
5339 ;;
5340 esac
5341 case $ac_sys_system in
5342 SCO_SV*) OPT="$OPT -m486 -DSCO5"
5343 ;;
5344 esac
5345 ;;
5346
5347 *)
5348 OPT="-O"
5349 ;;
5350 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005351fi
5352
5353
5354
5355# The -arch flags for universal builds on OSX
5356UNIVERSAL_ARCH_FLAGS=
5357
5358
5359# tweak BASECFLAGS based on compiler and platform
5360case $GCC in
5361yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005362 # Python doesn't violate C99 aliasing rules, but older versions of
5363 # GCC produce warnings for legal Python code. Enable
5364 # -fno-strict-aliasing on versions of GCC that support but produce
5365 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00005366 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
5367$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005368 ac_save_cc="$CC"
5369 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005370 save_CFLAGS="$CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +00005371 if test "${ac_cv_no_strict_aliasing+set}" = set; then :
5372 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00005373else
Matthias Kloseb9621712010-04-24 17:59:49 +00005374 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005375/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005376
Matthias Kloseb159a552010-04-25 21:00:44 +00005377
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005378int
5379main ()
5380{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005381
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005382 ;
5383 return 0;
5384}
Matthias Kloseb159a552010-04-25 21:00:44 +00005385
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005386_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005387if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00005388
5389 CC="$ac_save_cc -fstrict-aliasing"
5390 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
5391 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005392/* end confdefs.h. */
5393
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005394 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005395int
5396main ()
5397{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005398double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005399 ;
5400 return 0;
5401}
Matthias Kloseb159a552010-04-25 21:00:44 +00005402
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005403_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005404if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00005405
5406 ac_cv_no_strict_aliasing=no
5407
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005408else
Matthias Kloseb159a552010-04-25 21:00:44 +00005409
5410 ac_cv_no_strict_aliasing=yes
5411
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005412fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005413rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00005414
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005415else
Matthias Kloseb159a552010-04-25 21:00:44 +00005416
5417 ac_cv_no_strict_aliasing=no
5418
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005419fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005420rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00005421fi
5422
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005423 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005424 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00005425 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
5426$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005427 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005428 then
5429 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
5430 fi
5431
5432 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
5433 # support. Without this, treatment of subnormals doesn't follow
5434 # the standard.
5435 case $ac_sys_machine in
5436 alpha*)
5437 BASECFLAGS="$BASECFLAGS -mieee"
5438 ;;
5439 esac
5440
5441 case $ac_sys_system in
5442 SCO_SV*)
5443 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
5444 ;;
5445 # is there any other compiler on Darwin besides gcc?
5446 Darwin*)
5447 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
5448 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussoren666028b2010-04-18 19:07:43 +00005449 if test "${CC}" = gcc
5450 then
Matthias Kloseb9621712010-04-24 17:59:49 +00005451 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
5452$as_echo_n "checking which compiler should be used... " >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00005453 case "${UNIVERSALSDK}" in
5454 */MacOSX10.4u.sdk)
5455 # Build using 10.4 SDK, force usage of gcc when the
5456 # compiler is gcc, otherwise the user will get very
5457 # confusing error messages when building on OSX 10.6
5458 CC=gcc-4.0
5459 CPP=cpp-4.0
5460 ;;
5461 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005462 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5463$as_echo "$CC" >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00005464 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005465
5466
5467 if test "${enable_universalsdk}"; then
5468 UNIVERSAL_ARCH_FLAGS=""
5469 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
5470 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
5471 ARCH_RUN_32BIT=""
Benjamin Peterson99f03762010-04-11 22:15:28 +00005472 LIPO_32BIT_FLAGS=""
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005473 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
5474 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005475 LIPO_32BIT_FLAGS=""
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005476 ARCH_RUN_32BIT="true"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005477
5478 elif test "$UNIVERSAL_ARCHS" = "all" ; then
5479 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005480 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005481 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005482
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005483 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
5484 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005485 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005486 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005487
5488 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
5489 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005490 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005491 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005492
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005493 else
Benjamin Petersond7f73e92010-09-05 00:09:07 +00005494 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 +00005495
5496 fi
5497
5498
Ronald Oussoren666028b2010-04-18 19:07:43 +00005499 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
5500 if test "${UNIVERSALSDK}" != "/"
5501 then
5502 CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
5503 LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren712979d2010-04-20 19:51:33 +00005504 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005505 fi
5506 fi
5507
5508 # Calculate the right deployment target for this build.
5509 #
5510 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
5511 if test ${cur_target} '>' 10.2; then
5512 cur_target=10.3
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005513 if test ${enable_universalsdk}; then
5514 if test "${UNIVERSAL_ARCHS}" = "all"; then
5515 # Ensure that the default platform for a
5516 # 4-way universal build is OSX 10.5,
5517 # that's the first OS release where
5518 # 4-way builds make sense.
5519 cur_target='10.5'
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005520
5521 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
5522 cur_target='10.5'
5523
5524 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
5525 cur_target='10.5'
5526
5527 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
5528 cur_target='10.5'
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005529 fi
5530 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00005531 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005532 # On Intel macs default to a deployment
5533 # target of 10.4, that's the first OSX
5534 # release with Intel support.
5535 cur_target="10.4"
5536 fi
5537 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005538 fi
5539 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
5540
5541 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
5542 # environment with a value that is the same as what we'll use
5543 # in the Makefile to ensure that we'll get the same compiler
5544 # environment during configure and build time.
5545 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
5546 export MACOSX_DEPLOYMENT_TARGET
5547 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
5548
5549 ;;
5550 OSF*)
5551 BASECFLAGS="$BASECFLAGS -mieee"
5552 ;;
5553 esac
5554 ;;
5555
5556*)
5557 case $ac_sys_system in
5558 OpenUNIX*|UnixWare*)
5559 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
5560 ;;
5561 OSF*)
5562 BASECFLAGS="$BASECFLAGS -ieee -std"
5563 ;;
5564 SCO_SV*)
5565 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
5566 ;;
5567 esac
5568 ;;
5569esac
5570
5571if test "$Py_DEBUG" = 'true'; then
5572 :
5573else
5574 OPT="-DNDEBUG $OPT"
5575fi
5576
5577if test "$ac_arch_flags"
5578then
5579 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
5580fi
5581
5582# disable check for icc since it seems to pass, but generates a warning
5583if test "$CC" = icc
5584then
5585 ac_cv_opt_olimit_ok=no
5586fi
5587
Matthias Kloseb9621712010-04-24 17:59:49 +00005588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -OPT:Olimit=0" >&5
5589$as_echo_n "checking whether $CC accepts -OPT:Olimit=0... " >&6; }
5590if test "${ac_cv_opt_olimit_ok+set}" = set; then :
5591 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005592else
5593 ac_save_cc="$CC"
5594CC="$CC -OPT:Olimit=0"
Matthias Kloseb9621712010-04-24 17:59:49 +00005595cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005596/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005597
5598int
5599main ()
5600{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005601
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005602 ;
5603 return 0;
5604}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005605_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005606if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005607 ac_cv_opt_olimit_ok=yes
5608else
Matthias Kloseb9621712010-04-24 17:59:49 +00005609 ac_cv_opt_olimit_ok=no
Matthias Kloseb159a552010-04-25 21:00:44 +00005610
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005611fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005612rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005613CC="$ac_save_cc"
5614fi
5615
Matthias Kloseb9621712010-04-24 17:59:49 +00005616{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_opt_olimit_ok" >&5
5617$as_echo "$ac_cv_opt_olimit_ok" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005618if test $ac_cv_opt_olimit_ok = yes; then
5619 case $ac_sys_system in
5620 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
5621 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
5622 # environment?
5623 Darwin*)
5624 ;;
5625 *)
5626 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
5627 ;;
5628 esac
5629else
Matthias Kloseb9621712010-04-24 17:59:49 +00005630 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Olimit 1500" >&5
5631$as_echo_n "checking whether $CC accepts -Olimit 1500... " >&6; }
5632 if test "${ac_cv_olimit_ok+set}" = set; then :
5633 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005634else
5635 ac_save_cc="$CC"
5636 CC="$CC -Olimit 1500"
Matthias Kloseb9621712010-04-24 17:59:49 +00005637 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005638/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005639
5640int
5641main ()
5642{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005643
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005644 ;
5645 return 0;
5646}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005647_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005648if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005649 ac_cv_olimit_ok=yes
5650else
Matthias Kloseb9621712010-04-24 17:59:49 +00005651 ac_cv_olimit_ok=no
Matthias Kloseb159a552010-04-25 21:00:44 +00005652
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005653fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005654rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005655 CC="$ac_save_cc"
5656fi
5657
Matthias Kloseb9621712010-04-24 17:59:49 +00005658 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_olimit_ok" >&5
5659$as_echo "$ac_cv_olimit_ok" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005660 if test $ac_cv_olimit_ok = yes; then
5661 BASECFLAGS="$BASECFLAGS -Olimit 1500"
5662 fi
5663fi
5664
5665# Check whether GCC supports PyArg_ParseTuple format
5666if test "$GCC" = "yes"
5667then
Matthias Kloseb9621712010-04-24 17:59:49 +00005668 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5
5669$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005670 save_CFLAGS=$CFLAGS
5671 CFLAGS="$CFLAGS -Werror"
Matthias Kloseb9621712010-04-24 17:59:49 +00005672 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005673/* end confdefs.h. */
5674
5675 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005676int
5677main ()
5678{
5679
5680 ;
5681 return 0;
5682}
Matthias Kloseb159a552010-04-25 21:00:44 +00005683
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005684_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005685if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005686
Matthias Kloseb159a552010-04-25 21:00:44 +00005687
Matthias Kloseb9621712010-04-24 17:59:49 +00005688$as_echo "#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005689
Matthias Kloseb159a552010-04-25 21:00:44 +00005690 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00005691$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00005692
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005693else
Matthias Kloseb159a552010-04-25 21:00:44 +00005694
5695 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00005696$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005697
5698fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005699rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5700 CFLAGS=$save_CFLAGS
5701fi
5702
5703# On some compilers, pthreads are available without further options
5704# (e.g. MacOS X). On some of these systems, the compiler will not
5705# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
5706# So we have to see first whether pthreads are available without
5707# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00005708{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
5709$as_echo_n "checking whether pthreads are available without options... " >&6; }
5710if test "${ac_cv_pthread_is_default+set}" = set; then :
5711 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005712else
Matthias Kloseb9621712010-04-24 17:59:49 +00005713 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005714 ac_cv_pthread_is_default=no
5715else
Matthias Kloseb9621712010-04-24 17:59:49 +00005716 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005717/* end confdefs.h. */
5718
5719#include <pthread.h>
5720
5721void* routine(void* p){return NULL;}
5722
5723int main(){
5724 pthread_t p;
5725 if(pthread_create(&p,NULL,routine,NULL)!=0)
5726 return 1;
5727 (void)pthread_detach(p);
5728 return 0;
5729}
5730
5731_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005732if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005733
5734 ac_cv_pthread_is_default=yes
5735 ac_cv_kthread=no
5736 ac_cv_pthread=no
5737
5738else
Matthias Kloseb9621712010-04-24 17:59:49 +00005739 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005740fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005741rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5742 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005743fi
5744
5745
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005746fi
5747
Matthias Kloseb9621712010-04-24 17:59:49 +00005748{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
5749$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005750
5751
5752if test $ac_cv_pthread_is_default = yes
5753then
5754 ac_cv_kpthread=no
5755else
5756# -Kpthread, if available, provides the right #defines
5757# and linker options to make pthread_create available
5758# Some compilers won't report that they do not support -Kpthread,
5759# so we need to run a program to see whether it really made the
5760# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
5762$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
5763if test "${ac_cv_kpthread+set}" = set; then :
5764 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005765else
5766 ac_save_cc="$CC"
5767CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005768if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005769 ac_cv_kpthread=no
5770else
Matthias Kloseb9621712010-04-24 17:59:49 +00005771 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005772/* end confdefs.h. */
5773
5774#include <pthread.h>
5775
5776void* routine(void* p){return NULL;}
5777
5778int main(){
5779 pthread_t p;
5780 if(pthread_create(&p,NULL,routine,NULL)!=0)
5781 return 1;
5782 (void)pthread_detach(p);
5783 return 0;
5784}
5785
5786_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005787if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005788 ac_cv_kpthread=yes
5789else
Matthias Kloseb9621712010-04-24 17:59:49 +00005790 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005791fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005792rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5793 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005794fi
5795
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005796CC="$ac_save_cc"
5797fi
5798
Matthias Kloseb9621712010-04-24 17:59:49 +00005799{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
5800$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005801fi
5802
5803if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
5804then
5805# -Kthread, if available, provides the right #defines
5806# and linker options to make pthread_create available
5807# Some compilers won't report that they do not support -Kthread,
5808# so we need to run a program to see whether it really made the
5809# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005810{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
5811$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
5812if test "${ac_cv_kthread+set}" = set; then :
5813 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005814else
5815 ac_save_cc="$CC"
5816CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005817if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005818 ac_cv_kthread=no
5819else
Matthias Kloseb9621712010-04-24 17:59:49 +00005820 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005821/* end confdefs.h. */
5822
5823#include <pthread.h>
5824
5825void* routine(void* p){return NULL;}
5826
5827int main(){
5828 pthread_t p;
5829 if(pthread_create(&p,NULL,routine,NULL)!=0)
5830 return 1;
5831 (void)pthread_detach(p);
5832 return 0;
5833}
5834
5835_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005836if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005837 ac_cv_kthread=yes
5838else
Matthias Kloseb9621712010-04-24 17:59:49 +00005839 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005840fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005841rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5842 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005843fi
5844
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005845CC="$ac_save_cc"
5846fi
5847
Matthias Kloseb9621712010-04-24 17:59:49 +00005848{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
5849$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005850fi
5851
5852if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
5853then
5854# -pthread, if available, provides the right #defines
5855# and linker options to make pthread_create available
5856# Some compilers won't report that they do not support -pthread,
5857# so we need to run a program to see whether it really made the
5858# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005859{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
5860$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
5861if test "${ac_cv_thread+set}" = set; then :
5862 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005863else
5864 ac_save_cc="$CC"
5865CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005866if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005867 ac_cv_pthread=no
5868else
Matthias Kloseb9621712010-04-24 17:59:49 +00005869 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005870/* end confdefs.h. */
5871
5872#include <pthread.h>
5873
5874void* routine(void* p){return NULL;}
5875
5876int main(){
5877 pthread_t p;
5878 if(pthread_create(&p,NULL,routine,NULL)!=0)
5879 return 1;
5880 (void)pthread_detach(p);
5881 return 0;
5882}
5883
5884_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005885if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005886 ac_cv_pthread=yes
5887else
Matthias Kloseb9621712010-04-24 17:59:49 +00005888 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005889fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005890rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5891 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005892fi
5893
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005894CC="$ac_save_cc"
5895fi
5896
Matthias Kloseb9621712010-04-24 17:59:49 +00005897{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
5898$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005899fi
5900
5901# If we have set a CC compiler flag for thread support then
5902# check if it works for CXX, too.
5903ac_cv_cxx_thread=no
5904if test ! -z "$CXX"
5905then
Matthias Kloseb9621712010-04-24 17:59:49 +00005906{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
5907$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005908ac_save_cxx="$CXX"
5909
5910if test "$ac_cv_kpthread" = "yes"
5911then
5912 CXX="$CXX -Kpthread"
5913 ac_cv_cxx_thread=yes
5914elif test "$ac_cv_kthread" = "yes"
5915then
5916 CXX="$CXX -Kthread"
5917 ac_cv_cxx_thread=yes
5918elif test "$ac_cv_pthread" = "yes"
5919then
5920 CXX="$CXX -pthread"
5921 ac_cv_cxx_thread=yes
5922fi
5923
5924if test $ac_cv_cxx_thread = yes
5925then
5926 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5927 $CXX -c conftest.$ac_ext 2>&5
5928 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5929 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5930 then
5931 ac_cv_cxx_thread=yes
5932 else
5933 ac_cv_cxx_thread=no
5934 fi
5935 rm -fr conftest*
5936fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005937{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
5938$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005939fi
5940CXX="$ac_save_cxx"
5941
5942
5943# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00005944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5945$as_echo_n "checking for ANSI C header files... " >&6; }
5946if test "${ac_cv_header_stdc+set}" = set; then :
5947 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005948else
Matthias Kloseb9621712010-04-24 17:59:49 +00005949 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005950/* end confdefs.h. */
5951#include <stdlib.h>
5952#include <stdarg.h>
5953#include <string.h>
5954#include <float.h>
5955
5956int
5957main ()
5958{
5959
5960 ;
5961 return 0;
5962}
5963_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005964if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005965 ac_cv_header_stdc=yes
5966else
Matthias Kloseb9621712010-04-24 17:59:49 +00005967 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005968fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005969rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5970
5971if test $ac_cv_header_stdc = yes; then
5972 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00005973 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005974/* end confdefs.h. */
5975#include <string.h>
5976
5977_ACEOF
5978if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005979 $EGREP "memchr" >/dev/null 2>&1; then :
5980
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005981else
5982 ac_cv_header_stdc=no
5983fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005984rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005985
5986fi
5987
5988if test $ac_cv_header_stdc = yes; then
5989 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00005990 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005991/* end confdefs.h. */
5992#include <stdlib.h>
5993
5994_ACEOF
5995if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005996 $EGREP "free" >/dev/null 2>&1; then :
5997
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005998else
5999 ac_cv_header_stdc=no
6000fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006001rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006002
6003fi
6004
6005if test $ac_cv_header_stdc = yes; then
6006 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00006007 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006008 :
6009else
Matthias Kloseb9621712010-04-24 17:59:49 +00006010 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006011/* end confdefs.h. */
6012#include <ctype.h>
6013#include <stdlib.h>
6014#if ((' ' & 0x0FF) == 0x020)
6015# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6016# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6017#else
6018# define ISLOWER(c) \
6019 (('a' <= (c) && (c) <= 'i') \
6020 || ('j' <= (c) && (c) <= 'r') \
6021 || ('s' <= (c) && (c) <= 'z'))
6022# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6023#endif
6024
6025#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6026int
6027main ()
6028{
6029 int i;
6030 for (i = 0; i < 256; i++)
6031 if (XOR (islower (i), ISLOWER (i))
6032 || toupper (i) != TOUPPER (i))
6033 return 2;
6034 return 0;
6035}
6036_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006037if ac_fn_c_try_run "$LINENO"; then :
6038
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006039else
Matthias Kloseb9621712010-04-24 17:59:49 +00006040 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006041fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006042rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6043 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006044fi
6045
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006046fi
6047fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006048{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6049$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006050if test $ac_cv_header_stdc = yes; then
6051
Matthias Kloseb9621712010-04-24 17:59:49 +00006052$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006053
6054fi
6055
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006056for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
6057fcntl.h grp.h \
Christian Heimesbbe741d2008-03-28 10:53:29 +00006058ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Thomas Wouters89f507f2006-12-13 04:49:30 +00006059shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00006060unistd.h utime.h \
Christian Heimes4fbc72b2008-03-22 00:47:35 +00006061sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
6062sys/lock.h sys/mkdev.h sys/modem.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006063sys/param.h sys/poll.h sys/select.h sys/socket.h sys/statvfs.h sys/stat.h \
Benjamin Petersonde9c8692008-07-01 18:23:09 +00006064sys/termio.h sys/time.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006065sys/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 +00006066sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Ronald Oussoren755740f2010-02-07 19:56:39 +00006067bluetooth/bluetooth.h linux/tipc.h spawn.h util.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006068do :
6069 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6070ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Benjamin Petersond7f73e92010-09-05 00:09:07 +00006071eval as_val=\$$as_ac_Header
6072 if test "x$as_val" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006073 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006074#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006075_ACEOF
6076
6077fi
6078
Guido van Rossum627b2d71993-12-24 10:39:16 +00006079done
6080
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006081ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006082for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00006083 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6084{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
6085$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Benjamin Petersond7f73e92010-09-05 00:09:07 +00006086if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006087 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006088else
Matthias Kloseb9621712010-04-24 17:59:49 +00006089 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006090/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006091#include <sys/types.h>
6092#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00006093
Martin v. Löwis11437992002-04-12 09:54:03 +00006094int
6095main ()
6096{
6097if ((DIR *) 0)
6098return 0;
6099 ;
6100 return 0;
6101}
6102_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006103if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006104 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00006105else
Matthias Kloseb9621712010-04-24 17:59:49 +00006106 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006107fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006108rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006109fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006110eval ac_res=\$$as_ac_Header
6111 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6112$as_echo "$ac_res" >&6; }
Benjamin Petersond7f73e92010-09-05 00:09:07 +00006113eval as_val=\$$as_ac_Header
6114 if test "x$as_val" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006115 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006116#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006117_ACEOF
6118
6119ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00006120fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006121
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006122done
6123# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6124if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006125 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6126$as_echo_n "checking for library containing opendir... " >&6; }
6127if test "${ac_cv_search_opendir+set}" = set; then :
6128 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006129else
Martin v. Löwis11437992002-04-12 09:54:03 +00006130 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006131cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006132/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006133
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006134/* Override any GCC internal prototype to avoid an error.
6135 Use char because int might match the return type of a GCC
6136 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006137#ifdef __cplusplus
6138extern "C"
6139#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006140char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006141int
6142main ()
6143{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006144return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006145 ;
6146 return 0;
6147}
6148_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006149for ac_lib in '' dir; do
6150 if test -z "$ac_lib"; then
6151 ac_res="none required"
6152 else
6153 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006154 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006155 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006156 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006157 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006158fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006159rm -f core conftest.err conftest.$ac_objext \
6160 conftest$ac_exeext
6161 if test "${ac_cv_search_opendir+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006162 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006163fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006164done
Matthias Kloseb9621712010-04-24 17:59:49 +00006165if test "${ac_cv_search_opendir+set}" = set; then :
6166
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006167else
6168 ac_cv_search_opendir=no
6169fi
6170rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006171LIBS=$ac_func_search_save_LIBS
6172fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006173{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6174$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006175ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006176if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006177 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00006178
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006179fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006180
Michael W. Hudson54241132001-12-07 15:38:26 +00006181else
Matthias Kloseb9621712010-04-24 17:59:49 +00006182 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6183$as_echo_n "checking for library containing opendir... " >&6; }
6184if test "${ac_cv_search_opendir+set}" = set; then :
6185 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006186else
6187 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006188cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006189/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006190
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006191/* Override any GCC internal prototype to avoid an error.
6192 Use char because int might match the return type of a GCC
6193 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006194#ifdef __cplusplus
6195extern "C"
6196#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006197char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006198int
6199main ()
6200{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006201return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006202 ;
6203 return 0;
6204}
6205_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006206for ac_lib in '' x; do
6207 if test -z "$ac_lib"; then
6208 ac_res="none required"
6209 else
6210 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006211 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006212 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006213 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006214 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006215fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006216rm -f core conftest.err conftest.$ac_objext \
6217 conftest$ac_exeext
6218 if test "${ac_cv_search_opendir+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006219 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006220fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006221done
Matthias Kloseb9621712010-04-24 17:59:49 +00006222if test "${ac_cv_search_opendir+set}" = set; then :
6223
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006224else
6225 ac_cv_search_opendir=no
6226fi
6227rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006228LIBS=$ac_func_search_save_LIBS
6229fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006230{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6231$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006232ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006233if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006234 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006235
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006236fi
6237
6238fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006239
Matthias Kloseb9621712010-04-24 17:59:49 +00006240{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
6241$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
6242if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then :
6243 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006244else
Matthias Kloseb9621712010-04-24 17:59:49 +00006245 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006246/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006247#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006248int
6249main ()
6250{
6251return makedev(0, 0);
6252 ;
6253 return 0;
6254}
6255_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006256if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006257 ac_cv_header_sys_types_h_makedev=yes
6258else
Matthias Kloseb9621712010-04-24 17:59:49 +00006259 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006260fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006261rm -f core conftest.err conftest.$ac_objext \
6262 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006263
6264fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006265{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
6266$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006267
6268if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006269ac_fn_c_check_header_mongrel "$LINENO" "sys/mkdev.h" "ac_cv_header_sys_mkdev_h" "$ac_includes_default"
6270if test "x$ac_cv_header_sys_mkdev_h" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006271
Matthias Kloseb9621712010-04-24 17:59:49 +00006272$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006273
6274fi
6275
6276
6277
6278 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006279 ac_fn_c_check_header_mongrel "$LINENO" "sys/sysmacros.h" "ac_cv_header_sys_sysmacros_h" "$ac_includes_default"
6280if test "x$ac_cv_header_sys_sysmacros_h" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006281
Matthias Kloseb9621712010-04-24 17:59:49 +00006282$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006283
6284fi
6285
6286
6287 fi
6288fi
6289
Michael W. Hudson54241132001-12-07 15:38:26 +00006290
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006291# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006292for ac_header in term.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006293do :
6294 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006295#ifdef HAVE_CURSES_H
6296#include <curses.h>
6297#endif
6298
Matthias Kloseb9621712010-04-24 17:59:49 +00006299"
6300if test "x$ac_cv_header_term_h" = x""yes; then :
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006301 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006302#define HAVE_TERM_H 1
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006303_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006304
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006305fi
6306
6307done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006308
6309
Martin v. Löwis11017b12006-01-14 18:12:57 +00006310# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00006311for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006312do :
6313 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 +00006314#ifdef HAVE_ASM_TYPES_H
6315#include <asm/types.h>
6316#endif
6317#ifdef HAVE_SYS_SOCKET_H
6318#include <sys/socket.h>
6319#endif
6320
Matthias Kloseb9621712010-04-24 17:59:49 +00006321"
6322if test "x$ac_cv_header_linux_netlink_h" = x""yes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00006323 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006324#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006325_ACEOF
6326
6327fi
6328
6329done
6330
6331
Guido van Rossum627b2d71993-12-24 10:39:16 +00006332# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006333was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006334{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
6335$as_echo_n "checking for clock_t in time.h... " >&6; }
6336cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006337/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006338#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006339
6340_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006341if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006342 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00006343 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006344else
Martin v. Löwis11437992002-04-12 09:54:03 +00006345
6346
Matthias Kloseb9621712010-04-24 17:59:49 +00006347$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00006348
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006349
Guido van Rossum627b2d71993-12-24 10:39:16 +00006350fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006351rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006352
Matthias Kloseb9621712010-04-24 17:59:49 +00006353{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
6354$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006355
Neal Norwitz11690112002-07-30 01:08:28 +00006356# Check whether using makedev requires defining _OSF_SOURCE
Matthias Kloseb9621712010-04-24 17:59:49 +00006357{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
6358$as_echo_n "checking for makedev... " >&6; }
6359cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006360/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00006361
Jesus Cea740f53a2010-04-28 11:35:30 +00006362#if defined(MAJOR_IN_MKDEV)
6363#include <sys/mkdev.h>
6364#elif defined(MAJOR_IN_SYSMACROS)
6365#include <sys/sysmacros.h>
6366#else
6367#include <sys/types.h>
6368#endif
6369
Neal Norwitz11690112002-07-30 01:08:28 +00006370int
6371main ()
6372{
Jesus Cea740f53a2010-04-28 11:35:30 +00006373
6374 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00006375 ;
6376 return 0;
6377}
Matthias Kloseb159a552010-04-25 21:00:44 +00006378
Neal Norwitz11690112002-07-30 01:08:28 +00006379_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006380if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006381 ac_cv_has_makedev=yes
6382else
Matthias Kloseb9621712010-04-24 17:59:49 +00006383 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006384fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006385rm -f core conftest.err conftest.$ac_objext \
6386 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006387if test "$ac_cv_has_makedev" = "no"; then
6388 # we didn't link, try if _OSF_SOURCE will allow us to link
Matthias Kloseb9621712010-04-24 17:59:49 +00006389 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006390/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006391
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006392#define _OSF_SOURCE 1
6393#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006394
Neal Norwitz11690112002-07-30 01:08:28 +00006395int
6396main ()
6397{
6398 makedev(0, 0)
6399 ;
6400 return 0;
6401}
6402_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006403if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006404 ac_cv_has_makedev=yes
6405else
Matthias Kloseb9621712010-04-24 17:59:49 +00006406 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006407fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006408rm -f core conftest.err conftest.$ac_objext \
6409 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006410 if test "$ac_cv_has_makedev" = "yes"; then
6411
Matthias Kloseb9621712010-04-24 17:59:49 +00006412$as_echo "#define _OSF_SOURCE 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006413
6414 fi
6415fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006416{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
6417$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006418if test "$ac_cv_has_makedev" = "yes"; then
6419
Matthias Kloseb9621712010-04-24 17:59:49 +00006420$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006421
6422fi
6423
Martin v. Löwis399a6892002-10-04 10:22:02 +00006424# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6425# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6426# defined, but the compiler does not support pragma redefine_extname,
6427# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6428# structures (such as rlimit64) without declaring them. As a
6429# work-around, disable LFS on such configurations
6430
6431use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00006432{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
6433$as_echo_n "checking Solaris LFS bug... " >&6; }
6434cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006435/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006436
6437#define _LARGEFILE_SOURCE 1
6438#define _FILE_OFFSET_BITS 64
6439#include <sys/resource.h>
6440
Martin v. Löwis399a6892002-10-04 10:22:02 +00006441int
6442main ()
6443{
6444struct rlimit foo;
6445 ;
6446 return 0;
6447}
6448_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006449if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00006450 sol_lfs_bug=no
6451else
Matthias Kloseb9621712010-04-24 17:59:49 +00006452 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006453fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006454rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006455{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
6456$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006457if test "$sol_lfs_bug" = "yes"; then
6458 use_lfs=no
6459fi
6460
6461if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006462# Two defines needed to enable largefile support on various platforms
6463# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00006464
Matthias Kloseb9621712010-04-24 17:59:49 +00006465$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006466
6467
Matthias Kloseb9621712010-04-24 17:59:49 +00006468$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00006469
Martin v. Löwis399a6892002-10-04 10:22:02 +00006470fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006471
Guido van Rossum84e7b241996-08-19 21:59:00 +00006472# Add some code to confdefs.h so that the test for off_t works on SCO
6473cat >> confdefs.h <<\EOF
6474#if defined(SCO_DS)
6475#undef _OFF_T
6476#endif
6477EOF
6478
Guido van Rossumef2255b2000-03-10 22:30:29 +00006479# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00006480ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
6481if test "x$ac_cv_type_mode_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006482
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006483else
Martin v. Löwis11437992002-04-12 09:54:03 +00006484
6485cat >>confdefs.h <<_ACEOF
6486#define mode_t int
6487_ACEOF
6488
6489fi
6490
Matthias Kloseb9621712010-04-24 17:59:49 +00006491ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
6492if test "x$ac_cv_type_off_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006493
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006494else
Martin v. Löwis11437992002-04-12 09:54:03 +00006495
6496cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006497#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006498_ACEOF
6499
6500fi
6501
Matthias Kloseb9621712010-04-24 17:59:49 +00006502ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
6503if test "x$ac_cv_type_pid_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006504
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006505else
Martin v. Löwis11437992002-04-12 09:54:03 +00006506
6507cat >>confdefs.h <<_ACEOF
6508#define pid_t int
6509_ACEOF
6510
6511fi
6512
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006513
Martin v. Löwis11437992002-04-12 09:54:03 +00006514cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00006515#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00006516_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006517
Matthias Kloseb9621712010-04-24 17:59:49 +00006518ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
6519if test "x$ac_cv_type_size_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006520
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006521else
Martin v. Löwis11437992002-04-12 09:54:03 +00006522
6523cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006524#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00006525_ACEOF
6526
6527fi
6528
Matthias Kloseb9621712010-04-24 17:59:49 +00006529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
6530$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
6531if test "${ac_cv_type_uid_t+set}" = set; then :
6532 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006533else
Matthias Kloseb9621712010-04-24 17:59:49 +00006534 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006535/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006536#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006537
6538_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006539if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006540 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006541 ac_cv_type_uid_t=yes
6542else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006543 ac_cv_type_uid_t=no
6544fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006545rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006546
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006547fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006548{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
6549$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00006550if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006551
Matthias Kloseb9621712010-04-24 17:59:49 +00006552$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006553
6554
Matthias Kloseb9621712010-04-24 17:59:49 +00006555$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006556
6557fi
6558
Matthias Kloseb9621712010-04-24 17:59:49 +00006559ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
6560case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006561 no|yes) ;; #(
6562 *)
6563
Matthias Kloseb9621712010-04-24 17:59:49 +00006564$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006565
6566
6567cat >>confdefs.h <<_ACEOF
6568#define uint32_t $ac_cv_c_uint32_t
6569_ACEOF
6570;;
6571 esac
6572
Matthias Kloseb9621712010-04-24 17:59:49 +00006573ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
6574case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006575 no|yes) ;; #(
6576 *)
6577
Matthias Kloseb9621712010-04-24 17:59:49 +00006578$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006579
6580
6581cat >>confdefs.h <<_ACEOF
6582#define uint64_t $ac_cv_c_uint64_t
6583_ACEOF
6584;;
6585 esac
6586
Matthias Kloseb9621712010-04-24 17:59:49 +00006587ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
6588case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006589 no|yes) ;; #(
6590 *)
6591
6592cat >>confdefs.h <<_ACEOF
6593#define int32_t $ac_cv_c_int32_t
6594_ACEOF
6595;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00006596esac
6597
Matthias Kloseb9621712010-04-24 17:59:49 +00006598ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
6599case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006600 no|yes) ;; #(
6601 *)
6602
6603cat >>confdefs.h <<_ACEOF
6604#define int64_t $ac_cv_c_int64_t
6605_ACEOF
6606;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006607esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00006608
Matthias Kloseb9621712010-04-24 17:59:49 +00006609ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
6610if test "x$ac_cv_type_ssize_t" = x""yes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006611
Matthias Kloseb9621712010-04-24 17:59:49 +00006612$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00006613
6614fi
6615
Jack Jansendd19cf82001-12-06 22:36:17 +00006616
Michael W. Hudson54241132001-12-07 15:38:26 +00006617# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00006618# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006619# The cast to long int works around a bug in the HP C Compiler
6620# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6621# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6622# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
6624$as_echo_n "checking size of int... " >&6; }
6625if test "${ac_cv_sizeof_int+set}" = set; then :
6626 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006627else
Matthias Kloseb9621712010-04-24 17:59:49 +00006628 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 +00006629
Martin v. Löwis11437992002-04-12 09:54:03 +00006630else
Matthias Kloseb9621712010-04-24 17:59:49 +00006631 if test "$ac_cv_type_int" = yes; then
6632 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6633$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Petersond7f73e92010-09-05 00:09:07 +00006634{ as_fn_set_status 77
6635as_fn_error "cannot compute sizeof (int)
6636See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006637 else
6638 ac_cv_sizeof_int=0
6639 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006640fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006641
Martin v. Löwis11437992002-04-12 09:54:03 +00006642fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006643{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
6644$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006645
6646
6647
Martin v. Löwis11437992002-04-12 09:54:03 +00006648cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006649#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00006650_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006651
6652
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006653# The cast to long int works around a bug in the HP C Compiler
6654# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6655# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6656# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006657{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
6658$as_echo_n "checking size of long... " >&6; }
6659if test "${ac_cv_sizeof_long+set}" = set; then :
6660 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006661else
Matthias Kloseb9621712010-04-24 17:59:49 +00006662 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 +00006663
Martin v. Löwis11437992002-04-12 09:54:03 +00006664else
Matthias Kloseb9621712010-04-24 17:59:49 +00006665 if test "$ac_cv_type_long" = yes; then
6666 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6667$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Petersond7f73e92010-09-05 00:09:07 +00006668{ as_fn_set_status 77
6669as_fn_error "cannot compute sizeof (long)
6670See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006671 else
6672 ac_cv_sizeof_long=0
6673 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006674fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006675
Martin v. Löwis11437992002-04-12 09:54:03 +00006676fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006677{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
6678$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006679
6680
6681
Martin v. Löwis11437992002-04-12 09:54:03 +00006682cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006683#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006684_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006685
6686
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006687# The cast to long int works around a bug in the HP C Compiler
6688# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6689# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6690# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
6692$as_echo_n "checking size of void *... " >&6; }
6693if test "${ac_cv_sizeof_void_p+set}" = set; then :
6694 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006695else
Matthias Kloseb9621712010-04-24 17:59:49 +00006696 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 +00006697
Martin v. Löwis11437992002-04-12 09:54:03 +00006698else
Matthias Kloseb9621712010-04-24 17:59:49 +00006699 if test "$ac_cv_type_void_p" = yes; then
6700 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6701$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Petersond7f73e92010-09-05 00:09:07 +00006702{ as_fn_set_status 77
6703as_fn_error "cannot compute sizeof (void *)
6704See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006705 else
6706 ac_cv_sizeof_void_p=0
6707 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006708fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006709
Martin v. Löwis11437992002-04-12 09:54:03 +00006710fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006711{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
6712$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006713
6714
6715
Martin v. Löwis11437992002-04-12 09:54:03 +00006716cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006717#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00006718_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006719
6720
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006721# The cast to long int works around a bug in the HP C Compiler
6722# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6723# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6724# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
6726$as_echo_n "checking size of short... " >&6; }
6727if test "${ac_cv_sizeof_short+set}" = set; then :
6728 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006729else
Matthias Kloseb9621712010-04-24 17:59:49 +00006730 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 +00006731
Martin v. Löwis11437992002-04-12 09:54:03 +00006732else
Matthias Kloseb9621712010-04-24 17:59:49 +00006733 if test "$ac_cv_type_short" = yes; then
6734 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6735$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Petersond7f73e92010-09-05 00:09:07 +00006736{ as_fn_set_status 77
6737as_fn_error "cannot compute sizeof (short)
6738See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006739 else
6740 ac_cv_sizeof_short=0
6741 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006742fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006743
Martin v. Löwis11437992002-04-12 09:54:03 +00006744fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006745{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
6746$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006747
6748
6749
Martin v. Löwis11437992002-04-12 09:54:03 +00006750cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006751#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00006752_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006753
6754
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006755# The cast to long int works around a bug in the HP C Compiler
6756# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6757# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6758# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006759{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
6760$as_echo_n "checking size of float... " >&6; }
6761if test "${ac_cv_sizeof_float+set}" = set; then :
6762 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006763else
Matthias Kloseb9621712010-04-24 17:59:49 +00006764 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 +00006765
Martin v. Löwis11437992002-04-12 09:54:03 +00006766else
Matthias Kloseb9621712010-04-24 17:59:49 +00006767 if test "$ac_cv_type_float" = yes; then
6768 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6769$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Petersond7f73e92010-09-05 00:09:07 +00006770{ as_fn_set_status 77
6771as_fn_error "cannot compute sizeof (float)
6772See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006773 else
6774 ac_cv_sizeof_float=0
6775 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006776fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006777
Martin v. Löwis11437992002-04-12 09:54:03 +00006778fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006779{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
6780$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006781
6782
6783
Martin v. Löwis11437992002-04-12 09:54:03 +00006784cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006785#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00006786_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006787
6788
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006789# The cast to long int works around a bug in the HP C Compiler
6790# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6791# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6792# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006793{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
6794$as_echo_n "checking size of double... " >&6; }
6795if test "${ac_cv_sizeof_double+set}" = set; then :
6796 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006797else
Matthias Kloseb9621712010-04-24 17:59:49 +00006798 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 +00006799
Martin v. Löwis11437992002-04-12 09:54:03 +00006800else
Matthias Kloseb9621712010-04-24 17:59:49 +00006801 if test "$ac_cv_type_double" = yes; then
6802 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6803$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Petersond7f73e92010-09-05 00:09:07 +00006804{ as_fn_set_status 77
6805as_fn_error "cannot compute sizeof (double)
6806See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006807 else
6808 ac_cv_sizeof_double=0
6809 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006810fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006811
Martin v. Löwis11437992002-04-12 09:54:03 +00006812fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006813{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
6814$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006815
6816
6817
Martin v. Löwis11437992002-04-12 09:54:03 +00006818cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006819#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00006820_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006821
6822
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006823# The cast to long int works around a bug in the HP C Compiler
6824# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6825# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6826# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
6828$as_echo_n "checking size of fpos_t... " >&6; }
6829if test "${ac_cv_sizeof_fpos_t+set}" = set; then :
6830 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006831else
Matthias Kloseb9621712010-04-24 17:59:49 +00006832 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 +00006833
Martin v. Löwis11437992002-04-12 09:54:03 +00006834else
Matthias Kloseb9621712010-04-24 17:59:49 +00006835 if test "$ac_cv_type_fpos_t" = yes; then
6836 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6837$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Petersond7f73e92010-09-05 00:09:07 +00006838{ as_fn_set_status 77
6839as_fn_error "cannot compute sizeof (fpos_t)
6840See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006841 else
6842 ac_cv_sizeof_fpos_t=0
6843 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006844fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006845
Martin v. Löwis11437992002-04-12 09:54:03 +00006846fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006847{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
6848$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006849
6850
6851
Martin v. Löwis11437992002-04-12 09:54:03 +00006852cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006853#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00006854_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006855
Michael W. Hudson54241132001-12-07 15:38:26 +00006856
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006857# The cast to long int works around a bug in the HP C Compiler
6858# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6859# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6860# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
6862$as_echo_n "checking size of size_t... " >&6; }
6863if test "${ac_cv_sizeof_size_t+set}" = set; then :
6864 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00006865else
Matthias Kloseb9621712010-04-24 17:59:49 +00006866 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 +00006867
Martin v. Löwis18e16552006-02-15 17:27:45 +00006868else
Matthias Kloseb9621712010-04-24 17:59:49 +00006869 if test "$ac_cv_type_size_t" = yes; then
6870 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6871$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Petersond7f73e92010-09-05 00:09:07 +00006872{ as_fn_set_status 77
6873as_fn_error "cannot compute sizeof (size_t)
6874See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006875 else
6876 ac_cv_sizeof_size_t=0
6877 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00006878fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006879
Martin v. Löwis18e16552006-02-15 17:27:45 +00006880fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006881{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
6882$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006883
6884
6885
Martin v. Löwis18e16552006-02-15 17:27:45 +00006886cat >>confdefs.h <<_ACEOF
6887#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
6888_ACEOF
6889
6890
Christian Heimes400adb02008-02-01 08:12:03 +00006891# The cast to long int works around a bug in the HP C Compiler
6892# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6893# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6894# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006895{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
6896$as_echo_n "checking size of pid_t... " >&6; }
6897if test "${ac_cv_sizeof_pid_t+set}" = set; then :
6898 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00006899else
Matthias Kloseb9621712010-04-24 17:59:49 +00006900 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 +00006901
Christian Heimes400adb02008-02-01 08:12:03 +00006902else
Matthias Kloseb9621712010-04-24 17:59:49 +00006903 if test "$ac_cv_type_pid_t" = yes; then
6904 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6905$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Petersond7f73e92010-09-05 00:09:07 +00006906{ as_fn_set_status 77
6907as_fn_error "cannot compute sizeof (pid_t)
6908See \`config.log' for more details." "$LINENO" 5; }; }
Christian Heimes400adb02008-02-01 08:12:03 +00006909 else
6910 ac_cv_sizeof_pid_t=0
6911 fi
6912fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006913
Christian Heimes400adb02008-02-01 08:12:03 +00006914fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006915{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
6916$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00006917
6918
6919
6920cat >>confdefs.h <<_ACEOF
6921#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
6922_ACEOF
6923
6924
Michael W. Hudson54241132001-12-07 15:38:26 +00006925
Matthias Kloseb9621712010-04-24 17:59:49 +00006926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
6927$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006928have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006929cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006930/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006931
Martin v. Löwis11437992002-04-12 09:54:03 +00006932int
6933main ()
6934{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006935long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00006936 ;
6937 return 0;
6938}
6939_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006940if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006941
6942
Matthias Kloseb9621712010-04-24 17:59:49 +00006943$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006944
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006945 have_long_long=yes
6946
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006947fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006948rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006949{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
6950$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00006951if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006952# The cast to long int works around a bug in the HP C Compiler
6953# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6954# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6955# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006956{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
6957$as_echo_n "checking size of long long... " >&6; }
6958if test "${ac_cv_sizeof_long_long+set}" = set; then :
6959 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006960else
Matthias Kloseb9621712010-04-24 17:59:49 +00006961 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 +00006962
Martin v. Löwis11437992002-04-12 09:54:03 +00006963else
Matthias Kloseb9621712010-04-24 17:59:49 +00006964 if test "$ac_cv_type_long_long" = yes; then
6965 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6966$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Petersond7f73e92010-09-05 00:09:07 +00006967{ as_fn_set_status 77
6968as_fn_error "cannot compute sizeof (long long)
6969See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006970 else
6971 ac_cv_sizeof_long_long=0
6972 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006973fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006974
Martin v. Löwis11437992002-04-12 09:54:03 +00006975fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006976{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
6977$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006978
6979
6980
Martin v. Löwis11437992002-04-12 09:54:03 +00006981cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006982#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006983_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006984
Michael W. Hudson54241132001-12-07 15:38:26 +00006985
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006986fi
6987
Matthias Kloseb9621712010-04-24 17:59:49 +00006988{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
6989$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006990have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006991cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006992/* end confdefs.h. */
6993
6994int
6995main ()
6996{
6997long double x; x = (long double)0;
6998 ;
6999 return 0;
7000}
7001_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007002if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007003
7004
Matthias Kloseb9621712010-04-24 17:59:49 +00007005$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007006
7007 have_long_double=yes
7008
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007009fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007010rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007011{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
7012$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007013if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007014# The cast to long int works around a bug in the HP C Compiler
7015# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7016# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7017# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007018{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
7019$as_echo_n "checking size of long double... " >&6; }
7020if test "${ac_cv_sizeof_long_double+set}" = set; then :
7021 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007022else
Matthias Kloseb9621712010-04-24 17:59:49 +00007023 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 +00007024
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007025else
Matthias Kloseb9621712010-04-24 17:59:49 +00007026 if test "$ac_cv_type_long_double" = yes; then
7027 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7028$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Petersond7f73e92010-09-05 00:09:07 +00007029{ as_fn_set_status 77
7030as_fn_error "cannot compute sizeof (long double)
7031See \`config.log' for more details." "$LINENO" 5; }; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007032 else
7033 ac_cv_sizeof_long_double=0
7034 fi
7035fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007036
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007037fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007038{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
7039$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007040
7041
7042
7043cat >>confdefs.h <<_ACEOF
7044#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
7045_ACEOF
7046
7047
7048fi
7049
7050
Matthias Kloseb9621712010-04-24 17:59:49 +00007051{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
7052$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007053have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007054cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00007055/* end confdefs.h. */
7056
7057int
7058main ()
7059{
7060_Bool x; x = (_Bool)0;
7061 ;
7062 return 0;
7063}
7064_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007065if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00007066
7067
Matthias Kloseb9621712010-04-24 17:59:49 +00007068$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00007069
7070 have_c99_bool=yes
7071
Thomas Woutersb2137042007-02-01 18:02:27 +00007072fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007073rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007074{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
7075$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007076if test "$have_c99_bool" = yes ; then
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 _Bool" >&5
7082$as_echo_n "checking size of _Bool... " >&6; }
7083if test "${ac_cv_sizeof__Bool+set}" = set; then :
7084 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00007085else
Matthias Kloseb9621712010-04-24 17:59:49 +00007086 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 +00007087
Thomas Woutersb2137042007-02-01 18:02:27 +00007088else
Matthias Kloseb9621712010-04-24 17:59:49 +00007089 if test "$ac_cv_type__Bool" = 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;}
Benjamin Petersond7f73e92010-09-05 00:09:07 +00007092{ as_fn_set_status 77
7093as_fn_error "cannot compute sizeof (_Bool)
7094See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007095 else
7096 ac_cv_sizeof__Bool=0
7097 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00007098fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007099
Thomas Woutersb2137042007-02-01 18:02:27 +00007100fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007101{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
7102$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007103
7104
7105
Thomas Woutersb2137042007-02-01 18:02:27 +00007106cat >>confdefs.h <<_ACEOF
7107#define SIZEOF__BOOL $ac_cv_sizeof__Bool
7108_ACEOF
7109
7110
7111fi
7112
Matthias Kloseb9621712010-04-24 17:59:49 +00007113ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00007114 #include <stdint.h>
7115 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00007116"
7117if test "x$ac_cv_type_uintptr_t" = x""yes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00007118
7119cat >>confdefs.h <<_ACEOF
7120#define HAVE_UINTPTR_T 1
7121_ACEOF
7122
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007123# The cast to long int works around a bug in the HP C Compiler
7124# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7125# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7126# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
7128$as_echo_n "checking size of uintptr_t... " >&6; }
7129if test "${ac_cv_sizeof_uintptr_t+set}" = set; then :
7130 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007131else
Matthias Kloseb9621712010-04-24 17:59:49 +00007132 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 +00007133
Martin v. Löwis11437992002-04-12 09:54:03 +00007134else
Matthias Kloseb9621712010-04-24 17:59:49 +00007135 if test "$ac_cv_type_uintptr_t" = yes; then
7136 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7137$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Petersond7f73e92010-09-05 00:09:07 +00007138{ as_fn_set_status 77
7139as_fn_error "cannot compute sizeof (uintptr_t)
7140See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007141 else
7142 ac_cv_sizeof_uintptr_t=0
7143 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007144fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007145
Martin v. Löwis11437992002-04-12 09:54:03 +00007146fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007147{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
7148$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007149
7150
7151
Martin v. Löwis11437992002-04-12 09:54:03 +00007152cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007153#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007154_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007155
Michael W. Hudson54241132001-12-07 15:38:26 +00007156
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007157fi
7158
Thomas Wouters89f507f2006-12-13 04:49:30 +00007159
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007160# The cast to long int works around a bug in the HP C Compiler
7161# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7162# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7163# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
7165$as_echo_n "checking size of off_t... " >&6; }
7166if test "${ac_cv_sizeof_off_t+set}" = set; then :
7167 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007168else
Matthias Kloseb9621712010-04-24 17:59:49 +00007169 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007170#ifdef HAVE_SYS_TYPES_H
7171#include <sys/types.h>
7172#endif
7173
Matthias Kloseb9621712010-04-24 17:59:49 +00007174"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007175
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007176else
Matthias Kloseb9621712010-04-24 17:59:49 +00007177 if test "$ac_cv_type_off_t" = yes; then
7178 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7179$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Petersond7f73e92010-09-05 00:09:07 +00007180{ as_fn_set_status 77
7181as_fn_error "cannot compute sizeof (off_t)
7182See \`config.log' for more details." "$LINENO" 5; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007183 else
7184 ac_cv_sizeof_off_t=0
7185 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007186fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007187
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007188fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007189{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
7190$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007191
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007192
7193
Martin v. Löwis11437992002-04-12 09:54:03 +00007194cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007195#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007196_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007197
Michael W. Hudson54241132001-12-07 15:38:26 +00007198
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007199
Matthias Kloseb9621712010-04-24 17:59:49 +00007200{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
7201$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007202if test "$have_long_long" = yes
7203then
7204if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007205 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007206
Matthias Kloseb9621712010-04-24 17:59:49 +00007207$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007208
Matthias Kloseb9621712010-04-24 17:59:49 +00007209 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7210$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007211else
Matthias Kloseb9621712010-04-24 17:59:49 +00007212 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7213$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007214fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00007215else
Matthias Kloseb9621712010-04-24 17:59:49 +00007216 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7217$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007218fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007219
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007220# The cast to long int works around a bug in the HP C Compiler
7221# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7222# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7223# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007224{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
7225$as_echo_n "checking size of time_t... " >&6; }
7226if test "${ac_cv_sizeof_time_t+set}" = set; then :
7227 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007228else
Matthias Kloseb9621712010-04-24 17:59:49 +00007229 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007230#ifdef HAVE_SYS_TYPES_H
7231#include <sys/types.h>
7232#endif
7233#ifdef HAVE_TIME_H
7234#include <time.h>
7235#endif
7236
Matthias Kloseb9621712010-04-24 17:59:49 +00007237"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007238
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007239else
Matthias Kloseb9621712010-04-24 17:59:49 +00007240 if test "$ac_cv_type_time_t" = yes; then
7241 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7242$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Petersond7f73e92010-09-05 00:09:07 +00007243{ as_fn_set_status 77
7244as_fn_error "cannot compute sizeof (time_t)
7245See \`config.log' for more details." "$LINENO" 5; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007246 else
7247 ac_cv_sizeof_time_t=0
7248 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007249fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007250
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007251fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007252{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
7253$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007254
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007255
7256
Martin v. Löwis11437992002-04-12 09:54:03 +00007257cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007258#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007259_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007260
Michael W. Hudson54241132001-12-07 15:38:26 +00007261
7262
Trent Mick635f6fb2000-08-23 21:33:05 +00007263# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007264ac_save_cc="$CC"
7265if test "$ac_cv_kpthread" = "yes"
7266then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00007267elif test "$ac_cv_kthread" = "yes"
7268then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00007269elif test "$ac_cv_pthread" = "yes"
7270then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007271fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007272
Matthias Kloseb9621712010-04-24 17:59:49 +00007273{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
7274$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007275have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007276cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007277/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007278
7279 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007280int
7281main ()
7282{
Guido van Rossum12580492000-09-24 16:47:19 +00007283pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007284 ;
7285 return 0;
7286}
Matthias Kloseb159a552010-04-25 21:00:44 +00007287
Martin v. Löwis11437992002-04-12 09:54:03 +00007288_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007289if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00007290 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00007291fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007292rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007293{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
7294$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007295if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007296 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007297# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7298# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7299# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007300{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
7301$as_echo_n "checking size of pthread_t... " >&6; }
7302if test "${ac_cv_sizeof_pthread_t+set}" = set; then :
7303 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007304else
Matthias Kloseb9621712010-04-24 17:59:49 +00007305 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007306#ifdef HAVE_PTHREAD_H
7307#include <pthread.h>
7308#endif
7309
Matthias Kloseb9621712010-04-24 17:59:49 +00007310"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007311
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007312else
Matthias Kloseb9621712010-04-24 17:59:49 +00007313 if test "$ac_cv_type_pthread_t" = yes; then
7314 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7315$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Petersond7f73e92010-09-05 00:09:07 +00007316{ as_fn_set_status 77
7317as_fn_error "cannot compute sizeof (pthread_t)
7318See \`config.log' for more details." "$LINENO" 5; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007319 else
7320 ac_cv_sizeof_pthread_t=0
7321 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00007322fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007323
Trent Mick635f6fb2000-08-23 21:33:05 +00007324fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007325{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
7326$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007327
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007328
7329
Martin v. Löwis11437992002-04-12 09:54:03 +00007330cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007331#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007332_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007333
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007334
Trent Mick635f6fb2000-08-23 21:33:05 +00007335fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007336CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00007337
Michael W. Hudson54241132001-12-07 15:38:26 +00007338
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007339case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007340 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007341 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
7342 ;;
7343 Darwin/*)
7344 OTHER_LIBTOOL_OPT=""
7345 ;;
7346esac
7347
7348
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007349ARCH_RUN_32BIT=""
7350
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007351case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007352 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00007353 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
7354 if test "${enable_universalsdk}"; then
7355 :
7356 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007357 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007358 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00007359 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007360 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00007361 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00007362 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007363 if test ${gcc_version} '<' 4.0
7364 then
7365 LIBTOOL_CRUFT="-lcc_dynamic"
7366 else
7367 LIBTOOL_CRUFT=""
7368 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007369 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007370 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007371else
Matthias Kloseb9621712010-04-24 17:59:49 +00007372 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007373/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007374
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007375 #include <unistd.h>
7376 int main(int argc, char*argv[])
7377 {
7378 if (sizeof(long) == 4) {
7379 return 0;
7380 } else {
7381 return 1;
7382 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007383 }
7384
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007385_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007386if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007387 ac_osx_32bit=yes
7388else
Matthias Kloseb9621712010-04-24 17:59:49 +00007389 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007390fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007391rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7392 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007393fi
7394
7395
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007396 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007397 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007398 i386)
7399 MACOSX_DEFAULT_ARCH="i386"
7400 ;;
7401 ppc)
7402 MACOSX_DEFAULT_ARCH="ppc"
7403 ;;
7404 *)
Benjamin Petersond7f73e92010-09-05 00:09:07 +00007405 as_fn_error "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007406 ;;
7407 esac
7408 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007409 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007410 i386)
7411 MACOSX_DEFAULT_ARCH="x86_64"
7412 ;;
7413 ppc)
7414 MACOSX_DEFAULT_ARCH="ppc64"
7415 ;;
7416 *)
Benjamin Petersond7f73e92010-09-05 00:09:07 +00007417 as_fn_error "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007418 ;;
7419 esac
7420
7421 #ARCH_RUN_32BIT="true"
7422 fi
7423
7424 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00007425 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007426 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007427esac
7428
Matthias Kloseb9621712010-04-24 17:59:49 +00007429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
7430$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007431if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007432then
Skip Montanarodecc6a42003-01-01 20:07:49 +00007433 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00007434 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00007435 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007436
Matthias Kloseb9621712010-04-24 17:59:49 +00007437$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007438
Matthias Kloseb9621712010-04-24 17:59:49 +00007439 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7440$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00007441 if test $enable_shared = "yes"
7442 then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00007443 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 +00007444 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007445else
Matthias Kloseb9621712010-04-24 17:59:49 +00007446 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7447$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007448fi
7449
Matthias Kloseb9621712010-04-24 17:59:49 +00007450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
7451$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007452case $ac_sys_system/$ac_sys_release in
7453 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007454
Matthias Kloseb9621712010-04-24 17:59:49 +00007455$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007456
Matthias Kloseb9621712010-04-24 17:59:49 +00007457 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
7458$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007459 ;;
7460 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00007461 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7462$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007463 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007464esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007465
Guido van Rossum0a516c91994-09-12 10:58:40 +00007466# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00007467
Michael W. Hudson54241132001-12-07 15:38:26 +00007468
7469
7470
7471
Benjamin Peterson99f03762010-04-11 22:15:28 +00007472
Thomas Wouters477c8d52006-05-27 19:21:47 +00007473
Georg Brandlb1441c72009-01-03 22:33:39 +00007474
Thomas Wouters477c8d52006-05-27 19:21:47 +00007475cat >>confdefs.h <<_ACEOF
7476#define SHLIB_EXT "$SO"
7477_ACEOF
7478
Guido van Rossum0a516c91994-09-12 10:58:40 +00007479# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00007480# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007481# (Shared libraries in this instance are shared modules to be loaded into
7482# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00007483{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
7484$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007485if test -z "$LDSHARED"
7486then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007487 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007488 AIX*)
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00007489 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp -L\$(srcdir)"
Guido van Rossumce608b02001-09-28 15:59:38 +00007490 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007491 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00007492 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00007493 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00007494 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007495 if test "$GCC" = "yes" ; then
7496 LDSHARED='$(CC) -shared'
7497 LDCXXSHARED='$(CXX) -shared'
7498 else
7499 LDSHARED='$(CC) -G'
7500 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00007501 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007502 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007503 if test "$GCC" = "yes" ; then
7504 LDSHARED='$(CC) -shared'
7505 LDCXXSHARED='$(CXX) -shared'
7506 else
7507 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007508 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +00007509 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +00007510 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +00007511 LDSHARED='$(CC) $(LDFLAGS) -bundle'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007512 LDCXXSHARED='$(CXX) $(LDFLAGS) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00007513 if test "$enable_framework" ; then
7514 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007515 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7516 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007517 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007518 else
7519 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00007520 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00007521 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00007522 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007523 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Jack Jansene578a632001-08-15 01:27:14 +00007524 LDSHARED='$(CC) $(LDFLAGS) -bundle'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007525 LDCXXSHARED='$(CXX) $(LDFLAGS) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00007526 if test "$enable_framework" ; then
7527 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007528 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7529 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007530 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007531 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00007532 # No framework, use the Python app as bundle-loader
7533 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00007534 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007535 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007536 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007537 Darwin/*)
7538 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
7539 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00007540
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007541 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +00007542 then
Thomas Wouters477c8d52006-05-27 19:21:47 +00007543 if test "${enable_universalsdk}"; then
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007544 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007545 fi
Jack Jansen6b08a402004-06-03 12:41:45 +00007546 LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007547 LDCXXSHARED='$(CXX) $(LDFLAGS) -bundle -undefined dynamic_lookup'
Jack Jansen6b08a402004-06-03 12:41:45 +00007548 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00007549 else
7550 LDSHARED='$(CC) $(LDFLAGS) -bundle'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007551 LDCXXSHARED='$(CXX) $(LDFLAGS) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00007552 if test "$enable_framework" ; then
7553 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007554 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7555 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007556 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007557 else
7558 # No framework, use the Python app as bundle-loader
7559 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
7560 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007561 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007562 fi
7563 fi
7564 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007565 Linux*|GNU*|QNX*)
7566 LDSHARED='$(CC) -shared'
7567 LDCXXSHARED='$(CXX) -shared';;
7568 BSD/OS*/4*)
7569 LDSHARED="gcc -shared"
7570 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007571 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00007572 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00007573 then
Benjamin Petersonab0a7522010-03-14 15:18:25 +00007574 LDSHARED='$(CC) -shared ${LDFLAGS}'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007575 LDCXXSHARED='$(CXX) -shared ${LDFLAGS}'
Guido van Rossum0286ae82000-08-29 15:06:49 +00007576 else
7577 LDSHARED="ld -Bshareable ${LDFLAGS}"
7578 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007579 OpenBSD*)
7580 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7581 then
7582 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007583 LDCXXSHARED='$(CXX) -shared $(CCSHARED) ${LDFLAGS}'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007584 else
7585 case `uname -r` in
7586 [01].* | 2.[0-7] | 2.[0-7].*)
7587 LDSHARED="ld -Bshareable ${LDFLAGS}"
7588 ;;
7589 *)
7590 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007591 LDCXXSHARED='$(CXX) -shared $(CCSHARED) ${LDFLAGS}'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007592 ;;
7593 esac
7594 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007595 NetBSD*|DragonFly*)
7596 LDSHARED="cc -shared ${LDFLAGS}"
7597 LDCXXSHARED="c++ -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007598 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007599 if test "$GCC" = "yes" ; then
7600 LDSHARED='$(CC) -shared'
7601 LDCXXSHARED='$(CXX) -shared'
7602 else
7603 LDSHARED='$(CC) -G'
7604 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00007605 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007606 SCO_SV*)
7607 LDSHARED='$(CC) -Wl,-G,-Bexport'
7608 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
7609 CYGWIN*)
7610 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
7611 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007612 *) LDSHARED="ld";;
7613 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007614fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007615{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
7616$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00007617LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007618BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00007619# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007620# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007621{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
7622$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007623if test -z "$CCSHARED"
7624then
Guido van Rossum07397971997-04-29 21:49:50 +00007625 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00007626 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007627 then CCSHARED="-fPIC";
7628 elif test `uname -p` = sparc;
7629 then CCSHARED="-xcode=pic32";
7630 else CCSHARED="-Kpic";
7631 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00007632 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00007633 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00007634 else CCSHARED="+z";
7635 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007636 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007637 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007638 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007639 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00007640 if test "$GCC" = "yes"
7641 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00007642 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00007643 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007644 SCO_SV*)
7645 if test "$GCC" = "yes"
7646 then CCSHARED="-fPIC"
7647 else CCSHARED="-Kpic -belf"
7648 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007649 IRIX*/6*) case $CC in
7650 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00007651 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007652 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007653 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007654fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007655{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
7656$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007657# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007658# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007659{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
7660$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007661if test -z "$LINKFORSHARED"
7662then
Guido van Rossum07397971997-04-29 21:49:50 +00007663 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007664 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007665 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00007666 LINKFORSHARED="-Wl,-E -Wl,+s";;
7667# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007668 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007669 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007670 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00007671 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00007672 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Jack Jansene578a632001-08-15 01:27:14 +00007673 if test "$enable_framework"
7674 then
Jack Jansenda49e192005-01-07 13:08:22 +00007675 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007676 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007677 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007678 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007679 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00007680 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007681 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00007682 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7683 then
7684 LINKFORSHARED="-Wl,--export-dynamic"
7685 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007686 SunOS/5*) case $CC in
7687 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00007688 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00007689 then
7690 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007691 fi;;
7692 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00007693 CYGWIN*)
7694 if test $enable_shared = "no"
7695 then
7696 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
7697 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00007698 QNX*)
7699 # -Wl,-E causes the symbols to be added to the dynamic
7700 # symbol table so that they can be found when a module
7701 # is loaded. -N 2048K causes the stack size to be set
7702 # to 2048 kilobytes so that the stack doesn't overflow
7703 # when running test_compile.py.
7704 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007705 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007706fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007707{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
7708$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007709
Michael W. Hudson54241132001-12-07 15:38:26 +00007710
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00007711
Matthias Kloseb9621712010-04-24 17:59:49 +00007712{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
7713$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007714if test ! "$LIBRARY" = "$LDLIBRARY"
7715then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00007716 case $ac_sys_system in
7717 CYGWIN*)
7718 # Cygwin needs CCSHARED when building extension DLLs
7719 # but not when building the interpreter DLL.
7720 CFLAGSFORSHARED='';;
7721 *)
7722 CFLAGSFORSHARED='$(CCSHARED)'
7723 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007724fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007725{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
7726$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007727
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007728# SHLIBS are libraries (except -lc and -lm) to link to the python shared
7729# library (with --enable-shared).
7730# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007731# symbols, this must be set to $(LIBS) (expanded by make). We do this even
7732# if it is not required, since it creates a dependency of the shared library
7733# to LIBS. This, in turn, means that applications linking the shared libpython
7734# don't need to link LIBS explicitly. The default should be only changed
7735# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007736
Matthias Kloseb9621712010-04-24 17:59:49 +00007737{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
7738$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007739case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007740 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007741 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007742esac
Matthias Kloseb9621712010-04-24 17:59:49 +00007743{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
7744$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007745
7746
Guido van Rossum627b2d71993-12-24 10:39:16 +00007747# checks for libraries
Matthias Kloseb9621712010-04-24 17:59:49 +00007748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
7749$as_echo_n "checking for dlopen in -ldl... " >&6; }
7750if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
7751 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007752else
Martin v. Löwis11437992002-04-12 09:54:03 +00007753 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007754LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007755cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007756/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007757
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007758/* Override any GCC internal prototype to avoid an error.
7759 Use char because int might match the return type of a GCC
7760 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007761#ifdef __cplusplus
7762extern "C"
7763#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007764char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007765int
7766main ()
7767{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007768return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007769 ;
7770 return 0;
7771}
7772_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007773if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007774 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007775else
Matthias Kloseb9621712010-04-24 17:59:49 +00007776 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007777fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007778rm -f core conftest.err conftest.$ac_objext \
7779 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007780LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007781fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007782{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
7783$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
7784if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007785 cat >>confdefs.h <<_ACEOF
7786#define HAVE_LIBDL 1
7787_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007788
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007789 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00007790
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007791fi
7792 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00007793{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
7794$as_echo_n "checking for shl_load in -ldld... " >&6; }
7795if test "${ac_cv_lib_dld_shl_load+set}" = set; then :
7796 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007797else
Martin v. Löwis11437992002-04-12 09:54:03 +00007798 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007799LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007800cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007801/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007802
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007803/* Override any GCC internal prototype to avoid an error.
7804 Use char because int might match the return type of a GCC
7805 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007806#ifdef __cplusplus
7807extern "C"
7808#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007809char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007810int
7811main ()
7812{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007813return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007814 ;
7815 return 0;
7816}
7817_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007818if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007819 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007820else
Matthias Kloseb9621712010-04-24 17:59:49 +00007821 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007822fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007823rm -f core conftest.err conftest.$ac_objext \
7824 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007825LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007826fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007827{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
7828$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
7829if test "x$ac_cv_lib_dld_shl_load" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007830 cat >>confdefs.h <<_ACEOF
7831#define HAVE_LIBDLD 1
7832_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007833
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007834 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007835
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007836fi
7837 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00007838
Georg Brandlb1441c72009-01-03 22:33:39 +00007839# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00007840if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007841 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
7842$as_echo_n "checking for library containing sem_init... " >&6; }
7843if test "${ac_cv_search_sem_init+set}" = set; then :
7844 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007845else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00007846 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007847cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007848/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007849
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007850/* Override any GCC internal prototype to avoid an error.
7851 Use char because int might match the return type of a GCC
7852 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007853#ifdef __cplusplus
7854extern "C"
7855#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007856char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007857int
7858main ()
7859{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007860return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007861 ;
7862 return 0;
7863}
7864_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007865for ac_lib in '' pthread rt posix4; do
7866 if test -z "$ac_lib"; then
7867 ac_res="none required"
7868 else
7869 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007870 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007871 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007872 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007873 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007874fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007875rm -f core conftest.err conftest.$ac_objext \
7876 conftest$ac_exeext
7877 if test "${ac_cv_search_sem_init+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007878 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007879fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007880done
Matthias Kloseb9621712010-04-24 17:59:49 +00007881if test "${ac_cv_search_sem_init+set}" = set; then :
7882
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007883else
7884 ac_cv_search_sem_init=no
7885fi
7886rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00007887LIBS=$ac_func_search_save_LIBS
7888fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007889{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
7890$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007891ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00007892if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007893 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007894
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007895fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00007896 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00007897 # posix4 on Solaris 2.6
7898 # pthread (first!) on Linux
7899fi
7900
Martin v. Löwis19d17342003-06-14 21:03:05 +00007901# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00007902{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
7903$as_echo_n "checking for textdomain in -lintl... " >&6; }
7904if test "${ac_cv_lib_intl_textdomain+set}" = set; then :
7905 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00007906else
7907 ac_check_lib_save_LIBS=$LIBS
7908LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007909cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007910/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00007911
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007912/* Override any GCC internal prototype to avoid an error.
7913 Use char because int might match the return type of a GCC
7914 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00007915#ifdef __cplusplus
7916extern "C"
7917#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00007918char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00007919int
7920main ()
7921{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007922return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00007923 ;
7924 return 0;
7925}
7926_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007927if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00007928 ac_cv_lib_intl_textdomain=yes
7929else
Matthias Kloseb9621712010-04-24 17:59:49 +00007930 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00007931fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007932rm -f core conftest.err conftest.$ac_objext \
7933 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00007934LIBS=$ac_check_lib_save_LIBS
7935fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007936{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
7937$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
7938if test "x$ac_cv_lib_intl_textdomain" = x""yes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00007939
Matthias Kloseb9621712010-04-24 17:59:49 +00007940$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00007941
Brett Cannonc6d936e2009-06-07 20:09:53 +00007942 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00007943fi
7944
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007945
7946# checks for system dependent C++ extensions support
7947case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00007948 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
7949$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
7950 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007951/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007952
7953 #include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007954int
7955main ()
7956{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007957loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00007958 ;
7959 return 0;
7960}
Matthias Kloseb159a552010-04-25 21:00:44 +00007961
Martin v. Löwis11437992002-04-12 09:54:03 +00007962_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007963if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007964
Matthias Kloseb159a552010-04-25 21:00:44 +00007965
Matthias Kloseb9621712010-04-24 17:59:49 +00007966$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007967
Matthias Kloseb159a552010-04-25 21:00:44 +00007968 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007969$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00007970
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007971else
Matthias Kloseb159a552010-04-25 21:00:44 +00007972
7973 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007974$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00007975
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007976fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007977rm -f core conftest.err conftest.$ac_objext \
7978 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007979 *) ;;
7980esac
7981
Guido van Rossum70c7f481998-03-26 18:44:10 +00007982# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00007983{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
7984$as_echo_n "checking for t_open in -lnsl... " >&6; }
7985if test "${ac_cv_lib_nsl_t_open+set}" = set; then :
7986 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007987else
Martin v. Löwis11437992002-04-12 09:54:03 +00007988 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007989LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007990cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007991/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007992
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007993/* Override any GCC internal prototype to avoid an error.
7994 Use char because int might match the return type of a GCC
7995 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007996#ifdef __cplusplus
7997extern "C"
7998#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007999char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008000int
8001main ()
8002{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008003return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008004 ;
8005 return 0;
8006}
8007_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008008if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008009 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008010else
Matthias Kloseb9621712010-04-24 17:59:49 +00008011 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008012fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008013rm -f core conftest.err conftest.$ac_objext \
8014 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008015LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008016fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008017{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
8018$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
8019if test "x$ac_cv_lib_nsl_t_open" = x""yes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008020 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008021fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00008022 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00008023{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
8024$as_echo_n "checking for socket in -lsocket... " >&6; }
8025if test "${ac_cv_lib_socket_socket+set}" = set; then :
8026 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008027else
Martin v. Löwis11437992002-04-12 09:54:03 +00008028 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008029LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008030cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008031/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008032
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008033/* Override any GCC internal prototype to avoid an error.
8034 Use char because int might match the return type of a GCC
8035 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008036#ifdef __cplusplus
8037extern "C"
8038#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008039char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008040int
8041main ()
8042{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008043return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008044 ;
8045 return 0;
8046}
8047_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008048if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008049 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008050else
Matthias Kloseb9621712010-04-24 17:59:49 +00008051 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008052fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008053rm -f core conftest.err conftest.$ac_objext \
8054 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008055LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008056fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008057{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
8058$as_echo "$ac_cv_lib_socket_socket" >&6; }
8059if test "x$ac_cv_lib_socket_socket" = x""yes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00008060 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00008061fi
8062 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00008063
Matthias Kloseb9621712010-04-24 17:59:49 +00008064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
8065$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008066
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008067# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008068if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008069 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00008070{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8071$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00008072LIBS="$withval $LIBS"
8073
8074else
Matthias Kloseb9621712010-04-24 17:59:49 +00008075 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8076$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008077fi
8078
Guido van Rossum7f43da71994-08-01 12:15:30 +00008079
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008080if test -n "$ac_tool_prefix"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008081 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
8082set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008083{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8084$as_echo_n "checking for $ac_word... " >&6; }
8085if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
8086 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008087else
8088 case $PKG_CONFIG in
8089 [\\/]* | ?:[\\/]*)
8090 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8091 ;;
8092 *)
8093 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8094for as_dir in $PATH
8095do
8096 IFS=$as_save_IFS
8097 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008098 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Petersond78735d2010-01-01 16:04:23 +00008099 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8100 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008101 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008102 break 2
8103 fi
8104done
Matthias Kloseb9621712010-04-24 17:59:49 +00008105 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008106IFS=$as_save_IFS
8107
8108 ;;
8109esac
8110fi
8111PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8112if test -n "$PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008113 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8114$as_echo "$PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008115else
Matthias Kloseb9621712010-04-24 17:59:49 +00008116 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8117$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008118fi
8119
8120
8121fi
8122if test -z "$ac_cv_path_PKG_CONFIG"; then
8123 ac_pt_PKG_CONFIG=$PKG_CONFIG
8124 # Extract the first word of "pkg-config", so it can be a program name with args.
8125set dummy pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8127$as_echo_n "checking for $ac_word... " >&6; }
8128if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then :
8129 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008130else
8131 case $ac_pt_PKG_CONFIG in
8132 [\\/]* | ?:[\\/]*)
8133 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
8134 ;;
8135 *)
8136 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8137for as_dir in $PATH
8138do
8139 IFS=$as_save_IFS
8140 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008141 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Petersond78735d2010-01-01 16:04:23 +00008142 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8143 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008144 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008145 break 2
8146 fi
8147done
Matthias Kloseb9621712010-04-24 17:59:49 +00008148 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008149IFS=$as_save_IFS
8150
8151 ;;
8152esac
8153fi
8154ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
8155if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008156 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
8157$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008158else
Matthias Kloseb9621712010-04-24 17:59:49 +00008159 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8160$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008161fi
8162
8163 if test "x$ac_pt_PKG_CONFIG" = x; then
8164 PKG_CONFIG=""
8165 else
8166 case $cross_compiling:$ac_tool_warned in
8167yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00008168{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8169$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Petersond78735d2010-01-01 16:04:23 +00008170ac_tool_warned=yes ;;
8171esac
8172 PKG_CONFIG=$ac_pt_PKG_CONFIG
8173 fi
8174else
8175 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
8176fi
8177
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008178
8179# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00008180{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
8181$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008182
8183# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008184if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008185 withval=$with_system_expat;
8186fi
8187
8188
Matthias Kloseb9621712010-04-24 17:59:49 +00008189{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
8190$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008191
8192# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00008193{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
8194$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008195
8196# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008197if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008198 withval=$with_system_ffi;
8199fi
8200
8201
8202if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008203 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
8204else
8205 LIBFFI_INCLUDEDIR=""
8206fi
8207
8208
Matthias Kloseb9621712010-04-24 17:59:49 +00008209{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
8210$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008211
Matthias Klose55708cc2009-04-30 08:06:49 +00008212# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +00008213{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
8214$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008215
8216# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008217if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +00008218 withval=$with_dbmliborder;
8219if test x$with_dbmliborder = xyes
8220then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00008221as_fn_error "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008222else
8223 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
8224 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
8225 then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00008226 as_fn_error "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008227 fi
8228 done
8229fi
8230fi
8231
Matthias Kloseb9621712010-04-24 17:59:49 +00008232{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
8233$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008234
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00008235# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008236
8237
Matthias Kloseb9621712010-04-24 17:59:49 +00008238{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
8239$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008240
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008241# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008242if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008243 withval=$with_signal_module;
8244fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008245
8246
8247if test -z "$with_signal_module"
8248then with_signal_module="yes"
8249fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008250{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
8251$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008252
8253if test "${with_signal_module}" = "yes"; then
8254 USE_SIGNAL_MODULE=""
8255 SIGNAL_OBJS=""
8256else
8257 USE_SIGNAL_MODULE="#"
8258 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
8259fi
8260
Guido van Rossum3d15bd82001-01-10 18:53:48 +00008261# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00008262
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008263USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00008264
Matthias Kloseb9621712010-04-24 17:59:49 +00008265{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dec-threads" >&5
8266$as_echo_n "checking for --with-dec-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008267
Guido van Rossumec2f0731997-01-22 20:54:01 +00008268
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008269# Check whether --with-dec-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008270if test "${with_dec_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008271 withval=$with_dec_threads;
Matthias Kloseb9621712010-04-24 17:59:49 +00008272{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8273$as_echo "$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +00008274LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00008275if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00008276 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00008277fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008278else
Matthias Kloseb9621712010-04-24 17:59:49 +00008279 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8280$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008281fi
8282
Martin v. Löwis11437992002-04-12 09:54:03 +00008283
8284# Templates for things AC_DEFINEd more than once.
8285# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00008286
8287
Martin v. Löwis11437992002-04-12 09:54:03 +00008288
8289
Matthias Kloseb9621712010-04-24 17:59:49 +00008290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
8291$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008292
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008293# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008294if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008295 withval=$with_threads;
8296fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008297
8298
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008299# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00008300
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008301# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008302if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008303 withval=$with_thread; with_threads=$with_thread
8304fi
8305
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008306
8307if test -z "$with_threads"
8308then with_threads="yes"
8309fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008310{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
8311$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008312
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008313
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008314if test "$with_threads" = "no"
8315then
8316 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008317elif test "$ac_cv_pthread_is_default" = yes
8318then
Matthias Kloseb9621712010-04-24 17:59:49 +00008319 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008320
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008321 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +00008322 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008323
8324 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00008325 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008326elif test "$ac_cv_kpthread" = "yes"
8327then
8328 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008329 if test "$ac_cv_cxx_thread" = "yes"; then
8330 CXX="$CXX -Kpthread"
8331 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008332 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00008333
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008334 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008335 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008336elif test "$ac_cv_kthread" = "yes"
8337then
8338 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008339 if test "$ac_cv_cxx_thread" = "yes"; then
8340 CXX="$CXX -Kthread"
8341 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008342 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008343
8344 posix_threads=yes
8345 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008346elif test "$ac_cv_pthread" = "yes"
8347then
8348 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008349 if test "$ac_cv_cxx_thread" = "yes"; then
8350 CXX="$CXX -pthread"
8351 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008352 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008353
8354 posix_threads=yes
8355 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008356else
8357 if test ! -z "$with_threads" -a -d "$with_threads"
8358 then LDFLAGS="$LDFLAGS -L$with_threads"
8359 fi
8360 if test ! -z "$withval" -a -d "$withval"
8361 then LDFLAGS="$LDFLAGS -L$withval"
8362 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008363
8364 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00008365 # define _POSIX_THREADS in unistd.h. Some apparently don't
8366 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +00008367 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
8368$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
8369 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008370/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008371
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008372#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008373#ifdef _POSIX_THREADS
8374yes
8375#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008376
8377_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008378if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008379 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008380 unistd_defines_pthreads=yes
8381else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008382 unistd_defines_pthreads=no
8383fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008384rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008385
Matthias Kloseb9621712010-04-24 17:59:49 +00008386 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
8387$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008388
Matthias Kloseb9621712010-04-24 17:59:49 +00008389 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00008390
Matthias Kloseb9621712010-04-24 17:59:49 +00008391 ac_fn_c_check_header_mongrel "$LINENO" "cthreads.h" "ac_cv_header_cthreads_h" "$ac_includes_default"
8392if test "x$ac_cv_header_cthreads_h" = x""yes; then :
8393 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008394
Matthias Kloseb9621712010-04-24 17:59:49 +00008395 $as_echo "#define C_THREADS 1" >>confdefs.h
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008396
Martin v. Löwis11437992002-04-12 09:54:03 +00008397
Matthias Kloseb9621712010-04-24 17:59:49 +00008398$as_echo "#define HURD_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008399
8400 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008401 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008402else
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008403
Matthias Kloseb9621712010-04-24 17:59:49 +00008404 ac_fn_c_check_header_mongrel "$LINENO" "mach/cthreads.h" "ac_cv_header_mach_cthreads_h" "$ac_includes_default"
8405if test "x$ac_cv_header_mach_cthreads_h" = x""yes; then :
8406 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008407
Matthias Kloseb9621712010-04-24 17:59:49 +00008408 $as_echo "#define C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008409
Martin v. Löwis11437992002-04-12 09:54:03 +00008410
Matthias Kloseb9621712010-04-24 17:59:49 +00008411$as_echo "#define MACH_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008412
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008413 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008414else
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008415
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008416 # Just looking for pthread_create in libpthread is not enough:
8417 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
8418 # So we really have to include pthread.h, and then link.
8419 _libs=$LIBS
8420 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00008421 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
8422$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
8423 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008424/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008425#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00008426
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008427void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00008428int
8429main ()
8430{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008431
8432pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00008433 ;
8434 return 0;
8435}
8436_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008437if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008438
Matthias Kloseb9621712010-04-24 17:59:49 +00008439 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8440$as_echo "yes" >&6; }
8441 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00008442
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008443 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008444 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00008445else
Martin v. Löwis11437992002-04-12 09:54:03 +00008446
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008447 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +00008448 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
8449if test "x$ac_cv_func_pthread_detach" = x""yes; then :
8450 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00008451
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008452 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008453 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00008454else
Guido van Rossumad678af1998-10-02 14:42:15 +00008455
Matthias Kloseb9621712010-04-24 17:59:49 +00008456 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
8457$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
8458if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then :
8459 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008460else
Martin v. Löwis11437992002-04-12 09:54:03 +00008461 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008462LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008463cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008464/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008465
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008466/* Override any GCC internal prototype to avoid an error.
8467 Use char because int might match the return type of a GCC
8468 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008469#ifdef __cplusplus
8470extern "C"
8471#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008472char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008473int
8474main ()
8475{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008476return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008477 ;
8478 return 0;
8479}
8480_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008481if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008482 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00008483else
Matthias Kloseb9621712010-04-24 17:59:49 +00008484 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00008485fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008486rm -f core conftest.err conftest.$ac_objext \
8487 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008488LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008489fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008490{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
8491$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
8492if test "x$ac_cv_lib_pthreads_pthread_create" = x""yes; then :
8493 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00008494
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008495 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008496 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008497 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00008498else
Greg Steinadf63d62000-07-05 10:38:09 +00008499
Matthias Kloseb9621712010-04-24 17:59:49 +00008500 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
8501$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
8502if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then :
8503 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00008504else
Martin v. Löwis11437992002-04-12 09:54:03 +00008505 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008506LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008507cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008508/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008509
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008510/* Override any GCC internal prototype to avoid an error.
8511 Use char because int might match the return type of a GCC
8512 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008513#ifdef __cplusplus
8514extern "C"
8515#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008516char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008517int
8518main ()
8519{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008520return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008521 ;
8522 return 0;
8523}
8524_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008525if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008526 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00008527else
Matthias Kloseb9621712010-04-24 17:59:49 +00008528 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00008529fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008530rm -f core conftest.err conftest.$ac_objext \
8531 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008532LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00008533fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008534{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
8535$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
8536if test "x$ac_cv_lib_c_r_pthread_create" = x""yes; then :
8537 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00008538
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008539 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008540 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008541 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008542else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008543
Matthias Kloseb9621712010-04-24 17:59:49 +00008544 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
8545$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
8546if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then :
8547 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008548else
Martin v. Löwis11437992002-04-12 09:54:03 +00008549 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008550LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008551cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008552/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008553
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008554/* Override any GCC internal prototype to avoid an error.
8555 Use char because int might match the return type of a GCC
8556 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008557#ifdef __cplusplus
8558extern "C"
8559#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008560char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008561int
8562main ()
8563{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008564return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008565 ;
8566 return 0;
8567}
8568_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008569if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008570 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008571else
Matthias Kloseb9621712010-04-24 17:59:49 +00008572 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008573fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008574rm -f core conftest.err conftest.$ac_objext \
8575 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008576LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008577fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008578{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
8579$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
8580if test "x$ac_cv_lib_pthread___pthread_create_system" = x""yes; then :
8581 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008582
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008583 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008584 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008585 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008586else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008587
Matthias Kloseb9621712010-04-24 17:59:49 +00008588 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
8589$as_echo_n "checking for pthread_create in -lcma... " >&6; }
8590if test "${ac_cv_lib_cma_pthread_create+set}" = set; then :
8591 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00008592else
Martin v. Löwis11437992002-04-12 09:54:03 +00008593 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008594LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008595cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008596/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008597
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008598/* Override any GCC internal prototype to avoid an error.
8599 Use char because int might match the return type of a GCC
8600 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008601#ifdef __cplusplus
8602extern "C"
8603#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008604char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008605int
8606main ()
8607{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008608return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008609 ;
8610 return 0;
8611}
8612_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008613if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008614 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00008615else
Matthias Kloseb9621712010-04-24 17:59:49 +00008616 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00008617fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008618rm -f core conftest.err conftest.$ac_objext \
8619 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008620LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008621fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008622{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
8623$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
8624if test "x$ac_cv_lib_cma_pthread_create" = x""yes; then :
8625 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00008626
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008627 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008628 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008629 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00008630else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00008631
Martin v. Löwis130fb172001-07-19 11:00:41 +00008632 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00008633fi
8634
Guido van Rossum627b2d71993-12-24 10:39:16 +00008635
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008636fi
8637
Guido van Rossum0be3e491997-05-22 20:33:33 +00008638fi
8639
Guido van Rossum49545951997-12-02 19:28:29 +00008640fi
8641
Guido van Rossumb93a8621998-05-07 13:27:32 +00008642fi
8643
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008644fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008645rm -f core conftest.err conftest.$ac_objext \
8646 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008647fi
8648
Martin v. Löwis11437992002-04-12 09:54:03 +00008649
8650fi
8651
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008652
Michael W. Hudson54241132001-12-07 15:38:26 +00008653
Matthias Kloseb9621712010-04-24 17:59:49 +00008654 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
8655$as_echo_n "checking for usconfig in -lmpc... " >&6; }
8656if test "${ac_cv_lib_mpc_usconfig+set}" = set; then :
8657 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008658else
Martin v. Löwis11437992002-04-12 09:54:03 +00008659 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008660LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008661cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008662/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008663
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008664/* Override any GCC internal prototype to avoid an error.
8665 Use char because int might match the return type of a GCC
8666 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008667#ifdef __cplusplus
8668extern "C"
8669#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008670char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008671int
8672main ()
8673{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008674return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008675 ;
8676 return 0;
8677}
8678_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008679if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008680 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008681else
Matthias Kloseb9621712010-04-24 17:59:49 +00008682 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008683fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008684rm -f core conftest.err conftest.$ac_objext \
8685 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008686LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008687fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008688{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
8689$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
8690if test "x$ac_cv_lib_mpc_usconfig" = x""yes; then :
8691 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008692
Martin v. Löwis130fb172001-07-19 11:00:41 +00008693 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008694 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008695 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008696fi
8697
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008698
Neal Norwitza978ab02002-11-02 16:58:05 +00008699 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008700 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
8701$as_echo_n "checking for thr_create in -lthread... " >&6; }
8702if test "${ac_cv_lib_thread_thr_create+set}" = set; then :
8703 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008704else
Martin v. Löwis11437992002-04-12 09:54:03 +00008705 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008706LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008707cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008708/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008709
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008710/* Override any GCC internal prototype to avoid an error.
8711 Use char because int might match the return type of a GCC
8712 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008713#ifdef __cplusplus
8714extern "C"
8715#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008716char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008717int
8718main ()
8719{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008720return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008721 ;
8722 return 0;
8723}
8724_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008725if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008726 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008727else
Matthias Kloseb9621712010-04-24 17:59:49 +00008728 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008729fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008730rm -f core conftest.err conftest.$ac_objext \
8731 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008732LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008733fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008734{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
8735$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
8736if test "x$ac_cv_lib_thread_thr_create" = x""yes; then :
8737 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008738
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008739 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008740 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008741 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008742fi
8743
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008744 fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008745
Martin v. Löwis130fb172001-07-19 11:00:41 +00008746 if test "$USE_THREAD_MODULE" != "#"
8747 then
8748 # If the above checks didn't disable threads, (at least) OSF1
8749 # needs this '-threads' argument during linking.
8750 case $ac_sys_system in
8751 OSF1) LDLAST=-threads;;
8752 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +00008753 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008754fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008755
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008756if test "$posix_threads" = "yes"; then
8757 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008758
Matthias Kloseb9621712010-04-24 17:59:49 +00008759$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008760
8761 fi
8762
8763 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
8764 case $ac_sys_system/$ac_sys_release in
8765 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +00008766$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008767
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008768 ;;
8769 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +00008770$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008771
8772 ;;
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00008773 AIX/5)
Matthias Kloseb9621712010-04-24 17:59:49 +00008774$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00008775
8776 ;;
Antoine Pitrou33a29942010-08-30 14:52:00 +00008777 AIX/6)
8778$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
8779
8780 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008781 esac
8782
Matthias Kloseb9621712010-04-24 17:59:49 +00008783 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
8784$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
8785 if test "${ac_cv_pthread_system_supported+set}" = set; then :
8786 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008787else
Matthias Kloseb9621712010-04-24 17:59:49 +00008788 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008789 ac_cv_pthread_system_supported=no
8790else
Matthias Kloseb9621712010-04-24 17:59:49 +00008791 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008792/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008793#include <pthread.h>
8794 void *foo(void *parm) {
8795 return NULL;
8796 }
8797 main() {
8798 pthread_attr_t attr;
8799 pthread_t id;
8800 if (pthread_attr_init(&attr)) exit(-1);
8801 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
8802 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
8803 exit(0);
8804 }
8805_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008806if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008807 ac_cv_pthread_system_supported=yes
8808else
Matthias Kloseb9621712010-04-24 17:59:49 +00008809 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008810fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008811rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8812 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008813fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008814
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008815
Guido van Rossum627b2d71993-12-24 10:39:16 +00008816fi
8817
Matthias Kloseb9621712010-04-24 17:59:49 +00008818 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
8819$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008820 if test "$ac_cv_pthread_system_supported" = "yes"; then
8821
Matthias Kloseb9621712010-04-24 17:59:49 +00008822$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008823
8824 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008825 for ac_func in pthread_sigmask
8826do :
8827 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
8828if test "x$ac_cv_func_pthread_sigmask" = x""yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008829 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008830#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008831_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +00008832 case $ac_sys_system in
8833 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008834
Matthias Kloseb9621712010-04-24 17:59:49 +00008835$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +00008836
8837 ;;
8838 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008839fi
8840done
8841
8842fi
8843
8844
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008845# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +00008846
Matthias Kloseb9621712010-04-24 17:59:49 +00008847{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
8848$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008849# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008850if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008851 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008852 no)
Matthias Kloseb9621712010-04-24 17:59:49 +00008853 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8854$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008855 ipv6=no
8856 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00008857 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8858$as_echo "yes" >&6; }
8859 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008860
8861 ipv6=yes
8862 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008863 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008864else
Martin v. Löwis11437992002-04-12 09:54:03 +00008865
Matthias Kloseb9621712010-04-24 17:59:49 +00008866 if test "$cross_compiling" = yes; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008867
Matthias Kloseb9621712010-04-24 17:59:49 +00008868 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8869$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008870 ipv6=no
8871
8872else
Matthias Kloseb9621712010-04-24 17:59:49 +00008873 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008874/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008875 /* AF_INET6 available check */
8876#include <sys/types.h>
8877#include <sys/socket.h>
8878main()
8879{
8880 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
8881 exit(1);
8882 else
8883 exit(0);
8884}
8885
Martin v. Löwis11437992002-04-12 09:54:03 +00008886_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008887if ac_fn_c_try_run "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008888
Matthias Kloseb9621712010-04-24 17:59:49 +00008889 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8890$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008891 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +00008892
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008893else
Matthias Kloseb159a552010-04-25 21:00:44 +00008894
Matthias Kloseb9621712010-04-24 17:59:49 +00008895 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8896$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008897 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +00008898
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008899fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008900rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8901 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008902fi
8903
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008904
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008905if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008906 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
8907$as_echo_n "checking if RFC2553 API is available... " >&6; }
8908 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008909/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008910
8911 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008912#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008913int
8914main ()
8915{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008916struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +00008917 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +00008918 ;
8919 return 0;
8920}
Matthias Kloseb159a552010-04-25 21:00:44 +00008921
Martin v. Löwis11437992002-04-12 09:54:03 +00008922_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008923if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008924
8925 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008926$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008927 ipv6=yes
8928
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008929else
Matthias Kloseb159a552010-04-25 21:00:44 +00008930
8931 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008932$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008933 ipv6=no
8934
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008935fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008936rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008937fi
8938
8939if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008940 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008941
8942fi
8943
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008944fi
8945
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008946
8947ipv6type=unknown
8948ipv6lib=none
8949ipv6trylibc=no
8950
8951if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008952 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
8953$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +00008954 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
8955 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008956 case $i in
8957 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +00008958 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008959/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008960
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008961#include <netinet/in.h>
8962#ifdef IPV6_INRIA_VERSION
8963yes
8964#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008965_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008966if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008967 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00008968 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008969fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008970rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008971
8972 ;;
8973 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +00008974 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008975/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008976
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008977#include <netinet/in.h>
8978#ifdef __KAME__
8979yes
8980#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008981_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008982if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008983 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008984 ipv6type=$i;
8985 ipv6lib=inet6
8986 ipv6libdir=/usr/local/v6/lib
8987 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008988fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008989rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008990
8991 ;;
8992 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +00008993 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008994/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008995
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008996#include <features.h>
8997#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
8998yes
8999#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009000_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009001if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009002 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009003 ipv6type=$i;
9004 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009005fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009006rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009007
9008 ;;
9009 linux-inet6)
9010 if test -d /usr/inet6; then
9011 ipv6type=$i
9012 ipv6lib=inet6
9013 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +00009014 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009015 fi
9016 ;;
9017 solaris)
9018 if test -f /etc/netconfig; then
9019 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
9020 ipv6type=$i
9021 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009022 fi
9023 fi
9024 ;;
9025 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +00009026 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009027/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009028
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009029#include <sys/param.h>
9030#ifdef _TOSHIBA_INET6
9031yes
9032#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009033_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009034if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009035 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009036 ipv6type=$i;
9037 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009038 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009039fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009040rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009041
9042 ;;
9043 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +00009044 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009045/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009046
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009047#include </usr/local/v6/include/sys/v6config.h>
9048#ifdef __V6D__
9049yes
9050#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009051_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009052if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009053 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009054 ipv6type=$i;
9055 ipv6lib=v6;
9056 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +00009057 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009058fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009059rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009060
9061 ;;
9062 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +00009063 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009064/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009065
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009066#include <sys/param.h>
9067#ifdef _ZETA_MINAMI_INET6
9068yes
9069#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009070_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009071if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009072 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009073 ipv6type=$i;
9074 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009075 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009076fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009077rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009078
9079 ;;
9080 esac
9081 if test "$ipv6type" != "unknown"; then
9082 break
9083 fi
9084 done
Matthias Kloseb9621712010-04-24 17:59:49 +00009085 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
9086$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009087fi
9088
9089if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
9090 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
9091 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
9092 echo "using lib$ipv6lib"
9093 else
9094 if test $ipv6trylibc = "yes"; then
9095 echo "using libc"
9096 else
9097 echo 'Fatal: no $ipv6lib library found. cannot continue.'
9098 echo "You need to fetch lib$ipv6lib.a from appropriate"
9099 echo 'ipv6 kit and compile beforehand.'
9100 exit 1
9101 fi
9102 fi
9103fi
9104
Matthias Kloseb9621712010-04-24 17:59:49 +00009105{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
9106$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
9107cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009108/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009109
9110 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009111int
9112main ()
9113{
9114FSIORefNum fRef = 0
9115 ;
9116 return 0;
9117}
Matthias Kloseb159a552010-04-25 21:00:44 +00009118
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009119_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009120if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009121
Matthias Kloseb159a552010-04-25 21:00:44 +00009122
Matthias Kloseb9621712010-04-24 17:59:49 +00009123$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009124
Matthias Kloseb9621712010-04-24 17:59:49 +00009125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9126$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009127
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009128else
Matthias Kloseb159a552010-04-25 21:00:44 +00009129
Matthias Kloseb9621712010-04-24 17:59:49 +00009130 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9131$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009132
9133fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009134rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9135
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009136# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +00009137{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
9138$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009139
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009140# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009141if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009142 withval=$with_doc_strings;
9143fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009144
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009145
9146if test -z "$with_doc_strings"
9147then with_doc_strings="yes"
9148fi
9149if test "$with_doc_strings" != "no"
9150then
9151
Matthias Kloseb9621712010-04-24 17:59:49 +00009152$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009153
9154fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009155{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
9156$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009157
Antoine Pitrou042b1282010-08-13 21:15:58 +00009158# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +00009159{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
9160$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009161
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009162# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009163if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009164 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009165if test "$withval" != no
9166then
9167
Matthias Kloseb9621712010-04-24 17:59:49 +00009168$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009169
Matthias Kloseb9621712010-04-24 17:59:49 +00009170 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9171$as_echo "yes" >&6; }
9172else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9173$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009174fi
9175else
Matthias Kloseb9621712010-04-24 17:59:49 +00009176 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9177$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009178fi
9179
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009180
9181# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +00009182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
9183$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009184
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009185# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009186if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009187 withval=$with_pymalloc;
9188fi
Michael W. Hudson54241132001-12-07 15:38:26 +00009189
Neil Schemenauera35c6882001-02-27 04:45:05 +00009190
Neil Schemenauer16c22972002-03-22 15:34:49 +00009191if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00009192then
9193 with_pymalloc="yes"
9194 SOABI_QUALIFIERS="${SOABI_QUALIFIERS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +00009195fi
9196if test "$with_pymalloc" != "no"
9197then
Martin v. Löwis11437992002-04-12 09:54:03 +00009198
Matthias Kloseb9621712010-04-24 17:59:49 +00009199$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +00009200
9201fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009202{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
9203$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +00009204
Benjamin Peterson05159c42009-12-03 03:01:27 +00009205# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +00009206{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
9207$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009208
9209# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009210if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009211 withval=$with_valgrind;
9212else
9213 with_valgrind=no
9214fi
9215
Matthias Kloseb9621712010-04-24 17:59:49 +00009216{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
9217$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009218if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009219 ac_fn_c_check_header_mongrel "$LINENO" "valgrind/valgrind.h" "ac_cv_header_valgrind_valgrind_h" "$ac_includes_default"
9220if test "x$ac_cv_header_valgrind_valgrind_h" = x""yes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009221
Matthias Kloseb9621712010-04-24 17:59:49 +00009222$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +00009223
9224else
Benjamin Petersond7f73e92010-09-05 00:09:07 +00009225 as_fn_error "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +00009226
9227fi
9228
9229
Jeffrey Yasskin39370832010-05-03 19:29:34 +00009230 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +00009231fi
9232
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 \
Jean-Paul Calderone6ed7ac42010-06-19 19:58:37 +00009312 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"
Benjamin Petersond7f73e92010-09-05 00:09:07 +00009319eval 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
Martin v. Löwisd5843682002-11-21 20:41:28 +00009545#include <stdio.h>
9546
Martin v. Löwisd5843682002-11-21 20:41:28 +00009547int
9548main ()
9549{
9550void* p = ctermid_r
9551 ;
9552 return 0;
9553}
9554_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009555if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +00009556
Matthias Kloseb9621712010-04-24 17:59:49 +00009557$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +00009558
Matthias Kloseb159a552010-04-25 21:00:44 +00009559 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009560$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009561else
Matthias Kloseb9621712010-04-24 17:59:49 +00009562 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9563$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009564
9565fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009566rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9567
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009568{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
9569$as_echo_n "checking for flock declaration... " >&6; }
9570if test "${ac_cv_flock_decl+set}" = set; then :
9571 $as_echo_n "(cached) " >&6
9572else
9573 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009574/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009575#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009576int
9577main ()
9578{
9579void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009580
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009581 ;
9582 return 0;
9583}
9584_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009585if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009586 ac_cv_flock_decl=yes
9587else
9588 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009589
9590fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009591rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +00009592
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009593fi
9594{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
9595$as_echo "$ac_cv_flock_decl" >&6; }
9596if test "x${ac_cv_flock_decl}" = xyes; then
9597 for ac_func in flock
9598do :
9599 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
9600if test "x$ac_cv_func_flock" = x""yes; then :
9601 cat >>confdefs.h <<_ACEOF
9602#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +00009603_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009604
Antoine Pitroua3000072010-09-07 14:52:42 +00009605else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009606 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +00009607$as_echo_n "checking for flock in -lbsd... " >&6; }
9608if test "${ac_cv_lib_bsd_flock+set}" = set; then :
9609 $as_echo_n "(cached) " >&6
9610else
9611 ac_check_lib_save_LIBS=$LIBS
9612LIBS="-lbsd $LIBS"
9613cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9614/* end confdefs.h. */
9615
9616/* Override any GCC internal prototype to avoid an error.
9617 Use char because int might match the return type of a GCC
9618 builtin and then its argument prototype would still apply. */
9619#ifdef __cplusplus
9620extern "C"
9621#endif
9622char flock ();
9623int
9624main ()
9625{
9626return flock ();
9627 ;
9628 return 0;
9629}
9630_ACEOF
9631if ac_fn_c_try_link "$LINENO"; then :
9632 ac_cv_lib_bsd_flock=yes
9633else
9634 ac_cv_lib_bsd_flock=no
9635fi
9636rm -f core conftest.err conftest.$ac_objext \
9637 conftest$ac_exeext conftest.$ac_ext
9638LIBS=$ac_check_lib_save_LIBS
9639fi
9640{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
9641$as_echo "$ac_cv_lib_bsd_flock" >&6; }
9642if test "x$ac_cv_lib_bsd_flock" = x""yes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009643 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +00009644
9645
9646$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
9647
9648
9649fi
9650
9651
9652fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009653done
9654
Antoine Pitroua3000072010-09-07 14:52:42 +00009655fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009656
Matthias Kloseb9621712010-04-24 17:59:49 +00009657{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
9658$as_echo_n "checking for getpagesize... " >&6; }
9659cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009660/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009661
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009662#include <unistd.h>
9663
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009664int
9665main ()
9666{
9667void* p = getpagesize
9668 ;
9669 return 0;
9670}
9671_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009672if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009673
Matthias Kloseb9621712010-04-24 17:59:49 +00009674$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009675
Matthias Kloseb159a552010-04-25 21:00:44 +00009676 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009677$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009678else
Matthias Kloseb9621712010-04-24 17:59:49 +00009679 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9680$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009681
9682fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009683rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009684
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009685for ac_prog in true
9686do
9687 # Extract the first word of "$ac_prog", so it can be a program name with args.
9688set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00009689{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9690$as_echo_n "checking for $ac_word... " >&6; }
9691if test "${ac_cv_prog_TRUE+set}" = set; then :
9692 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009693else
9694 if test -n "$TRUE"; then
9695 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
9696else
9697as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9698for as_dir in $PATH
9699do
9700 IFS=$as_save_IFS
9701 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009702 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009703 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 +00009704 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00009705 $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 +00009706 break 2
9707 fi
9708done
Matthias Kloseb9621712010-04-24 17:59:49 +00009709 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009710IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009711
9712fi
9713fi
9714TRUE=$ac_cv_prog_TRUE
9715if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009716 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
9717$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009718else
Matthias Kloseb9621712010-04-24 17:59:49 +00009719 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9720$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009721fi
9722
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009723
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009724 test -n "$TRUE" && break
9725done
9726test -n "$TRUE" || TRUE="/bin/true"
9727
9728
Matthias Kloseb9621712010-04-24 17:59:49 +00009729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
9730$as_echo_n "checking for inet_aton in -lc... " >&6; }
9731if test "${ac_cv_lib_c_inet_aton+set}" = set; then :
9732 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009733else
9734 ac_check_lib_save_LIBS=$LIBS
9735LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009736cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009737/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009738
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009739/* Override any GCC internal prototype to avoid an error.
9740 Use char because int might match the return type of a GCC
9741 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009742#ifdef __cplusplus
9743extern "C"
9744#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009745char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009746int
9747main ()
9748{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009749return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009750 ;
9751 return 0;
9752}
9753_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009754if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009755 ac_cv_lib_c_inet_aton=yes
9756else
Matthias Kloseb9621712010-04-24 17:59:49 +00009757 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009758fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009759rm -f core conftest.err conftest.$ac_objext \
9760 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009761LIBS=$ac_check_lib_save_LIBS
9762fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009763{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
9764$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
9765if test "x$ac_cv_lib_c_inet_aton" = x""yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009766 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009767else
Matthias Kloseb9621712010-04-24 17:59:49 +00009768 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
9769$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
9770if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then :
9771 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009772else
9773 ac_check_lib_save_LIBS=$LIBS
9774LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009775cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009776/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009777
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009778/* Override any GCC internal prototype to avoid an error.
9779 Use char because int might match the return type of a GCC
9780 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009781#ifdef __cplusplus
9782extern "C"
9783#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009784char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009785int
9786main ()
9787{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009788return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009789 ;
9790 return 0;
9791}
9792_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009793if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009794 ac_cv_lib_resolv_inet_aton=yes
9795else
Matthias Kloseb9621712010-04-24 17:59:49 +00009796 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009797fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009798rm -f core conftest.err conftest.$ac_objext \
9799 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009800LIBS=$ac_check_lib_save_LIBS
9801fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009802{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
9803$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
9804if test "x$ac_cv_lib_resolv_inet_aton" = x""yes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009805 cat >>confdefs.h <<_ACEOF
9806#define HAVE_LIBRESOLV 1
9807_ACEOF
9808
9809 LIBS="-lresolv $LIBS"
9810
9811fi
9812
9813
9814fi
9815
9816
Christian Heimesd0764e22007-12-04 15:00:33 +00009817# On Tru64, chflags seems to be present, but calling it will
9818# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +00009819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
9820$as_echo_n "checking for chflags... " >&6; }
9821if test "${ac_cv_have_chflags+set}" = set; then :
9822 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009823else
Matthias Kloseb9621712010-04-24 17:59:49 +00009824 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009825 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +00009826else
Matthias Kloseb9621712010-04-24 17:59:49 +00009827 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +00009828/* end confdefs.h. */
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009829[
Christian Heimesd0764e22007-12-04 15:00:33 +00009830#include <sys/stat.h>
9831#include <unistd.h>
9832int main(int argc, char*argv[])
9833{
9834 if(chflags(argv[0], 0) != 0)
9835 return 1;
9836 return 0;
9837}
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009838]
Christian Heimesd0764e22007-12-04 15:00:33 +00009839_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009840if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009841 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009842else
Matthias Kloseb9621712010-04-24 17:59:49 +00009843 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009844fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009845rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9846 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009847fi
9848
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009849
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009850fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009851{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
9852$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009853if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009854 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
9855if test "x$ac_cv_func_chflags" = x""yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009856 ac_cv_have_chflags="yes"
9857else
9858 ac_cv_have_chflags="no"
9859fi
9860
9861fi
9862if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009863
Matthias Kloseb9621712010-04-24 17:59:49 +00009864$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009865
9866fi
9867
Matthias Kloseb9621712010-04-24 17:59:49 +00009868{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
9869$as_echo_n "checking for lchflags... " >&6; }
9870if test "${ac_cv_have_lchflags+set}" = set; then :
9871 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009872else
Matthias Kloseb9621712010-04-24 17:59:49 +00009873 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009874 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +00009875else
Matthias Kloseb9621712010-04-24 17:59:49 +00009876 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +00009877/* end confdefs.h. */
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009878[
Christian Heimesd0764e22007-12-04 15:00:33 +00009879#include <sys/stat.h>
9880#include <unistd.h>
9881int main(int argc, char*argv[])
9882{
9883 if(lchflags(argv[0], 0) != 0)
9884 return 1;
9885 return 0;
9886}
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009887]
Christian Heimesd0764e22007-12-04 15:00:33 +00009888_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009889if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009890 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009891else
Matthias Kloseb9621712010-04-24 17:59:49 +00009892 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +00009893fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009894rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9895 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009896fi
9897
9898
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009899fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009900{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
9901$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009902if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009903 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
9904if test "x$ac_cv_func_lchflags" = x""yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009905 ac_cv_have_lchflags="yes"
9906else
9907 ac_cv_have_lchflags="no"
9908fi
9909
9910fi
9911if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009912
Matthias Kloseb9621712010-04-24 17:59:49 +00009913$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009914
9915fi
9916
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009917case $ac_sys_system/$ac_sys_release in
9918Darwin/*)
9919 _CUR_CFLAGS="${CFLAGS}"
9920 _CUR_LDFLAGS="${LDFLAGS}"
9921 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
9922 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
9923 ;;
9924esac
9925
Matthias Kloseb9621712010-04-24 17:59:49 +00009926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
9927$as_echo_n "checking for inflateCopy in -lz... " >&6; }
9928if test "${ac_cv_lib_z_inflateCopy+set}" = set; then :
9929 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009930else
9931 ac_check_lib_save_LIBS=$LIBS
9932LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009933cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009934/* end confdefs.h. */
9935
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009936/* Override any GCC internal prototype to avoid an error.
9937 Use char because int might match the return type of a GCC
9938 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009939#ifdef __cplusplus
9940extern "C"
9941#endif
9942char inflateCopy ();
9943int
9944main ()
9945{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009946return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009947 ;
9948 return 0;
9949}
9950_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009951if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009952 ac_cv_lib_z_inflateCopy=yes
9953else
Matthias Kloseb9621712010-04-24 17:59:49 +00009954 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009955fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009956rm -f core conftest.err conftest.$ac_objext \
9957 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009958LIBS=$ac_check_lib_save_LIBS
9959fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009960{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
9961$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
9962if test "x$ac_cv_lib_z_inflateCopy" = x""yes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009963
Matthias Kloseb9621712010-04-24 17:59:49 +00009964$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009965
9966fi
9967
9968
9969case $ac_sys_system/$ac_sys_release in
9970Darwin/*)
9971 CFLAGS="${_CUR_CFLAGS}"
9972 LDFLAGS="${_CUR_LDFLAGS}"
9973 ;;
9974esac
9975
Matthias Kloseb9621712010-04-24 17:59:49 +00009976{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
9977$as_echo_n "checking for hstrerror... " >&6; }
9978cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009979/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +00009980
Martin v. Löwise9416172003-05-03 10:12:45 +00009981#include <netdb.h>
9982
Martin v. Löwise9416172003-05-03 10:12:45 +00009983int
9984main ()
9985{
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009986void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +00009987 ;
9988 return 0;
9989}
9990_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009991if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +00009992
Matthias Kloseb9621712010-04-24 17:59:49 +00009993$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +00009994
Matthias Kloseb159a552010-04-25 21:00:44 +00009995 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009996$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +00009997else
Matthias Kloseb9621712010-04-24 17:59:49 +00009998 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9999$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010000
10001fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010002rm -f core conftest.err conftest.$ac_objext \
10003 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010004
Matthias Kloseb9621712010-04-24 17:59:49 +000010005{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
10006$as_echo_n "checking for inet_aton... " >&6; }
10007cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010008/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010009
Martin v. Löwis86d66262006-02-17 08:40:11 +000010010#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010011#include <sys/socket.h>
10012#include <netinet/in.h>
10013#include <arpa/inet.h>
10014
Martin v. Löwise9416172003-05-03 10:12:45 +000010015int
10016main ()
10017{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010018void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010019 ;
10020 return 0;
10021}
10022_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010023if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010024
Matthias Kloseb9621712010-04-24 17:59:49 +000010025$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010026
Matthias Kloseb159a552010-04-25 21:00:44 +000010027 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010028$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010029else
Matthias Kloseb9621712010-04-24 17:59:49 +000010030 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10031$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010032
10033fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010034rm -f core conftest.err conftest.$ac_objext \
10035 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010036
Matthias Kloseb9621712010-04-24 17:59:49 +000010037{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
10038$as_echo_n "checking for inet_pton... " >&6; }
10039cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010040/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010041
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010042#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010043#include <sys/socket.h>
10044#include <netinet/in.h>
10045#include <arpa/inet.h>
10046
Martin v. Löwise9416172003-05-03 10:12:45 +000010047int
10048main ()
10049{
10050void* p = inet_pton
10051 ;
10052 return 0;
10053}
10054_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010055if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010056
Matthias Kloseb9621712010-04-24 17:59:49 +000010057$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010058
Matthias Kloseb159a552010-04-25 21:00:44 +000010059 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010060$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010061else
Matthias Kloseb9621712010-04-24 17:59:49 +000010062 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10063$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010064
10065fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010066rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000010067
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010068# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000010069{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
10070$as_echo_n "checking for setgroups... " >&6; }
10071cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010072/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010073
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010074#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010075#ifdef HAVE_GRP_H
10076#include <grp.h>
10077#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000010078
Martin v. Löwisd5843682002-11-21 20:41:28 +000010079int
10080main ()
10081{
10082void* p = setgroups
10083 ;
10084 return 0;
10085}
10086_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010087if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010088
Matthias Kloseb9621712010-04-24 17:59:49 +000010089$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010090
Matthias Kloseb159a552010-04-25 21:00:44 +000010091 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010092$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010093else
Matthias Kloseb9621712010-04-24 17:59:49 +000010094 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10095$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010096
10097fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010098rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010099
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010100# check for openpty and forkpty
10101
10102for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010103do :
10104 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
10105if test "x$ac_cv_func_openpty" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010106 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010107#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010108_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010109
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010110else
Matthias Kloseb9621712010-04-24 17:59:49 +000010111 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
10112$as_echo_n "checking for openpty in -lutil... " >&6; }
10113if test "${ac_cv_lib_util_openpty+set}" = set; then :
10114 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010115else
Martin v. Löwis11437992002-04-12 09:54:03 +000010116 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010117LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010118cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010119/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010120
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010121/* Override any GCC internal prototype to avoid an error.
10122 Use char because int might match the return type of a GCC
10123 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010124#ifdef __cplusplus
10125extern "C"
10126#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010127char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010128int
10129main ()
10130{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010131return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010132 ;
10133 return 0;
10134}
10135_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010136if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010137 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010138else
Matthias Kloseb9621712010-04-24 17:59:49 +000010139 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010140fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010141rm -f core conftest.err conftest.$ac_objext \
10142 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010143LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010144fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010145{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
10146$as_echo "$ac_cv_lib_util_openpty" >&6; }
10147if test "x$ac_cv_lib_util_openpty" = x""yes; then :
10148 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010149 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010150else
Matthias Kloseb9621712010-04-24 17:59:49 +000010151 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
10152$as_echo_n "checking for openpty in -lbsd... " >&6; }
10153if test "${ac_cv_lib_bsd_openpty+set}" = set; then :
10154 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010155else
10156 ac_check_lib_save_LIBS=$LIBS
10157LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010158cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010159/* end confdefs.h. */
10160
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010161/* Override any GCC internal prototype to avoid an error.
10162 Use char because int might match the return type of a GCC
10163 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010164#ifdef __cplusplus
10165extern "C"
10166#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010167char openpty ();
10168int
10169main ()
10170{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010171return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010172 ;
10173 return 0;
10174}
10175_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010176if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010177 ac_cv_lib_bsd_openpty=yes
10178else
Matthias Kloseb9621712010-04-24 17:59:49 +000010179 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010180fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010181rm -f core conftest.err conftest.$ac_objext \
10182 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010183LIBS=$ac_check_lib_save_LIBS
10184fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010185{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
10186$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
10187if test "x$ac_cv_lib_bsd_openpty" = x""yes; then :
10188 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010189 LIBS="$LIBS -lbsd"
10190fi
10191
10192
10193fi
10194
Fred Drake8cef4cf2000-06-28 16:40:38 +000010195
10196fi
10197done
10198
10199for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010200do :
10201 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
10202if test "x$ac_cv_func_forkpty" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010203 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010204#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010205_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010206
Fred Drake8cef4cf2000-06-28 16:40:38 +000010207else
Matthias Kloseb9621712010-04-24 17:59:49 +000010208 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
10209$as_echo_n "checking for forkpty in -lutil... " >&6; }
10210if test "${ac_cv_lib_util_forkpty+set}" = set; then :
10211 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010212else
Martin v. Löwis11437992002-04-12 09:54:03 +000010213 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010214LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010215cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010216/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010217
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010218/* Override any GCC internal prototype to avoid an error.
10219 Use char because int might match the return type of a GCC
10220 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010221#ifdef __cplusplus
10222extern "C"
10223#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010224char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010225int
10226main ()
10227{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010228return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010229 ;
10230 return 0;
10231}
10232_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010233if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010234 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010235else
Matthias Kloseb9621712010-04-24 17:59:49 +000010236 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010237fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010238rm -f core conftest.err conftest.$ac_objext \
10239 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010240LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010241fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010242{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
10243$as_echo "$ac_cv_lib_util_forkpty" >&6; }
10244if test "x$ac_cv_lib_util_forkpty" = x""yes; then :
10245 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010246 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010247else
Matthias Kloseb9621712010-04-24 17:59:49 +000010248 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
10249$as_echo_n "checking for forkpty in -lbsd... " >&6; }
10250if test "${ac_cv_lib_bsd_forkpty+set}" = set; then :
10251 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010252else
10253 ac_check_lib_save_LIBS=$LIBS
10254LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010255cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010256/* end confdefs.h. */
10257
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010258/* Override any GCC internal prototype to avoid an error.
10259 Use char because int might match the return type of a GCC
10260 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010261#ifdef __cplusplus
10262extern "C"
10263#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010264char forkpty ();
10265int
10266main ()
10267{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010268return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010269 ;
10270 return 0;
10271}
10272_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010273if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010274 ac_cv_lib_bsd_forkpty=yes
10275else
Matthias Kloseb9621712010-04-24 17:59:49 +000010276 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010277fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010278rm -f core conftest.err conftest.$ac_objext \
10279 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010280LIBS=$ac_check_lib_save_LIBS
10281fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010282{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
10283$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
10284if test "x$ac_cv_lib_bsd_forkpty" = x""yes; then :
10285 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010286 LIBS="$LIBS -lbsd"
10287fi
10288
10289
10290fi
10291
Fred Drake8cef4cf2000-06-28 16:40:38 +000010292
10293fi
10294done
10295
Jack Jansendd19cf82001-12-06 22:36:17 +000010296
Christian Heimesb186d002008-03-18 15:15:01 +000010297# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000010298for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000010299do :
10300 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
10301if test "x$ac_cv_func_memmove" = x""yes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000010302 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010303#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000010304_ACEOF
10305
10306fi
10307done
10308
10309
Michael W. Hudson54241132001-12-07 15:38:26 +000010310# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000010311for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000010312do :
10313 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10314ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Benjamin Petersond7f73e92010-09-05 00:09:07 +000010315eval as_val=\$$as_ac_var
10316 if test "x$as_val" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010317 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010318#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010319_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000010320
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010321fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000010322done
10323
Michael W. Hudson54241132001-12-07 15:38:26 +000010324
Benjamin Petersond7f73e92010-09-05 00:09:07 +000010325for ac_func in dup2 getcwd strdup
10326do :
10327 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10328ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10329eval as_val=\$$as_ac_var
10330 if test "x$as_val" = x""yes; then :
10331 cat >>confdefs.h <<_ACEOF
10332#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
10333_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000010334
Martin v. Löwis1142de32002-03-29 16:28:31 +000010335else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010336 case " $LIBOBJS " in
Benjamin Petersond7f73e92010-09-05 00:09:07 +000010337 *" $ac_func.$ac_objext "* ) ;;
10338 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010339 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010340esac
10341
Martin v. Löwis1142de32002-03-29 16:28:31 +000010342fi
Benjamin Petersond7f73e92010-09-05 00:09:07 +000010343done
Martin v. Löwis1142de32002-03-29 16:28:31 +000010344
10345
10346for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010347do :
10348 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
10349if test "x$ac_cv_func_getpgrp" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010350 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010351#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010352_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010353 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010354/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010355#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010356int
10357main ()
10358{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010359getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010360 ;
10361 return 0;
10362}
10363_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010364if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010365
Matthias Kloseb9621712010-04-24 17:59:49 +000010366$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010367
Guido van Rossum627b2d71993-12-24 10:39:16 +000010368fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010369rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010370
Guido van Rossum627b2d71993-12-24 10:39:16 +000010371fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010372done
Guido van Rossum627b2d71993-12-24 10:39:16 +000010373
Jack Jansen150753c2003-03-29 22:07:47 +000010374for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010375do :
10376 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
10377if test "x$ac_cv_func_setpgrp" = x""yes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000010378 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010379#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000010380_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010381 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010382/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000010383#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000010384int
10385main ()
10386{
10387setpgrp(0,0);
10388 ;
10389 return 0;
10390}
10391_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010392if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010393
Matthias Kloseb9621712010-04-24 17:59:49 +000010394$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010395
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010396fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010397rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000010398
10399fi
10400done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010401
Thomas Wouters3a584202000-08-05 23:28:51 +000010402for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000010403do :
10404 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
10405if test "x$ac_cv_func_gettimeofday" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010406 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010407#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010408_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010409 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010410/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010411#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010412int
10413main ()
10414{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010415gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010416 ;
10417 return 0;
10418}
10419_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010420if ac_fn_c_try_compile "$LINENO"; then :
10421
Guido van Rossum627b2d71993-12-24 10:39:16 +000010422else
Skip Montanaro6dead952003-09-25 14:50:04 +000010423
Matthias Kloseb9621712010-04-24 17:59:49 +000010424$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010425
Martin v. Löwis11437992002-04-12 09:54:03 +000010426
Guido van Rossum627b2d71993-12-24 10:39:16 +000010427fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010428rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010429
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010430fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010431done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010432
Michael W. Hudson54241132001-12-07 15:38:26 +000010433
Matthias Kloseb9621712010-04-24 17:59:49 +000010434{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
10435$as_echo_n "checking for major... " >&6; }
10436cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010437/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010438
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010439#if defined(MAJOR_IN_MKDEV)
10440#include <sys/mkdev.h>
10441#elif defined(MAJOR_IN_SYSMACROS)
10442#include <sys/sysmacros.h>
10443#else
10444#include <sys/types.h>
10445#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010446
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010447int
10448main ()
10449{
10450
10451 makedev(major(0),minor(0));
10452
10453 ;
10454 return 0;
10455}
10456_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010457if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010458
10459
Matthias Kloseb9621712010-04-24 17:59:49 +000010460$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010461
Matthias Kloseb9621712010-04-24 17:59:49 +000010462 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10463$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010464
10465else
Skip Montanaro6dead952003-09-25 14:50:04 +000010466
Matthias Kloseb9621712010-04-24 17:59:49 +000010467 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10468$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010469
10470fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010471rm -f core conftest.err conftest.$ac_objext \
10472 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010473
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010474# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000010475# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000010476{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
10477$as_echo_n "checking for getaddrinfo... " >&6; }
10478cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010479/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010480
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010481#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010482#include <sys/socket.h>
10483#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010484#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010485
Martin v. Löwis11437992002-04-12 09:54:03 +000010486int
10487main ()
10488{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010489getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000010490 ;
10491 return 0;
10492}
10493_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010494if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010495 have_getaddrinfo=yes
10496else
Matthias Kloseb9621712010-04-24 17:59:49 +000010497 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010498fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010499rm -f core conftest.err conftest.$ac_objext \
10500 conftest$ac_exeext conftest.$ac_ext
10501{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
10502$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010503if test $have_getaddrinfo = yes
10504then
Matthias Kloseb9621712010-04-24 17:59:49 +000010505 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
10506$as_echo_n "checking getaddrinfo bug... " >&6; }
10507 if test "${ac_cv_buggy_getaddrinfo+set}" = set; then :
10508 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010509else
Matthias Kloseb9621712010-04-24 17:59:49 +000010510 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010511 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010512else
Matthias Kloseb9621712010-04-24 17:59:49 +000010513 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010514/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010515
10516#include <sys/types.h>
10517#include <netdb.h>
10518#include <string.h>
10519#include <sys/socket.h>
10520#include <netinet/in.h>
10521
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010522int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010523{
10524 int passive, gaierr, inet4 = 0, inet6 = 0;
10525 struct addrinfo hints, *ai, *aitop;
10526 char straddr[INET6_ADDRSTRLEN], strport[16];
10527
10528 for (passive = 0; passive <= 1; passive++) {
10529 memset(&hints, 0, sizeof(hints));
10530 hints.ai_family = AF_UNSPEC;
10531 hints.ai_flags = passive ? AI_PASSIVE : 0;
10532 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000010533 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010534 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
10535 (void)gai_strerror(gaierr);
10536 goto bad;
10537 }
10538 for (ai = aitop; ai; ai = ai->ai_next) {
10539 if (ai->ai_addr == NULL ||
10540 ai->ai_addrlen == 0 ||
10541 getnameinfo(ai->ai_addr, ai->ai_addrlen,
10542 straddr, sizeof(straddr), strport, sizeof(strport),
10543 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
10544 goto bad;
10545 }
10546 switch (ai->ai_family) {
10547 case AF_INET:
10548 if (strcmp(strport, "54321") != 0) {
10549 goto bad;
10550 }
10551 if (passive) {
10552 if (strcmp(straddr, "0.0.0.0") != 0) {
10553 goto bad;
10554 }
10555 } else {
10556 if (strcmp(straddr, "127.0.0.1") != 0) {
10557 goto bad;
10558 }
10559 }
10560 inet4++;
10561 break;
10562 case AF_INET6:
10563 if (strcmp(strport, "54321") != 0) {
10564 goto bad;
10565 }
10566 if (passive) {
10567 if (strcmp(straddr, "::") != 0) {
10568 goto bad;
10569 }
10570 } else {
10571 if (strcmp(straddr, "::1") != 0) {
10572 goto bad;
10573 }
10574 }
10575 inet6++;
10576 break;
10577 case AF_UNSPEC:
10578 goto bad;
10579 break;
10580 default:
10581 /* another family support? */
10582 break;
10583 }
10584 }
10585 }
10586
10587 if (!(inet4 == 0 || inet4 == 2))
10588 goto bad;
10589 if (!(inet6 == 0 || inet6 == 2))
10590 goto bad;
10591
10592 if (aitop)
10593 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010594 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010595
10596 bad:
10597 if (aitop)
10598 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010599 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010600}
10601
Martin v. Löwis11437992002-04-12 09:54:03 +000010602_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010603if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010604 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010605else
Matthias Kloseb9621712010-04-24 17:59:49 +000010606 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010607fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010608rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10609 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010610fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010611
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010612fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010613
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010614fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010615
Mark Dickinson2df5d282009-12-31 21:22:50 +000010616if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010617then
10618 if test $ipv6 = yes
10619 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010620 echo 'Fatal: You must get working getaddrinfo() function.'
10621 echo ' or you can specify "--disable-ipv6"'.
10622 exit 1
10623 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010624else
Martin v. Löwis11437992002-04-12 09:54:03 +000010625
Matthias Kloseb9621712010-04-24 17:59:49 +000010626$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010627
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010628fi
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010629for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000010630do :
10631 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
10632if test "x$ac_cv_func_getnameinfo" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010633 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010634#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010635_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010636
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010637fi
10638done
10639
Michael W. Hudson54241132001-12-07 15:38:26 +000010640
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010641# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000010642{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
10643$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
10644if test "${ac_cv_header_time+set}" = set; then :
10645 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010646else
Matthias Kloseb9621712010-04-24 17:59:49 +000010647 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010648/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010649#include <sys/types.h>
10650#include <sys/time.h>
10651#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010652
Martin v. Löwis11437992002-04-12 09:54:03 +000010653int
10654main ()
10655{
10656if ((struct tm *) 0)
10657return 0;
10658 ;
10659 return 0;
10660}
10661_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010662if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010663 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000010664else
Matthias Kloseb9621712010-04-24 17:59:49 +000010665 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010666fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010667rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010668fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010669{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
10670$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010671if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010672
Matthias Kloseb9621712010-04-24 17:59:49 +000010673$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010674
10675fi
10676
Matthias Kloseb9621712010-04-24 17:59:49 +000010677{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
10678$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
10679if test "${ac_cv_struct_tm+set}" = set; then :
10680 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010681else
Matthias Kloseb9621712010-04-24 17:59:49 +000010682 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010683/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010684#include <sys/types.h>
10685#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010686
Martin v. Löwis11437992002-04-12 09:54:03 +000010687int
10688main ()
10689{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010690struct tm tm;
10691 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000010692 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000010693 ;
10694 return 0;
10695}
10696_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010697if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010698 ac_cv_struct_tm=time.h
10699else
Matthias Kloseb9621712010-04-24 17:59:49 +000010700 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010701fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010702rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010703fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010704{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
10705$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010706if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010707
Matthias Kloseb9621712010-04-24 17:59:49 +000010708$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010709
10710fi
10711
Matthias Kloseb9621712010-04-24 17:59:49 +000010712ac_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 +000010713#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000010714
Matthias Kloseb9621712010-04-24 17:59:49 +000010715"
10716if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010717
10718cat >>confdefs.h <<_ACEOF
10719#define HAVE_STRUCT_TM_TM_ZONE 1
10720_ACEOF
10721
10722
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010723fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010724
Martin v. Löwis11437992002-04-12 09:54:03 +000010725if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
10726
Matthias Kloseb9621712010-04-24 17:59:49 +000010727$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010728
10729else
Matthias Kloseb9621712010-04-24 17:59:49 +000010730 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
10731"
10732if test "x$ac_cv_have_decl_tzname" = x""yes; then :
10733 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010734else
Matthias Kloseb9621712010-04-24 17:59:49 +000010735 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010736fi
10737
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010738cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010739#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010740_ACEOF
10741
Matthias Kloseb9621712010-04-24 17:59:49 +000010742 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
10743$as_echo_n "checking for tzname... " >&6; }
10744if test "${ac_cv_var_tzname+set}" = set; then :
10745 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010746else
Matthias Kloseb9621712010-04-24 17:59:49 +000010747 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010748/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010749#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010750#if !HAVE_DECL_TZNAME
10751extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000010752#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010753
Martin v. Löwis11437992002-04-12 09:54:03 +000010754int
10755main ()
10756{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010757return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000010758 ;
10759 return 0;
10760}
10761_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010762if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010763 ac_cv_var_tzname=yes
10764else
Matthias Kloseb9621712010-04-24 17:59:49 +000010765 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010766fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010767rm -f core conftest.err conftest.$ac_objext \
10768 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000010769fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010770{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
10771$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010772 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010773
Matthias Kloseb9621712010-04-24 17:59:49 +000010774$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010775
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010776 fi
10777fi
10778
Matthias Kloseb9621712010-04-24 17:59:49 +000010779ac_fn_c_check_member "$LINENO" "struct stat" "st_rdev" "ac_cv_member_struct_stat_st_rdev" "$ac_includes_default"
10780if test "x$ac_cv_member_struct_stat_st_rdev" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010781
10782cat >>confdefs.h <<_ACEOF
10783#define HAVE_STRUCT_STAT_ST_RDEV 1
10784_ACEOF
10785
10786
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010787fi
10788
Matthias Kloseb9621712010-04-24 17:59:49 +000010789ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
10790if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000010791
Martin v. Löwis11437992002-04-12 09:54:03 +000010792cat >>confdefs.h <<_ACEOF
10793#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
10794_ACEOF
10795
10796
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010797fi
10798
Matthias Kloseb9621712010-04-24 17:59:49 +000010799ac_fn_c_check_member "$LINENO" "struct stat" "st_flags" "ac_cv_member_struct_stat_st_flags" "$ac_includes_default"
10800if test "x$ac_cv_member_struct_stat_st_flags" = x""yes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000010801
10802cat >>confdefs.h <<_ACEOF
10803#define HAVE_STRUCT_STAT_ST_FLAGS 1
10804_ACEOF
10805
10806
10807fi
10808
Matthias Kloseb9621712010-04-24 17:59:49 +000010809ac_fn_c_check_member "$LINENO" "struct stat" "st_gen" "ac_cv_member_struct_stat_st_gen" "$ac_includes_default"
10810if test "x$ac_cv_member_struct_stat_st_gen" = x""yes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000010811
10812cat >>confdefs.h <<_ACEOF
10813#define HAVE_STRUCT_STAT_ST_GEN 1
10814_ACEOF
10815
10816
10817fi
10818
Matthias Kloseb9621712010-04-24 17:59:49 +000010819ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtime" "ac_cv_member_struct_stat_st_birthtime" "$ac_includes_default"
10820if test "x$ac_cv_member_struct_stat_st_birthtime" = x""yes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000010821
10822cat >>confdefs.h <<_ACEOF
10823#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
10824_ACEOF
10825
10826
10827fi
10828
Matthias Kloseb9621712010-04-24 17:59:49 +000010829ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
10830if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000010831
Martin v. Löwis11437992002-04-12 09:54:03 +000010832cat >>confdefs.h <<_ACEOF
10833#define HAVE_STRUCT_STAT_ST_BLOCKS 1
10834_ACEOF
10835
10836
Matthias Kloseb9621712010-04-24 17:59:49 +000010837$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010838
10839else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010840 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000010841 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010842 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
10843 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010844esac
10845
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010846fi
10847
Michael W. Hudson54241132001-12-07 15:38:26 +000010848
Martin v. Löwis11437992002-04-12 09:54:03 +000010849
Matthias Kloseb9621712010-04-24 17:59:49 +000010850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
10851$as_echo_n "checking for time.h that defines altzone... " >&6; }
10852if test "${ac_cv_header_time_altzone+set}" = set; then :
10853 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010854else
Matthias Kloseb159a552010-04-25 21:00:44 +000010855
Matthias Kloseb9621712010-04-24 17:59:49 +000010856 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010857/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000010858#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010859int
10860main ()
10861{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010862return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000010863 ;
10864 return 0;
10865}
10866_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010867if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010868 ac_cv_header_time_altzone=yes
10869else
Matthias Kloseb9621712010-04-24 17:59:49 +000010870 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000010871fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010872rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000010873
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010874fi
10875
Matthias Kloseb9621712010-04-24 17:59:49 +000010876{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
10877$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010878if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010879
Matthias Kloseb9621712010-04-24 17:59:49 +000010880$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010881
10882fi
10883
Guido van Rossumda88dad1995-01-26 00:46:29 +000010884was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000010885{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
10886$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
10887cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010888/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000010889
10890#include <sys/types.h>
10891#include <sys/select.h>
10892#include <sys/time.h>
10893
Martin v. Löwis11437992002-04-12 09:54:03 +000010894int
10895main ()
10896{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010897;
Martin v. Löwis11437992002-04-12 09:54:03 +000010898 ;
10899 return 0;
10900}
10901_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010902if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010903
10904
Matthias Kloseb9621712010-04-24 17:59:49 +000010905$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000010906
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010907 was_it_defined=yes
10908
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010909fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010910rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010911{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
10912$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010913
Matthias Kloseb9621712010-04-24 17:59:49 +000010914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
10915$as_echo_n "checking for addrinfo... " >&6; }
10916if test "${ac_cv_struct_addrinfo+set}" = set; then :
10917 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010918else
Matthias Kloseb9621712010-04-24 17:59:49 +000010919 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010920/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010921#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010922int
10923main ()
10924{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010925struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000010926 ;
10927 return 0;
10928}
10929_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010930if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010931 ac_cv_struct_addrinfo=yes
10932else
Matthias Kloseb9621712010-04-24 17:59:49 +000010933 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010934fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010935rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10936fi
10937
Matthias Kloseb9621712010-04-24 17:59:49 +000010938{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
10939$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010940if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010941
Matthias Kloseb9621712010-04-24 17:59:49 +000010942$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010943
10944fi
10945
Matthias Kloseb9621712010-04-24 17:59:49 +000010946{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
10947$as_echo_n "checking for sockaddr_storage... " >&6; }
10948if test "${ac_cv_struct_sockaddr_storage+set}" = set; then :
10949 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010950else
Matthias Kloseb9621712010-04-24 17:59:49 +000010951 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010952/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010953
10954# include <sys/types.h>
10955# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010956int
10957main ()
10958{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010959struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000010960 ;
10961 return 0;
10962}
10963_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010964if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010965 ac_cv_struct_sockaddr_storage=yes
10966else
Matthias Kloseb9621712010-04-24 17:59:49 +000010967 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010968fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010969rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10970fi
10971
Matthias Kloseb9621712010-04-24 17:59:49 +000010972{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
10973$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010974if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010975
Matthias Kloseb9621712010-04-24 17:59:49 +000010976$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010977
10978fi
10979
Guido van Rossum627b2d71993-12-24 10:39:16 +000010980# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000010981
Matthias Kloseb9621712010-04-24 17:59:49 +000010982{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
10983$as_echo_n "checking whether char is unsigned... " >&6; }
10984if test "${ac_cv_c_char_unsigned+set}" = set; then :
10985 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000010986else
Matthias Kloseb9621712010-04-24 17:59:49 +000010987 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010988/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010989$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000010990int
10991main ()
10992{
10993static int test_array [1 - 2 * !(((char) -1) < 0)];
10994test_array [0] = 0
10995
10996 ;
10997 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000010998}
Martin v. Löwis11437992002-04-12 09:54:03 +000010999_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011000if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000011001 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011002else
Matthias Kloseb9621712010-04-24 17:59:49 +000011003 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011004fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011005rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011006fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011007{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
11008$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011009if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011010 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011011
11012fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000011013
Matthias Kloseb9621712010-04-24 17:59:49 +000011014{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
11015$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
11016if test "${ac_cv_c_const+set}" = set; then :
11017 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011018else
Matthias Kloseb9621712010-04-24 17:59:49 +000011019 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011020/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011021
Martin v. Löwis11437992002-04-12 09:54:03 +000011022int
11023main ()
11024{
11025/* FIXME: Include the comments suggested by Paul. */
11026#ifndef __cplusplus
11027 /* Ultrix mips cc rejects this. */
11028 typedef int charset[2];
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011029 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000011030 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011031 char const *const *pcpcc;
11032 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011033 /* NEC SVR4.0.2 mips cc rejects this. */
11034 struct point {int x, y;};
11035 static struct point const zero = {0,0};
11036 /* AIX XL C 1.02.0.0 rejects this.
11037 It does not let you subtract one const X* pointer from another in
11038 an arm of an if-expression whose if-part is not a constant
11039 expression */
11040 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011041 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011042 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011043 ++pcpcc;
11044 ppc = (char**) pcpcc;
11045 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011046 { /* SCO 3.2v4 cc rejects this. */
11047 char *t;
11048 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011049
Martin v. Löwis11437992002-04-12 09:54:03 +000011050 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011051 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011052 }
11053 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
11054 int x[] = {25, 17};
11055 const int *foo = &x[0];
11056 ++foo;
11057 }
11058 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11059 typedef const int *iptr;
11060 iptr p = 0;
11061 ++p;
11062 }
11063 { /* AIX XL C 1.02.0.0 rejects this saying
11064 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11065 struct s { int j; const int *ap[3]; };
11066 struct s *b; b->j = 5;
11067 }
11068 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11069 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011070 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011071 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011072 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000011073#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000011074
Martin v. Löwis11437992002-04-12 09:54:03 +000011075 ;
11076 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000011077}
Martin v. Löwis11437992002-04-12 09:54:03 +000011078_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011079if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011080 ac_cv_c_const=yes
11081else
Matthias Kloseb9621712010-04-24 17:59:49 +000011082 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011083fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011084rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011085fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011086{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
11087$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011088if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011089
Matthias Kloseb9621712010-04-24 17:59:49 +000011090$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011091
11092fi
11093
Michael W. Hudson54241132001-12-07 15:38:26 +000011094
Guido van Rossumda88dad1995-01-26 00:46:29 +000011095works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
11097$as_echo_n "checking for working volatile... " >&6; }
11098cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011099/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011100
Martin v. Löwis11437992002-04-12 09:54:03 +000011101int
11102main ()
11103{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011104volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011105 ;
11106 return 0;
11107}
11108_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011109if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011110 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011111else
Skip Montanaro6dead952003-09-25 14:50:04 +000011112
Matthias Kloseb9621712010-04-24 17:59:49 +000011113$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011114
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011115
Guido van Rossum627b2d71993-12-24 10:39:16 +000011116fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011117rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011118{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11119$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011120
Guido van Rossumda88dad1995-01-26 00:46:29 +000011121works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011122{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
11123$as_echo_n "checking for working signed char... " >&6; }
11124cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011125/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011126
Martin v. Löwis11437992002-04-12 09:54:03 +000011127int
11128main ()
11129{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011130signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000011131 ;
11132 return 0;
11133}
11134_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011135if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011136 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011137else
Skip Montanaro6dead952003-09-25 14:50:04 +000011138
Matthias Kloseb9621712010-04-24 17:59:49 +000011139$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000011140
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011141
Guido van Rossum7f43da71994-08-01 12:15:30 +000011142fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011143rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011144{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11145$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011146
Guido van Rossumda88dad1995-01-26 00:46:29 +000011147have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
11149$as_echo_n "checking for prototypes... " >&6; }
11150cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011151/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011152int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011153int
11154main ()
11155{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011156return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000011157 ;
11158 return 0;
11159}
11160_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011161if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011162
Matthias Kloseb9621712010-04-24 17:59:49 +000011163$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011164
Matthias Kloseb159a552010-04-25 21:00:44 +000011165 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011166fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011167rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011168{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
11169$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011170
Guido van Rossumda88dad1995-01-26 00:46:29 +000011171works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011172{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
11173$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
11174cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011175/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011176
11177#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000011178int foo(int x, ...) {
11179 va_list va;
11180 va_start(va, x);
11181 va_arg(va, int);
11182 va_arg(va, char *);
11183 va_arg(va, double);
11184 return 0;
11185}
Guido van Rossum7f43da71994-08-01 12:15:30 +000011186
Martin v. Löwis11437992002-04-12 09:54:03 +000011187int
11188main ()
11189{
Guido van Rossum90eea071996-08-30 20:58:57 +000011190return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000011191 ;
11192 return 0;
11193}
11194_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011195if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011196
11197
Matthias Kloseb9621712010-04-24 17:59:49 +000011198$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011199
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011200 works=yes
11201
Guido van Rossum627b2d71993-12-24 10:39:16 +000011202fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011203rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011204{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11205$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011206
Martin v. Löwisd6320502004-08-12 13:45:08 +000011207# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000011208{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
11209$as_echo_n "checking for socketpair... " >&6; }
11210cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011211/* end confdefs.h. */
11212
11213#include <sys/types.h>
11214#include <sys/socket.h>
11215
11216int
11217main ()
11218{
11219void *x=socketpair
11220 ;
11221 return 0;
11222}
11223_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011224if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000011225
Matthias Kloseb9621712010-04-24 17:59:49 +000011226$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000011227
Matthias Kloseb159a552010-04-25 21:00:44 +000011228 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011229$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011230else
Matthias Kloseb9621712010-04-24 17:59:49 +000011231 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11232$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011233
11234fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011235rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011236
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011237# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000011238{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
11239$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
11240cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011241/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011242#include <sys/types.h>
11243#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011244int
11245main ()
11246{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011247struct sockaddr x;
11248x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011249 ;
11250 return 0;
11251}
11252_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011253if ac_fn_c_try_compile "$LINENO"; then :
11254 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11255$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011256
Matthias Kloseb9621712010-04-24 17:59:49 +000011257$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011258
11259else
Matthias Kloseb9621712010-04-24 17:59:49 +000011260 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11261$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011262
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011263fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011264rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011265
Guido van Rossumda88dad1995-01-26 00:46:29 +000011266va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011267{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
11268$as_echo_n "checking whether va_list is an array... " >&6; }
11269cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011270/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011271
11272#ifdef HAVE_STDARG_PROTOTYPES
11273#include <stdarg.h>
11274#else
11275#include <varargs.h>
11276#endif
11277
Martin v. Löwis11437992002-04-12 09:54:03 +000011278int
11279main ()
11280{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011281va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000011282 ;
11283 return 0;
11284}
11285_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011286if ac_fn_c_try_compile "$LINENO"; then :
11287
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011288else
Skip Montanaro6dead952003-09-25 14:50:04 +000011289
Martin v. Löwis11437992002-04-12 09:54:03 +000011290
Matthias Kloseb9621712010-04-24 17:59:49 +000011291$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011292
Guido van Rossumda88dad1995-01-26 00:46:29 +000011293 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011294
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011295fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011296rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011297{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
11298$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011299
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011300# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000011301
11302
Matthias Kloseb9621712010-04-24 17:59:49 +000011303ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
11304if test "x$ac_cv_func_gethostbyname_r" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011305
Matthias Kloseb9621712010-04-24 17:59:49 +000011306 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000011307
Matthias Kloseb9621712010-04-24 17:59:49 +000011308 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
11309$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011310 OLD_CFLAGS=$CFLAGS
11311 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011312 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011313/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011314
11315# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011316
Martin v. Löwis11437992002-04-12 09:54:03 +000011317int
11318main ()
11319{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011320
11321 char *name;
11322 struct hostent *he, *res;
11323 char buffer[2048];
11324 int buflen = 2048;
11325 int h_errnop;
11326
11327 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011328
11329 ;
11330 return 0;
11331}
11332_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011333if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011334
Matthias Kloseb9621712010-04-24 17:59:49 +000011335 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011336
Martin v. Löwis11437992002-04-12 09:54:03 +000011337
Matthias Kloseb9621712010-04-24 17:59:49 +000011338$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011339
Matthias Kloseb9621712010-04-24 17:59:49 +000011340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11341$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011342
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011343else
Skip Montanaro6dead952003-09-25 14:50:04 +000011344
Matthias Kloseb9621712010-04-24 17:59:49 +000011345 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11346$as_echo "no" >&6; }
11347 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
11348$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
11349 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011350/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011351
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011352# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011353
Martin v. Löwis11437992002-04-12 09:54:03 +000011354int
11355main ()
11356{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011357
11358 char *name;
11359 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000011360 char buffer[2048];
11361 int buflen = 2048;
11362 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011363
Matthias Kloseb159a552010-04-25 21:00:44 +000011364 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011365
11366 ;
11367 return 0;
11368}
11369_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011370if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011371
Matthias Kloseb9621712010-04-24 17:59:49 +000011372 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011373
Martin v. Löwis11437992002-04-12 09:54:03 +000011374
Matthias Kloseb159a552010-04-25 21:00:44 +000011375$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011376
Matthias Kloseb9621712010-04-24 17:59:49 +000011377 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11378$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011379
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011380else
Skip Montanaro6dead952003-09-25 14:50:04 +000011381
Matthias Kloseb9621712010-04-24 17:59:49 +000011382 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11383$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011384 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
11385$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
11386 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11387/* end confdefs.h. */
11388
11389# include <netdb.h>
11390
11391int
11392main ()
11393{
11394
11395 char *name;
11396 struct hostent *he;
11397 struct hostent_data data;
11398
11399 (void) gethostbyname_r(name, he, &data);
11400
11401 ;
11402 return 0;
11403}
11404_ACEOF
11405if ac_fn_c_try_compile "$LINENO"; then :
11406
11407 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
11408
11409
11410$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
11411
11412 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11413$as_echo "yes" >&6; }
11414
11415else
11416
11417 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11418$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011419
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011420fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011421rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011422
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011423fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011424rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011425
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011426fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011427rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011428 CFLAGS=$OLD_CFLAGS
11429
11430else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011431
Matthias Kloseb9621712010-04-24 17:59:49 +000011432 for ac_func in gethostbyname
11433do :
11434 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
11435if test "x$ac_cv_func_gethostbyname" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011436 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011437#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011438_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011439
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011440fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011441done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011442
Michael W. Hudson54241132001-12-07 15:38:26 +000011443
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011444fi
11445
Michael W. Hudson54241132001-12-07 15:38:26 +000011446
11447
11448
11449
11450
11451
Guido van Rossum627b2d71993-12-24 10:39:16 +000011452# checks for system services
11453# (none yet)
11454
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011455# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000011456ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
11457if test "x$ac_cv_func___fpu_control" = x""yes; then :
11458
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011459else
Matthias Kloseb9621712010-04-24 17:59:49 +000011460 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
11461$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
11462if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then :
11463 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011464else
Martin v. Löwis11437992002-04-12 09:54:03 +000011465 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011466LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011467cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011468/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011469
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011470/* Override any GCC internal prototype to avoid an error.
11471 Use char because int might match the return type of a GCC
11472 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011473#ifdef __cplusplus
11474extern "C"
11475#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011476char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011477int
11478main ()
11479{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011480return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011481 ;
11482 return 0;
11483}
11484_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011485if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011486 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011487else
Matthias Kloseb9621712010-04-24 17:59:49 +000011488 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011489fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011490rm -f core conftest.err conftest.$ac_objext \
11491 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011492LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011493fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011494{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
11495$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
11496if test "x$ac_cv_lib_ieee___fpu_control" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011497 cat >>confdefs.h <<_ACEOF
11498#define HAVE_LIBIEEE 1
11499_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011500
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011501 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011502
Guido van Rossum627b2d71993-12-24 10:39:16 +000011503fi
11504
Michael W. Hudson54241132001-12-07 15:38:26 +000011505
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011506fi
11507
Michael W. Hudson54241132001-12-07 15:38:26 +000011508
Guido van Rossum7f253911997-05-09 02:42:48 +000011509# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000011510{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
11511$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011512
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011513# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011514if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011515 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000011516if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000011517then
11518
Matthias Kloseb9621712010-04-24 17:59:49 +000011519$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011520
Matthias Kloseb9621712010-04-24 17:59:49 +000011521 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11522$as_echo "yes" >&6; }
11523else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11524$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011525fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000011526else
Matthias Kloseb9621712010-04-24 17:59:49 +000011527 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11528$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011529fi
11530
Guido van Rossum7f253911997-05-09 02:42:48 +000011531
Guido van Rossum7f43da71994-08-01 12:15:30 +000011532# check for --with-libm=...
11533
Guido van Rossum563e7081996-09-10 18:20:48 +000011534case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000011535Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000011536*) LIBM=-lm
11537esac
Matthias Kloseb9621712010-04-24 17:59:49 +000011538{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
11539$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011540
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011541# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011542if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011543 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000011544if test "$withval" = no
11545then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000011546 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
11547$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011548elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011549then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000011550 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
11551$as_echo "set LIBM=\"$withval\"" >&6; }
Benjamin Petersond7f73e92010-09-05 00:09:07 +000011552else as_fn_error "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011553fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011554else
Matthias Kloseb9621712010-04-24 17:59:49 +000011555 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
11556$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011557fi
11558
Guido van Rossum7f43da71994-08-01 12:15:30 +000011559
11560# check for --with-libc=...
11561
Matthias Kloseb9621712010-04-24 17:59:49 +000011562{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
11563$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011564
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011565# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011566if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011567 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000011568if test "$withval" = no
11569then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000011570 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
11571$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011572elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011573then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000011574 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
11575$as_echo "set LIBC=\"$withval\"" >&6; }
Benjamin Petersond7f73e92010-09-05 00:09:07 +000011576else as_fn_error "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011577fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011578else
Matthias Kloseb9621712010-04-24 17:59:49 +000011579 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
11580$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011581fi
11582
Guido van Rossum7f43da71994-08-01 12:15:30 +000011583
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011584# **************************************************
11585# * Check for various properties of floating point *
11586# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011587
Matthias Kloseb9621712010-04-24 17:59:49 +000011588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
11589$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
11590if test "${ac_cv_little_endian_double+set}" = set; then :
11591 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011592else
11593
Matthias Kloseb9621712010-04-24 17:59:49 +000011594if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011595 ac_cv_little_endian_double=no
11596else
Matthias Kloseb9621712010-04-24 17:59:49 +000011597 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011598/* end confdefs.h. */
11599
11600#include <string.h>
11601int main() {
11602 double x = 9006104071832581.0;
11603 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
11604 return 0;
11605 else
11606 return 1;
11607}
11608
11609_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011610if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011611 ac_cv_little_endian_double=yes
11612else
Matthias Kloseb9621712010-04-24 17:59:49 +000011613 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011614fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011615rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11616 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011617fi
11618
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011619fi
11620
Matthias Kloseb9621712010-04-24 17:59:49 +000011621{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
11622$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011623if test "$ac_cv_little_endian_double" = yes
11624then
11625
Matthias Kloseb9621712010-04-24 17:59:49 +000011626$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011627
11628fi
11629
Matthias Kloseb9621712010-04-24 17:59:49 +000011630{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
11631$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
11632if test "${ac_cv_big_endian_double+set}" = set; then :
11633 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011634else
11635
Matthias Kloseb9621712010-04-24 17:59:49 +000011636if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011637 ac_cv_big_endian_double=no
11638else
Matthias Kloseb9621712010-04-24 17:59:49 +000011639 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011640/* end confdefs.h. */
11641
11642#include <string.h>
11643int main() {
11644 double x = 9006104071832581.0;
11645 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
11646 return 0;
11647 else
11648 return 1;
11649}
11650
11651_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011652if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011653 ac_cv_big_endian_double=yes
11654else
Matthias Kloseb9621712010-04-24 17:59:49 +000011655 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011656fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011657rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11658 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011659fi
11660
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011661fi
11662
Matthias Kloseb9621712010-04-24 17:59:49 +000011663{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
11664$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011665if test "$ac_cv_big_endian_double" = yes
11666then
11667
Matthias Kloseb9621712010-04-24 17:59:49 +000011668$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011669
11670fi
11671
11672# Some ARM platforms use a mixed-endian representation for doubles.
11673# While Python doesn't currently have full support for these platforms
11674# (see e.g., issue 1762561), we can at least make sure that float <-> string
11675# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000011676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
11677$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
11678if test "${ac_cv_mixed_endian_double+set}" = set; then :
11679 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011680else
11681
Matthias Kloseb9621712010-04-24 17:59:49 +000011682if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011683 ac_cv_mixed_endian_double=no
11684else
Matthias Kloseb9621712010-04-24 17:59:49 +000011685 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011686/* end confdefs.h. */
11687
11688#include <string.h>
11689int main() {
11690 double x = 9006104071832581.0;
11691 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
11692 return 0;
11693 else
11694 return 1;
11695}
11696
11697_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011698if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011699 ac_cv_mixed_endian_double=yes
11700else
Matthias Kloseb9621712010-04-24 17:59:49 +000011701 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011702fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011703rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11704 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011705fi
11706
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011707fi
11708
Matthias Kloseb9621712010-04-24 17:59:49 +000011709{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
11710$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011711if test "$ac_cv_mixed_endian_double" = yes
11712then
11713
Matthias Kloseb9621712010-04-24 17:59:49 +000011714$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011715
11716fi
11717
Mark Dickinson7abf8d42009-04-18 20:17:52 +000011718# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000011719# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000011720# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000011721# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011722# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000011723# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011724
11725# This inline assembler syntax may also work for suncc and icc,
11726# so we try it on all platforms.
11727
Matthias Kloseb9621712010-04-24 17:59:49 +000011728{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
11729$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
11730cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011731/* end confdefs.h. */
11732
11733int
11734main ()
11735{
11736
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011737 unsigned short cw;
11738 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
11739 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011740
11741 ;
11742 return 0;
11743}
11744_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011745if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011746 have_gcc_asm_for_x87=yes
11747else
Matthias Kloseb9621712010-04-24 17:59:49 +000011748 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011749fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011750rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011751{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
11752$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011753if test "$have_gcc_asm_for_x87" = yes
11754then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011755
Matthias Kloseb9621712010-04-24 17:59:49 +000011756$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011757
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011758fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011759
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011760# Detect whether system arithmetic is subject to x87-style double
11761# rounding issues. The result of this test has little meaning on non
11762# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
11763# mode is round-to-nearest and double rounding issues are present, and
11764# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000011765{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
11766$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011767# $BASECFLAGS may affect the result
11768ac_save_cc="$CC"
11769CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011770if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011771 ac_cv_x87_double_rounding=no
11772else
Matthias Kloseb9621712010-04-24 17:59:49 +000011773 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011774/* end confdefs.h. */
11775
11776#include <stdlib.h>
11777#include <math.h>
11778int main() {
11779 volatile double x, y, z;
11780 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
11781 x = 0.99999999999999989; /* 1-2**-53 */
11782 y = 1./x;
11783 if (y != 1.)
11784 exit(0);
11785 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
11786 x = 1e16;
11787 y = 2.99999;
11788 z = x + y;
11789 if (z != 1e16+4.)
11790 exit(0);
11791 /* both tests show evidence of double rounding */
11792 exit(1);
11793}
11794
11795_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011796if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011797 ac_cv_x87_double_rounding=no
11798else
Matthias Kloseb9621712010-04-24 17:59:49 +000011799 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011800fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011801rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11802 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011803fi
11804
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011805CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000011806{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
11807$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011808if test "$ac_cv_x87_double_rounding" = yes
11809then
11810
Matthias Kloseb9621712010-04-24 17:59:49 +000011811$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011812
11813fi
11814
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011815# ************************************
11816# * Check for mathematical functions *
11817# ************************************
11818
11819LIBS_SAVE=$LIBS
11820LIBS="$LIBS $LIBM"
11821
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011822# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
11823# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000011824{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
11825$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
11826if test "${ac_cv_tanh_preserves_zero_sign+set}" = set; then :
11827 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011828else
11829
Matthias Kloseb9621712010-04-24 17:59:49 +000011830if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011831 ac_cv_tanh_preserves_zero_sign=no
11832else
Matthias Kloseb9621712010-04-24 17:59:49 +000011833 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011834/* end confdefs.h. */
11835
11836#include <math.h>
11837#include <stdlib.h>
11838int main() {
11839 /* return 0 if either negative zeros don't exist
11840 on this platform or if negative zeros exist
11841 and tanh(-0.) == -0. */
11842 if (atan2(0., -1.) == atan2(-0., -1.) ||
11843 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
11844 else exit(1);
11845}
11846
11847_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011848if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011849 ac_cv_tanh_preserves_zero_sign=yes
11850else
Matthias Kloseb9621712010-04-24 17:59:49 +000011851 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011852fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011853rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11854 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011855fi
11856
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011857fi
11858
Matthias Kloseb9621712010-04-24 17:59:49 +000011859{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
11860$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011861if test "$ac_cv_tanh_preserves_zero_sign" = yes
11862then
11863
Matthias Kloseb9621712010-04-24 17:59:49 +000011864$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011865
11866fi
11867
Mark Dickinson9c113362009-09-05 10:36:23 +000011868for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
Matthias Kloseb9621712010-04-24 17:59:49 +000011869do :
11870 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11871ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Benjamin Petersond7f73e92010-09-05 00:09:07 +000011872eval as_val=\$$as_ac_var
11873 if test "x$as_val" = x""yes; then :
Mark Dickinson9c113362009-09-05 10:36:23 +000011874 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011875#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Mark Dickinson9c113362009-09-05 10:36:23 +000011876_ACEOF
11877
11878fi
11879done
11880
Mark Dickinson9c113362009-09-05 10:36:23 +000011881for ac_func in hypot lgamma log1p round tgamma
Matthias Kloseb9621712010-04-24 17:59:49 +000011882do :
11883 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11884ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Benjamin Petersond7f73e92010-09-05 00:09:07 +000011885eval as_val=\$$as_ac_var
11886 if test "x$as_val" = x""yes; then :
Christian Heimes99170a52007-12-19 02:07:34 +000011887 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011888#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimes99170a52007-12-19 02:07:34 +000011889_ACEOF
11890
11891fi
11892done
11893
Matthias Kloseb9621712010-04-24 17:59:49 +000011894ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
11895"
11896if test "x$ac_cv_have_decl_isinf" = x""yes; then :
11897 ac_have_decl=1
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011898else
Matthias Kloseb9621712010-04-24 17:59:49 +000011899 ac_have_decl=0
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011900fi
11901
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011902cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011903#define HAVE_DECL_ISINF $ac_have_decl
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011904_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011905ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
11906"
11907if test "x$ac_cv_have_decl_isnan" = x""yes; then :
11908 ac_have_decl=1
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011909else
Matthias Kloseb9621712010-04-24 17:59:49 +000011910 ac_have_decl=0
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011911fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011912
11913cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011914#define HAVE_DECL_ISNAN $ac_have_decl
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011915_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011916ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
11917"
11918if test "x$ac_cv_have_decl_isfinite" = x""yes; then :
11919 ac_have_decl=1
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011920else
Matthias Kloseb9621712010-04-24 17:59:49 +000011921 ac_have_decl=0
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011922fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011923
11924cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011925#define HAVE_DECL_ISFINITE $ac_have_decl
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011926_ACEOF
11927
11928
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000011929LIBS=$LIBS_SAVE
11930
Mark Dickinsona614f042009-11-28 12:48:43 +000011931# For multiprocessing module, check that sem_open
11932# actually works. For FreeBSD versions <= 7.2,
11933# the kernel module that provides POSIX semaphores
11934# isn't loaded by default, so an attempt to call
11935# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000011936{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
11937$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
11938if test "${ac_cv_posix_semaphores_enabled+set}" = set; then :
11939 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000011940else
Matthias Kloseb9621712010-04-24 17:59:49 +000011941 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000011942 ac_cv_posix_semaphores_enabled=yes
11943else
Matthias Kloseb9621712010-04-24 17:59:49 +000011944 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000011945/* end confdefs.h. */
11946
11947#include <unistd.h>
11948#include <fcntl.h>
11949#include <stdio.h>
11950#include <semaphore.h>
11951#include <sys/stat.h>
11952
11953int main(void) {
11954 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
11955 if (a == SEM_FAILED) {
11956 perror("sem_open");
11957 return 1;
11958 }
11959 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000011960 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000011961 return 0;
11962}
11963
11964_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011965if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000011966 ac_cv_posix_semaphores_enabled=yes
11967else
Matthias Kloseb9621712010-04-24 17:59:49 +000011968 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000011969fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011970rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11971 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000011972fi
11973
11974
Mark Dickinsona614f042009-11-28 12:48:43 +000011975fi
11976
Matthias Kloseb9621712010-04-24 17:59:49 +000011977{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
11978$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000011979if test $ac_cv_posix_semaphores_enabled = no
11980then
11981
Matthias Kloseb9621712010-04-24 17:59:49 +000011982$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000011983
11984fi
11985
Mark Dickinson10683072009-04-18 21:18:19 +000011986# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000011987{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
11988$as_echo_n "checking for broken sem_getvalue... " >&6; }
11989if test "${ac_cv_broken_sem_getvalue+set}" = set; then :
11990 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011991else
Matthias Kloseb9621712010-04-24 17:59:49 +000011992 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011993 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000011994else
Matthias Kloseb9621712010-04-24 17:59:49 +000011995 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000011996/* end confdefs.h. */
11997
11998#include <unistd.h>
11999#include <fcntl.h>
12000#include <stdio.h>
12001#include <semaphore.h>
12002#include <sys/stat.h>
12003
12004int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000012005 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000012006 int count;
12007 int res;
12008 if(a==SEM_FAILED){
12009 perror("sem_open");
12010 return 1;
12011
12012 }
12013 res = sem_getvalue(a, &count);
12014 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000012015 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000012016 return res==-1 ? 1 : 0;
12017}
12018
Mark Dickinson10683072009-04-18 21:18:19 +000012019_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012020if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012021 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000012022else
Matthias Kloseb9621712010-04-24 17:59:49 +000012023 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012024fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012025rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12026 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012027fi
12028
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012029
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012030fi
12031
Matthias Kloseb9621712010-04-24 17:59:49 +000012032{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
12033$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012034if test $ac_cv_broken_sem_getvalue = yes
12035then
12036
Matthias Kloseb9621712010-04-24 17:59:49 +000012037$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012038
12039fi
12040
Mark Dickinsonbd792642009-03-18 20:06:12 +000012041# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000012042{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
12043$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012044# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012045if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000012046 enableval=$enable_big_digits; case $enable_big_digits in
12047yes)
12048 enable_big_digits=30 ;;
12049no)
12050 enable_big_digits=15 ;;
1205115|30)
12052 ;;
12053*)
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012054 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 +000012055esac
Matthias Kloseb9621712010-04-24 17:59:49 +000012056{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
12057$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012058
12059cat >>confdefs.h <<_ACEOF
12060#define PYLONG_BITS_IN_DIGIT $enable_big_digits
12061_ACEOF
12062
12063
12064else
Matthias Kloseb9621712010-04-24 17:59:49 +000012065 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
12066$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012067fi
12068
12069
Guido van Rossumef2255b2000-03-10 22:30:29 +000012070# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012071ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
12072if test "x$ac_cv_header_wchar_h" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012073
12074
Matthias Kloseb9621712010-04-24 17:59:49 +000012075$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012076
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012077 wchar_h="yes"
12078
Guido van Rossumef2255b2000-03-10 22:30:29 +000012079else
Martin v. Löwis11437992002-04-12 09:54:03 +000012080 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000012081
12082fi
12083
Michael W. Hudson54241132001-12-07 15:38:26 +000012084
Martin v. Löwis11437992002-04-12 09:54:03 +000012085
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012086# determine wchar_t size
12087if test "$wchar_h" = yes
12088then
Matthias Kloseb9621712010-04-24 17:59:49 +000012089 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012090# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12091# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12092# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000012093{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
12094$as_echo_n "checking size of wchar_t... " >&6; }
12095if test "${ac_cv_sizeof_wchar_t+set}" = set; then :
12096 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012097else
Matthias Kloseb9621712010-04-24 17:59:49 +000012098 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
12099"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012100
Martin v. Löwis11437992002-04-12 09:54:03 +000012101else
Matthias Kloseb9621712010-04-24 17:59:49 +000012102 if test "$ac_cv_type_wchar_t" = yes; then
12103 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12104$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012105{ as_fn_set_status 77
12106as_fn_error "cannot compute sizeof (wchar_t)
12107See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012108 else
12109 ac_cv_sizeof_wchar_t=0
12110 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012111fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012112
Martin v. Löwis11437992002-04-12 09:54:03 +000012113fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012114{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
12115$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012116
12117
12118
Martin v. Löwis11437992002-04-12 09:54:03 +000012119cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012120#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012121_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012122
Michael W. Hudson54241132001-12-07 15:38:26 +000012123
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012124fi
12125
Matthias Kloseb9621712010-04-24 17:59:49 +000012126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
12127$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012128have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012129cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012130/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012131
12132#include <tcl.h>
12133#if TCL_UTF_MAX != 6
12134# error "NOT UCS4_TCL"
12135#endif
12136int
12137main ()
12138{
12139
12140 ;
12141 return 0;
12142}
12143_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012144if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012145
12146
Matthias Kloseb9621712010-04-24 17:59:49 +000012147$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012148
12149 have_ucs4_tcl=yes
12150
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012151fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012152rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012153{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
12154$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012155
Skip Montanaro6dead952003-09-25 14:50:04 +000012156# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012157if test "$wchar_h" = yes
12158then
12159 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000012160 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
12161$as_echo_n "checking whether wchar_t is signed... " >&6; }
12162 if test "${ac_cv_wchar_t_signed+set}" = set; then :
12163 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012164else
12165
Matthias Kloseb9621712010-04-24 17:59:49 +000012166 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012167 ac_cv_wchar_t_signed=yes
12168else
Matthias Kloseb9621712010-04-24 17:59:49 +000012169 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012170/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012171
12172 #include <wchar.h>
12173 int main()
12174 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000012175 /* Success: exit code 0 */
12176 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012177 }
12178
12179_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012180if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012181 ac_cv_wchar_t_signed=yes
12182else
Matthias Kloseb9621712010-04-24 17:59:49 +000012183 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012184fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012185rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12186 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012187fi
12188
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012189fi
12190
Matthias Kloseb9621712010-04-24 17:59:49 +000012191 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
12192$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012193fi
12194
Matthias Kloseb9621712010-04-24 17:59:49 +000012195{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what type to use for str" >&5
12196$as_echo_n "checking what type to use for str... " >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000012197
12198# Check whether --with-wide-unicode was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012199if test "${with_wide_unicode+set}" = set; then :
Georg Brandl52d168a2008-01-07 18:10:24 +000012200 withval=$with_wide_unicode;
12201if test "$withval" != no
12202then unicode_size="4"
12203else unicode_size="2"
12204fi
12205
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012206else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012207
Georg Brandl52d168a2008-01-07 18:10:24 +000012208case "$have_ucs4_tcl" in
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012209 yes) unicode_size="4";;
Georg Brandl52d168a2008-01-07 18:10:24 +000012210 *) unicode_size="2" ;;
12211esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012212
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012213fi
12214
Martin v. Löwis0036cba2002-04-12 09:58:45 +000012215
12216
Georg Brandl52d168a2008-01-07 18:10:24 +000012217case "$unicode_size" in
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012218 4)
12219 $as_echo "#define Py_UNICODE_SIZE 4" >>confdefs.h
12220
12221 SOABI_QUALIFIERS="${SOABI_QUALIFIERS}u"
12222 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000012223 *) $as_echo "#define Py_UNICODE_SIZE 2" >>confdefs.h
Georg Brandl52d168a2008-01-07 18:10:24 +000012224 ;;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012225esac
12226
Michael W. Hudson54241132001-12-07 15:38:26 +000012227
Martin v. Löwis11437992002-04-12 09:54:03 +000012228
Georg Brandl52d168a2008-01-07 18:10:24 +000012229# wchar_t is only usable if it maps to an unsigned type
12230if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000012231 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000012232then
12233 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012234
Matthias Kloseb9621712010-04-24 17:59:49 +000012235$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012236
Matthias Kloseb9621712010-04-24 17:59:49 +000012237 $as_echo "#define PY_UNICODE_TYPE wchar_t" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012238
Georg Brandl52d168a2008-01-07 18:10:24 +000012239elif test "$ac_cv_sizeof_short" = "$unicode_size"
12240then
12241 PY_UNICODE_TYPE="unsigned short"
Matthias Kloseb9621712010-04-24 17:59:49 +000012242 $as_echo "#define PY_UNICODE_TYPE unsigned short" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012243
Georg Brandl52d168a2008-01-07 18:10:24 +000012244elif test "$ac_cv_sizeof_long" = "$unicode_size"
12245then
12246 PY_UNICODE_TYPE="unsigned long"
Matthias Kloseb9621712010-04-24 17:59:49 +000012247 $as_echo "#define PY_UNICODE_TYPE unsigned long" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012248
Georg Brandl52d168a2008-01-07 18:10:24 +000012249else
12250 PY_UNICODE_TYPE="no type found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012251fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012252{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PY_UNICODE_TYPE" >&5
12253$as_echo "$PY_UNICODE_TYPE" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000012254
12255# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000012256 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12257$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
12258if test "${ac_cv_c_bigendian+set}" = set; then :
12259 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000012260else
Matthias Kloseb9621712010-04-24 17:59:49 +000012261 ac_cv_c_bigendian=unknown
12262 # See if we're dealing with a universal compiler.
12263 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12264/* end confdefs.h. */
12265#ifndef __APPLE_CC__
12266 not a universal capable compiler
12267 #endif
12268 typedef int dummy;
12269
Skip Montanaro6dead952003-09-25 14:50:04 +000012270_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012271if ac_fn_c_try_compile "$LINENO"; then :
12272
12273 # Check for potential -arch flags. It is not universal unless
12274 # there are at least two -arch flags with different values.
12275 ac_arch=
12276 ac_prev=
12277 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12278 if test -n "$ac_prev"; then
12279 case $ac_word in
12280 i?86 | x86_64 | ppc | ppc64)
12281 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12282 ac_arch=$ac_word
12283 else
12284 ac_cv_c_bigendian=universal
12285 break
12286 fi
12287 ;;
12288 esac
12289 ac_prev=
12290 elif test "x$ac_word" = "x-arch"; then
12291 ac_prev=arch
12292 fi
12293 done
12294fi
12295rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12296 if test $ac_cv_c_bigendian = unknown; then
12297 # See if sys/param.h defines the BYTE_ORDER macro.
12298 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012299/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012300#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012301 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012302
Martin v. Löwis11437992002-04-12 09:54:03 +000012303int
12304main ()
12305{
Matthias Kloseb9621712010-04-24 17:59:49 +000012306#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12307 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12308 && LITTLE_ENDIAN)
12309 bogus endian macros
12310 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012311
12312 ;
12313 return 0;
12314}
12315_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012316if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012317 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000012318 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012319/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012320#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012321 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012322
Martin v. Löwis11437992002-04-12 09:54:03 +000012323int
12324main ()
12325{
Guido van Rossumef2255b2000-03-10 22:30:29 +000012326#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000012327 not big endian
12328 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012329
12330 ;
12331 return 0;
12332}
12333_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012334if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012335 ac_cv_c_bigendian=yes
12336else
Matthias Kloseb9621712010-04-24 17:59:49 +000012337 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000012338fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012339rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012340fi
12341rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12342 fi
12343 if test $ac_cv_c_bigendian = unknown; then
12344 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12345 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012346/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000012347#include <limits.h>
12348
Martin v. Löwis11437992002-04-12 09:54:03 +000012349int
12350main ()
12351{
Matthias Kloseb9621712010-04-24 17:59:49 +000012352#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12353 bogus endian macros
12354 #endif
12355
Martin v. Löwis11437992002-04-12 09:54:03 +000012356 ;
12357 return 0;
12358}
12359_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012360if ac_fn_c_try_compile "$LINENO"; then :
12361 # It does; now see whether it defined to _BIG_ENDIAN or not.
12362 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12363/* end confdefs.h. */
12364#include <limits.h>
12365
12366int
12367main ()
12368{
12369#ifndef _BIG_ENDIAN
12370 not big endian
12371 #endif
12372
12373 ;
12374 return 0;
12375}
12376_ACEOF
12377if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012378 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012379else
Matthias Kloseb9621712010-04-24 17:59:49 +000012380 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012381fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012382rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12383fi
12384rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12385 fi
12386 if test $ac_cv_c_bigendian = unknown; then
12387 # Compile a test program.
12388 if test "$cross_compiling" = yes; then :
12389 # Try to guess by grepping values from an object file.
12390 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12391/* end confdefs.h. */
12392short int ascii_mm[] =
12393 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12394 short int ascii_ii[] =
12395 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12396 int use_ascii (int i) {
12397 return ascii_mm[i] + ascii_ii[i];
12398 }
12399 short int ebcdic_ii[] =
12400 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12401 short int ebcdic_mm[] =
12402 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12403 int use_ebcdic (int i) {
12404 return ebcdic_mm[i] + ebcdic_ii[i];
12405 }
12406 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012407
Matthias Kloseb9621712010-04-24 17:59:49 +000012408int
12409main ()
12410{
12411return use_ascii (foo) == use_ebcdic (foo);
12412 ;
12413 return 0;
12414}
12415_ACEOF
12416if ac_fn_c_try_compile "$LINENO"; then :
12417 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12418 ac_cv_c_bigendian=yes
12419 fi
12420 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12421 if test "$ac_cv_c_bigendian" = unknown; then
12422 ac_cv_c_bigendian=no
12423 else
12424 # finding both strings is unlikely to happen, but who knows?
12425 ac_cv_c_bigendian=unknown
12426 fi
12427 fi
12428fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012429rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012430else
Matthias Kloseb9621712010-04-24 17:59:49 +000012431 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012432/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012433$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012434int
12435main ()
12436{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012437
Matthias Kloseb9621712010-04-24 17:59:49 +000012438 /* Are we little or big endian? From Harbison&Steele. */
12439 union
12440 {
12441 long int l;
12442 char c[sizeof (long int)];
12443 } u;
12444 u.l = 1;
12445 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012446
12447 ;
12448 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000012449}
Martin v. Löwis11437992002-04-12 09:54:03 +000012450_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012451if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012452 ac_cv_c_bigendian=no
12453else
Matthias Kloseb9621712010-04-24 17:59:49 +000012454 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000012455fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012456rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12457 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000012458fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012459
Matthias Kloseb9621712010-04-24 17:59:49 +000012460 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012461fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012462{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12463$as_echo "$ac_cv_c_bigendian" >&6; }
12464 case $ac_cv_c_bigendian in #(
12465 yes)
12466 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12467;; #(
12468 no)
12469 ;; #(
12470 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012471
Matthias Kloseb9621712010-04-24 17:59:49 +000012472$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012473
Matthias Kloseb9621712010-04-24 17:59:49 +000012474 ;; #(
12475 *)
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012476 as_fn_error "unknown endianness
12477 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000012478 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000012479
Michael W. Hudson54241132001-12-07 15:38:26 +000012480
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012481# ABI version string for Python extension modules. This appears between the
12482# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
12483# from the following attributes which affect the ABI of this Python build (in
12484# this order):
12485#
12486# * The Python implementation (always 'cpython-' for us)
12487# * The major and minor version numbers
12488# * --with-pydebug (adds a 'd')
12489# * --with-pymalloc (adds a 'm')
12490# * --with-wide-unicode (adds a 'u')
12491#
12492# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012493# would get a shared library ABI version tag of 'cpython-32dmu' and shared
12494# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012495
12496{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
12497$as_echo_n "checking SOABI... " >&6; }
12498SOABI='cpython-'`echo $VERSION | tr -d .`${SOABI_QUALIFIERS}
12499{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
12500$as_echo "$SOABI" >&6; }
12501
12502# SO is the extension of shared libraries `(including the dot!)
12503# -- usually .so, .sl on HP-UX, .dll on Cygwin
12504{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SO" >&5
12505$as_echo_n "checking SO... " >&6; }
12506if test -z "$SO"
12507then
12508 case $ac_sys_system in
12509 hp*|HP*)
12510 case `uname -m` in
12511 ia64) SO=.so;;
12512 *) SO=.sl;;
12513 esac
12514 ;;
12515 CYGWIN*) SO=.dll;;
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012516 Linux*) SO=.${SOABI}.so;;
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012517 *) SO=.so;;
12518 esac
12519else
12520 # this might also be a termcap variable, see #610332
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012521 echo
12522 echo '====================================================================='
12523 echo '+ +'
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012524 echo '+ WARNING: You have set SO in your environment. +'
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012525 echo '+ Do you really mean to change the extension for shared libraries? +'
12526 echo '+ Continuing in 10 seconds to let you to ponder. +'
12527 echo '+ +'
12528 echo '====================================================================='
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012529 sleep 10
12530fi
12531{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SO" >&5
12532$as_echo "$SO" >&6; }
12533
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012534# Check whether right shifting a negative integer extends the sign bit
12535# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000012536{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
12537$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
12538if test "${ac_cv_rshift_extends_sign+set}" = set; then :
12539 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000012540else
Martin v. Löwis11437992002-04-12 09:54:03 +000012541
Matthias Kloseb9621712010-04-24 17:59:49 +000012542if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000012543 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012544else
Matthias Kloseb9621712010-04-24 17:59:49 +000012545 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012546/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012547
12548int main()
12549{
Vladimir Marangozova6180282000-07-12 05:05:06 +000012550 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012551}
12552
Martin v. Löwis11437992002-04-12 09:54:03 +000012553_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012554if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000012555 ac_cv_rshift_extends_sign=yes
12556else
Matthias Kloseb9621712010-04-24 17:59:49 +000012557 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000012558fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012559rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12560 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000012561fi
12562
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012563fi
12564
Matthias Kloseb9621712010-04-24 17:59:49 +000012565{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
12566$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000012567if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012568then
Martin v. Löwis11437992002-04-12 09:54:03 +000012569
Matthias Kloseb9621712010-04-24 17:59:49 +000012570$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012571
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012572fi
12573
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012574# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000012575{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
12576$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
12577if test "${ac_cv_have_getc_unlocked+set}" = set; then :
12578 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012579else
Martin v. Löwis11437992002-04-12 09:54:03 +000012580
Matthias Kloseb9621712010-04-24 17:59:49 +000012581cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012582/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012583#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012584int
12585main ()
12586{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012587
12588 FILE *f = fopen("/dev/null", "r");
12589 flockfile(f);
12590 getc_unlocked(f);
12591 funlockfile(f);
12592
Martin v. Löwis11437992002-04-12 09:54:03 +000012593 ;
12594 return 0;
12595}
12596_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012597if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012598 ac_cv_have_getc_unlocked=yes
12599else
Matthias Kloseb9621712010-04-24 17:59:49 +000012600 ac_cv_have_getc_unlocked=no
12601fi
12602rm -f core conftest.err conftest.$ac_objext \
12603 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012604fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012605
Matthias Kloseb9621712010-04-24 17:59:49 +000012606{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
12607$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012608if test "$ac_cv_have_getc_unlocked" = yes
12609then
Martin v. Löwis11437992002-04-12 09:54:03 +000012610
Matthias Kloseb9621712010-04-24 17:59:49 +000012611$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012612
12613fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012614
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012615# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000012616# save the value of LIBS so we don't actually link Python with readline
12617LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012618
Gregory P. Smith18820942008-09-07 06:24:49 +000012619# On some systems we need to link readline to a termcap compatible
12620# library. NOTE: Keep the precedence of listed libraries synchronised
12621# with setup.py.
12622py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
12624$as_echo_n "checking how to link readline libs... " >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012625for py_libtermcap in "" ncursesw ncurses curses termcap; do
12626 if test -z "$py_libtermcap"; then
12627 READLINE_LIBS="-lreadline"
12628 else
12629 READLINE_LIBS="-lreadline -l$py_libtermcap"
12630 fi
12631 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000012632 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012633/* end confdefs.h. */
12634
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012635/* Override any GCC internal prototype to avoid an error.
12636 Use char because int might match the return type of a GCC
12637 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012638#ifdef __cplusplus
12639extern "C"
12640#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012641char readline ();
12642int
12643main ()
12644{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012645return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012646 ;
12647 return 0;
12648}
12649_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012650if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000012651 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012652fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012653rm -f core conftest.err conftest.$ac_objext \
12654 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000012655 if test $py_cv_lib_readline = yes; then
12656 break
12657 fi
12658done
12659# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
12660#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000012661if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012662 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
12663$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012664else
Matthias Kloseb9621712010-04-24 17:59:49 +000012665 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
12666$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012667
Matthias Kloseb9621712010-04-24 17:59:49 +000012668$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012669
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012670fi
12671
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012672# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000012673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
12674$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
12675if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then :
12676 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012677else
12678 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012679LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012680cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012681/* end confdefs.h. */
12682
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012683/* Override any GCC internal prototype to avoid an error.
12684 Use char because int might match the return type of a GCC
12685 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012686#ifdef __cplusplus
12687extern "C"
12688#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012689char rl_callback_handler_install ();
12690int
12691main ()
12692{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012693return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012694 ;
12695 return 0;
12696}
12697_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012698if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012699 ac_cv_lib_readline_rl_callback_handler_install=yes
12700else
Matthias Kloseb9621712010-04-24 17:59:49 +000012701 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012702fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012703rm -f core conftest.err conftest.$ac_objext \
12704 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012705LIBS=$ac_check_lib_save_LIBS
12706fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012707{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
12708$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
12709if test "x$ac_cv_lib_readline_rl_callback_handler_install" = x""yes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012710
Matthias Kloseb9621712010-04-24 17:59:49 +000012711$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012712
12713fi
12714
12715
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012716# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000012717cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012718/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012719#include <readline/readline.h>
12720_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012721if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012722 have_readline=yes
12723else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012724 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000012725
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012726fi
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012727rm -f conftest.err conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012728if test $have_readline = yes
12729then
Matthias Kloseb9621712010-04-24 17:59:49 +000012730 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012731/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012732#include <readline/readline.h>
12733
12734_ACEOF
12735if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012736 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012737
Matthias Kloseb9621712010-04-24 17:59:49 +000012738$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012739
12740fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012741rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012742
Matthias Kloseb9621712010-04-24 17:59:49 +000012743 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000012744/* end confdefs.h. */
12745#include <readline/readline.h>
12746
12747_ACEOF
12748if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012749 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000012750
Matthias Kloseb9621712010-04-24 17:59:49 +000012751$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000012752
12753fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012754rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000012755
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012756fi
12757
Martin v. Löwis0daad592001-09-30 21:09:59 +000012758# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000012759{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
12760$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
12761if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then :
12762 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000012763else
Martin v. Löwis11437992002-04-12 09:54:03 +000012764 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012765LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012766cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012767/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012768
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012769/* Override any GCC internal prototype to avoid an error.
12770 Use char because int might match the return type of a GCC
12771 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012772#ifdef __cplusplus
12773extern "C"
12774#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012775char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012776int
12777main ()
12778{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012779return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012780 ;
12781 return 0;
12782}
12783_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012784if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012785 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000012786else
Matthias Kloseb9621712010-04-24 17:59:49 +000012787 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000012788fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012789rm -f core conftest.err conftest.$ac_objext \
12790 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012791LIBS=$ac_check_lib_save_LIBS
12792fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012793{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
12794$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
12795if test "x$ac_cv_lib_readline_rl_pre_input_hook" = x""yes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012796
Matthias Kloseb9621712010-04-24 17:59:49 +000012797$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000012798
Martin v. Löwis0daad592001-09-30 21:09:59 +000012799fi
12800
Michael W. Hudson54241132001-12-07 15:38:26 +000012801
Thomas Wouters89d996e2007-09-08 17:39:28 +000012802# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000012803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
12804$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
12805if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then :
12806 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000012807else
12808 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012809LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012810cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000012811/* end confdefs.h. */
12812
12813/* Override any GCC internal prototype to avoid an error.
12814 Use char because int might match the return type of a GCC
12815 builtin and then its argument prototype would still apply. */
12816#ifdef __cplusplus
12817extern "C"
12818#endif
12819char rl_completion_display_matches_hook ();
12820int
12821main ()
12822{
12823return rl_completion_display_matches_hook ();
12824 ;
12825 return 0;
12826}
12827_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012828if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000012829 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
12830else
Matthias Kloseb9621712010-04-24 17:59:49 +000012831 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000012832fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012833rm -f core conftest.err conftest.$ac_objext \
12834 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000012835LIBS=$ac_check_lib_save_LIBS
12836fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012837{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
12838$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
12839if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = x""yes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000012840
Matthias Kloseb9621712010-04-24 17:59:49 +000012841$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000012842
12843fi
12844
12845
Martin v. Löwis0daad592001-09-30 21:09:59 +000012846# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000012847{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
12848$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
12849if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then :
12850 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000012851else
Martin v. Löwis11437992002-04-12 09:54:03 +000012852 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012853LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012854cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012855/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012856
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012857/* Override any GCC internal prototype to avoid an error.
12858 Use char because int might match the return type of a GCC
12859 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012860#ifdef __cplusplus
12861extern "C"
12862#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012863char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012864int
12865main ()
12866{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012867return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012868 ;
12869 return 0;
12870}
12871_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012872if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012873 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000012874else
Matthias Kloseb9621712010-04-24 17:59:49 +000012875 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000012876fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012877rm -f core conftest.err conftest.$ac_objext \
12878 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012879LIBS=$ac_check_lib_save_LIBS
12880fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012881{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
12882$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
12883if test "x$ac_cv_lib_readline_rl_completion_matches" = x""yes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012884
Matthias Kloseb9621712010-04-24 17:59:49 +000012885$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000012886
Guido van Rossum353ae582001-07-10 16:45:32 +000012887fi
12888
Jack Jansendd19cf82001-12-06 22:36:17 +000012889
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012890# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000012891cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012892/* end confdefs.h. */
12893#include <readline/readline.h>
12894_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012895if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012896 have_readline=yes
12897else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012898 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000012899
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012900fi
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012901rm -f conftest.err conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012902if test $have_readline = yes
12903then
Matthias Kloseb9621712010-04-24 17:59:49 +000012904 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012905/* end confdefs.h. */
12906#include <readline/readline.h>
12907
12908_ACEOF
12909if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012910 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012911
Matthias Kloseb9621712010-04-24 17:59:49 +000012912$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012913
12914fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012915rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012916
12917fi
12918
Martin v. Löwis82bca632006-02-10 20:49:30 +000012919# End of readline checks: restore LIBS
12920LIBS=$LIBS_no_readline
12921
Matthias Kloseb9621712010-04-24 17:59:49 +000012922{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
12923$as_echo_n "checking for broken nice()... " >&6; }
12924if test "${ac_cv_broken_nice+set}" = set; then :
12925 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000012926else
Martin v. Löwis11437992002-04-12 09:54:03 +000012927
Matthias Kloseb9621712010-04-24 17:59:49 +000012928if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000012929 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012930else
Matthias Kloseb9621712010-04-24 17:59:49 +000012931 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012932/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012933
12934int main()
12935{
12936 int val1 = nice(1);
12937 if (val1 != -1 && val1 == nice(2))
12938 exit(0);
12939 exit(1);
12940}
12941
Martin v. Löwis11437992002-04-12 09:54:03 +000012942_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012943if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012944 ac_cv_broken_nice=yes
12945else
Matthias Kloseb9621712010-04-24 17:59:49 +000012946 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012947fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012948rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12949 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012950fi
12951
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012952fi
12953
Matthias Kloseb9621712010-04-24 17:59:49 +000012954{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
12955$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012956if test "$ac_cv_broken_nice" = yes
12957then
Martin v. Löwis11437992002-04-12 09:54:03 +000012958
Matthias Kloseb9621712010-04-24 17:59:49 +000012959$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012960
12961fi
12962
Matthias Kloseb9621712010-04-24 17:59:49 +000012963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
12964$as_echo_n "checking for broken poll()... " >&6; }
12965if test "${ac_cv_broken_poll+set}" = set; then :
12966 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012967else
Matthias Kloseb9621712010-04-24 17:59:49 +000012968 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012969 ac_cv_broken_poll=no
12970else
Matthias Kloseb9621712010-04-24 17:59:49 +000012971 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012972/* end confdefs.h. */
12973
12974#include <poll.h>
12975
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012976int main()
12977{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012978 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012979 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012980
12981 close (42);
12982
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012983 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012984 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012985 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012986 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012987 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012988 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012989 return 1;
12990}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012991
12992_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012993if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012994 ac_cv_broken_poll=yes
12995else
Matthias Kloseb9621712010-04-24 17:59:49 +000012996 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012997fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012998rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12999 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013000fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013001
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013002fi
13003
Matthias Kloseb9621712010-04-24 17:59:49 +000013004{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
13005$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013006if test "$ac_cv_broken_poll" = yes
13007then
13008
Matthias Kloseb9621712010-04-24 17:59:49 +000013009$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013010
13011fi
13012
Brett Cannon43802422005-02-10 20:48:03 +000013013# 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 +000013014# (which is not required by ISO C or UNIX spec) and/or if we support
13015# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000013016ac_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 +000013017#include <$ac_cv_struct_tm>
13018
Matthias Kloseb9621712010-04-24 17:59:49 +000013019"
13020if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then :
Brett Cannon43802422005-02-10 20:48:03 +000013021
13022cat >>confdefs.h <<_ACEOF
13023#define HAVE_STRUCT_TM_TM_ZONE 1
13024_ACEOF
13025
13026
13027fi
13028
13029if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13030
Matthias Kloseb9621712010-04-24 17:59:49 +000013031$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013032
13033else
Matthias Kloseb9621712010-04-24 17:59:49 +000013034 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13035"
13036if test "x$ac_cv_have_decl_tzname" = x""yes; then :
13037 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013038else
Matthias Kloseb9621712010-04-24 17:59:49 +000013039 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013040fi
13041
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013042cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013043#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013044_ACEOF
13045
Matthias Kloseb9621712010-04-24 17:59:49 +000013046 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13047$as_echo_n "checking for tzname... " >&6; }
13048if test "${ac_cv_var_tzname+set}" = set; then :
13049 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013050else
Matthias Kloseb9621712010-04-24 17:59:49 +000013051 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013052/* end confdefs.h. */
13053#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013054#if !HAVE_DECL_TZNAME
13055extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000013056#endif
13057
13058int
13059main ()
13060{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013061return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000013062 ;
13063 return 0;
13064}
13065_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013066if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000013067 ac_cv_var_tzname=yes
13068else
Matthias Kloseb9621712010-04-24 17:59:49 +000013069 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000013070fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013071rm -f core conftest.err conftest.$ac_objext \
13072 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013073fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013074{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13075$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000013076 if test $ac_cv_var_tzname = yes; then
13077
Matthias Kloseb9621712010-04-24 17:59:49 +000013078$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013079
13080 fi
13081fi
13082
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013083
Martin v. Löwis1d459062005-03-14 21:23:33 +000013084# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000013085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
13086$as_echo_n "checking for working tzset()... " >&6; }
13087if test "${ac_cv_working_tzset+set}" = set; then :
13088 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013089else
13090
Matthias Kloseb9621712010-04-24 17:59:49 +000013091if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013092 ac_cv_working_tzset=no
13093else
Matthias Kloseb9621712010-04-24 17:59:49 +000013094 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013095/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013096
13097#include <stdlib.h>
13098#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000013099#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000013100
13101#if HAVE_TZNAME
13102extern char *tzname[];
13103#endif
13104
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013105int main()
13106{
Brett Cannon18367812003-09-19 00:59:16 +000013107 /* Note that we need to ensure that not only does tzset(3)
13108 do 'something' with localtime, but it works as documented
13109 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000013110 This includes making sure that tzname is set properly if
13111 tm->tm_zone does not exist since it is the alternative way
13112 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000013113
13114 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000013115 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000013116 */
13117
Martin v. Löwis1d459062005-03-14 21:23:33 +000013118 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000013119 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
13120
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013121 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013122 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013123 if (localtime(&groundhogday)->tm_hour != 0)
13124 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013125#if HAVE_TZNAME
13126 /* For UTC, tzname[1] is sometimes "", sometimes " " */
13127 if (strcmp(tzname[0], "UTC") ||
13128 (tzname[1][0] != 0 && tzname[1][0] != ' '))
13129 exit(1);
13130#endif
Brett Cannon18367812003-09-19 00:59:16 +000013131
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013132 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013133 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013134 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013135 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013136#if HAVE_TZNAME
13137 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
13138 exit(1);
13139#endif
Brett Cannon18367812003-09-19 00:59:16 +000013140
13141 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
13142 tzset();
13143 if (localtime(&groundhogday)->tm_hour != 11)
13144 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013145#if HAVE_TZNAME
13146 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
13147 exit(1);
13148#endif
13149
13150#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000013151 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
13152 exit(1);
13153 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
13154 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013155#endif
Brett Cannon18367812003-09-19 00:59:16 +000013156
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013157 exit(0);
13158}
13159
13160_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013161if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013162 ac_cv_working_tzset=yes
13163else
Matthias Kloseb9621712010-04-24 17:59:49 +000013164 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013165fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013166rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13167 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013168fi
13169
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013170fi
13171
Matthias Kloseb9621712010-04-24 17:59:49 +000013172{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
13173$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013174if test "$ac_cv_working_tzset" = yes
13175then
13176
Matthias Kloseb9621712010-04-24 17:59:49 +000013177$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013178
13179fi
13180
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013181# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
13183$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
13184if test "${ac_cv_stat_tv_nsec+set}" = set; then :
13185 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013186else
Matthias Kloseb9621712010-04-24 17:59:49 +000013187 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013188/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013189#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013190int
13191main ()
13192{
13193
13194struct stat st;
13195st.st_mtim.tv_nsec = 1;
13196
13197 ;
13198 return 0;
13199}
13200_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013201if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000013202 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013203else
Matthias Kloseb9621712010-04-24 17:59:49 +000013204 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013205fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013206rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13207fi
13208
Matthias Kloseb9621712010-04-24 17:59:49 +000013209{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
13210$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013211if test "$ac_cv_stat_tv_nsec" = yes
13212then
13213
Matthias Kloseb9621712010-04-24 17:59:49 +000013214$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013215
13216fi
13217
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013218# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013219{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
13220$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
13221if test "${ac_cv_stat_tv_nsec2+set}" = set; then :
13222 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013223else
Matthias Kloseb9621712010-04-24 17:59:49 +000013224 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013225/* end confdefs.h. */
13226#include <sys/stat.h>
13227int
13228main ()
13229{
13230
13231struct stat st;
13232st.st_mtimespec.tv_nsec = 1;
13233
13234 ;
13235 return 0;
13236}
13237_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013238if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013239 ac_cv_stat_tv_nsec2=yes
13240else
Matthias Kloseb9621712010-04-24 17:59:49 +000013241 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013242fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013243rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13244fi
13245
Matthias Kloseb9621712010-04-24 17:59:49 +000013246{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
13247$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013248if test "$ac_cv_stat_tv_nsec2" = yes
13249then
13250
Matthias Kloseb9621712010-04-24 17:59:49 +000013251$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013252
13253fi
13254
Jack Jansen666b1e72001-10-31 12:11:48 +000013255# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000013256{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
13257$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
13258if test "${ac_cv_mvwdelch_is_expression+set}" = set; then :
13259 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013260else
Matthias Kloseb9621712010-04-24 17:59:49 +000013261 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013262/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013263#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013264int
13265main ()
13266{
Jack Jansen666b1e72001-10-31 12:11:48 +000013267
13268 int rtn;
13269 rtn = mvwdelch(0,0,0);
13270
Martin v. Löwis11437992002-04-12 09:54:03 +000013271 ;
13272 return 0;
13273}
13274_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013275if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013276 ac_cv_mvwdelch_is_expression=yes
13277else
Matthias Kloseb9621712010-04-24 17:59:49 +000013278 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013279fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013280rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13281fi
13282
Matthias Kloseb9621712010-04-24 17:59:49 +000013283{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
13284$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000013285
13286if test "$ac_cv_mvwdelch_is_expression" = yes
13287then
Martin v. Löwis11437992002-04-12 09:54:03 +000013288
Matthias Kloseb9621712010-04-24 17:59:49 +000013289$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013290
13291fi
13292
Matthias Kloseb9621712010-04-24 17:59:49 +000013293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
13294$as_echo_n "checking whether WINDOW has _flags... " >&6; }
13295if test "${ac_cv_window_has_flags+set}" = set; then :
13296 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013297else
Matthias Kloseb9621712010-04-24 17:59:49 +000013298 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013299/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013300#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013301int
13302main ()
13303{
Jack Jansen666b1e72001-10-31 12:11:48 +000013304
13305 WINDOW *w;
13306 w->_flags = 0;
13307
Martin v. Löwis11437992002-04-12 09:54:03 +000013308 ;
13309 return 0;
13310}
13311_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013312if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013313 ac_cv_window_has_flags=yes
13314else
Matthias Kloseb9621712010-04-24 17:59:49 +000013315 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013316fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013317rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13318fi
13319
Matthias Kloseb9621712010-04-24 17:59:49 +000013320{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
13321$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013322
Jack Jansen666b1e72001-10-31 12:11:48 +000013323
13324if test "$ac_cv_window_has_flags" = yes
13325then
Martin v. Löwis11437992002-04-12 09:54:03 +000013326
Matthias Kloseb9621712010-04-24 17:59:49 +000013327$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013328
13329fi
13330
Matthias Kloseb9621712010-04-24 17:59:49 +000013331{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
13332$as_echo_n "checking for is_term_resized... " >&6; }
13333cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013334/* end confdefs.h. */
13335#include <curses.h>
13336int
13337main ()
13338{
13339void *x=is_term_resized
13340 ;
13341 return 0;
13342}
13343_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013344if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013345
Matthias Kloseb9621712010-04-24 17:59:49 +000013346$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013347
Matthias Kloseb159a552010-04-25 21:00:44 +000013348 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013349$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013350else
Matthias Kloseb9621712010-04-24 17:59:49 +000013351 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13352$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013353
13354fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013355rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13356
Matthias Kloseb9621712010-04-24 17:59:49 +000013357{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
13358$as_echo_n "checking for resize_term... " >&6; }
13359cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013360/* end confdefs.h. */
13361#include <curses.h>
13362int
13363main ()
13364{
13365void *x=resize_term
13366 ;
13367 return 0;
13368}
13369_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013370if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013371
Matthias Kloseb9621712010-04-24 17:59:49 +000013372$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013373
Matthias Kloseb159a552010-04-25 21:00:44 +000013374 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013375$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013376else
Matthias Kloseb9621712010-04-24 17:59:49 +000013377 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13378$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013379
13380fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013381rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13382
Matthias Kloseb9621712010-04-24 17:59:49 +000013383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
13384$as_echo_n "checking for resizeterm... " >&6; }
13385cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013386/* end confdefs.h. */
13387#include <curses.h>
13388int
13389main ()
13390{
13391void *x=resizeterm
13392 ;
13393 return 0;
13394}
13395_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013396if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013397
Matthias Kloseb9621712010-04-24 17:59:49 +000013398$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013399
Matthias Kloseb159a552010-04-25 21:00:44 +000013400 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013401$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013402else
Matthias Kloseb9621712010-04-24 17:59:49 +000013403 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13404$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013405
13406fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013407rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13408
Matthias Kloseb9621712010-04-24 17:59:49 +000013409{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
13410$as_echo_n "checking for /dev/ptmx... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013411
13412if test -r /dev/ptmx
13413then
Matthias Kloseb9621712010-04-24 17:59:49 +000013414 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13415$as_echo "yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013416
Matthias Kloseb9621712010-04-24 17:59:49 +000013417$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013418
Thomas Wouters89f507f2006-12-13 04:49:30 +000013419else
Matthias Kloseb9621712010-04-24 17:59:49 +000013420 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13421$as_echo "no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013422fi
13423
Matthias Kloseb9621712010-04-24 17:59:49 +000013424{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
13425$as_echo_n "checking for /dev/ptc... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013426
13427if test -r /dev/ptc
13428then
Matthias Kloseb9621712010-04-24 17:59:49 +000013429 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13430$as_echo "yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013431
Matthias Kloseb9621712010-04-24 17:59:49 +000013432$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000013433
Thomas Wouters89f507f2006-12-13 04:49:30 +000013434else
Matthias Kloseb9621712010-04-24 17:59:49 +000013435 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13436$as_echo "no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013437fi
13438
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013439if test "$have_long_long" = yes
13440then
Matthias Kloseb9621712010-04-24 17:59:49 +000013441 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
13442$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
13443 if test "${ac_cv_have_long_long_format+set}" = set; then :
13444 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013445else
Matthias Kloseb9621712010-04-24 17:59:49 +000013446 if test "$cross_compiling" = yes; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013447 ac_cv_have_long_long_format=no
13448else
Matthias Kloseb9621712010-04-24 17:59:49 +000013449 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013450/* end confdefs.h. */
13451
13452 #include <stdio.h>
13453 #include <stddef.h>
13454 #include <string.h>
13455
13456 #ifdef HAVE_SYS_TYPES_H
13457 #include <sys/types.h>
13458 #endif
13459
13460 int main()
13461 {
13462 char buffer[256];
13463
13464 if (sprintf(buffer, "%lld", (long long)123) < 0)
13465 return 1;
13466 if (strcmp(buffer, "123"))
13467 return 1;
13468
13469 if (sprintf(buffer, "%lld", (long long)-123) < 0)
13470 return 1;
13471 if (strcmp(buffer, "-123"))
13472 return 1;
13473
13474 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
13475 return 1;
13476 if (strcmp(buffer, "123"))
13477 return 1;
13478
13479 return 0;
13480 }
13481
13482_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013483if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013484 ac_cv_have_long_long_format=yes
13485else
Matthias Kloseb9621712010-04-24 17:59:49 +000013486 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013487fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013488rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13489 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013490fi
13491
13492
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013493fi
13494
Matthias Kloseb9621712010-04-24 17:59:49 +000013495 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
13496$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013497fi
13498
Mark Dickinson89d7d412009-12-31 20:50:59 +000013499if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013500then
13501
Matthias Kloseb9621712010-04-24 17:59:49 +000013502$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013503
13504fi
13505
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000013506if test $ac_sys_system = Darwin
13507then
13508 LIBS="$LIBS -framework CoreFoundation"
13509fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013510
Matthias Kloseb9621712010-04-24 17:59:49 +000013511{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
13512$as_echo_n "checking for %zd printf() format support... " >&6; }
13513if test "${ac_cv_have_size_t_format+set}" = set; then :
13514 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013515else
Matthias Kloseb9621712010-04-24 17:59:49 +000013516 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000013517 ac_cv_have_size_t_format="cross -- assuming yes"
13518
Thomas Wouters477c8d52006-05-27 19:21:47 +000013519else
Matthias Kloseb9621712010-04-24 17:59:49 +000013520 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000013521/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013522
Thomas Wouters477c8d52006-05-27 19:21:47 +000013523#include <stdio.h>
13524#include <stddef.h>
13525#include <string.h>
13526
Christian Heimes2c181612007-12-17 20:04:13 +000013527#ifdef HAVE_SYS_TYPES_H
13528#include <sys/types.h>
13529#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000013530
13531#ifdef HAVE_SSIZE_T
13532typedef ssize_t Py_ssize_t;
13533#elif SIZEOF_VOID_P == SIZEOF_LONG
13534typedef long Py_ssize_t;
13535#else
13536typedef int Py_ssize_t;
13537#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000013538
Christian Heimes2c181612007-12-17 20:04:13 +000013539int main()
13540{
13541 char buffer[256];
13542
Thomas Wouters477c8d52006-05-27 19:21:47 +000013543 if(sprintf(buffer, "%zd", (size_t)123) < 0)
13544 return 1;
13545
Thomas Wouters89f507f2006-12-13 04:49:30 +000013546 if (strcmp(buffer, "123"))
13547 return 1;
13548
13549 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
13550 return 1;
13551
13552 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000013553 return 1;
13554
13555 return 0;
13556}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013557
Thomas Wouters477c8d52006-05-27 19:21:47 +000013558_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013559if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013560 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013561else
Matthias Kloseb9621712010-04-24 17:59:49 +000013562 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013563fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013564rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13565 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013566fi
13567
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013568fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013569{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
13570$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000013571if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013572
Matthias Kloseb9621712010-04-24 17:59:49 +000013573$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013574
13575fi
13576
Matthias Kloseb9621712010-04-24 17:59:49 +000013577ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000013578#ifdef HAVE_SYS_TYPES_H
13579#include <sys/types.h>
13580#endif
13581#ifdef HAVE_SYS_SOCKET_H
13582#include <sys/socket.h>
13583#endif
13584
Matthias Kloseb9621712010-04-24 17:59:49 +000013585"
13586if test "x$ac_cv_type_socklen_t" = x""yes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000013587
Martin v. Löwis11437992002-04-12 09:54:03 +000013588else
Guido van Rossum95713eb2000-05-18 20:53:31 +000013589
Matthias Kloseb9621712010-04-24 17:59:49 +000013590$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000013591
13592fi
13593
Michael W. Hudson54241132001-12-07 15:38:26 +000013594
Matthias Kloseb9621712010-04-24 17:59:49 +000013595{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
13596$as_echo_n "checking for broken mbstowcs... " >&6; }
13597if test "${ac_cv_broken_mbstowcs+set}" = set; then :
13598 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013599else
Matthias Kloseb9621712010-04-24 17:59:49 +000013600 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000013601 ac_cv_broken_mbstowcs=no
13602else
Matthias Kloseb9621712010-04-24 17:59:49 +000013603 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000013604/* end confdefs.h. */
13605
13606#include<stdlib.h>
13607int main() {
13608 size_t len = -1;
13609 const char *str = "text";
13610 len = mbstowcs(NULL, str, 0);
13611 return (len != 4);
13612}
13613
13614_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013615if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000013616 ac_cv_broken_mbstowcs=no
13617else
Matthias Kloseb9621712010-04-24 17:59:49 +000013618 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000013619fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013620rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13621 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000013622fi
13623
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013624fi
13625
Matthias Kloseb9621712010-04-24 17:59:49 +000013626{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
13627$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000013628if test "$ac_cv_broken_mbstowcs" = yes
13629then
13630
Matthias Kloseb9621712010-04-24 17:59:49 +000013631$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000013632
13633fi
13634
Antoine Pitrou042b1282010-08-13 21:15:58 +000013635{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
13636$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
13637if test "${ac_cv_computed_gotos+set}" = set; then :
13638 $as_echo_n "(cached) " >&6
13639else
13640 if test "$cross_compiling" = yes; then :
13641 ac_cv_computed_gotos=no
13642else
13643 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13644/* end confdefs.h. */
13645
13646int main(int argc, char **argv)
13647{
13648 static void *targets[1] = { &&LABEL1 };
13649 goto LABEL2;
13650LABEL1:
13651 return 0;
13652LABEL2:
13653 goto *targets[0];
13654 return 1;
13655}
13656
13657_ACEOF
13658if ac_fn_c_try_run "$LINENO"; then :
13659 ac_cv_computed_gotos=yes
13660else
13661 ac_cv_computed_gotos=no
13662fi
13663rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13664 conftest.$ac_objext conftest.beam conftest.$ac_ext
13665fi
13666
13667fi
13668
13669{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
13670$as_echo "$ac_cv_computed_gotos" >&6; }
13671if test "$ac_cv_computed_gotos" = yes
13672then
13673
13674$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
13675
13676fi
13677
Antoine Pitroub52ec782009-01-25 16:34:23 +000013678# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000013679{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
13680$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013681
13682# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013683if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000013684 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000013685if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000013686then
13687
Matthias Kloseb9621712010-04-24 17:59:49 +000013688$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000013689
Matthias Kloseb9621712010-04-24 17:59:49 +000013690 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13691$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013692fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000013693if test "$withval" = no
13694then
13695
13696$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
13697
Matthias Kloseb9621712010-04-24 17:59:49 +000013698 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13699$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013700fi
13701
Antoine Pitrou042b1282010-08-13 21:15:58 +000013702else
13703 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
13704$as_echo "no value specified" >&6; }
13705fi
13706
Antoine Pitroub52ec782009-01-25 16:34:23 +000013707
13708
Michael W. Hudson54241132001-12-07 15:38:26 +000013709
Jesus Cea6a792292010-05-03 21:18:48 +000013710case $ac_sys_system in
Benjamin Petersond7f73e92010-09-05 00:09:07 +000013711 OSF*) as_fn_error "OSF* systems are deprecated unless somebody volunteers. Check http://bugs.python.org/issue8606" "$LINENO" 5 ;;
Jesus Cea6a792292010-05-03 21:18:48 +000013712esac
13713
13714
13715
Mark Dickinsonb2153e92010-05-05 22:31:36 +000013716
13717
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000013718for h in `(cd $srcdir;echo Python/thread_*.h)`
13719do
13720 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
13721done
13722
Michael W. Hudson54241132001-12-07 15:38:26 +000013723
Neal Norwitzd24499d2005-12-18 21:36:39 +000013724SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Kloseb9621712010-04-24 17:59:49 +000013725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
13726$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013727for dir in $SRCDIRS; do
13728 if test ! -d $dir; then
13729 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000013730 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013731done
Matthias Kloseb9621712010-04-24 17:59:49 +000013732{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
13733$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000013734
Guido van Rossum627b2d71993-12-24 10:39:16 +000013735# generate output files
Antoine Pitrou20327222009-05-24 20:39:11 +000013736ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000013737
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000013738ac_config_files="$ac_config_files Modules/ld_so_aix"
13739
Martin v. Löwis11437992002-04-12 09:54:03 +000013740cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013741# This file is a shell script that caches the results of configure
13742# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000013743# scripts and configure runs, see configure's option --config-cache.
13744# It is not useful on other systems. If it contains results you don't
13745# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013746#
Martin v. Löwis11437992002-04-12 09:54:03 +000013747# config.status only pays attention to the cache file if you give it
13748# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013749#
Skip Montanaro6dead952003-09-25 14:50:04 +000013750# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000013751# loading this file, other *unset* `ac_cv_foo' will be assigned the
13752# following values.
13753
13754_ACEOF
13755
Guido van Rossumf78abae1997-01-21 22:02:36 +000013756# The following way of writing the cache mishandles newlines in values,
13757# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013758# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013759# Ultrix sh set writes to stderr and can't be redirected directly,
13760# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013761(
13762 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
13763 eval ac_val=\$$ac_var
13764 case $ac_val in #(
13765 *${as_nl}*)
13766 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000013767 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
13768$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013769 esac
13770 case $ac_var in #(
13771 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000013772 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
13773 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013774 esac ;;
13775 esac
13776 done
13777
Martin v. Löwis11437992002-04-12 09:54:03 +000013778 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013779 case $as_nl`(ac_space=' '; set) 2>&1` in #(
13780 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000013781 # `set' does not quote correctly, so add quotes: double-quote
13782 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000013783 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013784 "s/'/'\\\\''/g;
13785 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013786 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000013787 *)
13788 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013789 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000013790 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013791 esac |
13792 sort
13793) |
Martin v. Löwis11437992002-04-12 09:54:03 +000013794 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013795 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000013796 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013797 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000013798 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
13799 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013800 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
13801 :end' >>confcache
13802if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
13803 if test -w "$cache_file"; then
13804 test "x$cache_file" != "x/dev/null" &&
Matthias Kloseb9621712010-04-24 17:59:49 +000013805 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
13806$as_echo "$as_me: updating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000013807 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013808 else
Matthias Kloseb9621712010-04-24 17:59:49 +000013809 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
13810$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013811 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013812fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013813rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000013814
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013815test "x$prefix" = xNONE && prefix=$ac_default_prefix
13816# Let make expand exec_prefix.
13817test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000013818
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013819DEFS=-DHAVE_CONFIG_H
13820
Skip Montanaro6dead952003-09-25 14:50:04 +000013821ac_libobjs=
13822ac_ltlibobjs=
13823for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
13824 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013825 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000013826 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013827 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
13828 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000013829 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
13830 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000013831done
13832LIBOBJS=$ac_libobjs
13833
13834LTLIBOBJS=$ac_ltlibobjs
13835
13836
Martin v. Löwis11437992002-04-12 09:54:03 +000013837
Matthias Kloseb9621712010-04-24 17:59:49 +000013838
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013839: ${CONFIG_STATUS=./config.status}
Matthias Kloseb9621712010-04-24 17:59:49 +000013840ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000013841ac_clean_files_save=$ac_clean_files
13842ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013843{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
13844$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
13845as_write_fail=0
13846cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000013847#! $SHELL
13848# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000013849# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013850# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000013851# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000013852
Martin v. Löwis11437992002-04-12 09:54:03 +000013853debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000013854ac_cs_recheck=false
13855ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000013856
Matthias Kloseb9621712010-04-24 17:59:49 +000013857SHELL=\${CONFIG_SHELL-$SHELL}
13858export SHELL
13859_ASEOF
13860cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
13861## -------------------- ##
13862## M4sh Initialization. ##
13863## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000013864
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013865# Be more Bourne compatible
13866DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000013867if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013868 emulate sh
13869 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000013870 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000013871 # is contrary to our usage. Disable this feature.
13872 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013873 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013874else
Matthias Kloseb9621712010-04-24 17:59:49 +000013875 case `(set -o) 2>/dev/null` in #(
13876 *posix*) :
13877 set -o posix ;; #(
13878 *) :
13879 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013880esac
Michael W. Hudson54241132001-12-07 15:38:26 +000013881fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000013882
13883
Matthias Kloseb9621712010-04-24 17:59:49 +000013884as_nl='
13885'
13886export as_nl
13887# Printing a long string crashes Solaris 7 /usr/bin/printf.
13888as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
13889as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
13890as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
13891# Prefer a ksh shell builtin over an external printf program on Solaris,
13892# but without wasting forks for bash or zsh.
13893if test -z "$BASH_VERSION$ZSH_VERSION" \
13894 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
13895 as_echo='print -r --'
13896 as_echo_n='print -rn --'
13897elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
13898 as_echo='printf %s\n'
13899 as_echo_n='printf %s'
13900else
13901 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
13902 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
13903 as_echo_n='/usr/ucb/echo -n'
13904 else
13905 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
13906 as_echo_n_body='eval
13907 arg=$1;
13908 case $arg in #(
13909 *"$as_nl"*)
13910 expr "X$arg" : "X\\(.*\\)$as_nl";
13911 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
13912 esac;
13913 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
13914 '
13915 export as_echo_n_body
13916 as_echo_n='sh -c $as_echo_n_body as_echo'
13917 fi
13918 export as_echo_body
13919 as_echo='sh -c $as_echo_body as_echo'
13920fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013921
13922# The user is always right.
13923if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013924 PATH_SEPARATOR=:
13925 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
13926 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
13927 PATH_SEPARATOR=';'
13928 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013929fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013930
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013931
13932# IFS
13933# We need space, tab and new line, in precisely that order. Quoting is
13934# there to prevent editors from complaining about space-tab.
13935# (If _AS_PATH_WALK were called with IFS unset, it would disable word
13936# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013937IFS=" "" $as_nl"
13938
13939# Find who we are. Look in the path if we contain no directory separator.
Matthias Kloseb9621712010-04-24 17:59:49 +000013940case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013941 *[\\/]* ) as_myself=$0 ;;
13942 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000013943for as_dir in $PATH
13944do
13945 IFS=$as_save_IFS
13946 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000013947 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
13948 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013949IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000013950
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013951 ;;
13952esac
13953# We did not find ourselves, most probably we were run as `sh COMMAND'
13954# in which case we are not to be found in the path.
13955if test "x$as_myself" = x; then
13956 as_myself=$0
13957fi
13958if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013959 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
13960 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013961fi
13962
Matthias Kloseb9621712010-04-24 17:59:49 +000013963# Unset variables that we do not need and which cause bugs (e.g. in
13964# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
13965# suppresses any "Segmentation fault" message there. '((' could
13966# trigger a bug in pdksh 5.2.14.
13967for as_var in BASH_ENV ENV MAIL MAILPATH
13968do eval test x\${$as_var+set} = xset \
13969 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013970done
13971PS1='$ '
13972PS2='> '
13973PS4='+ '
13974
13975# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000013976LC_ALL=C
13977export LC_ALL
13978LANGUAGE=C
13979export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013980
Matthias Kloseb9621712010-04-24 17:59:49 +000013981# CDPATH.
13982(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
13983
13984
Benjamin Petersond7f73e92010-09-05 00:09:07 +000013985# as_fn_error ERROR [LINENO LOG_FD]
13986# ---------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000013987# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
13988# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Benjamin Petersond7f73e92010-09-05 00:09:07 +000013989# script with status $?, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000013990as_fn_error ()
13991{
Benjamin Petersond7f73e92010-09-05 00:09:07 +000013992 as_status=$?; test $as_status -eq 0 && as_status=1
13993 if test "$3"; then
13994 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
13995 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
Matthias Kloseb9621712010-04-24 17:59:49 +000013996 fi
Benjamin Petersond7f73e92010-09-05 00:09:07 +000013997 $as_echo "$as_me: error: $1" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000013998 as_fn_exit $as_status
13999} # as_fn_error
14000
14001
14002# as_fn_set_status STATUS
14003# -----------------------
14004# Set $? to STATUS, without forking.
14005as_fn_set_status ()
14006{
14007 return $1
14008} # as_fn_set_status
14009
14010# as_fn_exit STATUS
14011# -----------------
14012# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
14013as_fn_exit ()
14014{
14015 set +e
14016 as_fn_set_status $1
14017 exit $1
14018} # as_fn_exit
14019
14020# as_fn_unset VAR
14021# ---------------
14022# Portably unset VAR.
14023as_fn_unset ()
14024{
14025 { eval $1=; unset $1;}
14026}
14027as_unset=as_fn_unset
14028# as_fn_append VAR VALUE
14029# ----------------------
14030# Append the text in VALUE to the end of the definition contained in VAR. Take
14031# advantage of any shell optimizations that allow amortized linear growth over
14032# repeated appends, instead of the typical quadratic growth present in naive
14033# implementations.
14034if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
14035 eval 'as_fn_append ()
14036 {
14037 eval $1+=\$2
14038 }'
14039else
14040 as_fn_append ()
14041 {
14042 eval $1=\$$1\$2
14043 }
14044fi # as_fn_append
14045
14046# as_fn_arith ARG...
14047# ------------------
14048# Perform arithmetic evaluation on the ARGs, and store the result in the
14049# global $as_val. Take advantage of shells that can avoid forks. The arguments
14050# must be portable across $(()) and expr.
14051if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
14052 eval 'as_fn_arith ()
14053 {
14054 as_val=$(( $* ))
14055 }'
14056else
14057 as_fn_arith ()
14058 {
14059 as_val=`expr "$@" || test $? -eq 1`
14060 }
14061fi # as_fn_arith
14062
14063
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014064if expr a : '\(a\)' >/dev/null 2>&1 &&
14065 test "X`expr 00001 : '.*\(...\)'`" = X001; then
14066 as_expr=expr
14067else
14068 as_expr=false
14069fi
14070
14071if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
14072 as_basename=basename
14073else
14074 as_basename=false
14075fi
14076
Matthias Kloseb9621712010-04-24 17:59:49 +000014077if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
14078 as_dirname=dirname
14079else
14080 as_dirname=false
14081fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014082
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014083as_me=`$as_basename -- "$0" ||
14084$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
14085 X"$0" : 'X\(//\)$' \| \
14086 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014087$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014088 sed '/^.*\/\([^/][^/]*\)\/*$/{
14089 s//\1/
14090 q
14091 }
14092 /^X\/\(\/\/\)$/{
14093 s//\1/
14094 q
14095 }
14096 /^X\/\(\/\).*/{
14097 s//\1/
14098 q
14099 }
14100 s/.*/./; q'`
14101
Matthias Kloseb9621712010-04-24 17:59:49 +000014102# Avoid depending upon Character Ranges.
14103as_cr_letters='abcdefghijklmnopqrstuvwxyz'
14104as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14105as_cr_Letters=$as_cr_letters$as_cr_LETTERS
14106as_cr_digits='0123456789'
14107as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014108
14109ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000014110case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014111-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014112 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014113 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000014114 xy) ECHO_C='\c';;
14115 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
14116 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014117 esac;;
14118*)
14119 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000014120esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014121
Martin v. Löwis11437992002-04-12 09:54:03 +000014122rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014123if test -d conf$$.dir; then
14124 rm -f conf$$.dir/conf$$.file
14125else
14126 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000014127 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014128fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014129if (echo >conf$$.file) 2>/dev/null; then
14130 if ln -s conf$$.file conf$$ 2>/dev/null; then
14131 as_ln_s='ln -s'
14132 # ... but there are two gotchas:
14133 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
14134 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
14135 # In both cases, we have to default to `cp -p'.
14136 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
14137 as_ln_s='cp -p'
14138 elif ln conf$$.file conf$$ 2>/dev/null; then
14139 as_ln_s=ln
14140 else
Martin v. Löwis11437992002-04-12 09:54:03 +000014141 as_ln_s='cp -p'
Matthias Kloseb9621712010-04-24 17:59:49 +000014142 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014143else
14144 as_ln_s='cp -p'
14145fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014146rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
14147rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000014148
Matthias Kloseb9621712010-04-24 17:59:49 +000014149
14150# as_fn_mkdir_p
14151# -------------
14152# Create "$as_dir" as a directory, including parents if necessary.
14153as_fn_mkdir_p ()
14154{
14155
14156 case $as_dir in #(
14157 -*) as_dir=./$as_dir;;
14158 esac
14159 test -d "$as_dir" || eval $as_mkdir_p || {
14160 as_dirs=
14161 while :; do
14162 case $as_dir in #(
14163 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
14164 *) as_qdir=$as_dir;;
14165 esac
14166 as_dirs="'$as_qdir' $as_dirs"
14167 as_dir=`$as_dirname -- "$as_dir" ||
14168$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
14169 X"$as_dir" : 'X\(//\)[^/]' \| \
14170 X"$as_dir" : 'X\(//\)$' \| \
14171 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
14172$as_echo X"$as_dir" |
14173 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14174 s//\1/
14175 q
14176 }
14177 /^X\(\/\/\)[^/].*/{
14178 s//\1/
14179 q
14180 }
14181 /^X\(\/\/\)$/{
14182 s//\1/
14183 q
14184 }
14185 /^X\(\/\).*/{
14186 s//\1/
14187 q
14188 }
14189 s/.*/./; q'`
14190 test -d "$as_dir" && break
14191 done
14192 test -z "$as_dirs" || eval "mkdir $as_dirs"
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014193 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000014194
14195
14196} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000014197if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014198 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000014199else
Skip Montanarof0d5f792004-08-15 14:08:23 +000014200 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000014201 as_mkdir_p=false
14202fi
14203
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014204if test -x / >/dev/null 2>&1; then
14205 as_test_x='test -x'
14206else
14207 if ls -dL / >/dev/null 2>&1; then
14208 as_ls_L_option=L
14209 else
14210 as_ls_L_option=
14211 fi
14212 as_test_x='
14213 eval sh -c '\''
14214 if test -d "$1"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014215 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014216 else
Matthias Kloseb9621712010-04-24 17:59:49 +000014217 case $1 in #(
14218 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014219 esac;
Matthias Kloseb9621712010-04-24 17:59:49 +000014220 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014221 ???[sx]*):;;*)false;;esac;fi
14222 '\'' sh
14223 '
14224fi
14225as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000014226
14227# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014228as_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 +000014229
14230# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014231as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014232
14233
Martin v. Löwis11437992002-04-12 09:54:03 +000014234exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000014235## ----------------------------------- ##
14236## Main body of $CONFIG_STATUS script. ##
14237## ----------------------------------- ##
14238_ASEOF
14239test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014240
Matthias Kloseb9621712010-04-24 17:59:49 +000014241cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14242# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000014243# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014244# values after options handling.
14245ac_log="
Benjamin Peterson46ea4f72009-06-27 21:40:27 +000014246This file was extended by python $as_me 3.2, which was
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014247generated by GNU Autoconf 2.65. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000014248
14249 CONFIG_FILES = $CONFIG_FILES
14250 CONFIG_HEADERS = $CONFIG_HEADERS
14251 CONFIG_LINKS = $CONFIG_LINKS
14252 CONFIG_COMMANDS = $CONFIG_COMMANDS
14253 $ $0 $@
14254
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014255on `(hostname || uname -n) 2>/dev/null | sed 1q`
14256"
14257
Martin v. Löwis11437992002-04-12 09:54:03 +000014258_ACEOF
14259
Matthias Kloseb9621712010-04-24 17:59:49 +000014260case $ac_config_files in *"
14261"*) set x $ac_config_files; shift; ac_config_files=$*;;
14262esac
14263
14264case $ac_config_headers in *"
14265"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
14266esac
14267
14268
14269cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014270# Files that config.status was made for.
Antoine Pitroua3000072010-09-07 14:52:42 +000014271config_files="`echo $ac_config_files`"
14272config_headers="`echo $ac_config_headers`"
Martin v. Löwis11437992002-04-12 09:54:03 +000014273
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014274_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014275
Matthias Kloseb9621712010-04-24 17:59:49 +000014276cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014277ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000014278\`$as_me' instantiates files and other configuration actions
14279from templates according to the current configuration. Unless the files
14280and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000014281
Matthias Kloseb9621712010-04-24 17:59:49 +000014282Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000014283
14284 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014285 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000014286 --config print configuration, then exit
14287 -q, --quiet, --silent
14288 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000014289 -d, --debug don't remove temporary files
14290 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000014291 --file=FILE[:TEMPLATE]
14292 instantiate the configuration file FILE
14293 --header=FILE[:TEMPLATE]
14294 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000014295
14296Configuration files:
14297$config_files
14298
14299Configuration headers:
14300$config_headers
14301
Matthias Kloseb9621712010-04-24 17:59:49 +000014302Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014303
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014304_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014305cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14306ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000014307ac_cs_version="\\
Benjamin Peterson46ea4f72009-06-27 21:40:27 +000014308python config.status 3.2
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014309configured by $0, generated by GNU Autoconf 2.65,
Matthias Kloseb9621712010-04-24 17:59:49 +000014310 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000014311
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014312Copyright (C) 2009 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000014313This config.status script is free software; the Free Software Foundation
14314gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014315
14316ac_pwd='$ac_pwd'
14317srcdir='$srcdir'
14318INSTALL='$INSTALL'
Matthias Kloseb9621712010-04-24 17:59:49 +000014319test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000014320_ACEOF
14321
Matthias Kloseb9621712010-04-24 17:59:49 +000014322cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14323# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000014324ac_need_defaults=:
14325while test $# != 0
14326do
14327 case $1 in
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014328 --*=*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014329 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14330 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000014331 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000014332 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014333 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000014334 ac_option=$1
14335 ac_optarg=$2
14336 ac_shift=shift
14337 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014338 esac
14339
Skip Montanaro6dead952003-09-25 14:50:04 +000014340 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000014341 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000014342 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14343 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014344 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000014345 $as_echo "$ac_cs_version"; exit ;;
14346 --config | --confi | --conf | --con | --co | --c )
14347 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014348 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000014349 debug=: ;;
14350 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000014351 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014352 case $ac_optarg in
14353 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14354 esac
14355 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014356 ac_need_defaults=false;;
14357 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000014358 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014359 case $ac_optarg in
14360 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14361 esac
14362 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014363 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014364 --he | --h)
14365 # Conflict between --help and --header
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014366 as_fn_error "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000014367Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014368 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000014369 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000014370 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
14371 | -silent | --silent | --silen | --sile | --sil | --si | --s)
14372 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014373
14374 # This is an error.
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014375 -*) as_fn_error "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000014376Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014377
Matthias Kloseb9621712010-04-24 17:59:49 +000014378 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014379 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014380
14381 esac
14382 shift
14383done
14384
Skip Montanaro6dead952003-09-25 14:50:04 +000014385ac_configure_extra_args=
14386
14387if $ac_cs_silent; then
14388 exec 6>/dev/null
14389 ac_configure_extra_args="$ac_configure_extra_args --silent"
14390fi
14391
14392_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014393cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000014394if \$ac_cs_recheck; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014395 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
14396 shift
14397 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
14398 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014399 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000014400 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000014401fi
14402
Martin v. Löwis11437992002-04-12 09:54:03 +000014403_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014404cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014405exec 5>>config.log
14406{
14407 echo
14408 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
14409## Running $as_me. ##
14410_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000014411 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014412} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014413
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014414_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014415cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014416_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014417
Matthias Kloseb9621712010-04-24 17:59:49 +000014418cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014419
14420# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000014421for ac_config_target in $ac_config_targets
14422do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014423 case $ac_config_target in
14424 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
14425 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
14426 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014427 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
14428 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014429 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
14430 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000014431 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000014432 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014433
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014434 *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014435 esac
14436done
14437
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014438
Martin v. Löwis11437992002-04-12 09:54:03 +000014439# If the user did not use the arguments to specify the items to instantiate,
14440# then the envvar interface is used. Set only those that are not.
14441# We use the long form for the default assignment because of an extremely
14442# bizarre bug on SunOS 4.1.3.
14443if $ac_need_defaults; then
14444 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
14445 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
14446fi
14447
Skip Montanaro6dead952003-09-25 14:50:04 +000014448# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014449# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000014450# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014451# Hook for its removal unless debugging.
14452# Note that there is a small window in which the directory will not be cleaned:
14453# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000014454$debug ||
14455{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014456 tmp=
14457 trap 'exit_status=$?
14458 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
14459' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000014460 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000014461}
Martin v. Löwis11437992002-04-12 09:54:03 +000014462# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000014463
Martin v. Löwis11437992002-04-12 09:54:03 +000014464{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014465 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000014466 test -n "$tmp" && test -d "$tmp"
14467} ||
14468{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014469 tmp=./conf$$-$RANDOM
14470 (umask 077 && mkdir "$tmp")
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014471} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000014472
Matthias Kloseb9621712010-04-24 17:59:49 +000014473# Set up the scripts for CONFIG_FILES section.
14474# No need to generate them if there are no CONFIG_FILES.
14475# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014476if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014477
Matthias Kloseb9621712010-04-24 17:59:49 +000014478
14479ac_cr=`echo X | tr X '\015'`
14480# On cygwin, bash can eat \r inside `` if the user requested igncr.
14481# But we know of no other shell where ac_cr would be empty at this
14482# point, so we can use a bashism as a fallback.
14483if test "x$ac_cr" = x; then
14484 eval ac_cr=\$\'\\r\'
14485fi
14486ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
14487if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014488 ac_cs_awk_cr='\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000014489else
14490 ac_cs_awk_cr=$ac_cr
14491fi
14492
14493echo 'BEGIN {' >"$tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000014494_ACEOF
14495
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014496
Matthias Kloseb9621712010-04-24 17:59:49 +000014497{
14498 echo "cat >conf$$subs.awk <<_ACEOF" &&
14499 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
14500 echo "_ACEOF"
14501} >conf$$subs.sh ||
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014502 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
14503ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014504ac_delim='%!_!# '
14505for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000014506 . ./conf$$subs.sh ||
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014507 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014508
Matthias Kloseb9621712010-04-24 17:59:49 +000014509 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
14510 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014511 break
14512 elif $ac_last_try; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014513 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014514 else
14515 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000014516 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014517done
Matthias Kloseb9621712010-04-24 17:59:49 +000014518rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014519
Matthias Kloseb9621712010-04-24 17:59:49 +000014520cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14521cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014522_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014523sed -n '
14524h
14525s/^/S["/; s/!.*/"]=/
14526p
14527g
14528s/^[^!]*!//
14529:repl
14530t repl
14531s/'"$ac_delim"'$//
14532t delim
14533:nl
14534h
14535s/\(.\{148\}\)..*/\1/
14536t more1
14537s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
14538p
14539n
14540b repl
14541:more1
14542s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14543p
14544g
14545s/.\{148\}//
14546t nl
14547:delim
14548h
14549s/\(.\{148\}\)..*/\1/
14550t more2
14551s/["\\]/\\&/g; s/^/"/; s/$/"/
14552p
14553b
14554:more2
14555s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14556p
14557g
14558s/.\{148\}//
14559t delim
14560' <conf$$subs.awk | sed '
14561/^[^""]/{
14562 N
14563 s/\n//
14564}
14565' >>$CONFIG_STATUS || ac_write_fail=1
14566rm -f conf$$subs.awk
14567cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14568_ACAWK
14569cat >>"\$tmp/subs1.awk" <<_ACAWK &&
14570 for (key in S) S_is_set[key] = 1
14571 FS = ""
14572
14573}
14574{
14575 line = $ 0
14576 nfields = split(line, field, "@")
14577 substed = 0
14578 len = length(field[1])
14579 for (i = 2; i < nfields; i++) {
14580 key = field[i]
14581 keylen = length(key)
14582 if (S_is_set[key]) {
14583 value = S[key]
14584 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
14585 len += length(value) + length(field[++i])
14586 substed = 1
14587 } else
14588 len += 1 + keylen
14589 }
14590
14591 print line
14592}
14593
14594_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014595_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014596cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14597if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
14598 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
14599else
14600 cat
14601fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014602 || as_fn_error "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014603_ACEOF
14604
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014605# VPATH may cause trouble with some makes, so we remove $(srcdir),
14606# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014607# trailing colons and then remove the whole line if VPATH becomes empty
14608# (actually we leave an empty line to preserve line numbers).
14609if test "x$srcdir" = x.; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014610 ac_vpsub='/^[ ]*VPATH[ ]*=/{
14611s/:*\$(srcdir):*/:/
14612s/:*\${srcdir}:*/:/
14613s/:*@srcdir@:*/:/
14614s/^\([^=]*=[ ]*\):*/\1/
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014615s/:*$//
14616s/^[^=]*=[ ]*$//
14617}'
14618fi
14619
Matthias Kloseb9621712010-04-24 17:59:49 +000014620cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014621fi # test -n "$CONFIG_FILES"
14622
Matthias Kloseb9621712010-04-24 17:59:49 +000014623# Set up the scripts for CONFIG_HEADERS section.
14624# No need to generate them if there are no CONFIG_HEADERS.
14625# This happens for instance with `./config.status Makefile'.
14626if test -n "$CONFIG_HEADERS"; then
14627cat >"$tmp/defines.awk" <<\_ACAWK ||
14628BEGIN {
14629_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014630
Matthias Kloseb9621712010-04-24 17:59:49 +000014631# Transform confdefs.h into an awk script `defines.awk', embedded as
14632# here-document in config.status, that substitutes the proper values into
14633# config.h.in to produce config.h.
14634
14635# Create a delimiter string that does not exist in confdefs.h, to ease
14636# handling of long lines.
14637ac_delim='%!_!# '
14638for ac_last_try in false false :; do
14639 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
14640 if test -z "$ac_t"; then
14641 break
14642 elif $ac_last_try; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014643 as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000014644 else
14645 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
14646 fi
14647done
14648
14649# For the awk script, D is an array of macro values keyed by name,
14650# likewise P contains macro parameters if any. Preserve backslash
14651# newline sequences.
14652
14653ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
14654sed -n '
14655s/.\{148\}/&'"$ac_delim"'/g
14656t rset
14657:rset
14658s/^[ ]*#[ ]*define[ ][ ]*/ /
14659t def
14660d
14661:def
14662s/\\$//
14663t bsnl
14664s/["\\]/\\&/g
14665s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14666D["\1"]=" \3"/p
14667s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
14668d
14669:bsnl
14670s/["\\]/\\&/g
14671s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14672D["\1"]=" \3\\\\\\n"\\/p
14673t cont
14674s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
14675t cont
14676d
14677:cont
14678n
14679s/.\{148\}/&'"$ac_delim"'/g
14680t clear
14681:clear
14682s/\\$//
14683t bsnlc
14684s/["\\]/\\&/g; s/^/"/; s/$/"/p
14685d
14686:bsnlc
14687s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
14688b cont
14689' <confdefs.h | sed '
14690s/'"$ac_delim"'/"\\\
14691"/g' >>$CONFIG_STATUS || ac_write_fail=1
14692
14693cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14694 for (key in D) D_is_set[key] = 1
14695 FS = ""
14696}
14697/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
14698 line = \$ 0
14699 split(line, arg, " ")
14700 if (arg[1] == "#") {
14701 defundef = arg[2]
14702 mac1 = arg[3]
14703 } else {
14704 defundef = substr(arg[1], 2)
14705 mac1 = arg[2]
14706 }
14707 split(mac1, mac2, "(") #)
14708 macro = mac2[1]
14709 prefix = substr(line, 1, index(line, defundef) - 1)
14710 if (D_is_set[macro]) {
14711 # Preserve the white space surrounding the "#".
14712 print prefix "define", macro P[macro] D[macro]
14713 next
14714 } else {
14715 # Replace #undef with comments. This is necessary, for example,
14716 # in the case of _POSIX_SOURCE, which is predefined and required
14717 # on some systems where configure will not decide to define it.
14718 if (defundef == "undef") {
14719 print "/*", prefix defundef, macro, "*/"
14720 next
14721 }
14722 }
14723}
14724{ print }
14725_ACAWK
14726_ACEOF
14727cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014728 as_fn_error "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000014729fi # test -n "$CONFIG_HEADERS"
14730
14731
14732eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
14733shift
14734for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014735do
14736 case $ac_tag in
14737 :[FHLC]) ac_mode=$ac_tag; continue;;
14738 esac
14739 case $ac_mode$ac_tag in
14740 :[FHL]*:*);;
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014741 :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014742 :[FH]-) ac_tag=-:-;;
14743 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
14744 esac
14745 ac_save_IFS=$IFS
14746 IFS=:
14747 set x $ac_tag
14748 IFS=$ac_save_IFS
14749 shift
14750 ac_file=$1
14751 shift
14752
14753 case $ac_mode in
14754 :L) ac_source=$1;;
14755 :[FH])
14756 ac_file_inputs=
14757 for ac_f
14758 do
14759 case $ac_f in
14760 -) ac_f="$tmp/stdin";;
14761 *) # Look for the file first in the build tree, then in the source tree
14762 # (if the path is not absolute). The absolute path cannot be DOS-style,
14763 # because $ac_f cannot contain `:'.
14764 test -f "$ac_f" ||
14765 case $ac_f in
14766 [\\/$]*) false;;
14767 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
14768 esac ||
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014769 as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014770 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014771 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
14772 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014773 done
14774
14775 # Let's still pretend it is `configure' which instantiates (i.e., don't
14776 # use $as_me), people would be surprised to read:
14777 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014778 configure_input='Generated from '`
14779 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
14780 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014781 if test x"$ac_file" != x-; then
14782 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000014783 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
14784$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014785 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014786 # Neutralize special characters interpreted by sed in replacement strings.
14787 case $configure_input in #(
14788 *\&* | *\|* | *\\* )
14789 ac_sed_conf_input=`$as_echo "$configure_input" |
14790 sed 's/[\\\\&|]/\\\\&/g'`;; #(
14791 *) ac_sed_conf_input=$configure_input;;
14792 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014793
14794 case $ac_tag in
Matthias Kloseb9621712010-04-24 17:59:49 +000014795 *:-:* | *:-) cat >"$tmp/stdin" \
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014796 || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014797 esac
14798 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014799 esac
14800
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014801 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000014802$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014803 X"$ac_file" : 'X\(//\)[^/]' \| \
14804 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014805 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014806$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014807 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14808 s//\1/
14809 q
14810 }
14811 /^X\(\/\/\)[^/].*/{
14812 s//\1/
14813 q
14814 }
14815 /^X\(\/\/\)$/{
14816 s//\1/
14817 q
14818 }
14819 /^X\(\/\).*/{
14820 s//\1/
14821 q
14822 }
14823 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000014824 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000014825 ac_builddir=.
14826
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014827case "$ac_dir" in
14828.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
14829*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014830 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014831 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000014832 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014833 case $ac_top_builddir_sub in
14834 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
14835 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
14836 esac ;;
14837esac
14838ac_abs_top_builddir=$ac_pwd
14839ac_abs_builddir=$ac_pwd$ac_dir_suffix
14840# for backward compatibility:
14841ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000014842
14843case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014844 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000014845 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014846 ac_top_srcdir=$ac_top_builddir_sub
14847 ac_abs_top_srcdir=$ac_pwd ;;
14848 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000014849 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014850 ac_top_srcdir=$srcdir
14851 ac_abs_top_srcdir=$srcdir ;;
14852 *) # Relative name.
14853 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
14854 ac_top_srcdir=$ac_top_build_prefix$srcdir
14855 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014856esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014857ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000014858
Martin v. Löwis11437992002-04-12 09:54:03 +000014859
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014860 case $ac_mode in
14861 :F)
14862 #
14863 # CONFIG_FILE
14864 #
Martin v. Löwis11437992002-04-12 09:54:03 +000014865
14866 case $INSTALL in
14867 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014868 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014869 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000014870_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014871
Matthias Kloseb9621712010-04-24 17:59:49 +000014872cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014873# If the template does not know about datarootdir, expand it.
14874# FIXME: This hack should be removed a few years after 2.60.
14875ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000014876ac_sed_dataroot='
14877/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014878 p
14879 q
14880}
14881/@datadir@/p
14882/@docdir@/p
14883/@infodir@/p
14884/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000014885/@mandir@/p'
14886case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014887*datarootdir*) ac_datarootdir_seen=yes;;
14888*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014889 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
14890$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014891_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014892cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014893 ac_datarootdir_hack='
14894 s&@datadir@&$datadir&g
14895 s&@docdir@&$docdir&g
14896 s&@infodir@&$infodir&g
14897 s&@localedir@&$localedir&g
14898 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000014899 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014900esac
14901_ACEOF
14902
14903# Neutralize VPATH when `$srcdir' = `.'.
14904# Shell code in configure.ac might set extrasub.
14905# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000014906cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14907ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000014908$extrasub
14909_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014910cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014911:t
14912/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000014913s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014914s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000014915s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014916s&@srcdir@&$ac_srcdir&;t t
14917s&@abs_srcdir@&$ac_abs_srcdir&;t t
14918s&@top_srcdir@&$ac_top_srcdir&;t t
14919s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
14920s&@builddir@&$ac_builddir&;t t
14921s&@abs_builddir@&$ac_abs_builddir&;t t
14922s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
14923s&@INSTALL@&$ac_INSTALL&;t t
14924$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000014925"
14926eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014927 || as_fn_error "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014928
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014929test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
14930 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
14931 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000014932 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014933which seems to be undefined. Please make sure it is defined." >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014934$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014935which seems to be undefined. Please make sure it is defined." >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014936
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014937 rm -f "$tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000014938 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +000014939 -) cat "$tmp/out" && rm -f "$tmp/out";;
14940 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
14941 esac \
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014942 || as_fn_error "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014943 ;;
14944 :H)
14945 #
14946 # CONFIG_HEADER
14947 #
Martin v. Löwis11437992002-04-12 09:54:03 +000014948 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014949 {
14950 $as_echo "/* $configure_input */" \
14951 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
14952 } >"$tmp/config.h" \
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014953 || as_fn_error "could not create $ac_file" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000014954 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
14955 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
14956$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000014957 else
Matthias Kloseb9621712010-04-24 17:59:49 +000014958 rm -f "$ac_file"
14959 mv "$tmp/config.h" "$ac_file" \
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014960 || as_fn_error "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000014961 fi
14962 else
Matthias Kloseb9621712010-04-24 17:59:49 +000014963 $as_echo "/* $configure_input */" \
14964 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014965 || as_fn_error "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000014966 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014967 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000014968
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014969
14970 esac
14971
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000014972
14973 case $ac_file$ac_mode in
14974 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
14975
14976 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014977done # for ac_tag
14978
Guido van Rossum627b2d71993-12-24 10:39:16 +000014979
Matthias Kloseb9621712010-04-24 17:59:49 +000014980as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000014981_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014982ac_clean_files=$ac_clean_files_save
14983
Matthias Kloseb9621712010-04-24 17:59:49 +000014984test $ac_write_fail = 0 ||
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014985 as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000014986
Martin v. Löwis11437992002-04-12 09:54:03 +000014987
14988# configure is writing to config.log, and then calls config.status.
14989# config.status does its own redirection, appending to config.log.
14990# Unfortunately, on DOS this fails, as config.log is still kept open
14991# by configure, so config.status won't be able to write to it; its
14992# output is simply discarded. So we exec the FD to /dev/null,
14993# effectively closing config.log, so it can be properly (re)opened and
14994# appended to by config.status. When coming back to configure, we
14995# need to make the FD available again.
14996if test "$no_create" != yes; then
14997 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000014998 ac_config_status_args=
14999 test "$silent" = yes &&
15000 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000015001 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000015002 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000015003 exec 5>>config.log
15004 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
15005 # would make configure fail if this is the last instruction.
Benjamin Petersond7f73e92010-09-05 00:09:07 +000015006 $ac_cs_success || as_fn_exit $?
Matthias Kloseb9621712010-04-24 17:59:49 +000015007fi
15008if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
15009 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
15010$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015011fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000015012
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015013
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015014echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015015if test ! -f Modules/Setup
15016then
15017 cp $srcdir/Modules/Setup.dist Modules/Setup
15018fi
15019
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015020echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015021if test ! -f Modules/Setup.local
15022then
15023 echo "# Edit this file for local setup changes" >Modules/Setup.local
15024fi
15025
15026echo "creating Makefile"
15027$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
15028 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000015029 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000015030mv config.c Modules