blob: a3859d3916e8595db962bf3336e57c65111a2698 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00002# From configure.in Revision: 84584 .
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
750with_wctype_functions
751with_fpectl
752with_libm
753with_libc
754enable_big_digits
755with_wide_unicode
756with_computed_gotos
757'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000758 ac_precious_vars='build_alias
759host_alias
760target_alias
761CC
762CFLAGS
763LDFLAGS
764LIBS
765CPPFLAGS
766CPP'
767
Guido van Rossum627b2d71993-12-24 10:39:16 +0000768
Guido van Rossum7f43da71994-08-01 12:15:30 +0000769# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000770ac_init_help=
771ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000772ac_unrecognized_opts=
773ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000774# The variables have the same names as the options, with
775# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000776cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000777exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000778no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000779no_recursion=
780prefix=NONE
781program_prefix=NONE
782program_suffix=NONE
783program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000784silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000785site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000786srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000787verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000788x_includes=NONE
789x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000790
791# Installation directory options.
792# These are left unexpanded so users can "make install exec_prefix=/foo"
793# and all the variables that are supposed to be based on exec_prefix
794# by default will actually change.
795# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000796# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000797bindir='${exec_prefix}/bin'
798sbindir='${exec_prefix}/sbin'
799libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000800datarootdir='${prefix}/share'
801datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000802sysconfdir='${prefix}/etc'
803sharedstatedir='${prefix}/com'
804localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000805includedir='${prefix}/include'
806oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000807docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
808infodir='${datarootdir}/info'
809htmldir='${docdir}'
810dvidir='${docdir}'
811pdfdir='${docdir}'
812psdir='${docdir}'
813libdir='${exec_prefix}/lib'
814localedir='${datarootdir}/locale'
815mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000816
Guido van Rossum7f43da71994-08-01 12:15:30 +0000817ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000818ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000819for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000820do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000821 # If the previous option needs an argument, assign it.
822 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000823 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000824 ac_prev=
825 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000826 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000827
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000828 case $ac_option in
Benjamin Petersond7f73e92010-09-05 00:09:07 +0000829 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
830 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000831 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000832
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000833 # Accept the important Cygnus configure options, so we can diagnose typos.
834
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000835 case $ac_dashdash$ac_option in
836 --)
837 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000838
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000839 -bindir | --bindir | --bindi | --bind | --bin | --bi)
840 ac_prev=bindir ;;
841 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000842 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000843
844 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000845 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000846 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000847 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000848
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000849 -cache-file | --cache-file | --cache-fil | --cache-fi \
850 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
851 ac_prev=cache_file ;;
852 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
853 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000854 cache_file=$ac_optarg ;;
855
856 --config-cache | -C)
857 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000858
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000859 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000860 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000861 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000862 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000863
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000864 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
865 | --dataroo | --dataro | --datar)
866 ac_prev=datarootdir ;;
867 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
868 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
869 datarootdir=$ac_optarg ;;
870
Guido van Rossum7f43da71994-08-01 12:15:30 +0000871 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000872 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000873 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000874 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Benjamin Petersond7f73e92010-09-05 00:09:07 +0000875 as_fn_error "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000876 ac_useropt_orig=$ac_useropt
877 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
878 case $ac_user_opts in
879 *"
880"enable_$ac_useropt"
881"*) ;;
882 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
883 ac_unrecognized_sep=', ';;
884 esac
885 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000886
887 -docdir | --docdir | --docdi | --doc | --do)
888 ac_prev=docdir ;;
889 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
890 docdir=$ac_optarg ;;
891
892 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
893 ac_prev=dvidir ;;
894 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
895 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000896
897 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000898 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000899 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000900 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Benjamin Petersond7f73e92010-09-05 00:09:07 +0000901 as_fn_error "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000902 ac_useropt_orig=$ac_useropt
903 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
904 case $ac_user_opts in
905 *"
906"enable_$ac_useropt"
907"*) ;;
908 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
909 ac_unrecognized_sep=', ';;
910 esac
911 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000912
Guido van Rossum7f43da71994-08-01 12:15:30 +0000913 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
914 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
915 | --exec | --exe | --ex)
916 ac_prev=exec_prefix ;;
917 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
918 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
919 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000920 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000921
922 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000923 # Obsolete; use --with-gas.
924 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000925
Martin v. Löwis11437992002-04-12 09:54:03 +0000926 -help | --help | --hel | --he | -h)
927 ac_init_help=long ;;
928 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
929 ac_init_help=recursive ;;
930 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
931 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000932
933 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000934 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000935 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000936 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000937
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000938 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
939 ac_prev=htmldir ;;
940 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
941 | --ht=*)
942 htmldir=$ac_optarg ;;
943
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000944 -includedir | --includedir | --includedi | --included | --include \
945 | --includ | --inclu | --incl | --inc)
946 ac_prev=includedir ;;
947 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
948 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000949 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000950
951 -infodir | --infodir | --infodi | --infod | --info | --inf)
952 ac_prev=infodir ;;
953 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000954 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000955
956 -libdir | --libdir | --libdi | --libd)
957 ac_prev=libdir ;;
958 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000959 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000960
961 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
962 | --libexe | --libex | --libe)
963 ac_prev=libexecdir ;;
964 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
965 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000966 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000967
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000968 -localedir | --localedir | --localedi | --localed | --locale)
969 ac_prev=localedir ;;
970 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
971 localedir=$ac_optarg ;;
972
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000973 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000974 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000975 ac_prev=localstatedir ;;
976 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000977 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000978 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000979
980 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
981 ac_prev=mandir ;;
982 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000983 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000984
Guido van Rossum7f43da71994-08-01 12:15:30 +0000985 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000986 # Obsolete; use --without-fp.
987 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000988
989 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +0000990 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000991 no_create=yes ;;
992
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000993 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
994 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
995 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000996
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000997 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
998 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
999 | --oldin | --oldi | --old | --ol | --o)
1000 ac_prev=oldincludedir ;;
1001 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1002 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1003 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001004 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001005
Guido van Rossum7f43da71994-08-01 12:15:30 +00001006 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1007 ac_prev=prefix ;;
1008 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001009 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001010
1011 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1012 | --program-pre | --program-pr | --program-p)
1013 ac_prev=program_prefix ;;
1014 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1015 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001016 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001017
1018 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1019 | --program-suf | --program-su | --program-s)
1020 ac_prev=program_suffix ;;
1021 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1022 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001023 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001024
1025 -program-transform-name | --program-transform-name \
1026 | --program-transform-nam | --program-transform-na \
1027 | --program-transform-n | --program-transform- \
1028 | --program-transform | --program-transfor \
1029 | --program-transfo | --program-transf \
1030 | --program-trans | --program-tran \
1031 | --progr-tra | --program-tr | --program-t)
1032 ac_prev=program_transform_name ;;
1033 -program-transform-name=* | --program-transform-name=* \
1034 | --program-transform-nam=* | --program-transform-na=* \
1035 | --program-transform-n=* | --program-transform-=* \
1036 | --program-transform=* | --program-transfor=* \
1037 | --program-transfo=* | --program-transf=* \
1038 | --program-trans=* | --program-tran=* \
1039 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001040 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001041
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001042 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1043 ac_prev=pdfdir ;;
1044 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1045 pdfdir=$ac_optarg ;;
1046
1047 -psdir | --psdir | --psdi | --psd | --ps)
1048 ac_prev=psdir ;;
1049 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1050 psdir=$ac_optarg ;;
1051
Guido van Rossum7f43da71994-08-01 12:15:30 +00001052 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1053 | -silent | --silent | --silen | --sile | --sil)
1054 silent=yes ;;
1055
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001056 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1057 ac_prev=sbindir ;;
1058 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1059 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001060 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001061
1062 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1063 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1064 | --sharedst | --shareds | --shared | --share | --shar \
1065 | --sha | --sh)
1066 ac_prev=sharedstatedir ;;
1067 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1068 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1069 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1070 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001071 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001072
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001073 -site | --site | --sit)
1074 ac_prev=site ;;
1075 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001076 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001077
Guido van Rossum7f43da71994-08-01 12:15:30 +00001078 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1079 ac_prev=srcdir ;;
1080 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001081 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001082
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001083 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1084 | --syscon | --sysco | --sysc | --sys | --sy)
1085 ac_prev=sysconfdir ;;
1086 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1087 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001088 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001089
Guido van Rossum7f43da71994-08-01 12:15:30 +00001090 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001091 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001092 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001093 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001094
1095 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1096 verbose=yes ;;
1097
Martin v. Löwis11437992002-04-12 09:54:03 +00001098 -version | --version | --versio | --versi | --vers | -V)
1099 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001100
1101 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001102 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001103 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001104 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Benjamin Petersond7f73e92010-09-05 00:09:07 +00001105 as_fn_error "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001106 ac_useropt_orig=$ac_useropt
1107 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1108 case $ac_user_opts in
1109 *"
1110"with_$ac_useropt"
1111"*) ;;
1112 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1113 ac_unrecognized_sep=', ';;
1114 esac
1115 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001116
1117 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001118 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001119 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001120 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Benjamin Petersond7f73e92010-09-05 00:09:07 +00001121 as_fn_error "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001122 ac_useropt_orig=$ac_useropt
1123 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1124 case $ac_user_opts in
1125 *"
1126"with_$ac_useropt"
1127"*) ;;
1128 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1129 ac_unrecognized_sep=', ';;
1130 esac
1131 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001132
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001133 --x)
1134 # Obsolete; use --with-x.
1135 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001136
1137 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1138 | --x-incl | --x-inc | --x-in | --x-i)
1139 ac_prev=x_includes ;;
1140 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1141 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001142 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001143
1144 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1145 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1146 ac_prev=x_libraries ;;
1147 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1148 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001149 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001150
Benjamin Petersond7f73e92010-09-05 00:09:07 +00001151 -*) as_fn_error "unrecognized option: \`$ac_option'
1152Try \`$0 --help' for more information."
Guido van Rossum7f43da71994-08-01 12:15:30 +00001153 ;;
1154
Martin v. Löwis11437992002-04-12 09:54:03 +00001155 *=*)
1156 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1157 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001158 case $ac_envvar in #(
1159 '' | [0-9]* | *[!_$as_cr_alnum]* )
Benjamin Petersond7f73e92010-09-05 00:09:07 +00001160 as_fn_error "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001161 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001162 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001163 export $ac_envvar ;;
1164
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001165 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001166 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001167 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001168 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001169 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001170 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
Guido van Rossum7f43da71994-08-01 12:15:30 +00001171 ;;
1172
1173 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001174done
1175
Guido van Rossum7f43da71994-08-01 12:15:30 +00001176if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001177 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Benjamin Petersond7f73e92010-09-05 00:09:07 +00001178 as_fn_error "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001179fi
1180
Matthias Kloseb9621712010-04-24 17:59:49 +00001181if test -n "$ac_unrecognized_opts"; then
1182 case $enable_option_checking in
1183 no) ;;
Benjamin Petersond7f73e92010-09-05 00:09:07 +00001184 fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001185 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1186 esac
1187fi
1188
1189# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001190for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1191 datadir sysconfdir sharedstatedir localstatedir includedir \
1192 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1193 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001194do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001195 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001196 # Remove trailing slashes.
1197 case $ac_val in
1198 */ )
1199 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1200 eval $ac_var=\$ac_val;;
1201 esac
1202 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001203 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001204 [\\/$]* | ?:[\\/]* ) continue;;
1205 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001206 esac
Benjamin Petersond7f73e92010-09-05 00:09:07 +00001207 as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001208done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001209
Martin v. Löwis11437992002-04-12 09:54:03 +00001210# There might be people who depend on the old broken behavior: `$host'
1211# used to hold the argument of --host etc.
1212# FIXME: To remove some day.
1213build=$build_alias
1214host=$host_alias
1215target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001216
Martin v. Löwis11437992002-04-12 09:54:03 +00001217# FIXME: To remove some day.
1218if test "x$host_alias" != x; then
1219 if test "x$build_alias" = x; then
1220 cross_compiling=maybe
Benjamin Petersond7f73e92010-09-05 00:09:07 +00001221 $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
1222 If a cross compiler is detected then cross compile mode will be used." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001223 elif test "x$build_alias" != "x$host_alias"; then
1224 cross_compiling=yes
1225 fi
1226fi
1227
1228ac_tool_prefix=
1229test -n "$host_alias" && ac_tool_prefix=$host_alias-
1230
1231test "$silent" = yes && exec 6>/dev/null
1232
Guido van Rossum627b2d71993-12-24 10:39:16 +00001233
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001234ac_pwd=`pwd` && test -n "$ac_pwd" &&
1235ac_ls_di=`ls -di .` &&
1236ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Benjamin Petersond7f73e92010-09-05 00:09:07 +00001237 as_fn_error "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001238test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Benjamin Petersond7f73e92010-09-05 00:09:07 +00001239 as_fn_error "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001240
1241
Guido van Rossum627b2d71993-12-24 10:39:16 +00001242# Find the source files, if location was not specified.
1243if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001244 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001245 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001246 ac_confdir=`$as_dirname -- "$as_myself" ||
1247$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1248 X"$as_myself" : 'X\(//\)[^/]' \| \
1249 X"$as_myself" : 'X\(//\)$' \| \
1250 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1251$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001252 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1253 s//\1/
1254 q
1255 }
1256 /^X\(\/\/\)[^/].*/{
1257 s//\1/
1258 q
1259 }
1260 /^X\(\/\/\)$/{
1261 s//\1/
1262 q
1263 }
1264 /^X\(\/\).*/{
1265 s//\1/
1266 q
1267 }
1268 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001269 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001270 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001271 srcdir=..
1272 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001273else
1274 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001275fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001276if test ! -r "$srcdir/$ac_unique_file"; then
1277 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Benjamin Petersond7f73e92010-09-05 00:09:07 +00001278 as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001279fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001280ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1281ac_abs_confdir=`(
Benjamin Petersond7f73e92010-09-05 00:09:07 +00001282 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001283 pwd)`
1284# When building in place, set srcdir=.
1285if test "$ac_abs_confdir" = "$ac_pwd"; then
1286 srcdir=.
1287fi
1288# Remove unnecessary trailing slashes from srcdir.
1289# Double slashes in file names in object file debugging info
1290# mess up M-x gdb in Emacs.
1291case $srcdir in
1292*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1293esac
1294for ac_var in $ac_precious_vars; do
1295 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1296 eval ac_env_${ac_var}_value=\$${ac_var}
1297 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1298 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1299done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001300
Martin v. Löwis11437992002-04-12 09:54:03 +00001301#
1302# Report the --help message.
1303#
1304if test "$ac_init_help" = "long"; then
1305 # Omit some internal or obsolete options to make the list less imposing.
1306 # This message is too long to be a string in the A/UX 3.1 sh.
1307 cat <<_ACEOF
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001308\`configure' configures python 3.2 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001309
1310Usage: $0 [OPTION]... [VAR=VALUE]...
1311
1312To assign environment variables (e.g., CC, CFLAGS...), specify them as
1313VAR=VALUE. See below for descriptions of some of the useful variables.
1314
1315Defaults for the options are specified in brackets.
1316
1317Configuration:
1318 -h, --help display this help and exit
1319 --help=short display options specific to this package
1320 --help=recursive display the short help of all the included packages
1321 -V, --version display version information and exit
Benjamin Petersond7f73e92010-09-05 00:09:07 +00001322 -q, --quiet, --silent do not print \`checking...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001323 --cache-file=FILE cache test results in FILE [disabled]
1324 -C, --config-cache alias for \`--cache-file=config.cache'
1325 -n, --no-create do not create output files
1326 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1327
Martin v. Löwis11437992002-04-12 09:54:03 +00001328Installation directories:
1329 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001330 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001331 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001332 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001333
1334By default, \`make install' will install all the files in
1335\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1336an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1337for instance \`--prefix=\$HOME'.
1338
1339For better control, use the options below.
1340
1341Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001342 --bindir=DIR user executables [EPREFIX/bin]
1343 --sbindir=DIR system admin executables [EPREFIX/sbin]
1344 --libexecdir=DIR program executables [EPREFIX/libexec]
1345 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1346 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1347 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1348 --libdir=DIR object code libraries [EPREFIX/lib]
1349 --includedir=DIR C header files [PREFIX/include]
1350 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1351 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1352 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1353 --infodir=DIR info documentation [DATAROOTDIR/info]
1354 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1355 --mandir=DIR man documentation [DATAROOTDIR/man]
1356 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1357 --htmldir=DIR html documentation [DOCDIR]
1358 --dvidir=DIR dvi documentation [DOCDIR]
1359 --pdfdir=DIR pdf documentation [DOCDIR]
1360 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001361_ACEOF
1362
1363 cat <<\_ACEOF
1364_ACEOF
1365fi
1366
1367if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001368 case $ac_init_help in
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001369 short | recursive ) echo "Configuration of python 3.2:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001370 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001371 cat <<\_ACEOF
1372
1373Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001374 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001375 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1376 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001377 --enable-universalsdk[=SDKDIR]
Christian Heimes292d3512008-02-03 16:51:08 +00001378 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001379 --enable-framework[=INSTALLDIR]
1380 Build (MacOSX|Darwin) framework
1381 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001382 --enable-profiling enable C-level code profiling
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001383 --enable-ipv6 Enable ipv6 (with ipv4) support
1384 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001385 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001386 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001387
1388Optional Packages:
1389 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1390 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001391 --with-universal-archs=ARCH
1392 select architectures for universal build ("32-bit",
Ronald Oussoren3c064c12009-09-08 07:12:42 +00001393 "64-bit", "3-way", "intel" or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001394 --with-framework-name=FRAMEWORK
1395 specify an alternate name of the framework built
1396 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001397 --without-gcc never use gcc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001398 --with-cxx-main=<compiler>
1399 compile main() and link python executable with C++
1400 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001401 --with-suffix=.exe set executable suffix
1402 --with-pydebug build with Py_DEBUG defined
1403 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001404 --with-system-expat build pyexpat module using an installed expat
1405 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001406 --with-system-ffi build _ctypes module using an installed ffi library
Matthias Klose55708cc2009-04-30 08:06:49 +00001407 --with-dbmliborder=db1:db2:...
1408 order to check db backends for dbm. Valid value is a
1409 colon separated string with the backend names
1410 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001411 --with-signal-module disable/enable signal module
1412 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1413 --with(out)-threads[=DIRECTORY]
1414 disable/enable thread support
1415 --with(out)-thread[=DIRECTORY]
1416 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001417 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001418 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001419 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001420 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001421 --with-wctype-functions use wctype.h functions
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001422 --with-fpectl enable SIGFPE catching
1423 --with-libm=STRING math library
1424 --with-libc=STRING C library
Georg Brandl52d168a2008-01-07 18:10:24 +00001425 --with-wide-unicode Use 4-byte Unicode characters (default is 2 bytes)
Antoine Pitrou042b1282010-08-13 21:15:58 +00001426 --with(out)-computed-gotos
1427 Use computed gotos in evaluation loop (enabled by
1428 default on supported compilers)
Martin v. Löwis11437992002-04-12 09:54:03 +00001429
1430Some influential environment variables:
1431 CC C compiler command
1432 CFLAGS C compiler flags
1433 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1434 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001435 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001436 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001437 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001438 CPP C preprocessor
1439
1440Use these variables to override the choices made by `configure' or to help
1441it to find libraries and programs with nonstandard names/locations.
1442
Georg Brandle2e15612009-05-20 18:25:10 +00001443Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001444_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001445ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001446fi
1447
1448if test "$ac_init_help" = "recursive"; then
1449 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001450 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001451 test -d "$ac_dir" ||
1452 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1453 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001454 ac_builddir=.
1455
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001456case "$ac_dir" in
1457.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1458*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001459 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001460 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001461 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001462 case $ac_top_builddir_sub in
1463 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1464 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1465 esac ;;
1466esac
1467ac_abs_top_builddir=$ac_pwd
1468ac_abs_builddir=$ac_pwd$ac_dir_suffix
1469# for backward compatibility:
1470ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001471
1472case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001473 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001474 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001475 ac_top_srcdir=$ac_top_builddir_sub
1476 ac_abs_top_srcdir=$ac_pwd ;;
1477 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001478 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001479 ac_top_srcdir=$srcdir
1480 ac_abs_top_srcdir=$srcdir ;;
1481 *) # Relative name.
1482 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1483 ac_top_srcdir=$ac_top_build_prefix$srcdir
1484 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001485esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001486ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001487
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001488 cd "$ac_dir" || { ac_status=$?; continue; }
1489 # Check for guested configure.
1490 if test -f "$ac_srcdir/configure.gnu"; then
1491 echo &&
1492 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1493 elif test -f "$ac_srcdir/configure"; then
1494 echo &&
1495 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001496 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001497 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001498 fi || ac_status=$?
1499 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001500 done
1501fi
1502
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001503test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001504if $ac_init_version; then
1505 cat <<\_ACEOF
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001506python configure 3.2
Benjamin Petersond7f73e92010-09-05 00:09:07 +00001507generated by GNU Autoconf 2.65
Martin v. Löwis11437992002-04-12 09:54:03 +00001508
Benjamin Petersond7f73e92010-09-05 00:09:07 +00001509Copyright (C) 2009 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001510This configure script is free software; the Free Software Foundation
1511gives unlimited permission to copy, distribute and modify it.
1512_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001513 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001514fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001515
1516## ------------------------ ##
1517## Autoconf initialization. ##
1518## ------------------------ ##
1519
1520# ac_fn_c_try_compile LINENO
1521# --------------------------
1522# Try to compile conftest.$ac_ext, and return whether this succeeded.
1523ac_fn_c_try_compile ()
1524{
1525 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1526 rm -f conftest.$ac_objext
1527 if { { ac_try="$ac_compile"
1528case "(($ac_try" in
1529 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1530 *) ac_try_echo=$ac_try;;
1531esac
1532eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1533$as_echo "$ac_try_echo"; } >&5
1534 (eval "$ac_compile") 2>conftest.err
1535 ac_status=$?
1536 if test -s conftest.err; then
1537 grep -v '^ *+' conftest.err >conftest.er1
1538 cat conftest.er1 >&5
1539 mv -f conftest.er1 conftest.err
1540 fi
1541 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1542 test $ac_status = 0; } && {
1543 test -z "$ac_c_werror_flag" ||
1544 test ! -s conftest.err
1545 } && test -s conftest.$ac_objext; then :
1546 ac_retval=0
1547else
1548 $as_echo "$as_me: failed program was:" >&5
1549sed 's/^/| /' conftest.$ac_ext >&5
1550
1551 ac_retval=1
1552fi
1553 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1554 as_fn_set_status $ac_retval
1555
1556} # ac_fn_c_try_compile
1557
1558# ac_fn_c_try_cpp LINENO
1559# ----------------------
1560# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1561ac_fn_c_try_cpp ()
1562{
1563 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1564 if { { ac_try="$ac_cpp conftest.$ac_ext"
1565case "(($ac_try" in
1566 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1567 *) ac_try_echo=$ac_try;;
1568esac
1569eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1570$as_echo "$ac_try_echo"; } >&5
1571 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1572 ac_status=$?
1573 if test -s conftest.err; then
1574 grep -v '^ *+' conftest.err >conftest.er1
1575 cat conftest.er1 >&5
1576 mv -f conftest.er1 conftest.err
1577 fi
1578 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Benjamin Petersond7f73e92010-09-05 00:09:07 +00001579 test $ac_status = 0; } >/dev/null && {
Matthias Kloseb9621712010-04-24 17:59:49 +00001580 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1581 test ! -s conftest.err
1582 }; then :
1583 ac_retval=0
1584else
1585 $as_echo "$as_me: failed program was:" >&5
1586sed 's/^/| /' conftest.$ac_ext >&5
1587
1588 ac_retval=1
1589fi
1590 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1591 as_fn_set_status $ac_retval
1592
1593} # ac_fn_c_try_cpp
1594
1595# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1596# -------------------------------------------------------
1597# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1598# the include files in INCLUDES and setting the cache variable VAR
1599# accordingly.
1600ac_fn_c_check_header_mongrel ()
1601{
1602 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Benjamin Petersond7f73e92010-09-05 00:09:07 +00001603 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001604 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1605$as_echo_n "checking for $2... " >&6; }
Benjamin Petersond7f73e92010-09-05 00:09:07 +00001606if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001607 $as_echo_n "(cached) " >&6
1608fi
1609eval ac_res=\$$3
1610 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1611$as_echo "$ac_res" >&6; }
1612else
1613 # Is the header compilable?
1614{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1615$as_echo_n "checking $2 usability... " >&6; }
1616cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1617/* end confdefs.h. */
1618$4
1619#include <$2>
1620_ACEOF
1621if ac_fn_c_try_compile "$LINENO"; then :
1622 ac_header_compiler=yes
1623else
1624 ac_header_compiler=no
1625fi
1626rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1627{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1628$as_echo "$ac_header_compiler" >&6; }
1629
1630# Is the header present?
1631{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1632$as_echo_n "checking $2 presence... " >&6; }
1633cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1634/* end confdefs.h. */
1635#include <$2>
1636_ACEOF
1637if ac_fn_c_try_cpp "$LINENO"; then :
1638 ac_header_preproc=yes
1639else
1640 ac_header_preproc=no
1641fi
Benjamin Petersond7f73e92010-09-05 00:09:07 +00001642rm -f conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001643{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1644$as_echo "$ac_header_preproc" >&6; }
1645
1646# So? What about this header?
1647case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1648 yes:no: )
1649 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1650$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1651 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1652$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1653 ;;
1654 no:yes:* )
1655 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1656$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1657 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1658$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1659 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1660$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1661 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1662$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1663 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1664$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Benjamin Petersond7f73e92010-09-05 00:09:07 +00001665( cat <<\_ASBOX
1666## -------------------------------------- ##
Matthias Kloseb9621712010-04-24 17:59:49 +00001667## Report this to http://bugs.python.org/ ##
Benjamin Petersond7f73e92010-09-05 00:09:07 +00001668## -------------------------------------- ##
1669_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +00001670 ) | sed "s/^/$as_me: WARNING: /" >&2
1671 ;;
1672esac
1673 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1674$as_echo_n "checking for $2... " >&6; }
Benjamin Petersond7f73e92010-09-05 00:09:07 +00001675if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001676 $as_echo_n "(cached) " >&6
1677else
1678 eval "$3=\$ac_header_compiler"
1679fi
1680eval ac_res=\$$3
1681 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1682$as_echo "$ac_res" >&6; }
1683fi
1684 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1685
1686} # ac_fn_c_check_header_mongrel
1687
1688# ac_fn_c_try_run LINENO
1689# ----------------------
1690# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1691# that executables *can* be run.
1692ac_fn_c_try_run ()
1693{
1694 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1695 if { { ac_try="$ac_link"
1696case "(($ac_try" in
1697 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1698 *) ac_try_echo=$ac_try;;
1699esac
1700eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1701$as_echo "$ac_try_echo"; } >&5
1702 (eval "$ac_link") 2>&5
1703 ac_status=$?
1704 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1705 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1706 { { case "(($ac_try" in
1707 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1708 *) ac_try_echo=$ac_try;;
1709esac
1710eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1711$as_echo "$ac_try_echo"; } >&5
1712 (eval "$ac_try") 2>&5
1713 ac_status=$?
1714 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1715 test $ac_status = 0; }; }; then :
1716 ac_retval=0
1717else
1718 $as_echo "$as_me: program exited with status $ac_status" >&5
1719 $as_echo "$as_me: failed program was:" >&5
1720sed 's/^/| /' conftest.$ac_ext >&5
1721
1722 ac_retval=$ac_status
1723fi
1724 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1725 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1726 as_fn_set_status $ac_retval
1727
1728} # ac_fn_c_try_run
1729
1730# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1731# -------------------------------------------------------
1732# Tests whether HEADER exists and can be compiled using the include files in
1733# INCLUDES, setting the cache variable VAR accordingly.
1734ac_fn_c_check_header_compile ()
1735{
1736 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1737 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1738$as_echo_n "checking for $2... " >&6; }
Benjamin Petersond7f73e92010-09-05 00:09:07 +00001739if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001740 $as_echo_n "(cached) " >&6
1741else
1742 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1743/* end confdefs.h. */
1744$4
1745#include <$2>
1746_ACEOF
1747if ac_fn_c_try_compile "$LINENO"; then :
1748 eval "$3=yes"
1749else
1750 eval "$3=no"
1751fi
1752rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1753fi
1754eval ac_res=\$$3
1755 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1756$as_echo "$ac_res" >&6; }
1757 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1758
1759} # ac_fn_c_check_header_compile
1760
1761# ac_fn_c_try_link LINENO
1762# -----------------------
1763# Try to link conftest.$ac_ext, and return whether this succeeded.
1764ac_fn_c_try_link ()
1765{
1766 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1767 rm -f conftest.$ac_objext conftest$ac_exeext
1768 if { { ac_try="$ac_link"
1769case "(($ac_try" in
1770 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1771 *) ac_try_echo=$ac_try;;
1772esac
1773eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1774$as_echo "$ac_try_echo"; } >&5
1775 (eval "$ac_link") 2>conftest.err
1776 ac_status=$?
1777 if test -s conftest.err; then
1778 grep -v '^ *+' conftest.err >conftest.er1
1779 cat conftest.er1 >&5
1780 mv -f conftest.er1 conftest.err
1781 fi
1782 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1783 test $ac_status = 0; } && {
1784 test -z "$ac_c_werror_flag" ||
1785 test ! -s conftest.err
1786 } && test -s conftest$ac_exeext && {
1787 test "$cross_compiling" = yes ||
1788 $as_test_x conftest$ac_exeext
1789 }; then :
1790 ac_retval=0
1791else
1792 $as_echo "$as_me: failed program was:" >&5
1793sed 's/^/| /' conftest.$ac_ext >&5
1794
1795 ac_retval=1
1796fi
1797 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1798 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1799 # interfere with the next link command; also delete a directory that is
1800 # left behind by Apple's compiler. We do this before executing the actions.
1801 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1802 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1803 as_fn_set_status $ac_retval
1804
1805} # ac_fn_c_try_link
1806
1807# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1808# -------------------------------------------
1809# Tests whether TYPE exists after having included INCLUDES, setting cache
1810# variable VAR accordingly.
1811ac_fn_c_check_type ()
1812{
1813 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1814 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1815$as_echo_n "checking for $2... " >&6; }
Benjamin Petersond7f73e92010-09-05 00:09:07 +00001816if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001817 $as_echo_n "(cached) " >&6
1818else
1819 eval "$3=no"
1820 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1821/* end confdefs.h. */
1822$4
1823int
1824main ()
1825{
1826if (sizeof ($2))
1827 return 0;
1828 ;
1829 return 0;
1830}
1831_ACEOF
1832if ac_fn_c_try_compile "$LINENO"; then :
1833 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1834/* end confdefs.h. */
1835$4
1836int
1837main ()
1838{
1839if (sizeof (($2)))
1840 return 0;
1841 ;
1842 return 0;
1843}
1844_ACEOF
1845if ac_fn_c_try_compile "$LINENO"; then :
1846
1847else
1848 eval "$3=yes"
1849fi
1850rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1851fi
1852rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1853fi
1854eval ac_res=\$$3
1855 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1856$as_echo "$ac_res" >&6; }
1857 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1858
1859} # ac_fn_c_check_type
1860
1861# ac_fn_c_find_uintX_t LINENO BITS VAR
1862# ------------------------------------
1863# Finds an unsigned integer type with width BITS, setting cache variable VAR
1864# accordingly.
1865ac_fn_c_find_uintX_t ()
1866{
1867 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1868 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1869$as_echo_n "checking for uint$2_t... " >&6; }
Benjamin Petersond7f73e92010-09-05 00:09:07 +00001870if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001871 $as_echo_n "(cached) " >&6
1872else
1873 eval "$3=no"
1874 # Order is important - never check a type that is potentially smaller
1875 # than half of the expected target width.
1876 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1877 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1878 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1879/* end confdefs.h. */
1880$ac_includes_default
1881int
1882main ()
1883{
1884static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
1885test_array [0] = 0
1886
1887 ;
1888 return 0;
1889}
1890_ACEOF
1891if ac_fn_c_try_compile "$LINENO"; then :
1892 case $ac_type in #(
1893 uint$2_t) :
1894 eval "$3=yes" ;; #(
1895 *) :
1896 eval "$3=\$ac_type" ;;
1897esac
1898fi
1899rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Petersond7f73e92010-09-05 00:09:07 +00001900 eval as_val=\$$3
1901 if test "x$as_val" = x""no; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001902
1903else
1904 break
1905fi
1906 done
1907fi
1908eval ac_res=\$$3
1909 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1910$as_echo "$ac_res" >&6; }
1911 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1912
1913} # ac_fn_c_find_uintX_t
1914
1915# ac_fn_c_find_intX_t LINENO BITS VAR
1916# -----------------------------------
1917# Finds a signed integer type with width BITS, setting cache variable VAR
1918# accordingly.
1919ac_fn_c_find_intX_t ()
1920{
1921 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1922 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
1923$as_echo_n "checking for int$2_t... " >&6; }
Benjamin Petersond7f73e92010-09-05 00:09:07 +00001924if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001925 $as_echo_n "(cached) " >&6
1926else
1927 eval "$3=no"
1928 # Order is important - never check a type that is potentially smaller
1929 # than half of the expected target width.
1930 for ac_type in int$2_t 'int' 'long int' \
1931 'long long int' 'short int' 'signed char'; do
1932 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1933/* end confdefs.h. */
1934$ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00001935int
1936main ()
1937{
Benjamin Petersond7f73e92010-09-05 00:09:07 +00001938static int test_array [1 - 2 * !(enum { N = $2 / 2 - 1 };
1939 0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
Matthias Kloseb9621712010-04-24 17:59:49 +00001940test_array [0] = 0
1941
1942 ;
1943 return 0;
1944}
1945_ACEOF
1946if ac_fn_c_try_compile "$LINENO"; then :
1947 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1948/* end confdefs.h. */
1949$ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00001950int
1951main ()
1952{
Benjamin Petersond7f73e92010-09-05 00:09:07 +00001953static int test_array [1 - 2 * !(enum { N = $2 / 2 - 1 };
1954 ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Kloseb9621712010-04-24 17:59:49 +00001955 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
1956test_array [0] = 0
1957
1958 ;
1959 return 0;
1960}
1961_ACEOF
1962if ac_fn_c_try_compile "$LINENO"; then :
1963
1964else
1965 case $ac_type in #(
1966 int$2_t) :
1967 eval "$3=yes" ;; #(
1968 *) :
1969 eval "$3=\$ac_type" ;;
1970esac
1971fi
1972rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1973fi
1974rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Petersond7f73e92010-09-05 00:09:07 +00001975 eval as_val=\$$3
1976 if test "x$as_val" = x""no; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001977
1978else
1979 break
1980fi
1981 done
1982fi
1983eval ac_res=\$$3
1984 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1985$as_echo "$ac_res" >&6; }
1986 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1987
1988} # ac_fn_c_find_intX_t
1989
1990# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1991# --------------------------------------------
1992# Tries to find the compile-time value of EXPR in a program that includes
1993# INCLUDES, setting VAR accordingly. Returns whether the value could be
1994# computed
1995ac_fn_c_compute_int ()
1996{
1997 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1998 if test "$cross_compiling" = yes; then
1999 # Depending upon the size, compute the lo and hi bounds.
2000cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2001/* end confdefs.h. */
2002$4
2003int
2004main ()
2005{
2006static int test_array [1 - 2 * !(($2) >= 0)];
2007test_array [0] = 0
2008
2009 ;
2010 return 0;
2011}
2012_ACEOF
2013if ac_fn_c_try_compile "$LINENO"; then :
2014 ac_lo=0 ac_mid=0
2015 while :; do
2016 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2017/* end confdefs.h. */
2018$4
2019int
2020main ()
2021{
2022static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2023test_array [0] = 0
2024
2025 ;
2026 return 0;
2027}
2028_ACEOF
2029if ac_fn_c_try_compile "$LINENO"; then :
2030 ac_hi=$ac_mid; break
2031else
2032 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2033 if test $ac_lo -le $ac_mid; then
2034 ac_lo= ac_hi=
2035 break
2036 fi
2037 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2038fi
2039rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2040 done
2041else
2042 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2043/* end confdefs.h. */
2044$4
2045int
2046main ()
2047{
2048static int test_array [1 - 2 * !(($2) < 0)];
2049test_array [0] = 0
2050
2051 ;
2052 return 0;
2053}
2054_ACEOF
2055if ac_fn_c_try_compile "$LINENO"; then :
2056 ac_hi=-1 ac_mid=-1
2057 while :; do
2058 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2059/* end confdefs.h. */
2060$4
2061int
2062main ()
2063{
2064static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2065test_array [0] = 0
2066
2067 ;
2068 return 0;
2069}
2070_ACEOF
2071if ac_fn_c_try_compile "$LINENO"; then :
2072 ac_lo=$ac_mid; break
2073else
2074 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2075 if test $ac_mid -le $ac_hi; then
2076 ac_lo= ac_hi=
2077 break
2078 fi
2079 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2080fi
2081rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2082 done
2083else
2084 ac_lo= ac_hi=
2085fi
2086rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2087fi
2088rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2089# Binary search between lo and hi bounds.
2090while test "x$ac_lo" != "x$ac_hi"; do
2091 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2092 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2093/* end confdefs.h. */
2094$4
2095int
2096main ()
2097{
2098static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2099test_array [0] = 0
2100
2101 ;
2102 return 0;
2103}
2104_ACEOF
2105if ac_fn_c_try_compile "$LINENO"; then :
2106 ac_hi=$ac_mid
2107else
2108 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2109fi
2110rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2111done
2112case $ac_lo in #((
2113?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2114'') ac_retval=1 ;;
2115esac
2116 else
2117 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2118/* end confdefs.h. */
2119$4
2120static long int longval () { return $2; }
2121static unsigned long int ulongval () { return $2; }
2122#include <stdio.h>
2123#include <stdlib.h>
2124int
2125main ()
2126{
2127
2128 FILE *f = fopen ("conftest.val", "w");
2129 if (! f)
2130 return 1;
2131 if (($2) < 0)
2132 {
2133 long int i = longval ();
2134 if (i != ($2))
2135 return 1;
2136 fprintf (f, "%ld", i);
2137 }
2138 else
2139 {
2140 unsigned long int i = ulongval ();
2141 if (i != ($2))
2142 return 1;
2143 fprintf (f, "%lu", i);
2144 }
2145 /* Do not output a trailing newline, as this causes \r\n confusion
2146 on some platforms. */
2147 return ferror (f) || fclose (f) != 0;
2148
2149 ;
2150 return 0;
2151}
2152_ACEOF
2153if ac_fn_c_try_run "$LINENO"; then :
2154 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2155else
2156 ac_retval=1
2157fi
2158rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2159 conftest.$ac_objext conftest.beam conftest.$ac_ext
2160rm -f conftest.val
2161
2162 fi
2163 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2164 as_fn_set_status $ac_retval
2165
2166} # ac_fn_c_compute_int
2167
2168# ac_fn_c_check_func LINENO FUNC VAR
2169# ----------------------------------
2170# Tests whether FUNC exists, setting the cache variable VAR accordingly
2171ac_fn_c_check_func ()
2172{
2173 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2174 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2175$as_echo_n "checking for $2... " >&6; }
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002176if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002177 $as_echo_n "(cached) " >&6
2178else
2179 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2180/* end confdefs.h. */
2181/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2182 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2183#define $2 innocuous_$2
2184
2185/* System header to define __stub macros and hopefully few prototypes,
2186 which can conflict with char $2 (); below.
2187 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2188 <limits.h> exists even on freestanding compilers. */
2189
2190#ifdef __STDC__
2191# include <limits.h>
2192#else
2193# include <assert.h>
2194#endif
2195
2196#undef $2
2197
2198/* Override any GCC internal prototype to avoid an error.
2199 Use char because int might match the return type of a GCC
2200 builtin and then its argument prototype would still apply. */
2201#ifdef __cplusplus
2202extern "C"
2203#endif
2204char $2 ();
2205/* The GNU C library defines this for functions which it implements
2206 to always fail with ENOSYS. Some functions are actually named
2207 something starting with __ and the normal name is an alias. */
2208#if defined __stub_$2 || defined __stub___$2
2209choke me
2210#endif
2211
2212int
2213main ()
2214{
2215return $2 ();
2216 ;
2217 return 0;
2218}
2219_ACEOF
2220if ac_fn_c_try_link "$LINENO"; then :
2221 eval "$3=yes"
2222else
2223 eval "$3=no"
2224fi
2225rm -f core conftest.err conftest.$ac_objext \
2226 conftest$ac_exeext conftest.$ac_ext
2227fi
2228eval ac_res=\$$3
2229 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2230$as_echo "$ac_res" >&6; }
2231 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2232
2233} # ac_fn_c_check_func
2234
2235# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2236# ----------------------------------------------------
2237# Tries to find if the field MEMBER exists in type AGGR, after including
2238# INCLUDES, setting cache variable VAR accordingly.
2239ac_fn_c_check_member ()
2240{
2241 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2242 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2243$as_echo_n "checking for $2.$3... " >&6; }
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002244if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002245 $as_echo_n "(cached) " >&6
2246else
2247 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2248/* end confdefs.h. */
2249$5
2250int
2251main ()
2252{
2253static $2 ac_aggr;
2254if (ac_aggr.$3)
2255return 0;
2256 ;
2257 return 0;
2258}
2259_ACEOF
2260if ac_fn_c_try_compile "$LINENO"; then :
2261 eval "$4=yes"
2262else
2263 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2264/* end confdefs.h. */
2265$5
2266int
2267main ()
2268{
2269static $2 ac_aggr;
2270if (sizeof ac_aggr.$3)
2271return 0;
2272 ;
2273 return 0;
2274}
2275_ACEOF
2276if ac_fn_c_try_compile "$LINENO"; then :
2277 eval "$4=yes"
2278else
2279 eval "$4=no"
2280fi
2281rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2282fi
2283rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2284fi
2285eval ac_res=\$$4
2286 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2287$as_echo "$ac_res" >&6; }
2288 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2289
2290} # ac_fn_c_check_member
2291
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002292# ac_fn_c_check_decl LINENO SYMBOL VAR
2293# ------------------------------------
2294# Tests whether SYMBOL is declared, setting cache variable VAR accordingly.
Matthias Kloseb9621712010-04-24 17:59:49 +00002295ac_fn_c_check_decl ()
2296{
2297 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002298 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $2 is declared" >&5
2299$as_echo_n "checking whether $2 is declared... " >&6; }
2300if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002301 $as_echo_n "(cached) " >&6
2302else
2303 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2304/* end confdefs.h. */
2305$4
2306int
2307main ()
2308{
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002309#ifndef $2
2310 (void) $2;
Matthias Kloseb9621712010-04-24 17:59:49 +00002311#endif
2312
2313 ;
2314 return 0;
2315}
2316_ACEOF
2317if ac_fn_c_try_compile "$LINENO"; then :
2318 eval "$3=yes"
2319else
2320 eval "$3=no"
2321fi
2322rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2323fi
2324eval ac_res=\$$3
2325 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2326$as_echo "$ac_res" >&6; }
2327 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2328
2329} # ac_fn_c_check_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002330cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002331This file contains any messages produced by compilers while
2332running configure, to aid debugging if configure makes a mistake.
2333
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00002334It was created by python $as_me 3.2, which was
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002335generated by GNU Autoconf 2.65. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002336
2337 $ $0 $@
2338
2339_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002340exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002341{
2342cat <<_ASUNAME
2343## --------- ##
2344## Platform. ##
2345## --------- ##
2346
2347hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2348uname -m = `(uname -m) 2>/dev/null || echo unknown`
2349uname -r = `(uname -r) 2>/dev/null || echo unknown`
2350uname -s = `(uname -s) 2>/dev/null || echo unknown`
2351uname -v = `(uname -v) 2>/dev/null || echo unknown`
2352
2353/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2354/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2355
2356/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2357/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2358/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002359/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002360/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2361/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2362/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2363
2364_ASUNAME
2365
2366as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2367for as_dir in $PATH
2368do
2369 IFS=$as_save_IFS
2370 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002371 $as_echo "PATH: $as_dir"
2372 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002373IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002374
2375} >&5
2376
2377cat >&5 <<_ACEOF
2378
2379
2380## ----------- ##
2381## Core tests. ##
2382## ----------- ##
2383
2384_ACEOF
2385
2386
2387# Keep a trace of the command line.
2388# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002389# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002390# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002391# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002392ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002393ac_configure_args0=
2394ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002395ac_must_keep_next=false
2396for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002397do
Skip Montanaro6dead952003-09-25 14:50:04 +00002398 for ac_arg
2399 do
2400 case $ac_arg in
2401 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2402 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2403 | -silent | --silent | --silen | --sile | --sil)
2404 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002405 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002406 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002407 esac
2408 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002409 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002410 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002411 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002412 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002413 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002414 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002415 case $ac_arg in
2416 *=* | --config-cache | -C | -disable-* | --disable-* \
2417 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2418 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2419 | -with-* | --with-* | -without-* | --without-* | --x)
2420 case "$ac_configure_args0 " in
2421 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2422 esac
2423 ;;
2424 -* ) ac_must_keep_next=true ;;
2425 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002426 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002427 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002428 ;;
2429 esac
2430 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002431done
Matthias Kloseb9621712010-04-24 17:59:49 +00002432{ ac_configure_args0=; unset ac_configure_args0;}
2433{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002434
2435# When interrupted or exit'd, cleanup temporary files, and complete
2436# config.log. We remove comments because anyway the quotes in there
2437# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002438# WARNING: Use '\'' to represent an apostrophe within the trap.
2439# 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 +00002440trap 'exit_status=$?
2441 # Save into config.log some information that might help in debugging.
2442 {
2443 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002444
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002445 cat <<\_ASBOX
2446## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002447## Cache variables. ##
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002448## ---------------- ##
2449_ASBOX
Martin v. Löwis11437992002-04-12 09:54:03 +00002450 echo
2451 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002452(
2453 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2454 eval ac_val=\$$ac_var
2455 case $ac_val in #(
2456 *${as_nl}*)
2457 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002458 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2459$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002460 esac
2461 case $ac_var in #(
2462 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002463 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2464 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002465 esac ;;
2466 esac
2467 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002468 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002469 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2470 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002471 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002472 "s/'\''/'\''\\\\'\'''\''/g;
2473 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2474 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002475 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002476 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002477 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002478 esac |
2479 sort
2480)
Martin v. Löwis11437992002-04-12 09:54:03 +00002481 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002482
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002483 cat <<\_ASBOX
2484## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002485## Output variables. ##
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002486## ----------------- ##
2487_ASBOX
Skip Montanaro6dead952003-09-25 14:50:04 +00002488 echo
2489 for ac_var in $ac_subst_vars
2490 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002491 eval ac_val=\$$ac_var
2492 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002493 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002494 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002495 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002496 done | sort
2497 echo
2498
2499 if test -n "$ac_subst_files"; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002500 cat <<\_ASBOX
2501## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002502## File substitutions. ##
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002503## ------------------- ##
2504_ASBOX
Skip Montanaro6dead952003-09-25 14:50:04 +00002505 echo
2506 for ac_var in $ac_subst_files
2507 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002508 eval ac_val=\$$ac_var
2509 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002510 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002511 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002512 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002513 done | sort
2514 echo
2515 fi
2516
Martin v. Löwis11437992002-04-12 09:54:03 +00002517 if test -s confdefs.h; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002518 cat <<\_ASBOX
2519## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002520## confdefs.h. ##
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002521## ----------- ##
2522_ASBOX
Martin v. Löwis11437992002-04-12 09:54:03 +00002523 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002524 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002525 echo
2526 fi
2527 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002528 $as_echo "$as_me: caught signal $ac_signal"
2529 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002530 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002531 rm -f core *.core core.conftest.* &&
2532 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002533 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002534' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002535for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002536 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002537done
2538ac_signal=0
2539
2540# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002541rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002542
Matthias Kloseb9621712010-04-24 17:59:49 +00002543$as_echo "/* confdefs.h */" > confdefs.h
2544
Martin v. Löwis11437992002-04-12 09:54:03 +00002545# Predefined preprocessor variables.
2546
2547cat >>confdefs.h <<_ACEOF
2548#define PACKAGE_NAME "$PACKAGE_NAME"
2549_ACEOF
2550
Martin v. Löwis11437992002-04-12 09:54:03 +00002551cat >>confdefs.h <<_ACEOF
2552#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2553_ACEOF
2554
Martin v. Löwis11437992002-04-12 09:54:03 +00002555cat >>confdefs.h <<_ACEOF
2556#define PACKAGE_VERSION "$PACKAGE_VERSION"
2557_ACEOF
2558
Martin v. Löwis11437992002-04-12 09:54:03 +00002559cat >>confdefs.h <<_ACEOF
2560#define PACKAGE_STRING "$PACKAGE_STRING"
2561_ACEOF
2562
Martin v. Löwis11437992002-04-12 09:54:03 +00002563cat >>confdefs.h <<_ACEOF
2564#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2565_ACEOF
2566
Matthias Kloseb9621712010-04-24 17:59:49 +00002567cat >>confdefs.h <<_ACEOF
2568#define PACKAGE_URL "$PACKAGE_URL"
2569_ACEOF
2570
Martin v. Löwis11437992002-04-12 09:54:03 +00002571
2572# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002573# Prefer an explicitly selected file to automatically selected ones.
2574ac_site_file1=NONE
2575ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002576if test -n "$CONFIG_SITE"; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002577 ac_site_file1=$CONFIG_SITE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002578elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002579 ac_site_file1=$prefix/share/config.site
2580 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002581else
Matthias Kloseb9621712010-04-24 17:59:49 +00002582 ac_site_file1=$ac_default_prefix/share/config.site
2583 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002584fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002585for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002586do
Matthias Kloseb9621712010-04-24 17:59:49 +00002587 test "x$ac_site_file" = xNONE && continue
2588 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2589 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2590$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002591 sed 's/^/| /' "$ac_site_file" >&5
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002592 . "$ac_site_file"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002593 fi
2594done
2595
2596if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002597 # Some versions of bash will fail to source /dev/null (special files
2598 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2599 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2600 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2601$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002602 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002603 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2604 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002605 esac
2606 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002607else
Matthias Kloseb9621712010-04-24 17:59:49 +00002608 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2609$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002610 >$cache_file
2611fi
2612
2613# Check that the precious variables saved in the cache have kept the same
2614# value.
2615ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002616for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002617 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2618 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002619 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2620 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002621 case $ac_old_set,$ac_new_set in
2622 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002623 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2624$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 +00002625 ac_cache_corrupted=: ;;
2626 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002627 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2628$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002629 ac_cache_corrupted=: ;;
2630 ,);;
2631 *)
2632 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002633 # differences in whitespace do not lead to failure.
2634 ac_old_val_w=`echo x $ac_old_val`
2635 ac_new_val_w=`echo x $ac_new_val`
2636 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2637 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2638$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2639 ac_cache_corrupted=:
2640 else
2641 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2642$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2643 eval $ac_var=\$ac_old_val
2644 fi
2645 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2646$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2647 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2648$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002649 fi;;
2650 esac
2651 # Pass precious variables to config.status.
2652 if test "$ac_new_set" = set; then
2653 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002654 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002655 *) ac_arg=$ac_var=$ac_new_val ;;
2656 esac
2657 case " $ac_configure_args " in
2658 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002659 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002660 esac
2661 fi
2662done
2663if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002664 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2665$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2666 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2667$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002668 as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002669fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002670## -------------------- ##
2671## Main body of script. ##
2672## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002673
Guido van Rossum7f43da71994-08-01 12:15:30 +00002674ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002675ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002676ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2677ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2678ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002679
Guido van Rossum627b2d71993-12-24 10:39:16 +00002680
Michael W. Hudson54241132001-12-07 15:38:26 +00002681
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002682ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002683
2684
Martin v. Löwis11437992002-04-12 09:54:03 +00002685
Benjamin Petersond23f8222009-04-05 19:13:16 +00002686if test "$prefix" != "/"; then
2687 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2688fi
2689
2690
Martin v. Löwis11437992002-04-12 09:54:03 +00002691
2692
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002693# We don't use PACKAGE_ variables, and they cause conflicts
2694# with other autoconf-based packages that include Python.h
2695grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2696rm confdefs.h
2697mv confdefs.h.new confdefs.h
2698
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002699
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00002700VERSION=3.2
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002701
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002702# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002703
2704SOVERSION=1.0
2705
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002706# The later defininition of _XOPEN_SOURCE disables certain features
2707# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2708
Matthias Kloseb9621712010-04-24 17:59:49 +00002709$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002710
2711
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002712# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2713# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2714# them.
2715
Matthias Kloseb9621712010-04-24 17:59:49 +00002716$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002717
2718
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002719# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2720# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2721# them.
2722
Matthias Kloseb9621712010-04-24 17:59:49 +00002723$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002724
2725
Martin v. Löwisd6320502004-08-12 13:45:08 +00002726# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2727# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
2728
Matthias Kloseb9621712010-04-24 17:59:49 +00002729$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00002730
2731
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002732# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2733# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2734# them.
2735
Matthias Kloseb9621712010-04-24 17:59:49 +00002736$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002737
2738
2739
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002740define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002741
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00002742# Arguments passed to configure.
2743
2744CONFIG_ARGS="$ac_configure_args"
2745
Matthias Kloseb9621712010-04-24 17:59:49 +00002746{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
2747$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002748# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002749if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002750 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00002751 case $enableval in
2752 yes)
2753 enableval=/Developer/SDKs/MacOSX10.4u.sdk
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002754 if test ! -d "${enableval}"
2755 then
2756 enableval=/
2757 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002758 ;;
2759 esac
2760 case $enableval in
2761 no)
2762 UNIVERSALSDK=
2763 enable_universalsdk=
2764 ;;
2765 *)
2766 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002767 if test ! -d "${UNIVERSALSDK}"
2768 then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002769 as_fn_error "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002770 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002771 ;;
2772 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002773
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002774
Thomas Wouters477c8d52006-05-27 19:21:47 +00002775else
2776
2777 UNIVERSALSDK=
2778 enable_universalsdk=
2779
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002780fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002781
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002782if test -n "${UNIVERSALSDK}"
2783then
Matthias Kloseb9621712010-04-24 17:59:49 +00002784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
2785$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002786else
Matthias Kloseb9621712010-04-24 17:59:49 +00002787 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2788$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002789fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002790
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002791
Benjamin Peterson6794aa32008-07-16 20:33:37 +00002792
2793
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002794UNIVERSAL_ARCHS="32-bit"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00002795
Matthias Kloseb9621712010-04-24 17:59:49 +00002796{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
2797$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002798
2799# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002800if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002801 withval=$with_universal_archs;
Matthias Kloseb9621712010-04-24 17:59:49 +00002802 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
2803$as_echo "$withval" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002804 UNIVERSAL_ARCHS="$withval"
2805
2806else
2807
Matthias Kloseb9621712010-04-24 17:59:49 +00002808 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 32-bit" >&5
2809$as_echo "32-bit" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002810
2811fi
2812
2813
2814
2815
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002816
2817# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002818if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002819 withval=$with_framework_name;
2820 PYTHONFRAMEWORK=${withval}
2821 PYTHONFRAMEWORKDIR=${withval}.framework
2822 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
2823
2824else
2825
2826 PYTHONFRAMEWORK=Python
2827 PYTHONFRAMEWORKDIR=Python.framework
2828 PYTHONFRAMEWORKIDENTIFIER=org.python.python
2829
2830fi
2831
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002832# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002833if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002834 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00002835 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00002836 yes)
Jack Jansene578a632001-08-15 01:27:14 +00002837 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00002838 esac
2839 case $enableval in
2840 no)
2841 PYTHONFRAMEWORK=
2842 PYTHONFRAMEWORKDIR=no-framework
2843 PYTHONFRAMEWORKPREFIX=
2844 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002845 FRAMEWORKINSTALLFIRST=
2846 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002847 FRAMEWORKALTINSTALLFIRST=
2848 FRAMEWORKALTINSTALLLAST=
2849 if test "x${prefix}" = "xNONE"; then
2850 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2851 else
2852 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2853 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00002854 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00002855 ;;
2856 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002857 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00002858 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00002859 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00002860 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00002861 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
2862 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002863 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002864
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002865 if test "x${prefix}" = "xNONE" ; then
2866 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002867
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002868 else
2869 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2870 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002871
2872 case "${enableval}" in
2873 /System*)
2874 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2875 if test "${prefix}" = "NONE" ; then
2876 # See below
2877 FRAMEWORKUNIXTOOLSPREFIX="/usr"
2878 fi
2879 ;;
2880
2881 /Library*)
2882 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2883 ;;
2884
2885 */Library/Frameworks)
2886 MDIR="`dirname "${enableval}"`"
2887 MDIR="`dirname "${MDIR}"`"
2888 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
2889
2890 if test "${prefix}" = "NONE"; then
2891 # User hasn't specified the
2892 # --prefix option, but wants to install
2893 # the framework in a non-default location,
2894 # ensure that the compatibility links get
2895 # installed relative to that prefix as well
2896 # instead of in /usr/local.
2897 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
2898 fi
2899 ;;
2900
2901 *)
2902 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2903 ;;
2904 esac
2905
Jack Jansen127e56e2001-09-11 14:41:54 +00002906 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00002907
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002908 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00002909 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002910 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002911
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002912 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002913
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002914 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
2915
2916 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
2917
Jack Jansene578a632001-08-15 01:27:14 +00002918 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002919
Guido van Rossum563e7081996-09-10 18:20:48 +00002920else
Martin v. Löwis11437992002-04-12 09:54:03 +00002921
Jack Jansene578a632001-08-15 01:27:14 +00002922 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00002923 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00002924 PYTHONFRAMEWORKPREFIX=
2925 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002926 FRAMEWORKINSTALLFIRST=
2927 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002928 FRAMEWORKALTINSTALLFIRST=
2929 FRAMEWORKALTINSTALLLAST=
2930 if test "x${prefix}" = "xNONE" ; then
2931 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2932 else
2933 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2934 fi
Jack Jansene578a632001-08-15 01:27:14 +00002935 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002936
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002937
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002938fi
2939
Thomas Wouters477c8d52006-05-27 19:21:47 +00002940
2941
Michael W. Hudson54241132001-12-07 15:38:26 +00002942
2943
2944
2945
Jack Jansene578a632001-08-15 01:27:14 +00002946
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002947
2948
2949
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002950
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002951
Jack Jansene578a632001-08-15 01:27:14 +00002952##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00002953## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00002954## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00002955##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002956# Set name for machine-dependent library files
2957
Matthias Kloseb9621712010-04-24 17:59:49 +00002958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
2959$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002960if test -z "$MACHDEP"
2961then
Guido van Rossum563e7081996-09-10 18:20:48 +00002962 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002963 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00002964 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00002965 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002966 else
Guido van Rossum563e7081996-09-10 18:20:48 +00002967 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002968 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00002969 ac_md_system=`echo $ac_sys_system |
2970 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
2971 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00002972 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00002973 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00002974
Guido van Rossum07397971997-04-29 21:49:50 +00002975 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002976 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002977 darwin*) MACHDEP="darwin";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00002978 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00002979 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002980 esac
2981fi
Guido van Rossum91922671997-10-09 20:24:13 +00002982
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002983# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
2984# disable features if it is defined, without any means to access these
2985# features as extensions. For these systems, we skip the definition of
2986# _XOPEN_SOURCE. Before adding a system to the list to gain access to
2987# some feature, make sure there is no alternative way to access this
2988# feature. Also, when using wildcards, make sure you have verified the
2989# need for not defining _XOPEN_SOURCE on all systems matching the
2990# wildcard, and that the wildcard does not include future systems
2991# (which may remove their limitations).
2992case $ac_sys_system/$ac_sys_release in
2993 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
2994 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00002995 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00002996 # In addition, Stefan Krah confirms that issue #1244610 exists through
2997 # OpenBSD 4.6, but is fixed in 4.7.
2998 OpenBSD/2.* | OpenBSD/3.[0123456789] | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00002999 define_xopen_source=no
3000 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3001 # also defined. This can be overridden by defining _BSD_SOURCE
3002 # As this has a different meaning on Linux, only define it on OpenBSD
3003
Matthias Kloseb9621712010-04-24 17:59:49 +00003004$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003005
3006 ;;
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003007 OpenBSD/4.[789])
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003008 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3009 # also defined. This can be overridden by defining _BSD_SOURCE
3010 # As this has a different meaning on Linux, only define it on OpenBSD
3011
Matthias Kloseb9621712010-04-24 17:59:49 +00003012$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003013
3014 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003015 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3016 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3017 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003018 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 +00003019 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003020 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3021 # request to enable features supported by the standard as a request
3022 # to disable features not supported by the standard. The best way
3023 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3024 # entirely and define __EXTENSIONS__ instead.
3025 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003026 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003027 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3028 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003029 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003030 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003031 define_xopen_source=no;;
3032 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003033 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003034 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003035 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003036 # On FreeBSD 4, the math functions C89 does not cover are never defined
3037 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3038 FreeBSD/4.*)
3039 define_xopen_source=no;;
3040 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3041 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3042 # identifies itself as Darwin/7.*
3043 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3044 # disables platform specific features beyond repair.
3045 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3046 # has no effect, don't bother defining them
3047 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003048 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003049 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003050 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003051 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3052 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3053 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003054 AIX/4)
3055 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003056 AIX/5)
3057 if test `uname -r` -eq 1; then
3058 define_xopen_source=no
3059 fi
3060 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003061 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3062 # defining NI_NUMERICHOST.
3063 QNX/6.3.2)
3064 define_xopen_source=no
3065 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003066
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003067esac
3068
3069if test $define_xopen_source = yes
3070then
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003071
Matthias Kloseb9621712010-04-24 17:59:49 +00003072$as_echo "#define _XOPEN_SOURCE 600" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003073
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003074
3075 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3076 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3077 # several APIs are not declared. Since this is also needed in some
3078 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003079
Matthias Kloseb9621712010-04-24 17:59:49 +00003080$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003081
3082
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003083
Matthias Kloseb9621712010-04-24 17:59:49 +00003084$as_echo "#define _POSIX_C_SOURCE 200112L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003085
3086
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003087fi
3088
Guido van Rossum91922671997-10-09 20:24:13 +00003089#
3090# SGI compilers allow the specification of the both the ABI and the
3091# ISA on the command line. Depending on the values of these switches,
3092# different and often incompatable code will be generated.
3093#
3094# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3095# thus supply support for various ABI/ISA combinations. The MACHDEP
3096# variable is also adjusted.
3097#
3098
3099if test ! -z "$SGI_ABI"
3100then
3101 CC="cc $SGI_ABI"
3102 LDFLAGS="$SGI_ABI $LDFLAGS"
3103 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3104fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003105{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3106$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003107
Jack Jansen6b08a402004-06-03 12:41:45 +00003108# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3109# it may influence the way we can build extensions, so distutils
3110# needs to check it
3111
Thomas Wouters477c8d52006-05-27 19:21:47 +00003112
Jack Jansen6b08a402004-06-03 12:41:45 +00003113CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003114EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003115
Matthias Kloseb9621712010-04-24 17:59:49 +00003116{ $as_echo "$as_me:${as_lineno-$LINENO}: checking machine type as reported by uname -m" >&5
3117$as_echo_n "checking machine type as reported by uname -m... " >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00003118ac_sys_machine=`uname -m`
Matthias Kloseb9621712010-04-24 17:59:49 +00003119{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_sys_machine" >&5
3120$as_echo "$ac_sys_machine" >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00003121
Guido van Rossum627b2d71993-12-24 10:39:16 +00003122# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003123
3124# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3125# for debug/optimization stuff. BASECFLAGS is for flags that are required
3126# just to get things to compile and link. Users are free to override OPT
3127# when running configure or make. The build should not break if they do.
3128# BASECFLAGS should generally not be messed with, however.
3129
3130# XXX shouldn't some/most/all of this code be merged with the stuff later
3131# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003132{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3133$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003134
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003135# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003136if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003137 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003138 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003139 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003140 without_gcc=yes;;
3141 yes) CC=gcc
3142 without_gcc=no;;
3143 *) CC=$withval
3144 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003145 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003146else
Martin v. Löwis11437992002-04-12 09:54:03 +00003147
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003148 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003149 AIX*) CC=cc_r
3150 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003151 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003152 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003153fi
3154
Matthias Kloseb9621712010-04-24 17:59:49 +00003155{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3156$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003157
Guido van Rossum8b131c51995-03-09 14:10:13 +00003158# If the user switches compilers, we can't believe the cache
3159if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3160then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00003161 as_fn_error "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003162(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003163fi
3164
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003165# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3166# when the compiler supports them, but we don't always want -O2, and
3167# we set -g later.
3168if test -z "$CFLAGS"; then
3169 CFLAGS=
3170fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003171ac_ext=c
3172ac_cpp='$CPP $CPPFLAGS'
3173ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3174ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3175ac_compiler_gnu=$ac_cv_c_compiler_gnu
3176if test -n "$ac_tool_prefix"; then
3177 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3178set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003179{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3180$as_echo_n "checking for $ac_word... " >&6; }
3181if test "${ac_cv_prog_CC+set}" = set; then :
3182 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003183else
3184 if test -n "$CC"; then
3185 ac_cv_prog_CC="$CC" # Let the user override the test.
3186else
Martin v. Löwis11437992002-04-12 09:54:03 +00003187as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3188for as_dir in $PATH
3189do
3190 IFS=$as_save_IFS
3191 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003192 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003193 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 +00003194 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003195 $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 +00003196 break 2
3197 fi
3198done
Matthias Kloseb9621712010-04-24 17:59:49 +00003199 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003200IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003201
Jack Jansendd19cf82001-12-06 22:36:17 +00003202fi
3203fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003204CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003205if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003206 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3207$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003208else
Matthias Kloseb9621712010-04-24 17:59:49 +00003209 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3210$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003211fi
3212
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003213
Martin v. Löwis11437992002-04-12 09:54:03 +00003214fi
3215if test -z "$ac_cv_prog_CC"; then
3216 ac_ct_CC=$CC
3217 # Extract the first word of "gcc", so it can be a program name with args.
3218set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003219{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3220$as_echo_n "checking for $ac_word... " >&6; }
3221if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
3222 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003223else
3224 if test -n "$ac_ct_CC"; then
3225 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3226else
3227as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3228for as_dir in $PATH
3229do
3230 IFS=$as_save_IFS
3231 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003232 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003233 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 +00003234 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003235 $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 +00003236 break 2
3237 fi
3238done
Matthias Kloseb9621712010-04-24 17:59:49 +00003239 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003240IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003241
3242fi
3243fi
3244ac_ct_CC=$ac_cv_prog_ac_ct_CC
3245if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003246 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3247$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003248else
Matthias Kloseb9621712010-04-24 17:59:49 +00003249 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3250$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003251fi
3252
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003253 if test "x$ac_ct_CC" = x; then
3254 CC=""
3255 else
3256 case $cross_compiling:$ac_tool_warned in
3257yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003258{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3259$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003260ac_tool_warned=yes ;;
3261esac
3262 CC=$ac_ct_CC
3263 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003264else
3265 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003266fi
3267
Jack Jansendd19cf82001-12-06 22:36:17 +00003268if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003269 if test -n "$ac_tool_prefix"; then
3270 # 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 +00003271set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3273$as_echo_n "checking for $ac_word... " >&6; }
3274if test "${ac_cv_prog_CC+set}" = set; then :
3275 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003276else
3277 if test -n "$CC"; then
3278 ac_cv_prog_CC="$CC" # Let the user override the test.
3279else
Martin v. Löwis11437992002-04-12 09:54:03 +00003280as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3281for as_dir in $PATH
3282do
3283 IFS=$as_save_IFS
3284 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003285 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003286 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 +00003287 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003288 $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 +00003289 break 2
3290 fi
3291done
Matthias Kloseb9621712010-04-24 17:59:49 +00003292 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003293IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003294
3295fi
3296fi
3297CC=$ac_cv_prog_CC
3298if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003299 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3300$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003301else
Matthias Kloseb9621712010-04-24 17:59:49 +00003302 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3303$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003304fi
3305
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003306
Martin v. Löwis11437992002-04-12 09:54:03 +00003307 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003308fi
3309if test -z "$CC"; then
3310 # Extract the first word of "cc", so it can be a program name with args.
3311set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003312{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3313$as_echo_n "checking for $ac_word... " >&6; }
3314if test "${ac_cv_prog_CC+set}" = set; then :
3315 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003316else
3317 if test -n "$CC"; then
3318 ac_cv_prog_CC="$CC" # Let the user override the test.
3319else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003320 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003321as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3322for as_dir in $PATH
3323do
3324 IFS=$as_save_IFS
3325 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003326 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003327 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 +00003328 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3329 ac_prog_rejected=yes
3330 continue
3331 fi
3332 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003333 $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 +00003334 break 2
3335 fi
3336done
Matthias Kloseb9621712010-04-24 17:59:49 +00003337 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003338IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003339
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003340if test $ac_prog_rejected = yes; then
3341 # We found a bogon in the path, so make sure we never use it.
3342 set dummy $ac_cv_prog_CC
3343 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003344 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003345 # We chose a different compiler from the bogus one.
3346 # However, it has the same basename, so the bogon will be chosen
3347 # first if we set CC to just the basename; use the full file name.
3348 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003349 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003350 fi
3351fi
3352fi
3353fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003354CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003355if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003356 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3357$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003358else
Matthias Kloseb9621712010-04-24 17:59:49 +00003359 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3360$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003361fi
3362
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003363
Martin v. Löwis11437992002-04-12 09:54:03 +00003364fi
3365if test -z "$CC"; then
3366 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003367 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003368 do
3369 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3370set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3372$as_echo_n "checking for $ac_word... " >&6; }
3373if test "${ac_cv_prog_CC+set}" = set; then :
3374 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003375else
3376 if test -n "$CC"; then
3377 ac_cv_prog_CC="$CC" # Let the user override the test.
3378else
Martin v. Löwis11437992002-04-12 09:54:03 +00003379as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3380for as_dir in $PATH
3381do
3382 IFS=$as_save_IFS
3383 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003384 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003385 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 +00003386 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003387 $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 +00003388 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003389 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003390done
Matthias Kloseb9621712010-04-24 17:59:49 +00003391 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003392IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003393
3394fi
3395fi
3396CC=$ac_cv_prog_CC
3397if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003398 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3399$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003400else
Matthias Kloseb9621712010-04-24 17:59:49 +00003401 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3402$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003403fi
3404
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003405
Martin v. Löwis11437992002-04-12 09:54:03 +00003406 test -n "$CC" && break
3407 done
3408fi
3409if test -z "$CC"; then
3410 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003411 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003412do
3413 # Extract the first word of "$ac_prog", so it can be a program name with args.
3414set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003415{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3416$as_echo_n "checking for $ac_word... " >&6; }
3417if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
3418 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003419else
3420 if test -n "$ac_ct_CC"; then
3421 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3422else
3423as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3424for as_dir in $PATH
3425do
3426 IFS=$as_save_IFS
3427 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003428 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003429 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 +00003430 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003431 $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 +00003432 break 2
3433 fi
3434done
Matthias Kloseb9621712010-04-24 17:59:49 +00003435 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003436IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003437
Martin v. Löwis11437992002-04-12 09:54:03 +00003438fi
3439fi
3440ac_ct_CC=$ac_cv_prog_ac_ct_CC
3441if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003442 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3443$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003444else
Matthias Kloseb9621712010-04-24 17:59:49 +00003445 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3446$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003447fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003448
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003449
Martin v. Löwis11437992002-04-12 09:54:03 +00003450 test -n "$ac_ct_CC" && break
3451done
Michael W. Hudson54241132001-12-07 15:38:26 +00003452
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003453 if test "x$ac_ct_CC" = x; then
3454 CC=""
3455 else
3456 case $cross_compiling:$ac_tool_warned in
3457yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003458{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3459$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003460ac_tool_warned=yes ;;
3461esac
3462 CC=$ac_ct_CC
3463 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003464fi
3465
3466fi
3467
3468
Matthias Kloseb9621712010-04-24 17:59:49 +00003469test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3470$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Petersond7f73e92010-09-05 00:09:07 +00003471as_fn_error "no acceptable C compiler found in \$PATH
3472See \`config.log' for more details." "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003473
3474# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003475$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3476set X $ac_compile
3477ac_compiler=$2
3478for ac_option in --version -v -V -qversion; do
3479 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003480case "(($ac_try" in
3481 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3482 *) ac_try_echo=$ac_try;;
3483esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003484eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3485$as_echo "$ac_try_echo"; } >&5
3486 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003487 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003488 if test -s conftest.err; then
3489 sed '10a\
3490... rest of stderr output deleted ...
3491 10q' conftest.err >conftest.er1
3492 cat conftest.er1 >&5
3493 fi
3494 rm -f conftest.er1 conftest.err
3495 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3496 test $ac_status = 0; }
3497done
Martin v. Löwis11437992002-04-12 09:54:03 +00003498
Matthias Kloseb9621712010-04-24 17:59:49 +00003499cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003500/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003501
Martin v. Löwis11437992002-04-12 09:54:03 +00003502int
3503main ()
3504{
3505
3506 ;
3507 return 0;
3508}
3509_ACEOF
3510ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003511ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003512# Try to create an executable without -o first, disregard a.out.
3513# It will help us diagnose broken compilers, and finding out an intuition
3514# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003515{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3516$as_echo_n "checking whether the C compiler works... " >&6; }
3517ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3518
3519# The possible output files:
3520ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3521
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003522ac_rmfiles=
3523for ac_file in $ac_files
3524do
3525 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003526 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003527 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3528 esac
3529done
3530rm -f $ac_rmfiles
3531
Matthias Kloseb9621712010-04-24 17:59:49 +00003532if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003533case "(($ac_try" in
3534 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3535 *) ac_try_echo=$ac_try;;
3536esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003537eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3538$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003539 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003540 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003541 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3542 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003543 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3544# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3545# in a Makefile. We should not override ac_cv_exeext if it was cached,
3546# so that the user can short-circuit this test for compilers unknown to
3547# Autoconf.
3548for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003549do
3550 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003551 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003552 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003553 ;;
3554 [ab].out )
3555 # We found the default executable, but exeext='' is most
3556 # certainly right.
3557 break;;
3558 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003559 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003560 then :; else
3561 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3562 fi
3563 # We set ac_cv_exeext here because the later test for it is not
3564 # safe: cross compilers may not add the suffix if given an `-o'
3565 # argument, so we may need to know it at that point already.
3566 # Even if this section looks crufty: it has the advantage of
3567 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003568 break;;
3569 * )
3570 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003571 esac
3572done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003573test "$ac_cv_exeext" = no && ac_cv_exeext=
3574
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003575else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003576 ac_file=''
3577fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003578if test -z "$ac_file"; then :
3579 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3580$as_echo "no" >&6; }
3581$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003582sed 's/^/| /' conftest.$ac_ext >&5
3583
Matthias Kloseb9621712010-04-24 17:59:49 +00003584{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3585$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Petersond7f73e92010-09-05 00:09:07 +00003586{ as_fn_set_status 77
3587as_fn_error "C compiler cannot create executables
3588See \`config.log' for more details." "$LINENO" 5; }; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003589else
3590 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3591$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003592fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3594$as_echo_n "checking for C compiler default output file name... " >&6; }
3595{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3596$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003597ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003598
Matthias Kloseb9621712010-04-24 17:59:49 +00003599rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003600ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00003601{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3602$as_echo_n "checking for suffix of executables... " >&6; }
3603if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003604case "(($ac_try" in
3605 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3606 *) ac_try_echo=$ac_try;;
3607esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003608eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3609$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003610 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003611 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003612 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3613 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003614 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3615# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3616# work properly (i.e., refer to `conftest.exe'), while it won't with
3617# `rm'.
3618for ac_file in conftest.exe conftest conftest.*; do
3619 test -f "$ac_file" || continue
3620 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003621 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003622 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3623 break;;
3624 * ) break;;
3625 esac
3626done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003627else
Matthias Kloseb9621712010-04-24 17:59:49 +00003628 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3629$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Petersond7f73e92010-09-05 00:09:07 +00003630as_fn_error "cannot compute suffix of executables: cannot compile and link
3631See \`config.log' for more details." "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003632fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003633rm -f conftest conftest$ac_cv_exeext
3634{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3635$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003636
3637rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003638EXEEXT=$ac_cv_exeext
3639ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003640cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3641/* end confdefs.h. */
3642#include <stdio.h>
3643int
3644main ()
3645{
3646FILE *f = fopen ("conftest.out", "w");
3647 return ferror (f) || fclose (f) != 0;
3648
3649 ;
3650 return 0;
3651}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003652_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003653ac_clean_files="$ac_clean_files conftest.out"
3654# Check that the compiler produces executables we can run. If not, either
3655# the compiler is broken, or we cross compile.
3656{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3657$as_echo_n "checking whether we are cross compiling... " >&6; }
3658if test "$cross_compiling" != yes; then
3659 { { ac_try="$ac_link"
3660case "(($ac_try" in
3661 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3662 *) ac_try_echo=$ac_try;;
3663esac
3664eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3665$as_echo "$ac_try_echo"; } >&5
3666 (eval "$ac_link") 2>&5
3667 ac_status=$?
3668 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3669 test $ac_status = 0; }
3670 if { ac_try='./conftest$ac_cv_exeext'
3671 { { case "(($ac_try" in
3672 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3673 *) ac_try_echo=$ac_try;;
3674esac
3675eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3676$as_echo "$ac_try_echo"; } >&5
3677 (eval "$ac_try") 2>&5
3678 ac_status=$?
3679 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3680 test $ac_status = 0; }; }; then
3681 cross_compiling=no
3682 else
3683 if test "$cross_compiling" = maybe; then
3684 cross_compiling=yes
3685 else
3686 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3687$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Petersond7f73e92010-09-05 00:09:07 +00003688as_fn_error "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00003689If you meant to cross compile, use \`--host'.
Benjamin Petersond7f73e92010-09-05 00:09:07 +00003690See \`config.log' for more details." "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003691 fi
3692 fi
3693fi
3694{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3695$as_echo "$cross_compiling" >&6; }
3696
3697rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3698ac_clean_files=$ac_clean_files_save
3699{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3700$as_echo_n "checking for suffix of object files... " >&6; }
3701if test "${ac_cv_objext+set}" = set; then :
3702 $as_echo_n "(cached) " >&6
3703else
3704 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003705/* end confdefs.h. */
3706
3707int
3708main ()
3709{
3710
3711 ;
3712 return 0;
3713}
3714_ACEOF
3715rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00003716if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003717case "(($ac_try" in
3718 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3719 *) ac_try_echo=$ac_try;;
3720esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003721eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3722$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003723 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003724 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003725 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3726 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003727 for ac_file in conftest.o conftest.obj conftest.*; do
3728 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00003729 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003730 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003731 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3732 break;;
3733 esac
3734done
3735else
Matthias Kloseb9621712010-04-24 17:59:49 +00003736 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003737sed 's/^/| /' conftest.$ac_ext >&5
3738
Matthias Kloseb9621712010-04-24 17:59:49 +00003739{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3740$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Petersond7f73e92010-09-05 00:09:07 +00003741as_fn_error "cannot compute suffix of object files: cannot compile
3742See \`config.log' for more details." "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003743fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003744rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003745fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003746{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3747$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003748OBJEXT=$ac_cv_objext
3749ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3751$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3752if test "${ac_cv_c_compiler_gnu+set}" = set; then :
3753 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003754else
Matthias Kloseb9621712010-04-24 17:59:49 +00003755 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003756/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003757
Martin v. Löwis11437992002-04-12 09:54:03 +00003758int
3759main ()
3760{
3761#ifndef __GNUC__
3762 choke me
3763#endif
3764
3765 ;
3766 return 0;
3767}
3768_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003769if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00003770 ac_compiler_gnu=yes
3771else
Matthias Kloseb9621712010-04-24 17:59:49 +00003772 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003773fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003774rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003775ac_cv_c_compiler_gnu=$ac_compiler_gnu
3776
3777fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003778{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3779$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3780if test $ac_compiler_gnu = yes; then
3781 GCC=yes
3782else
3783 GCC=
3784fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003785ac_test_CFLAGS=${CFLAGS+set}
3786ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00003787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3788$as_echo_n "checking whether $CC accepts -g... " >&6; }
3789if test "${ac_cv_prog_cc_g+set}" = set; then :
3790 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003791else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003792 ac_save_c_werror_flag=$ac_c_werror_flag
3793 ac_c_werror_flag=yes
3794 ac_cv_prog_cc_g=no
3795 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00003796 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003797/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003798
Martin v. Löwis11437992002-04-12 09:54:03 +00003799int
3800main ()
3801{
3802
3803 ;
3804 return 0;
3805}
3806_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003807if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00003808 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003809else
Matthias Kloseb9621712010-04-24 17:59:49 +00003810 CFLAGS=""
3811 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003812/* end confdefs.h. */
3813
3814int
3815main ()
3816{
3817
3818 ;
3819 return 0;
3820}
3821_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003822if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003823
Matthias Kloseb9621712010-04-24 17:59:49 +00003824else
3825 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003826 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00003827 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003828/* end confdefs.h. */
3829
3830int
3831main ()
3832{
3833
3834 ;
3835 return 0;
3836}
3837_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003838if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003839 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00003840fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003841rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003842fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003843rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3844fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003845rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3846 ac_c_werror_flag=$ac_save_c_werror_flag
3847fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003848{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3849$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003850if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003851 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003852elif test $ac_cv_prog_cc_g = yes; then
3853 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003854 CFLAGS="-g -O2"
3855 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003856 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003857 fi
3858else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003859 if test "$GCC" = yes; then
3860 CFLAGS="-O2"
3861 else
3862 CFLAGS=
3863 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003864fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003865{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3866$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3867if test "${ac_cv_prog_cc_c89+set}" = set; then :
3868 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003869else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003870 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003871ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00003872cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003873/* end confdefs.h. */
3874#include <stdarg.h>
3875#include <stdio.h>
3876#include <sys/types.h>
3877#include <sys/stat.h>
3878/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3879struct buf { int x; };
3880FILE * (*rcsopen) (struct buf *, struct stat *, int);
3881static char *e (p, i)
3882 char **p;
3883 int i;
3884{
3885 return p[i];
3886}
3887static char *f (char * (*g) (char **, int), char **p, ...)
3888{
3889 char *s;
3890 va_list v;
3891 va_start (v,p);
3892 s = g (p, va_arg (v,int));
3893 va_end (v);
3894 return s;
3895}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003896
3897/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3898 function prototypes and stuff, but not '\xHH' hex character constants.
3899 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003900 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003901 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3902 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003903 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003904int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3905
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003906/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3907 inside strings and character constants. */
3908#define FOO(x) 'x'
3909int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3910
Skip Montanaro6dead952003-09-25 14:50:04 +00003911int test (int i, double x);
3912struct s1 {int (*f) (int a);};
3913struct s2 {int (*f) (double a);};
3914int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3915int argc;
3916char **argv;
3917int
3918main ()
3919{
3920return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3921 ;
3922 return 0;
3923}
3924_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003925for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3926 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003927do
3928 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00003929 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003930 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00003931fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003932rm -f core conftest.err conftest.$ac_objext
3933 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00003934done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003935rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003936CC=$ac_save_CC
3937
3938fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003939# AC_CACHE_VAL
3940case "x$ac_cv_prog_cc_c89" in
3941 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00003942 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3943$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003944 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00003945 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3946$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003947 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003948 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00003949 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3950$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003951esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003952if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00003953
Matthias Kloseb9621712010-04-24 17:59:49 +00003954fi
Skip Montanaro6dead952003-09-25 14:50:04 +00003955
Martin v. Löwis11437992002-04-12 09:54:03 +00003956ac_ext=c
3957ac_cpp='$CPP $CPPFLAGS'
3958ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3959ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3960ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003961
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003962
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003963
3964
Matthias Kloseb9621712010-04-24 17:59:49 +00003965{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
3966$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003967
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003968# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003969if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003970 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003971
3972 case $withval in
3973 no) with_cxx_main=no
3974 MAINCC='$(CC)';;
3975 yes) with_cxx_main=yes
3976 MAINCC='$(CXX)';;
3977 *) with_cxx_main=yes
3978 MAINCC=$withval
3979 if test -z "$CXX"
3980 then
3981 CXX=$withval
3982 fi;;
3983 esac
3984else
3985
3986 with_cxx_main=no
3987 MAINCC='$(CC)'
3988
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003989fi
3990
Matthias Kloseb9621712010-04-24 17:59:49 +00003991{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
3992$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003993
3994preset_cxx="$CXX"
3995if test -z "$CXX"
3996then
3997 case "$CC" in
3998 gcc) # Extract the first word of "g++", so it can be a program name with args.
3999set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004000{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4001$as_echo_n "checking for $ac_word... " >&6; }
4002if test "${ac_cv_path_CXX+set}" = set; then :
4003 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004004else
4005 case $CXX in
4006 [\\/]* | ?:[\\/]*)
4007 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4008 ;;
4009 *)
4010 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4011for as_dir in notfound
4012do
4013 IFS=$as_save_IFS
4014 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004015 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004016 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 +00004017 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004018 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004019 break 2
4020 fi
4021done
Matthias Kloseb9621712010-04-24 17:59:49 +00004022 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004023IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004024
4025 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
4026 ;;
4027esac
4028fi
4029CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004030if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004031 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4032$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004033else
Matthias Kloseb9621712010-04-24 17:59:49 +00004034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4035$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004036fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004037
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004038 ;;
4039 cc) # Extract the first word of "c++", so it can be a program name with args.
4040set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004041{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4042$as_echo_n "checking for $ac_word... " >&6; }
4043if test "${ac_cv_path_CXX+set}" = set; then :
4044 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004045else
4046 case $CXX in
4047 [\\/]* | ?:[\\/]*)
4048 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4049 ;;
4050 *)
4051 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4052for as_dir in notfound
4053do
4054 IFS=$as_save_IFS
4055 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004056 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004057 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 +00004058 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004059 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004060 break 2
4061 fi
4062done
Matthias Kloseb9621712010-04-24 17:59:49 +00004063 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004064IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004065
4066 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
4067 ;;
4068esac
4069fi
4070CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004071if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004072 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4073$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004074else
Matthias Kloseb9621712010-04-24 17:59:49 +00004075 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4076$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004077fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004078
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004079 ;;
4080 esac
4081 if test "$CXX" = "notfound"
4082 then
4083 CXX=""
4084 fi
4085fi
4086if test -z "$CXX"
4087then
4088 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4089do
4090 # Extract the first word of "$ac_prog", so it can be a program name with args.
4091set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004092{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4093$as_echo_n "checking for $ac_word... " >&6; }
4094if test "${ac_cv_prog_CXX+set}" = set; then :
4095 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004096else
4097 if test -n "$CXX"; then
4098 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4099else
4100as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4101for as_dir in $PATH
4102do
4103 IFS=$as_save_IFS
4104 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004105 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004106 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 +00004107 ac_cv_prog_CXX="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00004108 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004109 break 2
4110 fi
4111done
Matthias Kloseb9621712010-04-24 17:59:49 +00004112 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004113IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004114
4115fi
4116fi
4117CXX=$ac_cv_prog_CXX
4118if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004119 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4120$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004121else
Matthias Kloseb9621712010-04-24 17:59:49 +00004122 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4123$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004124fi
4125
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004126
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004127 test -n "$CXX" && break
4128done
4129test -n "$CXX" || CXX="notfound"
4130
4131 if test "$CXX" = "notfound"
4132 then
4133 CXX=""
4134 fi
4135fi
4136if test "$preset_cxx" != "$CXX"
4137then
Matthias Kloseb9621712010-04-24 17:59:49 +00004138 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004139
4140 By default, distutils will build C++ extension modules with \"$CXX\".
4141 If this is not intended, then set CXX on the configure command line.
4142 " >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00004143$as_echo "$as_me: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004144
4145 By default, distutils will build C++ extension modules with \"$CXX\".
4146 If this is not intended, then set CXX on the configure command line.
4147 " >&2;}
4148fi
4149
4150
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004151# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004152
4153ac_ext=c
4154ac_cpp='$CPP $CPPFLAGS'
4155ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4156ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4157ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Kloseb9621712010-04-24 17:59:49 +00004158{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4159$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004160# On Suns, sometimes $CPP names a directory.
4161if test -n "$CPP" && test -d "$CPP"; then
4162 CPP=
4163fi
4164if test -z "$CPP"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004165 if test "${ac_cv_prog_CPP+set}" = set; then :
4166 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004167else
Martin v. Löwis11437992002-04-12 09:54:03 +00004168 # Double quotes because CPP needs to be expanded
4169 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4170 do
4171 ac_preproc_ok=false
4172for ac_c_preproc_warn_flag in '' yes
4173do
4174 # Use a header file that comes with gcc, so configuring glibc
4175 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004176 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4177 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004178 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004179 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004180 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004181/* end confdefs.h. */
4182#ifdef __STDC__
4183# include <limits.h>
4184#else
4185# include <assert.h>
4186#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004187 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004188_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004189if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004190
Matthias Kloseb9621712010-04-24 17:59:49 +00004191else
Martin v. Löwis11437992002-04-12 09:54:03 +00004192 # Broken: fails on valid input.
4193continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004194fi
Benjamin Petersond7f73e92010-09-05 00:09:07 +00004195rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004196
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004197 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004198 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004199 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004200/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004201#include <ac_nonexistent.h>
4202_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004203if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004204 # Broken: success on invalid input.
4205continue
4206else
Martin v. Löwis11437992002-04-12 09:54:03 +00004207 # Passes both tests.
4208ac_preproc_ok=:
4209break
4210fi
Benjamin Petersond7f73e92010-09-05 00:09:07 +00004211rm -f conftest.err conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004212
4213done
4214# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Benjamin Petersond7f73e92010-09-05 00:09:07 +00004215rm -f conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004216if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004217 break
4218fi
4219
4220 done
4221 ac_cv_prog_CPP=$CPP
4222
4223fi
4224 CPP=$ac_cv_prog_CPP
4225else
4226 ac_cv_prog_CPP=$CPP
4227fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004228{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4229$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004230ac_preproc_ok=false
4231for ac_c_preproc_warn_flag in '' yes
4232do
4233 # Use a header file that comes with gcc, so configuring glibc
4234 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004235 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4236 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004237 # On the NeXT, cc -E runs the code through the compiler's parser,
4238 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004239 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004240/* end confdefs.h. */
4241#ifdef __STDC__
4242# include <limits.h>
4243#else
4244# include <assert.h>
4245#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004246 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004247_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004248if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004249
Matthias Kloseb9621712010-04-24 17:59:49 +00004250else
Martin v. Löwis11437992002-04-12 09:54:03 +00004251 # Broken: fails on valid input.
4252continue
4253fi
Benjamin Petersond7f73e92010-09-05 00:09:07 +00004254rm -f conftest.err conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004255
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004256 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004257 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004258 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004259/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004260#include <ac_nonexistent.h>
4261_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004262if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004263 # Broken: success on invalid input.
4264continue
4265else
Martin v. Löwis11437992002-04-12 09:54:03 +00004266 # Passes both tests.
4267ac_preproc_ok=:
4268break
4269fi
Benjamin Petersond7f73e92010-09-05 00:09:07 +00004270rm -f conftest.err conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004271
4272done
4273# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Benjamin Petersond7f73e92010-09-05 00:09:07 +00004274rm -f conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004275if $ac_preproc_ok; then :
4276
Martin v. Löwis11437992002-04-12 09:54:03 +00004277else
Matthias Kloseb9621712010-04-24 17:59:49 +00004278 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4279$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Petersond7f73e92010-09-05 00:09:07 +00004280as_fn_error "C preprocessor \"$CPP\" fails sanity check
4281See \`config.log' for more details." "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004282fi
4283
4284ac_ext=c
4285ac_cpp='$CPP $CPPFLAGS'
4286ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4287ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4288ac_compiler_gnu=$ac_cv_c_compiler_gnu
4289
4290
Matthias Kloseb9621712010-04-24 17:59:49 +00004291{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4292$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4293if test "${ac_cv_path_GREP+set}" = set; then :
4294 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004295else
Matthias Kloseb9621712010-04-24 17:59:49 +00004296 if test -z "$GREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004297 ac_path_GREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004298 # Loop through the user's path and test for each of PROGNAME-LIST
4299 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004300for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4301do
4302 IFS=$as_save_IFS
4303 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004304 for ac_prog in grep ggrep; do
4305 for ac_exec_ext in '' $ac_executable_extensions; do
4306 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4307 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
4308# Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004309 # Check for GNU $ac_path_GREP
4310case `"$ac_path_GREP" --version 2>&1` in
4311*GNU*)
4312 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4313*)
4314 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004315 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004316 while :
4317 do
4318 cat "conftest.in" "conftest.in" >"conftest.tmp"
4319 mv "conftest.tmp" "conftest.in"
4320 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00004321 $as_echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004322 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4323 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00004324 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004325 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4326 # Best one so far, save it but keep looking for a better one
4327 ac_cv_path_GREP="$ac_path_GREP"
4328 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00004329 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004330 # 10*(2^10) chars as input seems more than enough
4331 test $ac_count -gt 10 && break
4332 done
4333 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4334esac
4335
Matthias Kloseb9621712010-04-24 17:59:49 +00004336 $ac_path_GREP_found && break 3
4337 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004338 done
Matthias Kloseb9621712010-04-24 17:59:49 +00004339 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004340IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00004341 if test -z "$ac_cv_path_GREP"; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00004342 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 +00004343 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004344else
4345 ac_cv_path_GREP=$GREP
4346fi
4347
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004348fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004349{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4350$as_echo "$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004351 GREP="$ac_cv_path_GREP"
4352
4353
Matthias Kloseb9621712010-04-24 17:59:49 +00004354{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4355$as_echo_n "checking for egrep... " >&6; }
4356if test "${ac_cv_path_EGREP+set}" = set; then :
4357 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004358else
4359 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4360 then ac_cv_path_EGREP="$GREP -E"
4361 else
Matthias Kloseb9621712010-04-24 17:59:49 +00004362 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004363 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004364 # Loop through the user's path and test for each of PROGNAME-LIST
4365 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004366for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4367do
4368 IFS=$as_save_IFS
4369 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004370 for ac_prog in egrep; do
4371 for ac_exec_ext in '' $ac_executable_extensions; do
4372 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4373 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
4374# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004375 # Check for GNU $ac_path_EGREP
4376case `"$ac_path_EGREP" --version 2>&1` in
4377*GNU*)
4378 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4379*)
4380 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004381 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004382 while :
4383 do
4384 cat "conftest.in" "conftest.in" >"conftest.tmp"
4385 mv "conftest.tmp" "conftest.in"
4386 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00004387 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004388 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4389 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00004390 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004391 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4392 # Best one so far, save it but keep looking for a better one
4393 ac_cv_path_EGREP="$ac_path_EGREP"
4394 ac_path_EGREP_max=$ac_count
4395 fi
4396 # 10*(2^10) chars as input seems more than enough
4397 test $ac_count -gt 10 && break
4398 done
4399 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4400esac
4401
Matthias Kloseb9621712010-04-24 17:59:49 +00004402 $ac_path_EGREP_found && break 3
4403 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004404 done
Matthias Kloseb9621712010-04-24 17:59:49 +00004405 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004406IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00004407 if test -z "$ac_cv_path_EGREP"; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00004408 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 +00004409 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004410else
4411 ac_cv_path_EGREP=$EGREP
4412fi
4413
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004414 fi
4415fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004416{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4417$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004418 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00004419
4420
Matthias Kloseb9621712010-04-24 17:59:49 +00004421{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4422$as_echo_n "checking for ANSI C header files... " >&6; }
4423if test "${ac_cv_header_stdc+set}" = set; then :
4424 $as_echo_n "(cached) " >&6
4425else
4426 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004427/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00004428#include <stdlib.h>
4429#include <stdarg.h>
4430#include <string.h>
4431#include <float.h>
4432
4433int
4434main ()
4435{
4436
4437 ;
4438 return 0;
4439}
4440_ACEOF
4441if ac_fn_c_try_compile "$LINENO"; then :
4442 ac_cv_header_stdc=yes
4443else
4444 ac_cv_header_stdc=no
4445fi
4446rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4447
4448if test $ac_cv_header_stdc = yes; then
4449 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4450 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4451/* end confdefs.h. */
4452#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004453
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004454_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004455if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00004456 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004457
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004458else
Matthias Kloseb9621712010-04-24 17:59:49 +00004459 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004460fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00004461rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004462
Matthias Kloseb9621712010-04-24 17:59:49 +00004463fi
4464
4465if test $ac_cv_header_stdc = yes; then
4466 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4467 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4468/* end confdefs.h. */
4469#include <stdlib.h>
4470
4471_ACEOF
4472if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4473 $EGREP "free" >/dev/null 2>&1; then :
4474
4475else
4476 ac_cv_header_stdc=no
4477fi
4478rm -f conftest*
4479
4480fi
4481
4482if test $ac_cv_header_stdc = yes; then
4483 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4484 if test "$cross_compiling" = yes; then :
4485 :
4486else
4487 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4488/* end confdefs.h. */
4489#include <ctype.h>
4490#include <stdlib.h>
4491#if ((' ' & 0x0FF) == 0x020)
4492# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4493# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4494#else
4495# define ISLOWER(c) \
4496 (('a' <= (c) && (c) <= 'i') \
4497 || ('j' <= (c) && (c) <= 'r') \
4498 || ('s' <= (c) && (c) <= 'z'))
4499# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4500#endif
4501
4502#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4503int
4504main ()
4505{
4506 int i;
4507 for (i = 0; i < 256; i++)
4508 if (XOR (islower (i), ISLOWER (i))
4509 || toupper (i) != TOUPPER (i))
4510 return 2;
4511 return 0;
4512}
4513_ACEOF
4514if ac_fn_c_try_run "$LINENO"; then :
4515
4516else
4517 ac_cv_header_stdc=no
4518fi
4519rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4520 conftest.$ac_objext conftest.beam conftest.$ac_ext
4521fi
4522
4523fi
4524fi
4525{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4526$as_echo "$ac_cv_header_stdc" >&6; }
4527if test $ac_cv_header_stdc = yes; then
4528
4529$as_echo "#define STDC_HEADERS 1" >>confdefs.h
4530
4531fi
4532
4533# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4534for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4535 inttypes.h stdint.h unistd.h
4536do :
4537 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4538ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4539"
Benjamin Petersond7f73e92010-09-05 00:09:07 +00004540eval as_val=\$$as_ac_Header
4541 if test "x$as_val" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004542 cat >>confdefs.h <<_ACEOF
4543#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4544_ACEOF
4545
4546fi
4547
4548done
4549
4550
4551
4552 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
4553if test "x$ac_cv_header_minix_config_h" = x""yes; then :
4554 MINIX=yes
4555else
4556 MINIX=
4557fi
4558
4559
4560 if test "$MINIX" = yes; then
4561
4562$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4563
4564
4565$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4566
4567
4568$as_echo "#define _MINIX 1" >>confdefs.h
4569
4570 fi
4571
4572
4573 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4574$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
4575if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
4576 $as_echo_n "(cached) " >&6
4577else
4578 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4579/* end confdefs.h. */
4580
4581# define __EXTENSIONS__ 1
4582 $ac_includes_default
4583int
4584main ()
4585{
4586
4587 ;
4588 return 0;
4589}
4590_ACEOF
4591if ac_fn_c_try_compile "$LINENO"; then :
4592 ac_cv_safe_to_define___extensions__=yes
4593else
4594 ac_cv_safe_to_define___extensions__=no
4595fi
4596rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4597fi
4598{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4599$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4600 test $ac_cv_safe_to_define___extensions__ = yes &&
4601 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4602
4603 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4604
4605 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4606
4607 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4608
4609 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4610
4611
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004612
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004613# Check for unsupported systems
4614case $ac_sys_system/$ac_sys_release in
4615atheos*|Linux*/1*)
4616 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
4617 echo See README for details.
4618 exit 1;;
4619esac
4620
4621
Matthias Kloseb9621712010-04-24 17:59:49 +00004622{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
4623$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004624
4625# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004626if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004627 withval=$with_suffix;
4628 case $withval in
4629 no) EXEEXT=;;
4630 yes) EXEEXT=.exe;;
4631 *) EXEEXT=$withval;;
4632 esac
4633fi
4634
Matthias Kloseb9621712010-04-24 17:59:49 +00004635{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
4636$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004637
4638# Test whether we're running on a non-case-sensitive system, in which
4639# case we give a warning if no ext is given
4640
Matthias Kloseb9621712010-04-24 17:59:49 +00004641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
4642$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004643if test ! -d CaseSensitiveTestDir; then
4644mkdir CaseSensitiveTestDir
4645fi
4646
4647if test -d casesensitivetestdir
4648then
Matthias Kloseb9621712010-04-24 17:59:49 +00004649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4650$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004651 BUILDEXEEXT=.exe
4652else
Matthias Kloseb9621712010-04-24 17:59:49 +00004653 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4654$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004655 BUILDEXEEXT=$EXEEXT
4656fi
4657rmdir CaseSensitiveTestDir
4658
4659case $MACHDEP in
4660bsdos*)
4661 case $CC in
4662 gcc) CC="$CC -D_HAVE_BSDI";;
4663 esac;;
4664esac
4665
4666case $ac_sys_system in
4667hp*|HP*)
4668 case $CC in
4669 cc|*/cc) CC="$CC -Ae";;
4670 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004671esac
4672
4673
4674
Matthias Kloseb9621712010-04-24 17:59:49 +00004675{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
4676$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004677if test -z "$LIBRARY"
4678then
4679 LIBRARY='libpython$(VERSION).a'
4680fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004681{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
4682$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004683
4684# LDLIBRARY is the name of the library to link against (as opposed to the
4685# name of the library into which to insert object files). BLDLIBRARY is also
4686# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
4687# is blank as the main program is not linked directly against LDLIBRARY.
4688# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
4689# systems without shared libraries, LDLIBRARY is the same as LIBRARY
4690# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
4691# DLLLIBRARY is the shared (i.e., DLL) library.
4692#
4693# RUNSHARED is used to run shared python without installed libraries
4694#
4695# INSTSONAME is the name of the shared library that will be use to install
4696# on the system - some systems like version suffix, others don't
4697
4698
4699
4700
4701
4702
4703LDLIBRARY="$LIBRARY"
4704BLDLIBRARY='$(LDLIBRARY)'
4705INSTSONAME='$(LDLIBRARY)'
4706DLLLIBRARY=''
4707LDLIBRARYDIR=''
4708RUNSHARED=''
4709
4710# LINKCC is the command that links the python executable -- default is $(CC).
4711# If CXX is set, and if it is needed to link a main function that was
4712# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
4713# python might then depend on the C++ runtime
4714# This is altered for AIX in order to build the export list before
4715# linking.
4716
Matthias Kloseb9621712010-04-24 17:59:49 +00004717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
4718$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004719if test -z "$LINKCC"
4720then
4721 LINKCC='$(PURIFY) $(MAINCC)'
4722 case $ac_sys_system in
4723 AIX*)
4724 exp_extra="\"\""
4725 if test $ac_sys_release -ge 5 -o \
4726 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
4727 exp_extra="."
4728 fi
4729 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004730 QNX*)
4731 # qcc must be used because the other compilers do not
4732 # support -N.
4733 LINKCC=qcc;;
4734 esac
4735fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004736{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
4737$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004738
4739# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
4740# make sure we default having it set to "no": this is used by
4741# distutils.unixccompiler to know if it should add --enable-new-dtags
4742# to linker command lines, and failing to detect GNU ld simply results
4743# in the same bahaviour as before.
4744
Matthias Kloseb9621712010-04-24 17:59:49 +00004745{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
4746$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004747ac_prog=ld
4748if test "$GCC" = yes; then
4749 ac_prog=`$CC -print-prog-name=ld`
4750fi
4751case `"$ac_prog" -V 2>&1 < /dev/null` in
4752 *GNU*)
4753 GNULD=yes;;
4754 *)
4755 GNULD=no;;
4756esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004757{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
4758$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004759
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
4761$as_echo_n "checking for inline... " >&6; }
4762if test "${ac_cv_c_inline+set}" = set; then :
4763 $as_echo_n "(cached) " >&6
4764else
4765 ac_cv_c_inline=no
4766for ac_kw in inline __inline__ __inline; do
4767 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4768/* end confdefs.h. */
4769#ifndef __cplusplus
4770typedef int foo_t;
4771static $ac_kw foo_t static_foo () {return 0; }
4772$ac_kw foo_t foo () {return 0; }
4773#endif
4774
4775_ACEOF
4776if ac_fn_c_try_compile "$LINENO"; then :
4777 ac_cv_c_inline=$ac_kw
4778fi
4779rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4780 test "$ac_cv_c_inline" != no && break
4781done
4782
4783fi
4784{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
4785$as_echo "$ac_cv_c_inline" >&6; }
4786
4787case $ac_cv_c_inline in
4788 inline | yes) ;;
4789 *)
4790 case $ac_cv_c_inline in
4791 no) ac_val=;;
4792 *) ac_val=$ac_cv_c_inline;;
4793 esac
4794 cat >>confdefs.h <<_ACEOF
4795#ifndef __cplusplus
4796#define inline $ac_val
4797#endif
4798_ACEOF
4799 ;;
4800esac
4801
4802if test "$ac_cv_c_inline" != no ; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00004803
4804$as_echo "#define USE_INLINE 1" >>confdefs.h
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004805
4806
4807fi
4808
4809
Matthias Kloseb9621712010-04-24 17:59:49 +00004810{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
4811$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004812# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004813if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004814 enableval=$enable_shared;
4815fi
4816
4817
4818if test -z "$enable_shared"
4819then
4820 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00004821 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004822 enable_shared="yes";;
4823 *)
4824 enable_shared="no";;
4825 esac
4826fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004827{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
4828$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004829
Matthias Kloseb9621712010-04-24 17:59:49 +00004830{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
4831$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004832# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004833if test "${enable_profiling+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004834 enableval=$enable_profiling; ac_save_cc="$CC"
4835 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004836 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004837 ac_enable_profiling="no"
4838else
Matthias Kloseb9621712010-04-24 17:59:49 +00004839 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004840/* end confdefs.h. */
4841int main() { return 0; }
4842_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004843if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004844 ac_enable_profiling="yes"
4845else
Matthias Kloseb9621712010-04-24 17:59:49 +00004846 ac_enable_profiling="no"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004847fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004848rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4849 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004850fi
4851
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004852 CC="$ac_save_cc"
4853fi
4854
Matthias Kloseb9621712010-04-24 17:59:49 +00004855{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_profiling" >&5
4856$as_echo "$ac_enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004857
4858case "$ac_enable_profiling" in
4859 "yes")
4860 BASECFLAGS="-pg $BASECFLAGS"
4861 LDFLAGS="-pg $LDFLAGS"
4862 ;;
4863esac
4864
Matthias Kloseb9621712010-04-24 17:59:49 +00004865{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
4866$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004867
4868# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4869# library that we build, but we do not want to link against it (we
4870# will find it with a -framework option). For this reason there is an
4871# extra variable BLDLIBRARY against which Python and the extension
4872# modules are linked, BLDLIBRARY. This is normally the same as
4873# LDLIBRARY, but empty for MacOSX framework builds.
4874if test "$enable_framework"
4875then
4876 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
4877 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
4878 BLDLIBRARY=''
4879else
4880 BLDLIBRARY='$(LDLIBRARY)'
4881fi
4882
4883# Other platforms follow
4884if test $enable_shared = "yes"; then
4885
Matthias Kloseb9621712010-04-24 17:59:49 +00004886$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004887
4888 case $ac_sys_system in
4889 CYGWIN*)
4890 LDLIBRARY='libpython$(VERSION).dll.a'
4891 DLLLIBRARY='libpython$(VERSION).dll'
4892 ;;
4893 SunOS*)
4894 LDLIBRARY='libpython$(VERSION).so'
4895 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
4896 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4897 INSTSONAME="$LDLIBRARY".$SOVERSION
4898 ;;
4899 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
4900 LDLIBRARY='libpython$(VERSION).so'
4901 BLDLIBRARY='-L. -lpython$(VERSION)'
4902 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4903 case $ac_sys_system in
4904 FreeBSD*)
4905 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4906 ;;
4907 esac
4908 INSTSONAME="$LDLIBRARY".$SOVERSION
4909 ;;
4910 hp*|HP*)
4911 case `uname -m` in
4912 ia64)
4913 LDLIBRARY='libpython$(VERSION).so'
4914 ;;
4915 *)
4916 LDLIBRARY='libpython$(VERSION).sl'
4917 ;;
4918 esac
4919 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
4920 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
4921 ;;
4922 OSF*)
4923 LDLIBRARY='libpython$(VERSION).so'
4924 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
4925 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4926 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004927 Darwin*)
4928 LDLIBRARY='libpython$(VERSION).dylib'
4929 BLDLIBRARY='-L. -lpython$(VERSION)'
4930 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
4931 ;;
4932
4933 esac
4934else # shared is disabled
4935 case $ac_sys_system in
4936 CYGWIN*)
4937 BLDLIBRARY='$(LIBRARY)'
4938 LDLIBRARY='libpython$(VERSION).dll.a'
4939 ;;
4940 esac
4941fi
4942
Matthias Kloseb9621712010-04-24 17:59:49 +00004943{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
4944$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004945
4946if test -n "$ac_tool_prefix"; then
4947 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4948set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004949{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4950$as_echo_n "checking for $ac_word... " >&6; }
4951if test "${ac_cv_prog_RANLIB+set}" = set; then :
4952 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004953else
4954 if test -n "$RANLIB"; then
4955 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4956else
4957as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4958for as_dir in $PATH
4959do
4960 IFS=$as_save_IFS
4961 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004962 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004963 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4964 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00004965 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004966 break 2
4967 fi
4968done
Matthias Kloseb9621712010-04-24 17:59:49 +00004969 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004970IFS=$as_save_IFS
4971
4972fi
4973fi
4974RANLIB=$ac_cv_prog_RANLIB
4975if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004976 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
4977$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004978else
Matthias Kloseb9621712010-04-24 17:59:49 +00004979 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4980$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004981fi
4982
4983
4984fi
4985if test -z "$ac_cv_prog_RANLIB"; then
4986 ac_ct_RANLIB=$RANLIB
4987 # Extract the first word of "ranlib", so it can be a program name with args.
4988set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004989{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4990$as_echo_n "checking for $ac_word... " >&6; }
4991if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
4992 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004993else
4994 if test -n "$ac_ct_RANLIB"; then
4995 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4996else
4997as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4998for as_dir in $PATH
4999do
5000 IFS=$as_save_IFS
5001 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005002 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005003 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5004 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005005 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005006 break 2
5007 fi
5008done
Matthias Kloseb9621712010-04-24 17:59:49 +00005009 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005010IFS=$as_save_IFS
5011
5012fi
5013fi
5014ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5015if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005016 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5017$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005018else
Matthias Kloseb9621712010-04-24 17:59:49 +00005019 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5020$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005021fi
5022
5023 if test "x$ac_ct_RANLIB" = x; then
5024 RANLIB=":"
5025 else
5026 case $cross_compiling:$ac_tool_warned in
5027yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00005028{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5029$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005030ac_tool_warned=yes ;;
5031esac
5032 RANLIB=$ac_ct_RANLIB
5033 fi
5034else
5035 RANLIB="$ac_cv_prog_RANLIB"
5036fi
5037
5038
5039for ac_prog in ar aal
5040do
5041 # Extract the first word of "$ac_prog", so it can be a program name with args.
5042set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005043{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5044$as_echo_n "checking for $ac_word... " >&6; }
5045if test "${ac_cv_prog_AR+set}" = set; then :
5046 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005047else
5048 if test -n "$AR"; then
5049 ac_cv_prog_AR="$AR" # Let the user override the test.
5050else
5051as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5052for as_dir in $PATH
5053do
5054 IFS=$as_save_IFS
5055 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005056 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005057 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5058 ac_cv_prog_AR="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005059 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005060 break 2
5061 fi
5062done
Matthias Kloseb9621712010-04-24 17:59:49 +00005063 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005064IFS=$as_save_IFS
5065
5066fi
5067fi
5068AR=$ac_cv_prog_AR
5069if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005070 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5071$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005072else
Matthias Kloseb9621712010-04-24 17:59:49 +00005073 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5074$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005075fi
5076
5077
5078 test -n "$AR" && break
5079done
5080test -n "$AR" || AR="ar"
5081
5082
5083# tweak ARFLAGS only if the user didn't set it on the command line
5084
5085if test -z "$ARFLAGS"
5086then
5087 ARFLAGS="rc"
5088fi
5089
5090
5091# Extract the first word of "svnversion", so it can be a program name with args.
5092set dummy svnversion; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005093{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5094$as_echo_n "checking for $ac_word... " >&6; }
5095if test "${ac_cv_prog_SVNVERSION+set}" = set; then :
5096 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005097else
5098 if test -n "$SVNVERSION"; then
5099 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
5100else
5101as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5102for as_dir in $PATH
5103do
5104 IFS=$as_save_IFS
5105 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005106 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005107 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5108 ac_cv_prog_SVNVERSION="found"
Matthias Kloseb9621712010-04-24 17:59:49 +00005109 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005110 break 2
5111 fi
5112done
Matthias Kloseb9621712010-04-24 17:59:49 +00005113 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005114IFS=$as_save_IFS
5115
5116 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
5117fi
5118fi
5119SVNVERSION=$ac_cv_prog_SVNVERSION
5120if test -n "$SVNVERSION"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005121 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SVNVERSION" >&5
5122$as_echo "$SVNVERSION" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005123else
Matthias Kloseb9621712010-04-24 17:59:49 +00005124 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5125$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005126fi
5127
5128
5129if test $SVNVERSION = found
5130then
5131 SVNVERSION="svnversion \$(srcdir)"
5132else
5133 SVNVERSION="echo Unversioned directory"
5134fi
5135
5136case $MACHDEP in
5137bsdos*|hp*|HP*)
5138 # install -d does not work on BSDI or HP-UX
5139 if test -z "$INSTALL"
5140 then
5141 INSTALL="${srcdir}/install-sh -c"
5142 fi
5143esac
5144ac_aux_dir=
5145for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
Benjamin Petersond7f73e92010-09-05 00:09:07 +00005146 for ac_t in install-sh install.sh shtool; do
5147 if test -f "$ac_dir/$ac_t"; then
5148 ac_aux_dir=$ac_dir
5149 ac_install_sh="$ac_aux_dir/$ac_t -c"
5150 break 2
5151 fi
5152 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005153done
5154if test -z "$ac_aux_dir"; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00005155 as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005156fi
5157
5158# These three variables are undocumented and unsupported,
5159# and are intended to be withdrawn in a future Autoconf release.
5160# They can cause serious problems if a builder's source tree is in a directory
5161# whose full name contains unusual characters.
5162ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
5163ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
5164ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
5165
5166
5167# Find a good install program. We prefer a C program (faster),
5168# so one script is as good as another. But avoid the broken or
5169# incompatible versions:
5170# SysV /etc/install, /usr/sbin/install
5171# SunOS /usr/etc/install
5172# IRIX /sbin/install
5173# AIX /bin/install
5174# AmigaOS /C/install, which installs bootblocks on floppy discs
5175# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5176# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5177# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5178# OS/2's system install, which has a completely different semantic
5179# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00005180# Reject install programs that cannot install multiple files.
5181{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
5182$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005183if test -z "$INSTALL"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005184if test "${ac_cv_path_install+set}" = set; then :
5185 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005186else
5187 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5188for as_dir in $PATH
5189do
5190 IFS=$as_save_IFS
5191 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005192 # Account for people who put trailing slashes in PATH elements.
5193case $as_dir/ in #((
5194 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005195 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00005196 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005197 /usr/ucb/* ) ;;
5198 *)
5199 # OSF1 and SCO ODT 3.0 have their own names for install.
5200 # Don't use installbsd from OSF since it installs stuff as root
5201 # by default.
5202 for ac_prog in ginstall scoinst install; do
5203 for ac_exec_ext in '' $ac_executable_extensions; do
5204 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
5205 if test $ac_prog = install &&
5206 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5207 # AIX install. It has an incompatible calling convention.
5208 :
5209 elif test $ac_prog = install &&
5210 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5211 # program-specific install script used by HP pwplus--don't use.
5212 :
5213 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005214 rm -rf conftest.one conftest.two conftest.dir
5215 echo one > conftest.one
5216 echo two > conftest.two
5217 mkdir conftest.dir
5218 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5219 test -s conftest.one && test -s conftest.two &&
5220 test -s conftest.dir/conftest.one &&
5221 test -s conftest.dir/conftest.two
5222 then
5223 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5224 break 3
5225 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005226 fi
5227 fi
5228 done
5229 done
5230 ;;
5231esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005232
5233 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005234IFS=$as_save_IFS
5235
Matthias Kloseb9621712010-04-24 17:59:49 +00005236rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005237
5238fi
5239 if test "${ac_cv_path_install+set}" = set; then
5240 INSTALL=$ac_cv_path_install
5241 else
5242 # As a last resort, use the slow shell script. Don't cache a
5243 # value for INSTALL within a source directory, because that will
5244 # break other packages using the cache if that directory is
5245 # removed, or if the value is a relative name.
5246 INSTALL=$ac_install_sh
5247 fi
5248fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005249{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
5250$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005251
5252# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5253# It thinks the first close brace ends the variable substitution.
5254test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5255
5256test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
5257
5258test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5259
5260
5261# Not every filesystem supports hard links
5262
5263if test -z "$LN" ; then
5264 case $ac_sys_system in
5265 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005266 *) LN=ln;;
5267 esac
5268fi
5269
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00005270# For calculating the .so ABI tag.
5271SOABI_QUALIFIERS=""
5272
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005273# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00005274{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
5275$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005276
5277# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005278if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005279 withval=$with_pydebug;
5280if test "$withval" != no
5281then
5282
Matthias Kloseb9621712010-04-24 17:59:49 +00005283$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005284
Matthias Kloseb9621712010-04-24 17:59:49 +00005285 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5286$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005287 Py_DEBUG='true'
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00005288 SOABI_QUALIFIERS="${SOABI_QUALIFIERS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00005289else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5290$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005291fi
5292else
Matthias Kloseb9621712010-04-24 17:59:49 +00005293 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5294$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005295fi
5296
5297
5298# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
5299# merged with this chunk of code?
5300
5301# Optimizer/debugger flags
5302# ------------------------
5303# (The following bit of code is complicated enough - please keep things
5304# indented properly. Just pretend you're editing Python code. ;-)
5305
5306# There are two parallel sets of case statements below, one that checks to
5307# see if OPT was set and one that does BASECFLAGS setting based upon
5308# compiler and platform. BASECFLAGS tweaks need to be made even if the
5309# user set OPT.
5310
5311# tweak OPT based on compiler and platform, only if the user didn't set
5312# it on the command line
5313
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00005314if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005315then
5316 case $GCC in
5317 yes)
5318 if test "$CC" != 'g++' ; then
5319 STRICT_PROTO="-Wstrict-prototypes"
5320 fi
5321 # For gcc 4.x we need to use -fwrapv so lets check if its supported
5322 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
5323 WRAP="-fwrapv"
5324 fi
5325 case $ac_cv_prog_cc_g in
5326 yes)
5327 if test "$Py_DEBUG" = 'true' ; then
5328 # Optimization messes up debuggers, so turn it off for
5329 # debug builds.
Mark Dickinsonb2153e92010-05-05 22:31:36 +00005330 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005331 else
5332 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
5333 fi
5334 ;;
5335 *)
5336 OPT="-O3 -Wall $STRICT_PROTO"
5337 ;;
5338 esac
5339 case $ac_sys_system in
5340 SCO_SV*) OPT="$OPT -m486 -DSCO5"
5341 ;;
5342 esac
5343 ;;
5344
5345 *)
5346 OPT="-O"
5347 ;;
5348 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005349fi
5350
5351
5352
5353# The -arch flags for universal builds on OSX
5354UNIVERSAL_ARCH_FLAGS=
5355
5356
5357# tweak BASECFLAGS based on compiler and platform
5358case $GCC in
5359yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005360 # Python doesn't violate C99 aliasing rules, but older versions of
5361 # GCC produce warnings for legal Python code. Enable
5362 # -fno-strict-aliasing on versions of GCC that support but produce
5363 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00005364 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
5365$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005366 ac_save_cc="$CC"
5367 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005368 save_CFLAGS="$CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +00005369 if test "${ac_cv_no_strict_aliasing+set}" = set; then :
5370 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00005371else
Matthias Kloseb9621712010-04-24 17:59:49 +00005372 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005373/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005374
Matthias Kloseb159a552010-04-25 21:00:44 +00005375
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005376int
5377main ()
5378{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005379
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005380 ;
5381 return 0;
5382}
Matthias Kloseb159a552010-04-25 21:00:44 +00005383
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005384_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005385if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00005386
5387 CC="$ac_save_cc -fstrict-aliasing"
5388 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
5389 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005390/* end confdefs.h. */
5391
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005392 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005393int
5394main ()
5395{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005396double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005397 ;
5398 return 0;
5399}
Matthias Kloseb159a552010-04-25 21:00:44 +00005400
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005401_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005402if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00005403
5404 ac_cv_no_strict_aliasing=no
5405
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005406else
Matthias Kloseb159a552010-04-25 21:00:44 +00005407
5408 ac_cv_no_strict_aliasing=yes
5409
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005410fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005411rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00005412
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005413else
Matthias Kloseb159a552010-04-25 21:00:44 +00005414
5415 ac_cv_no_strict_aliasing=no
5416
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005417fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005418rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00005419fi
5420
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005421 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005422 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00005423 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
5424$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005425 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005426 then
5427 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
5428 fi
5429
5430 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
5431 # support. Without this, treatment of subnormals doesn't follow
5432 # the standard.
5433 case $ac_sys_machine in
5434 alpha*)
5435 BASECFLAGS="$BASECFLAGS -mieee"
5436 ;;
5437 esac
5438
5439 case $ac_sys_system in
5440 SCO_SV*)
5441 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
5442 ;;
5443 # is there any other compiler on Darwin besides gcc?
5444 Darwin*)
5445 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
5446 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussoren666028b2010-04-18 19:07:43 +00005447 if test "${CC}" = gcc
5448 then
Matthias Kloseb9621712010-04-24 17:59:49 +00005449 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
5450$as_echo_n "checking which compiler should be used... " >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00005451 case "${UNIVERSALSDK}" in
5452 */MacOSX10.4u.sdk)
5453 # Build using 10.4 SDK, force usage of gcc when the
5454 # compiler is gcc, otherwise the user will get very
5455 # confusing error messages when building on OSX 10.6
5456 CC=gcc-4.0
5457 CPP=cpp-4.0
5458 ;;
5459 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005460 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5461$as_echo "$CC" >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00005462 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005463
5464
5465 if test "${enable_universalsdk}"; then
5466 UNIVERSAL_ARCH_FLAGS=""
5467 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
5468 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
5469 ARCH_RUN_32BIT=""
Benjamin Peterson99f03762010-04-11 22:15:28 +00005470 LIPO_32BIT_FLAGS=""
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005471 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
5472 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005473 LIPO_32BIT_FLAGS=""
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005474 ARCH_RUN_32BIT="true"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005475
5476 elif test "$UNIVERSAL_ARCHS" = "all" ; then
5477 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005478 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005479 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005480
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005481 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
5482 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005483 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005484 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005485
5486 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
5487 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005488 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005489 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005490
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005491 else
Benjamin Petersond7f73e92010-09-05 00:09:07 +00005492 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 +00005493
5494 fi
5495
5496
Ronald Oussoren666028b2010-04-18 19:07:43 +00005497 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
5498 if test "${UNIVERSALSDK}" != "/"
5499 then
5500 CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
5501 LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren712979d2010-04-20 19:51:33 +00005502 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005503 fi
5504 fi
5505
5506 # Calculate the right deployment target for this build.
5507 #
5508 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
5509 if test ${cur_target} '>' 10.2; then
5510 cur_target=10.3
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005511 if test ${enable_universalsdk}; then
5512 if test "${UNIVERSAL_ARCHS}" = "all"; then
5513 # Ensure that the default platform for a
5514 # 4-way universal build is OSX 10.5,
5515 # that's the first OS release where
5516 # 4-way builds make sense.
5517 cur_target='10.5'
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005518
5519 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
5520 cur_target='10.5'
5521
5522 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
5523 cur_target='10.5'
5524
5525 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
5526 cur_target='10.5'
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005527 fi
5528 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00005529 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005530 # On Intel macs default to a deployment
5531 # target of 10.4, that's the first OSX
5532 # release with Intel support.
5533 cur_target="10.4"
5534 fi
5535 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005536 fi
5537 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
5538
5539 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
5540 # environment with a value that is the same as what we'll use
5541 # in the Makefile to ensure that we'll get the same compiler
5542 # environment during configure and build time.
5543 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
5544 export MACOSX_DEPLOYMENT_TARGET
5545 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
5546
5547 ;;
5548 OSF*)
5549 BASECFLAGS="$BASECFLAGS -mieee"
5550 ;;
5551 esac
5552 ;;
5553
5554*)
5555 case $ac_sys_system in
5556 OpenUNIX*|UnixWare*)
5557 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
5558 ;;
5559 OSF*)
5560 BASECFLAGS="$BASECFLAGS -ieee -std"
5561 ;;
5562 SCO_SV*)
5563 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
5564 ;;
5565 esac
5566 ;;
5567esac
5568
5569if test "$Py_DEBUG" = 'true'; then
5570 :
5571else
5572 OPT="-DNDEBUG $OPT"
5573fi
5574
5575if test "$ac_arch_flags"
5576then
5577 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
5578fi
5579
5580# disable check for icc since it seems to pass, but generates a warning
5581if test "$CC" = icc
5582then
5583 ac_cv_opt_olimit_ok=no
5584fi
5585
Matthias Kloseb9621712010-04-24 17:59:49 +00005586{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -OPT:Olimit=0" >&5
5587$as_echo_n "checking whether $CC accepts -OPT:Olimit=0... " >&6; }
5588if test "${ac_cv_opt_olimit_ok+set}" = set; then :
5589 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005590else
5591 ac_save_cc="$CC"
5592CC="$CC -OPT:Olimit=0"
Matthias Kloseb9621712010-04-24 17:59:49 +00005593cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005594/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005595
5596int
5597main ()
5598{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005599
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005600 ;
5601 return 0;
5602}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005603_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005604if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005605 ac_cv_opt_olimit_ok=yes
5606else
Matthias Kloseb9621712010-04-24 17:59:49 +00005607 ac_cv_opt_olimit_ok=no
Matthias Kloseb159a552010-04-25 21:00:44 +00005608
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005609fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005610rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005611CC="$ac_save_cc"
5612fi
5613
Matthias Kloseb9621712010-04-24 17:59:49 +00005614{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_opt_olimit_ok" >&5
5615$as_echo "$ac_cv_opt_olimit_ok" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005616if test $ac_cv_opt_olimit_ok = yes; then
5617 case $ac_sys_system in
5618 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
5619 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
5620 # environment?
5621 Darwin*)
5622 ;;
5623 *)
5624 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
5625 ;;
5626 esac
5627else
Matthias Kloseb9621712010-04-24 17:59:49 +00005628 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Olimit 1500" >&5
5629$as_echo_n "checking whether $CC accepts -Olimit 1500... " >&6; }
5630 if test "${ac_cv_olimit_ok+set}" = set; then :
5631 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005632else
5633 ac_save_cc="$CC"
5634 CC="$CC -Olimit 1500"
Matthias Kloseb9621712010-04-24 17:59:49 +00005635 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005636/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005637
5638int
5639main ()
5640{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005641
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005642 ;
5643 return 0;
5644}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005645_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005646if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005647 ac_cv_olimit_ok=yes
5648else
Matthias Kloseb9621712010-04-24 17:59:49 +00005649 ac_cv_olimit_ok=no
Matthias Kloseb159a552010-04-25 21:00:44 +00005650
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005651fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005652rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005653 CC="$ac_save_cc"
5654fi
5655
Matthias Kloseb9621712010-04-24 17:59:49 +00005656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_olimit_ok" >&5
5657$as_echo "$ac_cv_olimit_ok" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005658 if test $ac_cv_olimit_ok = yes; then
5659 BASECFLAGS="$BASECFLAGS -Olimit 1500"
5660 fi
5661fi
5662
5663# Check whether GCC supports PyArg_ParseTuple format
5664if test "$GCC" = "yes"
5665then
Matthias Kloseb9621712010-04-24 17:59:49 +00005666 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5
5667$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005668 save_CFLAGS=$CFLAGS
5669 CFLAGS="$CFLAGS -Werror"
Matthias Kloseb9621712010-04-24 17:59:49 +00005670 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005671/* end confdefs.h. */
5672
5673 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005674int
5675main ()
5676{
5677
5678 ;
5679 return 0;
5680}
Matthias Kloseb159a552010-04-25 21:00:44 +00005681
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005682_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005683if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005684
Matthias Kloseb159a552010-04-25 21:00:44 +00005685
Matthias Kloseb9621712010-04-24 17:59:49 +00005686$as_echo "#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005687
Matthias Kloseb159a552010-04-25 21:00:44 +00005688 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00005689$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00005690
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005691else
Matthias Kloseb159a552010-04-25 21:00:44 +00005692
5693 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00005694$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005695
5696fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005697rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5698 CFLAGS=$save_CFLAGS
5699fi
5700
5701# On some compilers, pthreads are available without further options
5702# (e.g. MacOS X). On some of these systems, the compiler will not
5703# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
5704# So we have to see first whether pthreads are available without
5705# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00005706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
5707$as_echo_n "checking whether pthreads are available without options... " >&6; }
5708if test "${ac_cv_pthread_is_default+set}" = set; then :
5709 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005710else
Matthias Kloseb9621712010-04-24 17:59:49 +00005711 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005712 ac_cv_pthread_is_default=no
5713else
Matthias Kloseb9621712010-04-24 17:59:49 +00005714 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005715/* end confdefs.h. */
5716
5717#include <pthread.h>
5718
5719void* routine(void* p){return NULL;}
5720
5721int main(){
5722 pthread_t p;
5723 if(pthread_create(&p,NULL,routine,NULL)!=0)
5724 return 1;
5725 (void)pthread_detach(p);
5726 return 0;
5727}
5728
5729_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005730if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005731
5732 ac_cv_pthread_is_default=yes
5733 ac_cv_kthread=no
5734 ac_cv_pthread=no
5735
5736else
Matthias Kloseb9621712010-04-24 17:59:49 +00005737 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005738fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005739rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5740 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005741fi
5742
5743
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005744fi
5745
Matthias Kloseb9621712010-04-24 17:59:49 +00005746{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
5747$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005748
5749
5750if test $ac_cv_pthread_is_default = yes
5751then
5752 ac_cv_kpthread=no
5753else
5754# -Kpthread, if available, provides the right #defines
5755# and linker options to make pthread_create available
5756# Some compilers won't report that they do not support -Kpthread,
5757# so we need to run a program to see whether it really made the
5758# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005759{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
5760$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
5761if test "${ac_cv_kpthread+set}" = set; then :
5762 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005763else
5764 ac_save_cc="$CC"
5765CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005766if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005767 ac_cv_kpthread=no
5768else
Matthias Kloseb9621712010-04-24 17:59:49 +00005769 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005770/* end confdefs.h. */
5771
5772#include <pthread.h>
5773
5774void* routine(void* p){return NULL;}
5775
5776int main(){
5777 pthread_t p;
5778 if(pthread_create(&p,NULL,routine,NULL)!=0)
5779 return 1;
5780 (void)pthread_detach(p);
5781 return 0;
5782}
5783
5784_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005785if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005786 ac_cv_kpthread=yes
5787else
Matthias Kloseb9621712010-04-24 17:59:49 +00005788 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005789fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005790rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5791 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005792fi
5793
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005794CC="$ac_save_cc"
5795fi
5796
Matthias Kloseb9621712010-04-24 17:59:49 +00005797{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
5798$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005799fi
5800
5801if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
5802then
5803# -Kthread, if available, provides the right #defines
5804# and linker options to make pthread_create available
5805# Some compilers won't report that they do not support -Kthread,
5806# so we need to run a program to see whether it really made the
5807# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005808{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
5809$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
5810if test "${ac_cv_kthread+set}" = set; then :
5811 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005812else
5813 ac_save_cc="$CC"
5814CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005815if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005816 ac_cv_kthread=no
5817else
Matthias Kloseb9621712010-04-24 17:59:49 +00005818 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005819/* end confdefs.h. */
5820
5821#include <pthread.h>
5822
5823void* routine(void* p){return NULL;}
5824
5825int main(){
5826 pthread_t p;
5827 if(pthread_create(&p,NULL,routine,NULL)!=0)
5828 return 1;
5829 (void)pthread_detach(p);
5830 return 0;
5831}
5832
5833_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005834if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005835 ac_cv_kthread=yes
5836else
Matthias Kloseb9621712010-04-24 17:59:49 +00005837 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005838fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005839rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5840 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005841fi
5842
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005843CC="$ac_save_cc"
5844fi
5845
Matthias Kloseb9621712010-04-24 17:59:49 +00005846{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
5847$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005848fi
5849
5850if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
5851then
5852# -pthread, if available, provides the right #defines
5853# and linker options to make pthread_create available
5854# Some compilers won't report that they do not support -pthread,
5855# so we need to run a program to see whether it really made the
5856# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005857{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
5858$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
5859if test "${ac_cv_thread+set}" = set; then :
5860 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005861else
5862 ac_save_cc="$CC"
5863CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005864if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005865 ac_cv_pthread=no
5866else
Matthias Kloseb9621712010-04-24 17:59:49 +00005867 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005868/* end confdefs.h. */
5869
5870#include <pthread.h>
5871
5872void* routine(void* p){return NULL;}
5873
5874int main(){
5875 pthread_t p;
5876 if(pthread_create(&p,NULL,routine,NULL)!=0)
5877 return 1;
5878 (void)pthread_detach(p);
5879 return 0;
5880}
5881
5882_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005883if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005884 ac_cv_pthread=yes
5885else
Matthias Kloseb9621712010-04-24 17:59:49 +00005886 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005887fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005888rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5889 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005890fi
5891
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005892CC="$ac_save_cc"
5893fi
5894
Matthias Kloseb9621712010-04-24 17:59:49 +00005895{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
5896$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005897fi
5898
5899# If we have set a CC compiler flag for thread support then
5900# check if it works for CXX, too.
5901ac_cv_cxx_thread=no
5902if test ! -z "$CXX"
5903then
Matthias Kloseb9621712010-04-24 17:59:49 +00005904{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
5905$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005906ac_save_cxx="$CXX"
5907
5908if test "$ac_cv_kpthread" = "yes"
5909then
5910 CXX="$CXX -Kpthread"
5911 ac_cv_cxx_thread=yes
5912elif test "$ac_cv_kthread" = "yes"
5913then
5914 CXX="$CXX -Kthread"
5915 ac_cv_cxx_thread=yes
5916elif test "$ac_cv_pthread" = "yes"
5917then
5918 CXX="$CXX -pthread"
5919 ac_cv_cxx_thread=yes
5920fi
5921
5922if test $ac_cv_cxx_thread = yes
5923then
5924 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5925 $CXX -c conftest.$ac_ext 2>&5
5926 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5927 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5928 then
5929 ac_cv_cxx_thread=yes
5930 else
5931 ac_cv_cxx_thread=no
5932 fi
5933 rm -fr conftest*
5934fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005935{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
5936$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005937fi
5938CXX="$ac_save_cxx"
5939
5940
5941# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00005942{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5943$as_echo_n "checking for ANSI C header files... " >&6; }
5944if test "${ac_cv_header_stdc+set}" = set; then :
5945 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005946else
Matthias Kloseb9621712010-04-24 17:59:49 +00005947 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005948/* end confdefs.h. */
5949#include <stdlib.h>
5950#include <stdarg.h>
5951#include <string.h>
5952#include <float.h>
5953
5954int
5955main ()
5956{
5957
5958 ;
5959 return 0;
5960}
5961_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005962if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005963 ac_cv_header_stdc=yes
5964else
Matthias Kloseb9621712010-04-24 17:59:49 +00005965 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005966fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005967rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5968
5969if test $ac_cv_header_stdc = yes; then
5970 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00005971 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005972/* end confdefs.h. */
5973#include <string.h>
5974
5975_ACEOF
5976if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005977 $EGREP "memchr" >/dev/null 2>&1; then :
5978
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005979else
5980 ac_cv_header_stdc=no
5981fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005982rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005983
5984fi
5985
5986if test $ac_cv_header_stdc = yes; then
5987 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00005988 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005989/* end confdefs.h. */
5990#include <stdlib.h>
5991
5992_ACEOF
5993if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005994 $EGREP "free" >/dev/null 2>&1; then :
5995
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005996else
5997 ac_cv_header_stdc=no
5998fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005999rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006000
6001fi
6002
6003if test $ac_cv_header_stdc = yes; then
6004 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00006005 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006006 :
6007else
Matthias Kloseb9621712010-04-24 17:59:49 +00006008 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006009/* end confdefs.h. */
6010#include <ctype.h>
6011#include <stdlib.h>
6012#if ((' ' & 0x0FF) == 0x020)
6013# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6014# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6015#else
6016# define ISLOWER(c) \
6017 (('a' <= (c) && (c) <= 'i') \
6018 || ('j' <= (c) && (c) <= 'r') \
6019 || ('s' <= (c) && (c) <= 'z'))
6020# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6021#endif
6022
6023#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6024int
6025main ()
6026{
6027 int i;
6028 for (i = 0; i < 256; i++)
6029 if (XOR (islower (i), ISLOWER (i))
6030 || toupper (i) != TOUPPER (i))
6031 return 2;
6032 return 0;
6033}
6034_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006035if ac_fn_c_try_run "$LINENO"; then :
6036
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006037else
Matthias Kloseb9621712010-04-24 17:59:49 +00006038 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006039fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006040rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6041 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006042fi
6043
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006044fi
6045fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006046{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6047$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006048if test $ac_cv_header_stdc = yes; then
6049
Matthias Kloseb9621712010-04-24 17:59:49 +00006050$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006051
6052fi
6053
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006054for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
6055fcntl.h grp.h \
Christian Heimesbbe741d2008-03-28 10:53:29 +00006056ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Thomas Wouters89f507f2006-12-13 04:49:30 +00006057shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00006058unistd.h utime.h \
Christian Heimes4fbc72b2008-03-22 00:47:35 +00006059sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
6060sys/lock.h sys/mkdev.h sys/modem.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006061sys/param.h sys/poll.h sys/select.h sys/socket.h sys/statvfs.h sys/stat.h \
Benjamin Petersonde9c8692008-07-01 18:23:09 +00006062sys/termio.h sys/time.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006063sys/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 +00006064sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Ronald Oussoren755740f2010-02-07 19:56:39 +00006065bluetooth/bluetooth.h linux/tipc.h spawn.h util.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006066do :
6067 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6068ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Benjamin Petersond7f73e92010-09-05 00:09:07 +00006069eval as_val=\$$as_ac_Header
6070 if test "x$as_val" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006071 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006072#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006073_ACEOF
6074
6075fi
6076
Guido van Rossum627b2d71993-12-24 10:39:16 +00006077done
6078
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006079ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006080for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00006081 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6082{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
6083$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Benjamin Petersond7f73e92010-09-05 00:09:07 +00006084if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006085 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006086else
Matthias Kloseb9621712010-04-24 17:59:49 +00006087 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006088/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006089#include <sys/types.h>
6090#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00006091
Martin v. Löwis11437992002-04-12 09:54:03 +00006092int
6093main ()
6094{
6095if ((DIR *) 0)
6096return 0;
6097 ;
6098 return 0;
6099}
6100_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006101if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006102 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00006103else
Matthias Kloseb9621712010-04-24 17:59:49 +00006104 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006105fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006106rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006107fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006108eval ac_res=\$$as_ac_Header
6109 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6110$as_echo "$ac_res" >&6; }
Benjamin Petersond7f73e92010-09-05 00:09:07 +00006111eval as_val=\$$as_ac_Header
6112 if test "x$as_val" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006113 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006114#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006115_ACEOF
6116
6117ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00006118fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006119
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006120done
6121# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6122if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006123 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6124$as_echo_n "checking for library containing opendir... " >&6; }
6125if test "${ac_cv_search_opendir+set}" = set; then :
6126 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006127else
Martin v. Löwis11437992002-04-12 09:54:03 +00006128 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006129cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006130/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006131
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006132/* Override any GCC internal prototype to avoid an error.
6133 Use char because int might match the return type of a GCC
6134 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006135#ifdef __cplusplus
6136extern "C"
6137#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006138char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006139int
6140main ()
6141{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006142return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006143 ;
6144 return 0;
6145}
6146_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006147for ac_lib in '' dir; do
6148 if test -z "$ac_lib"; then
6149 ac_res="none required"
6150 else
6151 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006152 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006153 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006154 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006155 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006156fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006157rm -f core conftest.err conftest.$ac_objext \
6158 conftest$ac_exeext
6159 if test "${ac_cv_search_opendir+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006160 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006161fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006162done
Matthias Kloseb9621712010-04-24 17:59:49 +00006163if test "${ac_cv_search_opendir+set}" = set; then :
6164
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006165else
6166 ac_cv_search_opendir=no
6167fi
6168rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006169LIBS=$ac_func_search_save_LIBS
6170fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006171{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6172$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006173ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006174if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006175 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00006176
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006177fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006178
Michael W. Hudson54241132001-12-07 15:38:26 +00006179else
Matthias Kloseb9621712010-04-24 17:59:49 +00006180 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6181$as_echo_n "checking for library containing opendir... " >&6; }
6182if test "${ac_cv_search_opendir+set}" = set; then :
6183 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006184else
6185 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006186cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006187/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006188
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006189/* Override any GCC internal prototype to avoid an error.
6190 Use char because int might match the return type of a GCC
6191 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006192#ifdef __cplusplus
6193extern "C"
6194#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006195char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006196int
6197main ()
6198{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006199return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006200 ;
6201 return 0;
6202}
6203_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006204for ac_lib in '' x; do
6205 if test -z "$ac_lib"; then
6206 ac_res="none required"
6207 else
6208 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006209 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006210 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006211 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006212 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006213fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006214rm -f core conftest.err conftest.$ac_objext \
6215 conftest$ac_exeext
6216 if test "${ac_cv_search_opendir+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006217 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006218fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006219done
Matthias Kloseb9621712010-04-24 17:59:49 +00006220if test "${ac_cv_search_opendir+set}" = set; then :
6221
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006222else
6223 ac_cv_search_opendir=no
6224fi
6225rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006226LIBS=$ac_func_search_save_LIBS
6227fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006228{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6229$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006230ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006231if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006232 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006233
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006234fi
6235
6236fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006237
Matthias Kloseb9621712010-04-24 17:59:49 +00006238{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
6239$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
6240if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then :
6241 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006242else
Matthias Kloseb9621712010-04-24 17:59:49 +00006243 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006244/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006245#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006246int
6247main ()
6248{
6249return makedev(0, 0);
6250 ;
6251 return 0;
6252}
6253_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006254if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006255 ac_cv_header_sys_types_h_makedev=yes
6256else
Matthias Kloseb9621712010-04-24 17:59:49 +00006257 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006258fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006259rm -f core conftest.err conftest.$ac_objext \
6260 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006261
6262fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006263{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
6264$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006265
6266if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006267ac_fn_c_check_header_mongrel "$LINENO" "sys/mkdev.h" "ac_cv_header_sys_mkdev_h" "$ac_includes_default"
6268if test "x$ac_cv_header_sys_mkdev_h" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006269
Matthias Kloseb9621712010-04-24 17:59:49 +00006270$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006271
6272fi
6273
6274
6275
6276 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006277 ac_fn_c_check_header_mongrel "$LINENO" "sys/sysmacros.h" "ac_cv_header_sys_sysmacros_h" "$ac_includes_default"
6278if test "x$ac_cv_header_sys_sysmacros_h" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006279
Matthias Kloseb9621712010-04-24 17:59:49 +00006280$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006281
6282fi
6283
6284
6285 fi
6286fi
6287
Michael W. Hudson54241132001-12-07 15:38:26 +00006288
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006289# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006290for ac_header in term.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006291do :
6292 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006293#ifdef HAVE_CURSES_H
6294#include <curses.h>
6295#endif
6296
Matthias Kloseb9621712010-04-24 17:59:49 +00006297"
6298if test "x$ac_cv_header_term_h" = x""yes; then :
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006299 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006300#define HAVE_TERM_H 1
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006301_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006302
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006303fi
6304
6305done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006306
6307
Martin v. Löwis11017b12006-01-14 18:12:57 +00006308# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00006309for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006310do :
6311 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 +00006312#ifdef HAVE_ASM_TYPES_H
6313#include <asm/types.h>
6314#endif
6315#ifdef HAVE_SYS_SOCKET_H
6316#include <sys/socket.h>
6317#endif
6318
Matthias Kloseb9621712010-04-24 17:59:49 +00006319"
6320if test "x$ac_cv_header_linux_netlink_h" = x""yes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00006321 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006322#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006323_ACEOF
6324
6325fi
6326
6327done
6328
6329
Guido van Rossum627b2d71993-12-24 10:39:16 +00006330# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006331was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006332{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
6333$as_echo_n "checking for clock_t in time.h... " >&6; }
6334cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006335/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006336#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006337
6338_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006339if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006340 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00006341 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006342else
Martin v. Löwis11437992002-04-12 09:54:03 +00006343
6344
Matthias Kloseb9621712010-04-24 17:59:49 +00006345$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00006346
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006347
Guido van Rossum627b2d71993-12-24 10:39:16 +00006348fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006349rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006350
Matthias Kloseb9621712010-04-24 17:59:49 +00006351{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
6352$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006353
Neal Norwitz11690112002-07-30 01:08:28 +00006354# Check whether using makedev requires defining _OSF_SOURCE
Matthias Kloseb9621712010-04-24 17:59:49 +00006355{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
6356$as_echo_n "checking for makedev... " >&6; }
6357cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006358/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00006359
Jesus Cea740f53a2010-04-28 11:35:30 +00006360#if defined(MAJOR_IN_MKDEV)
6361#include <sys/mkdev.h>
6362#elif defined(MAJOR_IN_SYSMACROS)
6363#include <sys/sysmacros.h>
6364#else
6365#include <sys/types.h>
6366#endif
6367
Neal Norwitz11690112002-07-30 01:08:28 +00006368int
6369main ()
6370{
Jesus Cea740f53a2010-04-28 11:35:30 +00006371
6372 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00006373 ;
6374 return 0;
6375}
Matthias Kloseb159a552010-04-25 21:00:44 +00006376
Neal Norwitz11690112002-07-30 01:08:28 +00006377_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006378if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006379 ac_cv_has_makedev=yes
6380else
Matthias Kloseb9621712010-04-24 17:59:49 +00006381 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006382fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006383rm -f core conftest.err conftest.$ac_objext \
6384 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006385if test "$ac_cv_has_makedev" = "no"; then
6386 # we didn't link, try if _OSF_SOURCE will allow us to link
Matthias Kloseb9621712010-04-24 17:59:49 +00006387 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006388/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006389
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006390#define _OSF_SOURCE 1
6391#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006392
Neal Norwitz11690112002-07-30 01:08:28 +00006393int
6394main ()
6395{
6396 makedev(0, 0)
6397 ;
6398 return 0;
6399}
6400_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006401if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006402 ac_cv_has_makedev=yes
6403else
Matthias Kloseb9621712010-04-24 17:59:49 +00006404 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006405fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006406rm -f core conftest.err conftest.$ac_objext \
6407 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006408 if test "$ac_cv_has_makedev" = "yes"; then
6409
Matthias Kloseb9621712010-04-24 17:59:49 +00006410$as_echo "#define _OSF_SOURCE 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006411
6412 fi
6413fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006414{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
6415$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006416if test "$ac_cv_has_makedev" = "yes"; then
6417
Matthias Kloseb9621712010-04-24 17:59:49 +00006418$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006419
6420fi
6421
Martin v. Löwis399a6892002-10-04 10:22:02 +00006422# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6423# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6424# defined, but the compiler does not support pragma redefine_extname,
6425# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6426# structures (such as rlimit64) without declaring them. As a
6427# work-around, disable LFS on such configurations
6428
6429use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00006430{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
6431$as_echo_n "checking Solaris LFS bug... " >&6; }
6432cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006433/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006434
6435#define _LARGEFILE_SOURCE 1
6436#define _FILE_OFFSET_BITS 64
6437#include <sys/resource.h>
6438
Martin v. Löwis399a6892002-10-04 10:22:02 +00006439int
6440main ()
6441{
6442struct rlimit foo;
6443 ;
6444 return 0;
6445}
6446_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006447if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00006448 sol_lfs_bug=no
6449else
Matthias Kloseb9621712010-04-24 17:59:49 +00006450 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006451fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006452rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006453{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
6454$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006455if test "$sol_lfs_bug" = "yes"; then
6456 use_lfs=no
6457fi
6458
6459if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006460# Two defines needed to enable largefile support on various platforms
6461# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00006462
Matthias Kloseb9621712010-04-24 17:59:49 +00006463$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006464
6465
Matthias Kloseb9621712010-04-24 17:59:49 +00006466$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00006467
Martin v. Löwis399a6892002-10-04 10:22:02 +00006468fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006469
Guido van Rossum84e7b241996-08-19 21:59:00 +00006470# Add some code to confdefs.h so that the test for off_t works on SCO
6471cat >> confdefs.h <<\EOF
6472#if defined(SCO_DS)
6473#undef _OFF_T
6474#endif
6475EOF
6476
Guido van Rossumef2255b2000-03-10 22:30:29 +00006477# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00006478ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
6479if test "x$ac_cv_type_mode_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006480
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006481else
Martin v. Löwis11437992002-04-12 09:54:03 +00006482
6483cat >>confdefs.h <<_ACEOF
6484#define mode_t int
6485_ACEOF
6486
6487fi
6488
Matthias Kloseb9621712010-04-24 17:59:49 +00006489ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
6490if test "x$ac_cv_type_off_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006491
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006492else
Martin v. Löwis11437992002-04-12 09:54:03 +00006493
6494cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006495#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006496_ACEOF
6497
6498fi
6499
Matthias Kloseb9621712010-04-24 17:59:49 +00006500ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
6501if test "x$ac_cv_type_pid_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006502
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006503else
Martin v. Löwis11437992002-04-12 09:54:03 +00006504
6505cat >>confdefs.h <<_ACEOF
6506#define pid_t int
6507_ACEOF
6508
6509fi
6510
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006511
Martin v. Löwis11437992002-04-12 09:54:03 +00006512cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00006513#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00006514_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006515
Matthias Kloseb9621712010-04-24 17:59:49 +00006516ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
6517if test "x$ac_cv_type_size_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006518
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006519else
Martin v. Löwis11437992002-04-12 09:54:03 +00006520
6521cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006522#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00006523_ACEOF
6524
6525fi
6526
Matthias Kloseb9621712010-04-24 17:59:49 +00006527{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
6528$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
6529if test "${ac_cv_type_uid_t+set}" = set; then :
6530 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006531else
Matthias Kloseb9621712010-04-24 17:59:49 +00006532 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006533/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006534#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006535
6536_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006537if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006538 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006539 ac_cv_type_uid_t=yes
6540else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006541 ac_cv_type_uid_t=no
6542fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006543rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006544
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006545fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006546{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
6547$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00006548if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006549
Matthias Kloseb9621712010-04-24 17:59:49 +00006550$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006551
6552
Matthias Kloseb9621712010-04-24 17:59:49 +00006553$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006554
6555fi
6556
Matthias Kloseb9621712010-04-24 17:59:49 +00006557ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
6558case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006559 no|yes) ;; #(
6560 *)
6561
Matthias Kloseb9621712010-04-24 17:59:49 +00006562$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006563
6564
6565cat >>confdefs.h <<_ACEOF
6566#define uint32_t $ac_cv_c_uint32_t
6567_ACEOF
6568;;
6569 esac
6570
Matthias Kloseb9621712010-04-24 17:59:49 +00006571ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
6572case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006573 no|yes) ;; #(
6574 *)
6575
Matthias Kloseb9621712010-04-24 17:59:49 +00006576$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006577
6578
6579cat >>confdefs.h <<_ACEOF
6580#define uint64_t $ac_cv_c_uint64_t
6581_ACEOF
6582;;
6583 esac
6584
Matthias Kloseb9621712010-04-24 17:59:49 +00006585ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
6586case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006587 no|yes) ;; #(
6588 *)
6589
6590cat >>confdefs.h <<_ACEOF
6591#define int32_t $ac_cv_c_int32_t
6592_ACEOF
6593;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00006594esac
6595
Matthias Kloseb9621712010-04-24 17:59:49 +00006596ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
6597case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006598 no|yes) ;; #(
6599 *)
6600
6601cat >>confdefs.h <<_ACEOF
6602#define int64_t $ac_cv_c_int64_t
6603_ACEOF
6604;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006605esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00006606
Matthias Kloseb9621712010-04-24 17:59:49 +00006607ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
6608if test "x$ac_cv_type_ssize_t" = x""yes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006609
Matthias Kloseb9621712010-04-24 17:59:49 +00006610$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00006611
6612fi
6613
Jack Jansendd19cf82001-12-06 22:36:17 +00006614
Michael W. Hudson54241132001-12-07 15:38:26 +00006615# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00006616# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006617# The cast to long int works around a bug in the HP C Compiler
6618# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6619# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6620# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006621{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
6622$as_echo_n "checking size of int... " >&6; }
6623if test "${ac_cv_sizeof_int+set}" = set; then :
6624 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006625else
Matthias Kloseb9621712010-04-24 17:59:49 +00006626 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 +00006627
Martin v. Löwis11437992002-04-12 09:54:03 +00006628else
Matthias Kloseb9621712010-04-24 17:59:49 +00006629 if test "$ac_cv_type_int" = yes; then
6630 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6631$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Petersond7f73e92010-09-05 00:09:07 +00006632{ as_fn_set_status 77
6633as_fn_error "cannot compute sizeof (int)
6634See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006635 else
6636 ac_cv_sizeof_int=0
6637 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006638fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006639
Martin v. Löwis11437992002-04-12 09:54:03 +00006640fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006641{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
6642$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006643
6644
6645
Martin v. Löwis11437992002-04-12 09:54:03 +00006646cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006647#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00006648_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006649
6650
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006651# The cast to long int works around a bug in the HP C Compiler
6652# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6653# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6654# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006655{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
6656$as_echo_n "checking size of long... " >&6; }
6657if test "${ac_cv_sizeof_long+set}" = set; then :
6658 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006659else
Matthias Kloseb9621712010-04-24 17:59:49 +00006660 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 +00006661
Martin v. Löwis11437992002-04-12 09:54:03 +00006662else
Matthias Kloseb9621712010-04-24 17:59:49 +00006663 if test "$ac_cv_type_long" = yes; then
6664 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6665$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Petersond7f73e92010-09-05 00:09:07 +00006666{ as_fn_set_status 77
6667as_fn_error "cannot compute sizeof (long)
6668See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006669 else
6670 ac_cv_sizeof_long=0
6671 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006672fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006673
Martin v. Löwis11437992002-04-12 09:54:03 +00006674fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006675{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
6676$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006677
6678
6679
Martin v. Löwis11437992002-04-12 09:54:03 +00006680cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006681#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006682_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006683
6684
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006685# The cast to long int works around a bug in the HP C Compiler
6686# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6687# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6688# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006689{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
6690$as_echo_n "checking size of void *... " >&6; }
6691if test "${ac_cv_sizeof_void_p+set}" = set; then :
6692 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006693else
Matthias Kloseb9621712010-04-24 17:59:49 +00006694 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 +00006695
Martin v. Löwis11437992002-04-12 09:54:03 +00006696else
Matthias Kloseb9621712010-04-24 17:59:49 +00006697 if test "$ac_cv_type_void_p" = yes; then
6698 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6699$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Petersond7f73e92010-09-05 00:09:07 +00006700{ as_fn_set_status 77
6701as_fn_error "cannot compute sizeof (void *)
6702See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006703 else
6704 ac_cv_sizeof_void_p=0
6705 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006706fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006707
Martin v. Löwis11437992002-04-12 09:54:03 +00006708fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006709{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
6710$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006711
6712
6713
Martin v. Löwis11437992002-04-12 09:54:03 +00006714cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006715#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00006716_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006717
6718
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006719# The cast to long int works around a bug in the HP C Compiler
6720# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6721# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6722# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006723{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
6724$as_echo_n "checking size of short... " >&6; }
6725if test "${ac_cv_sizeof_short+set}" = set; then :
6726 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006727else
Matthias Kloseb9621712010-04-24 17:59:49 +00006728 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 +00006729
Martin v. Löwis11437992002-04-12 09:54:03 +00006730else
Matthias Kloseb9621712010-04-24 17:59:49 +00006731 if test "$ac_cv_type_short" = yes; then
6732 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6733$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Petersond7f73e92010-09-05 00:09:07 +00006734{ as_fn_set_status 77
6735as_fn_error "cannot compute sizeof (short)
6736See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006737 else
6738 ac_cv_sizeof_short=0
6739 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006740fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006741
Martin v. Löwis11437992002-04-12 09:54:03 +00006742fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006743{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
6744$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006745
6746
6747
Martin v. Löwis11437992002-04-12 09:54:03 +00006748cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006749#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00006750_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006751
6752
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006753# The cast to long int works around a bug in the HP C Compiler
6754# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6755# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6756# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
6758$as_echo_n "checking size of float... " >&6; }
6759if test "${ac_cv_sizeof_float+set}" = set; then :
6760 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006761else
Matthias Kloseb9621712010-04-24 17:59:49 +00006762 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 +00006763
Martin v. Löwis11437992002-04-12 09:54:03 +00006764else
Matthias Kloseb9621712010-04-24 17:59:49 +00006765 if test "$ac_cv_type_float" = yes; then
6766 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6767$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Petersond7f73e92010-09-05 00:09:07 +00006768{ as_fn_set_status 77
6769as_fn_error "cannot compute sizeof (float)
6770See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006771 else
6772 ac_cv_sizeof_float=0
6773 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006774fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006775
Martin v. Löwis11437992002-04-12 09:54:03 +00006776fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006777{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
6778$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006779
6780
6781
Martin v. Löwis11437992002-04-12 09:54:03 +00006782cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006783#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00006784_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006785
6786
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006787# The cast to long int works around a bug in the HP C Compiler
6788# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6789# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6790# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006791{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
6792$as_echo_n "checking size of double... " >&6; }
6793if test "${ac_cv_sizeof_double+set}" = set; then :
6794 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006795else
Matthias Kloseb9621712010-04-24 17:59:49 +00006796 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 +00006797
Martin v. Löwis11437992002-04-12 09:54:03 +00006798else
Matthias Kloseb9621712010-04-24 17:59:49 +00006799 if test "$ac_cv_type_double" = yes; then
6800 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6801$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Petersond7f73e92010-09-05 00:09:07 +00006802{ as_fn_set_status 77
6803as_fn_error "cannot compute sizeof (double)
6804See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006805 else
6806 ac_cv_sizeof_double=0
6807 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006808fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006809
Martin v. Löwis11437992002-04-12 09:54:03 +00006810fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006811{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
6812$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006813
6814
6815
Martin v. Löwis11437992002-04-12 09:54:03 +00006816cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006817#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00006818_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006819
6820
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006821# The cast to long int works around a bug in the HP C Compiler
6822# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6823# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6824# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
6826$as_echo_n "checking size of fpos_t... " >&6; }
6827if test "${ac_cv_sizeof_fpos_t+set}" = set; then :
6828 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006829else
Matthias Kloseb9621712010-04-24 17:59:49 +00006830 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 +00006831
Martin v. Löwis11437992002-04-12 09:54:03 +00006832else
Matthias Kloseb9621712010-04-24 17:59:49 +00006833 if test "$ac_cv_type_fpos_t" = yes; then
6834 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6835$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Petersond7f73e92010-09-05 00:09:07 +00006836{ as_fn_set_status 77
6837as_fn_error "cannot compute sizeof (fpos_t)
6838See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006839 else
6840 ac_cv_sizeof_fpos_t=0
6841 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006842fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006843
Martin v. Löwis11437992002-04-12 09:54:03 +00006844fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006845{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
6846$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006847
6848
6849
Martin v. Löwis11437992002-04-12 09:54:03 +00006850cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006851#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00006852_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006853
Michael W. Hudson54241132001-12-07 15:38:26 +00006854
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006855# The cast to long int works around a bug in the HP C Compiler
6856# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6857# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6858# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006859{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
6860$as_echo_n "checking size of size_t... " >&6; }
6861if test "${ac_cv_sizeof_size_t+set}" = set; then :
6862 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00006863else
Matthias Kloseb9621712010-04-24 17:59:49 +00006864 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 +00006865
Martin v. Löwis18e16552006-02-15 17:27:45 +00006866else
Matthias Kloseb9621712010-04-24 17:59:49 +00006867 if test "$ac_cv_type_size_t" = yes; then
6868 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6869$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Petersond7f73e92010-09-05 00:09:07 +00006870{ as_fn_set_status 77
6871as_fn_error "cannot compute sizeof (size_t)
6872See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006873 else
6874 ac_cv_sizeof_size_t=0
6875 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00006876fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006877
Martin v. Löwis18e16552006-02-15 17:27:45 +00006878fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006879{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
6880$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006881
6882
6883
Martin v. Löwis18e16552006-02-15 17:27:45 +00006884cat >>confdefs.h <<_ACEOF
6885#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
6886_ACEOF
6887
6888
Christian Heimes400adb02008-02-01 08:12:03 +00006889# The cast to long int works around a bug in the HP C Compiler
6890# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6891# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6892# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006893{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
6894$as_echo_n "checking size of pid_t... " >&6; }
6895if test "${ac_cv_sizeof_pid_t+set}" = set; then :
6896 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00006897else
Matthias Kloseb9621712010-04-24 17:59:49 +00006898 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 +00006899
Christian Heimes400adb02008-02-01 08:12:03 +00006900else
Matthias Kloseb9621712010-04-24 17:59:49 +00006901 if test "$ac_cv_type_pid_t" = yes; then
6902 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6903$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Petersond7f73e92010-09-05 00:09:07 +00006904{ as_fn_set_status 77
6905as_fn_error "cannot compute sizeof (pid_t)
6906See \`config.log' for more details." "$LINENO" 5; }; }
Christian Heimes400adb02008-02-01 08:12:03 +00006907 else
6908 ac_cv_sizeof_pid_t=0
6909 fi
6910fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006911
Christian Heimes400adb02008-02-01 08:12:03 +00006912fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006913{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
6914$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00006915
6916
6917
6918cat >>confdefs.h <<_ACEOF
6919#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
6920_ACEOF
6921
6922
Michael W. Hudson54241132001-12-07 15:38:26 +00006923
Matthias Kloseb9621712010-04-24 17:59:49 +00006924{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
6925$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006926have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006927cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006928/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006929
Martin v. Löwis11437992002-04-12 09:54:03 +00006930int
6931main ()
6932{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006933long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00006934 ;
6935 return 0;
6936}
6937_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006938if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006939
6940
Matthias Kloseb9621712010-04-24 17:59:49 +00006941$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006942
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006943 have_long_long=yes
6944
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006945fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006946rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006947{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
6948$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00006949if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006950# The cast to long int works around a bug in the HP C Compiler
6951# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6952# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6953# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006954{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
6955$as_echo_n "checking size of long long... " >&6; }
6956if test "${ac_cv_sizeof_long_long+set}" = set; then :
6957 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006958else
Matthias Kloseb9621712010-04-24 17:59:49 +00006959 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 +00006960
Martin v. Löwis11437992002-04-12 09:54:03 +00006961else
Matthias Kloseb9621712010-04-24 17:59:49 +00006962 if test "$ac_cv_type_long_long" = yes; then
6963 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6964$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Petersond7f73e92010-09-05 00:09:07 +00006965{ as_fn_set_status 77
6966as_fn_error "cannot compute sizeof (long long)
6967See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006968 else
6969 ac_cv_sizeof_long_long=0
6970 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006971fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006972
Martin v. Löwis11437992002-04-12 09:54:03 +00006973fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006974{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
6975$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006976
6977
6978
Martin v. Löwis11437992002-04-12 09:54:03 +00006979cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006980#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006981_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006982
Michael W. Hudson54241132001-12-07 15:38:26 +00006983
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006984fi
6985
Matthias Kloseb9621712010-04-24 17:59:49 +00006986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
6987$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006988have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006989cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006990/* end confdefs.h. */
6991
6992int
6993main ()
6994{
6995long double x; x = (long double)0;
6996 ;
6997 return 0;
6998}
6999_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007000if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007001
7002
Matthias Kloseb9621712010-04-24 17:59:49 +00007003$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007004
7005 have_long_double=yes
7006
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007007fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007008rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007009{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
7010$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007011if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007012# The cast to long int works around a bug in the HP C Compiler
7013# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7014# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7015# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007016{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
7017$as_echo_n "checking size of long double... " >&6; }
7018if test "${ac_cv_sizeof_long_double+set}" = set; then :
7019 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007020else
Matthias Kloseb9621712010-04-24 17:59:49 +00007021 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 +00007022
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007023else
Matthias Kloseb9621712010-04-24 17:59:49 +00007024 if test "$ac_cv_type_long_double" = yes; then
7025 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7026$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Petersond7f73e92010-09-05 00:09:07 +00007027{ as_fn_set_status 77
7028as_fn_error "cannot compute sizeof (long double)
7029See \`config.log' for more details." "$LINENO" 5; }; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007030 else
7031 ac_cv_sizeof_long_double=0
7032 fi
7033fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007034
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007035fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007036{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
7037$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007038
7039
7040
7041cat >>confdefs.h <<_ACEOF
7042#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
7043_ACEOF
7044
7045
7046fi
7047
7048
Matthias Kloseb9621712010-04-24 17:59:49 +00007049{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
7050$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007051have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007052cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00007053/* end confdefs.h. */
7054
7055int
7056main ()
7057{
7058_Bool x; x = (_Bool)0;
7059 ;
7060 return 0;
7061}
7062_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007063if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00007064
7065
Matthias Kloseb9621712010-04-24 17:59:49 +00007066$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00007067
7068 have_c99_bool=yes
7069
Thomas Woutersb2137042007-02-01 18:02:27 +00007070fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007071rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007072{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
7073$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007074if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007075# The cast to long int works around a bug in the HP C Compiler
7076# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7077# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7078# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007079{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
7080$as_echo_n "checking size of _Bool... " >&6; }
7081if test "${ac_cv_sizeof__Bool+set}" = set; then :
7082 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00007083else
Matthias Kloseb9621712010-04-24 17:59:49 +00007084 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 +00007085
Thomas Woutersb2137042007-02-01 18:02:27 +00007086else
Matthias Kloseb9621712010-04-24 17:59:49 +00007087 if test "$ac_cv_type__Bool" = yes; then
7088 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7089$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Petersond7f73e92010-09-05 00:09:07 +00007090{ as_fn_set_status 77
7091as_fn_error "cannot compute sizeof (_Bool)
7092See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007093 else
7094 ac_cv_sizeof__Bool=0
7095 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00007096fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007097
Thomas Woutersb2137042007-02-01 18:02:27 +00007098fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007099{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
7100$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007101
7102
7103
Thomas Woutersb2137042007-02-01 18:02:27 +00007104cat >>confdefs.h <<_ACEOF
7105#define SIZEOF__BOOL $ac_cv_sizeof__Bool
7106_ACEOF
7107
7108
7109fi
7110
Matthias Kloseb9621712010-04-24 17:59:49 +00007111ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00007112 #include <stdint.h>
7113 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00007114"
7115if test "x$ac_cv_type_uintptr_t" = x""yes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00007116
7117cat >>confdefs.h <<_ACEOF
7118#define HAVE_UINTPTR_T 1
7119_ACEOF
7120
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007121# The cast to long int works around a bug in the HP C Compiler
7122# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7123# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7124# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
7126$as_echo_n "checking size of uintptr_t... " >&6; }
7127if test "${ac_cv_sizeof_uintptr_t+set}" = set; then :
7128 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007129else
Matthias Kloseb9621712010-04-24 17:59:49 +00007130 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 +00007131
Martin v. Löwis11437992002-04-12 09:54:03 +00007132else
Matthias Kloseb9621712010-04-24 17:59:49 +00007133 if test "$ac_cv_type_uintptr_t" = yes; then
7134 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7135$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Petersond7f73e92010-09-05 00:09:07 +00007136{ as_fn_set_status 77
7137as_fn_error "cannot compute sizeof (uintptr_t)
7138See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007139 else
7140 ac_cv_sizeof_uintptr_t=0
7141 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007142fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007143
Martin v. Löwis11437992002-04-12 09:54:03 +00007144fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007145{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
7146$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007147
7148
7149
Martin v. Löwis11437992002-04-12 09:54:03 +00007150cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007151#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007152_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007153
Michael W. Hudson54241132001-12-07 15:38:26 +00007154
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007155fi
7156
Thomas Wouters89f507f2006-12-13 04:49:30 +00007157
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007158# The cast to long int works around a bug in the HP C Compiler
7159# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7160# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7161# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007162{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
7163$as_echo_n "checking size of off_t... " >&6; }
7164if test "${ac_cv_sizeof_off_t+set}" = set; then :
7165 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007166else
Matthias Kloseb9621712010-04-24 17:59:49 +00007167 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007168#ifdef HAVE_SYS_TYPES_H
7169#include <sys/types.h>
7170#endif
7171
Matthias Kloseb9621712010-04-24 17:59:49 +00007172"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007173
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007174else
Matthias Kloseb9621712010-04-24 17:59:49 +00007175 if test "$ac_cv_type_off_t" = yes; then
7176 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7177$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Petersond7f73e92010-09-05 00:09:07 +00007178{ as_fn_set_status 77
7179as_fn_error "cannot compute sizeof (off_t)
7180See \`config.log' for more details." "$LINENO" 5; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007181 else
7182 ac_cv_sizeof_off_t=0
7183 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007184fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007185
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007186fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007187{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
7188$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007189
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007190
7191
Martin v. Löwis11437992002-04-12 09:54:03 +00007192cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007193#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007194_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007195
Michael W. Hudson54241132001-12-07 15:38:26 +00007196
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007197
Matthias Kloseb9621712010-04-24 17:59:49 +00007198{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
7199$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007200if test "$have_long_long" = yes
7201then
7202if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007203 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007204
Matthias Kloseb9621712010-04-24 17:59:49 +00007205$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007206
Matthias Kloseb9621712010-04-24 17:59:49 +00007207 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7208$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007209else
Matthias Kloseb9621712010-04-24 17:59:49 +00007210 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7211$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007212fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00007213else
Matthias Kloseb9621712010-04-24 17:59:49 +00007214 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7215$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007216fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007217
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007218# The cast to long int works around a bug in the HP C Compiler
7219# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7220# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7221# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
7223$as_echo_n "checking size of time_t... " >&6; }
7224if test "${ac_cv_sizeof_time_t+set}" = set; then :
7225 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007226else
Matthias Kloseb9621712010-04-24 17:59:49 +00007227 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007228#ifdef HAVE_SYS_TYPES_H
7229#include <sys/types.h>
7230#endif
7231#ifdef HAVE_TIME_H
7232#include <time.h>
7233#endif
7234
Matthias Kloseb9621712010-04-24 17:59:49 +00007235"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007236
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007237else
Matthias Kloseb9621712010-04-24 17:59:49 +00007238 if test "$ac_cv_type_time_t" = yes; then
7239 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7240$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Petersond7f73e92010-09-05 00:09:07 +00007241{ as_fn_set_status 77
7242as_fn_error "cannot compute sizeof (time_t)
7243See \`config.log' for more details." "$LINENO" 5; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007244 else
7245 ac_cv_sizeof_time_t=0
7246 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007247fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007248
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007249fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007250{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
7251$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007252
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007253
7254
Martin v. Löwis11437992002-04-12 09:54:03 +00007255cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007256#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007257_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007258
Michael W. Hudson54241132001-12-07 15:38:26 +00007259
7260
Trent Mick635f6fb2000-08-23 21:33:05 +00007261# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007262ac_save_cc="$CC"
7263if test "$ac_cv_kpthread" = "yes"
7264then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00007265elif test "$ac_cv_kthread" = "yes"
7266then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00007267elif test "$ac_cv_pthread" = "yes"
7268then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007269fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007270
Matthias Kloseb9621712010-04-24 17:59:49 +00007271{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
7272$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007273have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007274cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007275/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007276
7277 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007278int
7279main ()
7280{
Guido van Rossum12580492000-09-24 16:47:19 +00007281pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007282 ;
7283 return 0;
7284}
Matthias Kloseb159a552010-04-25 21:00:44 +00007285
Martin v. Löwis11437992002-04-12 09:54:03 +00007286_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007287if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00007288 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00007289fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007290rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007291{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
7292$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007293if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007294 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007295# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7296# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7297# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007298{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
7299$as_echo_n "checking size of pthread_t... " >&6; }
7300if test "${ac_cv_sizeof_pthread_t+set}" = set; then :
7301 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007302else
Matthias Kloseb9621712010-04-24 17:59:49 +00007303 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007304#ifdef HAVE_PTHREAD_H
7305#include <pthread.h>
7306#endif
7307
Matthias Kloseb9621712010-04-24 17:59:49 +00007308"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007309
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007310else
Matthias Kloseb9621712010-04-24 17:59:49 +00007311 if test "$ac_cv_type_pthread_t" = yes; then
7312 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7313$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Petersond7f73e92010-09-05 00:09:07 +00007314{ as_fn_set_status 77
7315as_fn_error "cannot compute sizeof (pthread_t)
7316See \`config.log' for more details." "$LINENO" 5; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007317 else
7318 ac_cv_sizeof_pthread_t=0
7319 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00007320fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007321
Trent Mick635f6fb2000-08-23 21:33:05 +00007322fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007323{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
7324$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007325
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007326
7327
Martin v. Löwis11437992002-04-12 09:54:03 +00007328cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007329#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007330_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007331
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007332
Trent Mick635f6fb2000-08-23 21:33:05 +00007333fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007334CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00007335
Michael W. Hudson54241132001-12-07 15:38:26 +00007336
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007337case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007338 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007339 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
7340 ;;
7341 Darwin/*)
7342 OTHER_LIBTOOL_OPT=""
7343 ;;
7344esac
7345
7346
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007347ARCH_RUN_32BIT=""
7348
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007349case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007350 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00007351 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
7352 if test "${enable_universalsdk}"; then
7353 :
7354 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007355 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007356 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00007357 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007358 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00007359 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00007360 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007361 if test ${gcc_version} '<' 4.0
7362 then
7363 LIBTOOL_CRUFT="-lcc_dynamic"
7364 else
7365 LIBTOOL_CRUFT=""
7366 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007367 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007368 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007369else
Matthias Kloseb9621712010-04-24 17:59:49 +00007370 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007371/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007372
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007373 #include <unistd.h>
7374 int main(int argc, char*argv[])
7375 {
7376 if (sizeof(long) == 4) {
7377 return 0;
7378 } else {
7379 return 1;
7380 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007381 }
7382
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007383_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007384if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007385 ac_osx_32bit=yes
7386else
Matthias Kloseb9621712010-04-24 17:59:49 +00007387 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007388fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007389rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7390 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007391fi
7392
7393
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007394 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007395 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007396 i386)
7397 MACOSX_DEFAULT_ARCH="i386"
7398 ;;
7399 ppc)
7400 MACOSX_DEFAULT_ARCH="ppc"
7401 ;;
7402 *)
Benjamin Petersond7f73e92010-09-05 00:09:07 +00007403 as_fn_error "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007404 ;;
7405 esac
7406 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007407 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007408 i386)
7409 MACOSX_DEFAULT_ARCH="x86_64"
7410 ;;
7411 ppc)
7412 MACOSX_DEFAULT_ARCH="ppc64"
7413 ;;
7414 *)
Benjamin Petersond7f73e92010-09-05 00:09:07 +00007415 as_fn_error "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007416 ;;
7417 esac
7418
7419 #ARCH_RUN_32BIT="true"
7420 fi
7421
7422 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00007423 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007424 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007425esac
7426
Matthias Kloseb9621712010-04-24 17:59:49 +00007427{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
7428$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007429if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007430then
Skip Montanarodecc6a42003-01-01 20:07:49 +00007431 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00007432 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00007433 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007434
Matthias Kloseb9621712010-04-24 17:59:49 +00007435$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007436
Matthias Kloseb9621712010-04-24 17:59:49 +00007437 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7438$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00007439 if test $enable_shared = "yes"
7440 then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00007441 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 +00007442 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007443else
Matthias Kloseb9621712010-04-24 17:59:49 +00007444 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7445$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007446fi
7447
Matthias Kloseb9621712010-04-24 17:59:49 +00007448{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
7449$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007450case $ac_sys_system/$ac_sys_release in
7451 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007452
Matthias Kloseb9621712010-04-24 17:59:49 +00007453$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007454
Matthias Kloseb9621712010-04-24 17:59:49 +00007455 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
7456$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007457 ;;
7458 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00007459 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7460$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007461 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007462esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007463
Guido van Rossum0a516c91994-09-12 10:58:40 +00007464# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00007465
Michael W. Hudson54241132001-12-07 15:38:26 +00007466
7467
7468
7469
Benjamin Peterson99f03762010-04-11 22:15:28 +00007470
Thomas Wouters477c8d52006-05-27 19:21:47 +00007471
Georg Brandlb1441c72009-01-03 22:33:39 +00007472
Thomas Wouters477c8d52006-05-27 19:21:47 +00007473cat >>confdefs.h <<_ACEOF
7474#define SHLIB_EXT "$SO"
7475_ACEOF
7476
Guido van Rossum0a516c91994-09-12 10:58:40 +00007477# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00007478# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007479# (Shared libraries in this instance are shared modules to be loaded into
7480# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00007481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
7482$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007483if test -z "$LDSHARED"
7484then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007485 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007486 AIX*)
7487 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00007488 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007489 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00007490 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00007491 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00007492 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007493 if test "$GCC" = "yes" ; then
7494 LDSHARED='$(CC) -shared'
7495 LDCXXSHARED='$(CXX) -shared'
7496 else
7497 LDSHARED='$(CC) -G'
7498 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00007499 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007500 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007501 if test "$GCC" = "yes" ; then
7502 LDSHARED='$(CC) -shared'
7503 LDCXXSHARED='$(CXX) -shared'
7504 else
7505 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007506 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +00007507 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +00007508 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +00007509 LDSHARED='$(CC) $(LDFLAGS) -bundle'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007510 LDCXXSHARED='$(CXX) $(LDFLAGS) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00007511 if test "$enable_framework" ; then
7512 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007513 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7514 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007515 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007516 else
7517 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00007518 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00007519 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00007520 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007521 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Jack Jansene578a632001-08-15 01:27:14 +00007522 LDSHARED='$(CC) $(LDFLAGS) -bundle'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007523 LDCXXSHARED='$(CXX) $(LDFLAGS) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00007524 if test "$enable_framework" ; then
7525 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007526 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7527 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007528 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007529 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00007530 # No framework, use the Python app as bundle-loader
7531 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00007532 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007533 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007534 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007535 Darwin/*)
7536 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
7537 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00007538
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007539 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +00007540 then
Thomas Wouters477c8d52006-05-27 19:21:47 +00007541 if test "${enable_universalsdk}"; then
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007542 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007543 fi
Jack Jansen6b08a402004-06-03 12:41:45 +00007544 LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007545 LDCXXSHARED='$(CXX) $(LDFLAGS) -bundle -undefined dynamic_lookup'
Jack Jansen6b08a402004-06-03 12:41:45 +00007546 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00007547 else
7548 LDSHARED='$(CC) $(LDFLAGS) -bundle'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007549 LDCXXSHARED='$(CXX) $(LDFLAGS) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00007550 if test "$enable_framework" ; then
7551 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007552 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7553 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007554 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007555 else
7556 # No framework, use the Python app as bundle-loader
7557 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
7558 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007559 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007560 fi
7561 fi
7562 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007563 Linux*|GNU*|QNX*)
7564 LDSHARED='$(CC) -shared'
7565 LDCXXSHARED='$(CXX) -shared';;
7566 BSD/OS*/4*)
7567 LDSHARED="gcc -shared"
7568 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007569 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00007570 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00007571 then
Benjamin Petersonab0a7522010-03-14 15:18:25 +00007572 LDSHARED='$(CC) -shared ${LDFLAGS}'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007573 LDCXXSHARED='$(CXX) -shared ${LDFLAGS}'
Guido van Rossum0286ae82000-08-29 15:06:49 +00007574 else
7575 LDSHARED="ld -Bshareable ${LDFLAGS}"
7576 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007577 OpenBSD*)
7578 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7579 then
7580 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007581 LDCXXSHARED='$(CXX) -shared $(CCSHARED) ${LDFLAGS}'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007582 else
7583 case `uname -r` in
7584 [01].* | 2.[0-7] | 2.[0-7].*)
7585 LDSHARED="ld -Bshareable ${LDFLAGS}"
7586 ;;
7587 *)
7588 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007589 LDCXXSHARED='$(CXX) -shared $(CCSHARED) ${LDFLAGS}'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007590 ;;
7591 esac
7592 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007593 NetBSD*|DragonFly*)
7594 LDSHARED="cc -shared ${LDFLAGS}"
7595 LDCXXSHARED="c++ -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007596 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007597 if test "$GCC" = "yes" ; then
7598 LDSHARED='$(CC) -shared'
7599 LDCXXSHARED='$(CXX) -shared'
7600 else
7601 LDSHARED='$(CC) -G'
7602 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00007603 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007604 SCO_SV*)
7605 LDSHARED='$(CC) -Wl,-G,-Bexport'
7606 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
7607 CYGWIN*)
7608 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
7609 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007610 *) LDSHARED="ld";;
7611 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007612fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007613{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
7614$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00007615LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007616BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00007617# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007618# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007619{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
7620$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007621if test -z "$CCSHARED"
7622then
Guido van Rossum07397971997-04-29 21:49:50 +00007623 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00007624 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007625 then CCSHARED="-fPIC";
7626 elif test `uname -p` = sparc;
7627 then CCSHARED="-xcode=pic32";
7628 else CCSHARED="-Kpic";
7629 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00007630 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00007631 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00007632 else CCSHARED="+z";
7633 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007634 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007635 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007636 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007637 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00007638 if test "$GCC" = "yes"
7639 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00007640 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00007641 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007642 SCO_SV*)
7643 if test "$GCC" = "yes"
7644 then CCSHARED="-fPIC"
7645 else CCSHARED="-Kpic -belf"
7646 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007647 IRIX*/6*) case $CC in
7648 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00007649 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007650 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007651 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007652fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007653{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
7654$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007655# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007656# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007657{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
7658$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007659if test -z "$LINKFORSHARED"
7660then
Guido van Rossum07397971997-04-29 21:49:50 +00007661 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007662 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007663 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00007664 LINKFORSHARED="-Wl,-E -Wl,+s";;
7665# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007666 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007667 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007668 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00007669 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00007670 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Jack Jansene578a632001-08-15 01:27:14 +00007671 if test "$enable_framework"
7672 then
Jack Jansenda49e192005-01-07 13:08:22 +00007673 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007674 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007675 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007676 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007677 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00007678 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007679 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00007680 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7681 then
7682 LINKFORSHARED="-Wl,--export-dynamic"
7683 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007684 SunOS/5*) case $CC in
7685 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00007686 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00007687 then
7688 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007689 fi;;
7690 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00007691 CYGWIN*)
7692 if test $enable_shared = "no"
7693 then
7694 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
7695 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00007696 QNX*)
7697 # -Wl,-E causes the symbols to be added to the dynamic
7698 # symbol table so that they can be found when a module
7699 # is loaded. -N 2048K causes the stack size to be set
7700 # to 2048 kilobytes so that the stack doesn't overflow
7701 # when running test_compile.py.
7702 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007703 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007704fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007705{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
7706$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007707
Michael W. Hudson54241132001-12-07 15:38:26 +00007708
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00007709
Matthias Kloseb9621712010-04-24 17:59:49 +00007710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
7711$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007712if test ! "$LIBRARY" = "$LDLIBRARY"
7713then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00007714 case $ac_sys_system in
7715 CYGWIN*)
7716 # Cygwin needs CCSHARED when building extension DLLs
7717 # but not when building the interpreter DLL.
7718 CFLAGSFORSHARED='';;
7719 *)
7720 CFLAGSFORSHARED='$(CCSHARED)'
7721 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007722fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007723{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
7724$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007725
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007726# SHLIBS are libraries (except -lc and -lm) to link to the python shared
7727# library (with --enable-shared).
7728# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007729# symbols, this must be set to $(LIBS) (expanded by make). We do this even
7730# if it is not required, since it creates a dependency of the shared library
7731# to LIBS. This, in turn, means that applications linking the shared libpython
7732# don't need to link LIBS explicitly. The default should be only changed
7733# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007734
Matthias Kloseb9621712010-04-24 17:59:49 +00007735{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
7736$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007737case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007738 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007739 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007740esac
Matthias Kloseb9621712010-04-24 17:59:49 +00007741{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
7742$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007743
7744
Guido van Rossum627b2d71993-12-24 10:39:16 +00007745# checks for libraries
Matthias Kloseb9621712010-04-24 17:59:49 +00007746{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
7747$as_echo_n "checking for dlopen in -ldl... " >&6; }
7748if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
7749 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007750else
Martin v. Löwis11437992002-04-12 09:54:03 +00007751 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007752LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007753cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007754/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007755
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007756/* Override any GCC internal prototype to avoid an error.
7757 Use char because int might match the return type of a GCC
7758 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007759#ifdef __cplusplus
7760extern "C"
7761#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007762char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007763int
7764main ()
7765{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007766return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007767 ;
7768 return 0;
7769}
7770_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007771if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007772 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007773else
Matthias Kloseb9621712010-04-24 17:59:49 +00007774 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007775fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007776rm -f core conftest.err conftest.$ac_objext \
7777 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007778LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007779fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007780{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
7781$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
7782if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007783 cat >>confdefs.h <<_ACEOF
7784#define HAVE_LIBDL 1
7785_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007786
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007787 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00007788
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007789fi
7790 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00007791{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
7792$as_echo_n "checking for shl_load in -ldld... " >&6; }
7793if test "${ac_cv_lib_dld_shl_load+set}" = set; then :
7794 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007795else
Martin v. Löwis11437992002-04-12 09:54:03 +00007796 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007797LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007798cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007799/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007800
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007801/* Override any GCC internal prototype to avoid an error.
7802 Use char because int might match the return type of a GCC
7803 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007804#ifdef __cplusplus
7805extern "C"
7806#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007807char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007808int
7809main ()
7810{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007811return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007812 ;
7813 return 0;
7814}
7815_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007816if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007817 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007818else
Matthias Kloseb9621712010-04-24 17:59:49 +00007819 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007820fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007821rm -f core conftest.err conftest.$ac_objext \
7822 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007823LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007824fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007825{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
7826$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
7827if test "x$ac_cv_lib_dld_shl_load" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007828 cat >>confdefs.h <<_ACEOF
7829#define HAVE_LIBDLD 1
7830_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007831
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007832 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007833
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007834fi
7835 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00007836
Georg Brandlb1441c72009-01-03 22:33:39 +00007837# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00007838if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007839 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
7840$as_echo_n "checking for library containing sem_init... " >&6; }
7841if test "${ac_cv_search_sem_init+set}" = set; then :
7842 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007843else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00007844 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007845cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007846/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007847
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007848/* Override any GCC internal prototype to avoid an error.
7849 Use char because int might match the return type of a GCC
7850 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007851#ifdef __cplusplus
7852extern "C"
7853#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007854char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007855int
7856main ()
7857{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007858return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007859 ;
7860 return 0;
7861}
7862_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007863for ac_lib in '' pthread rt posix4; do
7864 if test -z "$ac_lib"; then
7865 ac_res="none required"
7866 else
7867 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007868 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007869 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007870 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007871 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007872fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007873rm -f core conftest.err conftest.$ac_objext \
7874 conftest$ac_exeext
7875 if test "${ac_cv_search_sem_init+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007876 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007877fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007878done
Matthias Kloseb9621712010-04-24 17:59:49 +00007879if test "${ac_cv_search_sem_init+set}" = set; then :
7880
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007881else
7882 ac_cv_search_sem_init=no
7883fi
7884rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00007885LIBS=$ac_func_search_save_LIBS
7886fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007887{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
7888$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007889ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00007890if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007891 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007892
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007893fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00007894 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00007895 # posix4 on Solaris 2.6
7896 # pthread (first!) on Linux
7897fi
7898
Martin v. Löwis19d17342003-06-14 21:03:05 +00007899# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00007900{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
7901$as_echo_n "checking for textdomain in -lintl... " >&6; }
7902if test "${ac_cv_lib_intl_textdomain+set}" = set; then :
7903 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00007904else
7905 ac_check_lib_save_LIBS=$LIBS
7906LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007907cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007908/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00007909
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007910/* Override any GCC internal prototype to avoid an error.
7911 Use char because int might match the return type of a GCC
7912 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00007913#ifdef __cplusplus
7914extern "C"
7915#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00007916char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00007917int
7918main ()
7919{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007920return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00007921 ;
7922 return 0;
7923}
7924_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007925if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00007926 ac_cv_lib_intl_textdomain=yes
7927else
Matthias Kloseb9621712010-04-24 17:59:49 +00007928 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00007929fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007930rm -f core conftest.err conftest.$ac_objext \
7931 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00007932LIBS=$ac_check_lib_save_LIBS
7933fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007934{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
7935$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
7936if test "x$ac_cv_lib_intl_textdomain" = x""yes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00007937
Matthias Kloseb9621712010-04-24 17:59:49 +00007938$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00007939
Brett Cannonc6d936e2009-06-07 20:09:53 +00007940 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00007941fi
7942
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007943
7944# checks for system dependent C++ extensions support
7945case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00007946 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
7947$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
7948 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007949/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007950
7951 #include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007952int
7953main ()
7954{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007955loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00007956 ;
7957 return 0;
7958}
Matthias Kloseb159a552010-04-25 21:00:44 +00007959
Martin v. Löwis11437992002-04-12 09:54:03 +00007960_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007961if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007962
Matthias Kloseb159a552010-04-25 21:00:44 +00007963
Matthias Kloseb9621712010-04-24 17:59:49 +00007964$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007965
Matthias Kloseb159a552010-04-25 21:00:44 +00007966 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007967$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00007968
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007969else
Matthias Kloseb159a552010-04-25 21:00:44 +00007970
7971 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007972$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00007973
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007974fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007975rm -f core conftest.err conftest.$ac_objext \
7976 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007977 *) ;;
7978esac
7979
Guido van Rossum70c7f481998-03-26 18:44:10 +00007980# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00007981{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
7982$as_echo_n "checking for t_open in -lnsl... " >&6; }
7983if test "${ac_cv_lib_nsl_t_open+set}" = set; then :
7984 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007985else
Martin v. Löwis11437992002-04-12 09:54:03 +00007986 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007987LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007988cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007989/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007990
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007991/* Override any GCC internal prototype to avoid an error.
7992 Use char because int might match the return type of a GCC
7993 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007994#ifdef __cplusplus
7995extern "C"
7996#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007997char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007998int
7999main ()
8000{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008001return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008002 ;
8003 return 0;
8004}
8005_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008006if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008007 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008008else
Matthias Kloseb9621712010-04-24 17:59:49 +00008009 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008010fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008011rm -f core conftest.err conftest.$ac_objext \
8012 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008013LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008014fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008015{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
8016$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
8017if test "x$ac_cv_lib_nsl_t_open" = x""yes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008018 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008019fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00008020 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00008021{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
8022$as_echo_n "checking for socket in -lsocket... " >&6; }
8023if test "${ac_cv_lib_socket_socket+set}" = set; then :
8024 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008025else
Martin v. Löwis11437992002-04-12 09:54:03 +00008026 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008027LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008028cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008029/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008030
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008031/* Override any GCC internal prototype to avoid an error.
8032 Use char because int might match the return type of a GCC
8033 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008034#ifdef __cplusplus
8035extern "C"
8036#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008037char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008038int
8039main ()
8040{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008041return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008042 ;
8043 return 0;
8044}
8045_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008046if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008047 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008048else
Matthias Kloseb9621712010-04-24 17:59:49 +00008049 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008050fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008051rm -f core conftest.err conftest.$ac_objext \
8052 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008053LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008054fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008055{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
8056$as_echo "$ac_cv_lib_socket_socket" >&6; }
8057if test "x$ac_cv_lib_socket_socket" = x""yes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00008058 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00008059fi
8060 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00008061
Matthias Kloseb9621712010-04-24 17:59:49 +00008062{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
8063$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008064
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008065# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008066if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008067 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00008068{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8069$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00008070LIBS="$withval $LIBS"
8071
8072else
Matthias Kloseb9621712010-04-24 17:59:49 +00008073 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8074$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008075fi
8076
Guido van Rossum7f43da71994-08-01 12:15:30 +00008077
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008078if test -n "$ac_tool_prefix"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008079 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
8080set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008081{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8082$as_echo_n "checking for $ac_word... " >&6; }
8083if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
8084 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008085else
8086 case $PKG_CONFIG in
8087 [\\/]* | ?:[\\/]*)
8088 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8089 ;;
8090 *)
8091 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8092for as_dir in $PATH
8093do
8094 IFS=$as_save_IFS
8095 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008096 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Petersond78735d2010-01-01 16:04:23 +00008097 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8098 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008099 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008100 break 2
8101 fi
8102done
Matthias Kloseb9621712010-04-24 17:59:49 +00008103 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008104IFS=$as_save_IFS
8105
8106 ;;
8107esac
8108fi
8109PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8110if test -n "$PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008111 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8112$as_echo "$PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008113else
Matthias Kloseb9621712010-04-24 17:59:49 +00008114 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8115$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008116fi
8117
8118
8119fi
8120if test -z "$ac_cv_path_PKG_CONFIG"; then
8121 ac_pt_PKG_CONFIG=$PKG_CONFIG
8122 # Extract the first word of "pkg-config", so it can be a program name with args.
8123set dummy pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008124{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8125$as_echo_n "checking for $ac_word... " >&6; }
8126if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then :
8127 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008128else
8129 case $ac_pt_PKG_CONFIG in
8130 [\\/]* | ?:[\\/]*)
8131 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
8132 ;;
8133 *)
8134 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8135for as_dir in $PATH
8136do
8137 IFS=$as_save_IFS
8138 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008139 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Petersond78735d2010-01-01 16:04:23 +00008140 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8141 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008142 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008143 break 2
8144 fi
8145done
Matthias Kloseb9621712010-04-24 17:59:49 +00008146 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008147IFS=$as_save_IFS
8148
8149 ;;
8150esac
8151fi
8152ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
8153if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008154 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
8155$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008156else
Matthias Kloseb9621712010-04-24 17:59:49 +00008157 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8158$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008159fi
8160
8161 if test "x$ac_pt_PKG_CONFIG" = x; then
8162 PKG_CONFIG=""
8163 else
8164 case $cross_compiling:$ac_tool_warned in
8165yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00008166{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8167$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Petersond78735d2010-01-01 16:04:23 +00008168ac_tool_warned=yes ;;
8169esac
8170 PKG_CONFIG=$ac_pt_PKG_CONFIG
8171 fi
8172else
8173 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
8174fi
8175
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008176
8177# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00008178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
8179$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008180
8181# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008182if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008183 withval=$with_system_expat;
8184fi
8185
8186
Matthias Kloseb9621712010-04-24 17:59:49 +00008187{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
8188$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008189
8190# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00008191{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
8192$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008193
8194# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008195if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008196 withval=$with_system_ffi;
8197fi
8198
8199
8200if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008201 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
8202else
8203 LIBFFI_INCLUDEDIR=""
8204fi
8205
8206
Matthias Kloseb9621712010-04-24 17:59:49 +00008207{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
8208$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008209
Matthias Klose55708cc2009-04-30 08:06:49 +00008210# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +00008211{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
8212$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008213
8214# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008215if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +00008216 withval=$with_dbmliborder;
8217if test x$with_dbmliborder = xyes
8218then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00008219as_fn_error "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008220else
8221 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
8222 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
8223 then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00008224 as_fn_error "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008225 fi
8226 done
8227fi
8228fi
8229
Matthias Kloseb9621712010-04-24 17:59:49 +00008230{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
8231$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008232
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00008233# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008234
8235
Matthias Kloseb9621712010-04-24 17:59:49 +00008236{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
8237$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008238
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008239# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008240if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008241 withval=$with_signal_module;
8242fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008243
8244
8245if test -z "$with_signal_module"
8246then with_signal_module="yes"
8247fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008248{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
8249$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008250
8251if test "${with_signal_module}" = "yes"; then
8252 USE_SIGNAL_MODULE=""
8253 SIGNAL_OBJS=""
8254else
8255 USE_SIGNAL_MODULE="#"
8256 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
8257fi
8258
Guido van Rossum3d15bd82001-01-10 18:53:48 +00008259# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00008260
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008261USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00008262
Matthias Kloseb9621712010-04-24 17:59:49 +00008263{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dec-threads" >&5
8264$as_echo_n "checking for --with-dec-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008265
Guido van Rossumec2f0731997-01-22 20:54:01 +00008266
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008267# Check whether --with-dec-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008268if test "${with_dec_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008269 withval=$with_dec_threads;
Matthias Kloseb9621712010-04-24 17:59:49 +00008270{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8271$as_echo "$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +00008272LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00008273if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00008274 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00008275fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008276else
Matthias Kloseb9621712010-04-24 17:59:49 +00008277 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8278$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008279fi
8280
Martin v. Löwis11437992002-04-12 09:54:03 +00008281
8282# Templates for things AC_DEFINEd more than once.
8283# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00008284
8285
Martin v. Löwis11437992002-04-12 09:54:03 +00008286
8287
Matthias Kloseb9621712010-04-24 17:59:49 +00008288{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
8289$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008290
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008291# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008292if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008293 withval=$with_threads;
8294fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008295
8296
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008297# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00008298
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008299# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008300if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008301 withval=$with_thread; with_threads=$with_thread
8302fi
8303
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008304
8305if test -z "$with_threads"
8306then with_threads="yes"
8307fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008308{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
8309$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008310
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008311
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008312if test "$with_threads" = "no"
8313then
8314 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008315elif test "$ac_cv_pthread_is_default" = yes
8316then
Matthias Kloseb9621712010-04-24 17:59:49 +00008317 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008318
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008319 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +00008320 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008321
8322 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00008323 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008324elif test "$ac_cv_kpthread" = "yes"
8325then
8326 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008327 if test "$ac_cv_cxx_thread" = "yes"; then
8328 CXX="$CXX -Kpthread"
8329 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008330 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00008331
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008332 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008333 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008334elif test "$ac_cv_kthread" = "yes"
8335then
8336 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008337 if test "$ac_cv_cxx_thread" = "yes"; then
8338 CXX="$CXX -Kthread"
8339 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008340 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008341
8342 posix_threads=yes
8343 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008344elif test "$ac_cv_pthread" = "yes"
8345then
8346 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008347 if test "$ac_cv_cxx_thread" = "yes"; then
8348 CXX="$CXX -pthread"
8349 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008350 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008351
8352 posix_threads=yes
8353 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008354else
8355 if test ! -z "$with_threads" -a -d "$with_threads"
8356 then LDFLAGS="$LDFLAGS -L$with_threads"
8357 fi
8358 if test ! -z "$withval" -a -d "$withval"
8359 then LDFLAGS="$LDFLAGS -L$withval"
8360 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008361
8362 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00008363 # define _POSIX_THREADS in unistd.h. Some apparently don't
8364 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +00008365 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
8366$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
8367 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008368/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008369
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008370#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008371#ifdef _POSIX_THREADS
8372yes
8373#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008374
8375_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008376if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008377 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008378 unistd_defines_pthreads=yes
8379else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008380 unistd_defines_pthreads=no
8381fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008382rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008383
Matthias Kloseb9621712010-04-24 17:59:49 +00008384 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
8385$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008386
Matthias Kloseb9621712010-04-24 17:59:49 +00008387 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00008388
Matthias Kloseb9621712010-04-24 17:59:49 +00008389 ac_fn_c_check_header_mongrel "$LINENO" "cthreads.h" "ac_cv_header_cthreads_h" "$ac_includes_default"
8390if test "x$ac_cv_header_cthreads_h" = x""yes; then :
8391 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008392
Matthias Kloseb9621712010-04-24 17:59:49 +00008393 $as_echo "#define C_THREADS 1" >>confdefs.h
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008394
Martin v. Löwis11437992002-04-12 09:54:03 +00008395
Matthias Kloseb9621712010-04-24 17:59:49 +00008396$as_echo "#define HURD_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008397
8398 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008399 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008400else
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008401
Matthias Kloseb9621712010-04-24 17:59:49 +00008402 ac_fn_c_check_header_mongrel "$LINENO" "mach/cthreads.h" "ac_cv_header_mach_cthreads_h" "$ac_includes_default"
8403if test "x$ac_cv_header_mach_cthreads_h" = x""yes; then :
8404 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008405
Matthias Kloseb9621712010-04-24 17:59:49 +00008406 $as_echo "#define C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008407
Martin v. Löwis11437992002-04-12 09:54:03 +00008408
Matthias Kloseb9621712010-04-24 17:59:49 +00008409$as_echo "#define MACH_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008410
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008411 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008412else
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008413
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008414 # Just looking for pthread_create in libpthread is not enough:
8415 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
8416 # So we really have to include pthread.h, and then link.
8417 _libs=$LIBS
8418 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00008419 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
8420$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
8421 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008422/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008423#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00008424
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008425void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00008426int
8427main ()
8428{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008429
8430pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00008431 ;
8432 return 0;
8433}
8434_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008435if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008436
Matthias Kloseb9621712010-04-24 17:59:49 +00008437 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8438$as_echo "yes" >&6; }
8439 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00008440
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008441 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008442 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00008443else
Martin v. Löwis11437992002-04-12 09:54:03 +00008444
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008445 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +00008446 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
8447if test "x$ac_cv_func_pthread_detach" = x""yes; then :
8448 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00008449
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008450 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008451 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00008452else
Guido van Rossumad678af1998-10-02 14:42:15 +00008453
Matthias Kloseb9621712010-04-24 17:59:49 +00008454 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
8455$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
8456if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then :
8457 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008458else
Martin v. Löwis11437992002-04-12 09:54:03 +00008459 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008460LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008461cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008462/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008463
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008464/* Override any GCC internal prototype to avoid an error.
8465 Use char because int might match the return type of a GCC
8466 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008467#ifdef __cplusplus
8468extern "C"
8469#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008470char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008471int
8472main ()
8473{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008474return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008475 ;
8476 return 0;
8477}
8478_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008479if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008480 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00008481else
Matthias Kloseb9621712010-04-24 17:59:49 +00008482 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00008483fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008484rm -f core conftest.err conftest.$ac_objext \
8485 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008486LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008487fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008488{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
8489$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
8490if test "x$ac_cv_lib_pthreads_pthread_create" = x""yes; then :
8491 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00008492
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008493 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008494 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008495 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00008496else
Greg Steinadf63d62000-07-05 10:38:09 +00008497
Matthias Kloseb9621712010-04-24 17:59:49 +00008498 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
8499$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
8500if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then :
8501 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00008502else
Martin v. Löwis11437992002-04-12 09:54:03 +00008503 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008504LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008505cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008506/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008507
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008508/* Override any GCC internal prototype to avoid an error.
8509 Use char because int might match the return type of a GCC
8510 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008511#ifdef __cplusplus
8512extern "C"
8513#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008514char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008515int
8516main ()
8517{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008518return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008519 ;
8520 return 0;
8521}
8522_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008523if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008524 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00008525else
Matthias Kloseb9621712010-04-24 17:59:49 +00008526 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00008527fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008528rm -f core conftest.err conftest.$ac_objext \
8529 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008530LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00008531fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008532{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
8533$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
8534if test "x$ac_cv_lib_c_r_pthread_create" = x""yes; then :
8535 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00008536
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008537 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008538 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008539 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008540else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008541
Matthias Kloseb9621712010-04-24 17:59:49 +00008542 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
8543$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
8544if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then :
8545 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008546else
Martin v. Löwis11437992002-04-12 09:54:03 +00008547 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008548LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008549cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008550/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008551
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008552/* Override any GCC internal prototype to avoid an error.
8553 Use char because int might match the return type of a GCC
8554 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008555#ifdef __cplusplus
8556extern "C"
8557#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008558char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008559int
8560main ()
8561{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008562return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008563 ;
8564 return 0;
8565}
8566_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008567if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008568 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008569else
Matthias Kloseb9621712010-04-24 17:59:49 +00008570 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008571fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008572rm -f core conftest.err conftest.$ac_objext \
8573 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008574LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008575fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008576{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
8577$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
8578if test "x$ac_cv_lib_pthread___pthread_create_system" = x""yes; then :
8579 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008580
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008581 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008582 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008583 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008584else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008585
Matthias Kloseb9621712010-04-24 17:59:49 +00008586 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
8587$as_echo_n "checking for pthread_create in -lcma... " >&6; }
8588if test "${ac_cv_lib_cma_pthread_create+set}" = set; then :
8589 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00008590else
Martin v. Löwis11437992002-04-12 09:54:03 +00008591 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008592LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008593cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008594/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008595
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008596/* Override any GCC internal prototype to avoid an error.
8597 Use char because int might match the return type of a GCC
8598 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008599#ifdef __cplusplus
8600extern "C"
8601#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008602char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008603int
8604main ()
8605{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008606return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008607 ;
8608 return 0;
8609}
8610_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008611if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008612 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00008613else
Matthias Kloseb9621712010-04-24 17:59:49 +00008614 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00008615fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008616rm -f core conftest.err conftest.$ac_objext \
8617 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008618LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008619fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008620{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
8621$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
8622if test "x$ac_cv_lib_cma_pthread_create" = x""yes; then :
8623 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00008624
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008625 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008626 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008627 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00008628else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00008629
Martin v. Löwis130fb172001-07-19 11:00:41 +00008630 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00008631fi
8632
Guido van Rossum627b2d71993-12-24 10:39:16 +00008633
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008634fi
8635
Guido van Rossum0be3e491997-05-22 20:33:33 +00008636fi
8637
Guido van Rossum49545951997-12-02 19:28:29 +00008638fi
8639
Guido van Rossumb93a8621998-05-07 13:27:32 +00008640fi
8641
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008642fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008643rm -f core conftest.err conftest.$ac_objext \
8644 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008645fi
8646
Martin v. Löwis11437992002-04-12 09:54:03 +00008647
8648fi
8649
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008650
Michael W. Hudson54241132001-12-07 15:38:26 +00008651
Matthias Kloseb9621712010-04-24 17:59:49 +00008652 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
8653$as_echo_n "checking for usconfig in -lmpc... " >&6; }
8654if test "${ac_cv_lib_mpc_usconfig+set}" = set; then :
8655 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008656else
Martin v. Löwis11437992002-04-12 09:54:03 +00008657 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008658LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008659cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008660/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008661
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008662/* Override any GCC internal prototype to avoid an error.
8663 Use char because int might match the return type of a GCC
8664 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008665#ifdef __cplusplus
8666extern "C"
8667#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008668char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008669int
8670main ()
8671{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008672return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008673 ;
8674 return 0;
8675}
8676_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008677if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008678 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008679else
Matthias Kloseb9621712010-04-24 17:59:49 +00008680 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008681fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008682rm -f core conftest.err conftest.$ac_objext \
8683 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008684LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008685fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008686{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
8687$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
8688if test "x$ac_cv_lib_mpc_usconfig" = x""yes; then :
8689 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008690
Martin v. Löwis130fb172001-07-19 11:00:41 +00008691 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008692 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008693 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008694fi
8695
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008696
Neal Norwitza978ab02002-11-02 16:58:05 +00008697 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008698 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
8699$as_echo_n "checking for thr_create in -lthread... " >&6; }
8700if test "${ac_cv_lib_thread_thr_create+set}" = set; then :
8701 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008702else
Martin v. Löwis11437992002-04-12 09:54:03 +00008703 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008704LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008705cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008706/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008707
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008708/* Override any GCC internal prototype to avoid an error.
8709 Use char because int might match the return type of a GCC
8710 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008711#ifdef __cplusplus
8712extern "C"
8713#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008714char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008715int
8716main ()
8717{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008718return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008719 ;
8720 return 0;
8721}
8722_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008723if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008724 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008725else
Matthias Kloseb9621712010-04-24 17:59:49 +00008726 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008727fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008728rm -f core conftest.err conftest.$ac_objext \
8729 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008730LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008731fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008732{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
8733$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
8734if test "x$ac_cv_lib_thread_thr_create" = x""yes; then :
8735 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008736
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008737 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008738 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008739 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008740fi
8741
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008742 fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008743
Martin v. Löwis130fb172001-07-19 11:00:41 +00008744 if test "$USE_THREAD_MODULE" != "#"
8745 then
8746 # If the above checks didn't disable threads, (at least) OSF1
8747 # needs this '-threads' argument during linking.
8748 case $ac_sys_system in
8749 OSF1) LDLAST=-threads;;
8750 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +00008751 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008752fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008753
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008754if test "$posix_threads" = "yes"; then
8755 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008756
Matthias Kloseb9621712010-04-24 17:59:49 +00008757$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008758
8759 fi
8760
8761 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
8762 case $ac_sys_system/$ac_sys_release in
8763 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +00008764$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008765
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008766 ;;
8767 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +00008768$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008769
8770 ;;
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00008771 AIX/5)
Matthias Kloseb9621712010-04-24 17:59:49 +00008772$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00008773
8774 ;;
Antoine Pitrou33a29942010-08-30 14:52:00 +00008775 AIX/6)
8776$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
8777
8778 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008779 esac
8780
Matthias Kloseb9621712010-04-24 17:59:49 +00008781 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
8782$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
8783 if test "${ac_cv_pthread_system_supported+set}" = set; then :
8784 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008785else
Matthias Kloseb9621712010-04-24 17:59:49 +00008786 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008787 ac_cv_pthread_system_supported=no
8788else
Matthias Kloseb9621712010-04-24 17:59:49 +00008789 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008790/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008791#include <pthread.h>
8792 void *foo(void *parm) {
8793 return NULL;
8794 }
8795 main() {
8796 pthread_attr_t attr;
8797 pthread_t id;
8798 if (pthread_attr_init(&attr)) exit(-1);
8799 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
8800 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
8801 exit(0);
8802 }
8803_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008804if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008805 ac_cv_pthread_system_supported=yes
8806else
Matthias Kloseb9621712010-04-24 17:59:49 +00008807 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008808fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008809rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8810 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008811fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008812
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008813
Guido van Rossum627b2d71993-12-24 10:39:16 +00008814fi
8815
Matthias Kloseb9621712010-04-24 17:59:49 +00008816 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
8817$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008818 if test "$ac_cv_pthread_system_supported" = "yes"; then
8819
Matthias Kloseb9621712010-04-24 17:59:49 +00008820$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008821
8822 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008823 for ac_func in pthread_sigmask
8824do :
8825 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
8826if test "x$ac_cv_func_pthread_sigmask" = x""yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008827 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008828#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008829_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +00008830 case $ac_sys_system in
8831 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008832
Matthias Kloseb9621712010-04-24 17:59:49 +00008833$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +00008834
8835 ;;
8836 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008837fi
8838done
8839
8840fi
8841
8842
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008843# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +00008844
Matthias Kloseb9621712010-04-24 17:59:49 +00008845{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
8846$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008847# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008848if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008849 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008850 no)
Matthias Kloseb9621712010-04-24 17:59:49 +00008851 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8852$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008853 ipv6=no
8854 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00008855 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8856$as_echo "yes" >&6; }
8857 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008858
8859 ipv6=yes
8860 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008861 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008862else
Martin v. Löwis11437992002-04-12 09:54:03 +00008863
Matthias Kloseb9621712010-04-24 17:59:49 +00008864 if test "$cross_compiling" = yes; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008865
Matthias Kloseb9621712010-04-24 17:59:49 +00008866 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8867$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008868 ipv6=no
8869
8870else
Matthias Kloseb9621712010-04-24 17:59:49 +00008871 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008872/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008873 /* AF_INET6 available check */
8874#include <sys/types.h>
8875#include <sys/socket.h>
8876main()
8877{
8878 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
8879 exit(1);
8880 else
8881 exit(0);
8882}
8883
Martin v. Löwis11437992002-04-12 09:54:03 +00008884_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008885if ac_fn_c_try_run "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008886
Matthias Kloseb9621712010-04-24 17:59:49 +00008887 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8888$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008889 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +00008890
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008891else
Matthias Kloseb159a552010-04-25 21:00:44 +00008892
Matthias Kloseb9621712010-04-24 17:59:49 +00008893 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8894$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008895 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +00008896
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008897fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008898rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8899 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008900fi
8901
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008902
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008903if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008904 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
8905$as_echo_n "checking if RFC2553 API is available... " >&6; }
8906 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008907/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008908
8909 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008910#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008911int
8912main ()
8913{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008914struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +00008915 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +00008916 ;
8917 return 0;
8918}
Matthias Kloseb159a552010-04-25 21:00:44 +00008919
Martin v. Löwis11437992002-04-12 09:54:03 +00008920_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008921if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008922
8923 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008924$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008925 ipv6=yes
8926
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008927else
Matthias Kloseb159a552010-04-25 21:00:44 +00008928
8929 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008930$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008931 ipv6=no
8932
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008933fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008934rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008935fi
8936
8937if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008938 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008939
8940fi
8941
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008942fi
8943
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008944
8945ipv6type=unknown
8946ipv6lib=none
8947ipv6trylibc=no
8948
8949if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008950 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
8951$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +00008952 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
8953 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008954 case $i in
8955 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +00008956 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008957/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008958
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008959#include <netinet/in.h>
8960#ifdef IPV6_INRIA_VERSION
8961yes
8962#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008963_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008964if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008965 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00008966 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008967fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008968rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008969
8970 ;;
8971 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +00008972 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008973/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008974
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008975#include <netinet/in.h>
8976#ifdef __KAME__
8977yes
8978#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008979_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008980if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008981 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008982 ipv6type=$i;
8983 ipv6lib=inet6
8984 ipv6libdir=/usr/local/v6/lib
8985 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008986fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008987rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008988
8989 ;;
8990 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +00008991 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008992/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008993
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008994#include <features.h>
8995#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
8996yes
8997#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008998_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008999if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009000 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009001 ipv6type=$i;
9002 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009003fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009004rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009005
9006 ;;
9007 linux-inet6)
9008 if test -d /usr/inet6; then
9009 ipv6type=$i
9010 ipv6lib=inet6
9011 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +00009012 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009013 fi
9014 ;;
9015 solaris)
9016 if test -f /etc/netconfig; then
9017 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
9018 ipv6type=$i
9019 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009020 fi
9021 fi
9022 ;;
9023 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +00009024 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009025/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009026
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009027#include <sys/param.h>
9028#ifdef _TOSHIBA_INET6
9029yes
9030#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009031_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009032if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009033 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009034 ipv6type=$i;
9035 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009036 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009037fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009038rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009039
9040 ;;
9041 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +00009042 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009043/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009044
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009045#include </usr/local/v6/include/sys/v6config.h>
9046#ifdef __V6D__
9047yes
9048#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009049_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009050if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009051 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009052 ipv6type=$i;
9053 ipv6lib=v6;
9054 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +00009055 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009056fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009057rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009058
9059 ;;
9060 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +00009061 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009062/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009063
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009064#include <sys/param.h>
9065#ifdef _ZETA_MINAMI_INET6
9066yes
9067#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009068_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009069if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009070 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009071 ipv6type=$i;
9072 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009073 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009074fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009075rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009076
9077 ;;
9078 esac
9079 if test "$ipv6type" != "unknown"; then
9080 break
9081 fi
9082 done
Matthias Kloseb9621712010-04-24 17:59:49 +00009083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
9084$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009085fi
9086
9087if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
9088 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
9089 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
9090 echo "using lib$ipv6lib"
9091 else
9092 if test $ipv6trylibc = "yes"; then
9093 echo "using libc"
9094 else
9095 echo 'Fatal: no $ipv6lib library found. cannot continue.'
9096 echo "You need to fetch lib$ipv6lib.a from appropriate"
9097 echo 'ipv6 kit and compile beforehand.'
9098 exit 1
9099 fi
9100 fi
9101fi
9102
Matthias Kloseb9621712010-04-24 17:59:49 +00009103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
9104$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
9105cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009106/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009107
9108 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009109int
9110main ()
9111{
9112FSIORefNum fRef = 0
9113 ;
9114 return 0;
9115}
Matthias Kloseb159a552010-04-25 21:00:44 +00009116
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009117_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009118if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009119
Matthias Kloseb159a552010-04-25 21:00:44 +00009120
Matthias Kloseb9621712010-04-24 17:59:49 +00009121$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009122
Matthias Kloseb9621712010-04-24 17:59:49 +00009123 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9124$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009125
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009126else
Matthias Kloseb159a552010-04-25 21:00:44 +00009127
Matthias Kloseb9621712010-04-24 17:59:49 +00009128 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9129$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009130
9131fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009132rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9133
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009134# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +00009135{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
9136$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009137
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009138# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009139if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009140 withval=$with_doc_strings;
9141fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009142
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009143
9144if test -z "$with_doc_strings"
9145then with_doc_strings="yes"
9146fi
9147if test "$with_doc_strings" != "no"
9148then
9149
Matthias Kloseb9621712010-04-24 17:59:49 +00009150$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009151
9152fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009153{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
9154$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009155
Antoine Pitrou042b1282010-08-13 21:15:58 +00009156# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +00009157{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
9158$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009159
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009160# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009161if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009162 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009163if test "$withval" != no
9164then
9165
Matthias Kloseb9621712010-04-24 17:59:49 +00009166$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009167
Matthias Kloseb9621712010-04-24 17:59:49 +00009168 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9169$as_echo "yes" >&6; }
9170else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9171$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009172fi
9173else
Matthias Kloseb9621712010-04-24 17:59:49 +00009174 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9175$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009176fi
9177
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009178
9179# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +00009180{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
9181$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009182
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009183# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009184if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009185 withval=$with_pymalloc;
9186fi
Michael W. Hudson54241132001-12-07 15:38:26 +00009187
Neil Schemenauera35c6882001-02-27 04:45:05 +00009188
Neil Schemenauer16c22972002-03-22 15:34:49 +00009189if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00009190then
9191 with_pymalloc="yes"
9192 SOABI_QUALIFIERS="${SOABI_QUALIFIERS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +00009193fi
9194if test "$with_pymalloc" != "no"
9195then
Martin v. Löwis11437992002-04-12 09:54:03 +00009196
Matthias Kloseb9621712010-04-24 17:59:49 +00009197$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +00009198
9199fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009200{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
9201$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +00009202
Benjamin Peterson05159c42009-12-03 03:01:27 +00009203# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +00009204{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
9205$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009206
9207# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009208if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009209 withval=$with_valgrind;
9210else
9211 with_valgrind=no
9212fi
9213
Matthias Kloseb9621712010-04-24 17:59:49 +00009214{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
9215$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009216if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009217 ac_fn_c_check_header_mongrel "$LINENO" "valgrind/valgrind.h" "ac_cv_header_valgrind_valgrind_h" "$ac_includes_default"
9218if test "x$ac_cv_header_valgrind_valgrind_h" = x""yes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009219
Matthias Kloseb9621712010-04-24 17:59:49 +00009220$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +00009221
9222else
Benjamin Petersond7f73e92010-09-05 00:09:07 +00009223 as_fn_error "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +00009224
9225fi
9226
9227
Jeffrey Yasskin39370832010-05-03 19:29:34 +00009228 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +00009229fi
9230
Barry Warsawef82cd72000-06-30 16:21:01 +00009231# Check for --with-wctype-functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009232{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-wctype-functions" >&5
9233$as_echo_n "checking for --with-wctype-functions... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009234
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009235# Check whether --with-wctype-functions was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009236if test "${with_wctype_functions+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009237 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +00009238if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +00009239then
9240
Matthias Kloseb9621712010-04-24 17:59:49 +00009241$as_echo "#define WANT_WCTYPE_FUNCTIONS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009242
Matthias Kloseb9621712010-04-24 17:59:49 +00009243 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9244$as_echo "yes" >&6; }
9245else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9246$as_echo "no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +00009247fi
9248else
Matthias Kloseb9621712010-04-24 17:59:49 +00009249 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9250$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009251fi
9252
Barry Warsawef82cd72000-06-30 16:21:01 +00009253
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009254# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00009255
Guido van Rossum98935bf2001-09-05 19:13:16 +00009256DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +00009257
Guido van Rossume97ee181999-12-20 21:27:22 +00009258# the dlopen() function means we might want to use dynload_shlib.o. some
9259# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +00009260for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +00009261do :
9262 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
9263if test "x$ac_cv_func_dlopen" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009264 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009265#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009266_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +00009267
Guido van Rossume97ee181999-12-20 21:27:22 +00009268fi
Thomas Wouters3a584202000-08-05 23:28:51 +00009269done
Guido van Rossume97ee181999-12-20 21:27:22 +00009270
Michael W. Hudson54241132001-12-07 15:38:26 +00009271
Guido van Rossume97ee181999-12-20 21:27:22 +00009272# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
9273# loading of modules.
9274
Matthias Kloseb9621712010-04-24 17:59:49 +00009275{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
9276$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009277if test -z "$DYNLOADFILE"
9278then
9279 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00009280 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
9281 if test "$ac_cv_func_dlopen" = yes
9282 then DYNLOADFILE="dynload_shlib.o"
9283 else DYNLOADFILE="dynload_aix.o"
9284 fi
9285 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +00009286 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009287 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
9288 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +00009289 *)
9290 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
9291 # out any dynamic loading
9292 if test "$ac_cv_func_dlopen" = yes
9293 then DYNLOADFILE="dynload_shlib.o"
9294 else DYNLOADFILE="dynload_stub.o"
9295 fi
9296 ;;
9297 esac
9298fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009299{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
9300$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009301if test "$DYNLOADFILE" != "dynload_stub.o"
9302then
Martin v. Löwis11437992002-04-12 09:54:03 +00009303
Matthias Kloseb9621712010-04-24 17:59:49 +00009304$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +00009305
9306fi
9307
Neil Schemenauer4e425612001-06-19 15:44:15 +00009308# MACHDEP_OBJS can be set to platform-specific object files needed by Python
9309
Michael W. Hudson54241132001-12-07 15:38:26 +00009310
Matthias Kloseb9621712010-04-24 17:59:49 +00009311{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
9312$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009313if test -z "$MACHDEP_OBJS"
9314then
Jack Jansene578a632001-08-15 01:27:14 +00009315 MACHDEP_OBJS=$extra_machdep_objs
9316else
9317 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +00009318fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009319{ $as_echo "$as_me:${as_lineno-$LINENO}: result: MACHDEP_OBJS" >&5
9320$as_echo "MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009321
Guido van Rossum627b2d71993-12-24 10:39:16 +00009322# checks for library functions
Martin v. Löwis823725e2008-03-24 13:39:54 +00009323for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
9324 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +00009325 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +00009326 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Antoine Pitroub7572f02009-12-02 20:46:48 +00009327 initgroups kill killpg lchmod lchown lstat mbrtowc mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +00009328 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +00009329 putenv readlink realpath \
Benjamin Peterson965ce872009-04-05 21:24:58 +00009330 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
9331 setgid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +00009332 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setuid setvbuf \
Jean-Paul Calderone6ed7ac42010-06-19 19:58:37 +00009333 sigaction siginterrupt sigrelse snprintf strftime strlcpy \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +00009334 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Martin v. Löwis113a0852009-05-29 17:25:39 +00009335 truncate uname unsetenv utimes waitpid wait3 wait4 \
9336 wcscoll wcsftime wcsxfrm _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +00009337do :
9338 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9339ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Benjamin Petersond7f73e92010-09-05 00:09:07 +00009340eval as_val=\$$as_ac_var
9341 if test "x$as_val" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009342 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009343#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009344_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00009345
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009346fi
9347done
9348
Michael W. Hudson54241132001-12-07 15:38:26 +00009349
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009350# For some functions, having a definition is not sufficient, since
9351# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +00009352{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
9353$as_echo_n "checking for chroot... " >&6; }
9354cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009355/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009356#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009357int
9358main ()
9359{
9360void *x=chroot
9361 ;
9362 return 0;
9363}
9364_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009365if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009366
Matthias Kloseb9621712010-04-24 17:59:49 +00009367$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009368
Matthias Kloseb159a552010-04-25 21:00:44 +00009369 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009370$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009371else
Matthias Kloseb9621712010-04-24 17:59:49 +00009372 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9373$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009374
9375fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009376rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009377{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
9378$as_echo_n "checking for link... " >&6; }
9379cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009380/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009381#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009382int
9383main ()
9384{
9385void *x=link
9386 ;
9387 return 0;
9388}
9389_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009390if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009391
Matthias Kloseb9621712010-04-24 17:59:49 +00009392$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009393
Matthias Kloseb159a552010-04-25 21:00:44 +00009394 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009395$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009396else
Matthias Kloseb9621712010-04-24 17:59:49 +00009397 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9398$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009399
9400fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009401rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009402{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
9403$as_echo_n "checking for symlink... " >&6; }
9404cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009405/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009406#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009407int
9408main ()
9409{
9410void *x=symlink
9411 ;
9412 return 0;
9413}
9414_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009415if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009416
Matthias Kloseb9621712010-04-24 17:59:49 +00009417$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009418
Matthias Kloseb159a552010-04-25 21:00:44 +00009419 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009420$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009421else
Matthias Kloseb9621712010-04-24 17:59:49 +00009422 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9423$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009424
9425fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009426rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009427{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
9428$as_echo_n "checking for fchdir... " >&6; }
9429cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009430/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009431#include <unistd.h>
9432int
9433main ()
9434{
9435void *x=fchdir
9436 ;
9437 return 0;
9438}
9439_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009440if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009441
Matthias Kloseb9621712010-04-24 17:59:49 +00009442$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009443
Matthias Kloseb159a552010-04-25 21:00:44 +00009444 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009445$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009446else
Matthias Kloseb9621712010-04-24 17:59:49 +00009447 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9448$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009449
9450fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009451rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009452{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
9453$as_echo_n "checking for fsync... " >&6; }
9454cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009455/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009456#include <unistd.h>
9457int
9458main ()
9459{
9460void *x=fsync
9461 ;
9462 return 0;
9463}
9464_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009465if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009466
Matthias Kloseb9621712010-04-24 17:59:49 +00009467$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009468
Matthias Kloseb159a552010-04-25 21:00:44 +00009469 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009470$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009471else
Matthias Kloseb9621712010-04-24 17:59:49 +00009472 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9473$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009474
9475fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009476rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009477{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
9478$as_echo_n "checking for fdatasync... " >&6; }
9479cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009480/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009481#include <unistd.h>
9482int
9483main ()
9484{
9485void *x=fdatasync
9486 ;
9487 return 0;
9488}
9489_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009490if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009491
Matthias Kloseb9621712010-04-24 17:59:49 +00009492$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009493
Matthias Kloseb159a552010-04-25 21:00:44 +00009494 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009495$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009496else
Matthias Kloseb9621712010-04-24 17:59:49 +00009497 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9498$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009499
9500fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009501rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009502{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
9503$as_echo_n "checking for epoll... " >&6; }
9504cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009505/* end confdefs.h. */
9506#include <sys/epoll.h>
9507int
9508main ()
9509{
9510void *x=epoll_create
9511 ;
9512 return 0;
9513}
9514_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009515if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009516
Matthias Kloseb9621712010-04-24 17:59:49 +00009517$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009518
Matthias Kloseb159a552010-04-25 21:00:44 +00009519 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009520$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009521else
Matthias Kloseb9621712010-04-24 17:59:49 +00009522 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9523$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009524
9525fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009526rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009527{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
9528$as_echo_n "checking for kqueue... " >&6; }
9529cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009530/* end confdefs.h. */
9531
9532#include <sys/types.h>
9533#include <sys/event.h>
9534
9535int
9536main ()
9537{
9538int x=kqueue()
9539 ;
9540 return 0;
9541}
9542_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009543if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009544
Matthias Kloseb9621712010-04-24 17:59:49 +00009545$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009546
Matthias Kloseb159a552010-04-25 21:00:44 +00009547 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009548$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009549else
Matthias Kloseb9621712010-04-24 17:59:49 +00009550 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9551$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009552
9553fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009554rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +00009555# On some systems (eg. FreeBSD 5), we would find a definition of the
9556# functions ctermid_r, setgroups in the library, but no prototype
9557# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
9558# address to avoid compiler warnings and potential miscompilations
9559# because of the missing prototypes.
9560
Matthias Kloseb9621712010-04-24 17:59:49 +00009561{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
9562$as_echo_n "checking for ctermid_r... " >&6; }
9563cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009564/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +00009565
Martin v. Löwisd5843682002-11-21 20:41:28 +00009566#include <stdio.h>
9567
Martin v. Löwisd5843682002-11-21 20:41:28 +00009568int
9569main ()
9570{
9571void* p = ctermid_r
9572 ;
9573 return 0;
9574}
9575_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009576if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +00009577
Matthias Kloseb9621712010-04-24 17:59:49 +00009578$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +00009579
Matthias Kloseb159a552010-04-25 21:00:44 +00009580 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009581$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009582else
Matthias Kloseb9621712010-04-24 17:59:49 +00009583 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9584$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009585
9586fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009587rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9588
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009589{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
9590$as_echo_n "checking for flock declaration... " >&6; }
9591if test "${ac_cv_flock_decl+set}" = set; then :
9592 $as_echo_n "(cached) " >&6
9593else
9594 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009595/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009596#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009597int
9598main ()
9599{
9600void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009601
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009602 ;
9603 return 0;
9604}
9605_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009606if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009607 ac_cv_flock_decl=yes
9608else
9609 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009610
9611fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009612rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +00009613
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009614fi
9615{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
9616$as_echo "$ac_cv_flock_decl" >&6; }
9617if test "x${ac_cv_flock_decl}" = xyes; then
9618 for ac_func in flock
9619do :
9620 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
9621if test "x$ac_cv_func_flock" = x""yes; then :
9622 cat >>confdefs.h <<_ACEOF
9623#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +00009624_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009625
Antoine Pitroua3000072010-09-07 14:52:42 +00009626else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009627 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +00009628$as_echo_n "checking for flock in -lbsd... " >&6; }
9629if test "${ac_cv_lib_bsd_flock+set}" = set; then :
9630 $as_echo_n "(cached) " >&6
9631else
9632 ac_check_lib_save_LIBS=$LIBS
9633LIBS="-lbsd $LIBS"
9634cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9635/* end confdefs.h. */
9636
9637/* Override any GCC internal prototype to avoid an error.
9638 Use char because int might match the return type of a GCC
9639 builtin and then its argument prototype would still apply. */
9640#ifdef __cplusplus
9641extern "C"
9642#endif
9643char flock ();
9644int
9645main ()
9646{
9647return flock ();
9648 ;
9649 return 0;
9650}
9651_ACEOF
9652if ac_fn_c_try_link "$LINENO"; then :
9653 ac_cv_lib_bsd_flock=yes
9654else
9655 ac_cv_lib_bsd_flock=no
9656fi
9657rm -f core conftest.err conftest.$ac_objext \
9658 conftest$ac_exeext conftest.$ac_ext
9659LIBS=$ac_check_lib_save_LIBS
9660fi
9661{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
9662$as_echo "$ac_cv_lib_bsd_flock" >&6; }
9663if test "x$ac_cv_lib_bsd_flock" = x""yes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009664 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +00009665
9666
9667$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
9668
9669
9670fi
9671
9672
9673fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009674done
9675
Antoine Pitroua3000072010-09-07 14:52:42 +00009676fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009677
Matthias Kloseb9621712010-04-24 17:59:49 +00009678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
9679$as_echo_n "checking for getpagesize... " >&6; }
9680cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009681/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009682
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009683#include <unistd.h>
9684
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009685int
9686main ()
9687{
9688void* p = getpagesize
9689 ;
9690 return 0;
9691}
9692_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009693if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009694
Matthias Kloseb9621712010-04-24 17:59:49 +00009695$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009696
Matthias Kloseb159a552010-04-25 21:00:44 +00009697 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009698$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009699else
Matthias Kloseb9621712010-04-24 17:59:49 +00009700 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9701$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009702
9703fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009704rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009705
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009706for ac_prog in true
9707do
9708 # Extract the first word of "$ac_prog", so it can be a program name with args.
9709set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00009710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9711$as_echo_n "checking for $ac_word... " >&6; }
9712if test "${ac_cv_prog_TRUE+set}" = set; then :
9713 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009714else
9715 if test -n "$TRUE"; then
9716 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
9717else
9718as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9719for as_dir in $PATH
9720do
9721 IFS=$as_save_IFS
9722 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009723 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009724 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 +00009725 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00009726 $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 +00009727 break 2
9728 fi
9729done
Matthias Kloseb9621712010-04-24 17:59:49 +00009730 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009731IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009732
9733fi
9734fi
9735TRUE=$ac_cv_prog_TRUE
9736if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009737 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
9738$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009739else
Matthias Kloseb9621712010-04-24 17:59:49 +00009740 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9741$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009742fi
9743
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009744
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009745 test -n "$TRUE" && break
9746done
9747test -n "$TRUE" || TRUE="/bin/true"
9748
9749
Matthias Kloseb9621712010-04-24 17:59:49 +00009750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
9751$as_echo_n "checking for inet_aton in -lc... " >&6; }
9752if test "${ac_cv_lib_c_inet_aton+set}" = set; then :
9753 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009754else
9755 ac_check_lib_save_LIBS=$LIBS
9756LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009757cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009758/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009759
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009760/* Override any GCC internal prototype to avoid an error.
9761 Use char because int might match the return type of a GCC
9762 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009763#ifdef __cplusplus
9764extern "C"
9765#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009766char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009767int
9768main ()
9769{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009770return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009771 ;
9772 return 0;
9773}
9774_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009775if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009776 ac_cv_lib_c_inet_aton=yes
9777else
Matthias Kloseb9621712010-04-24 17:59:49 +00009778 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009779fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009780rm -f core conftest.err conftest.$ac_objext \
9781 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009782LIBS=$ac_check_lib_save_LIBS
9783fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009784{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
9785$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
9786if test "x$ac_cv_lib_c_inet_aton" = x""yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009787 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009788else
Matthias Kloseb9621712010-04-24 17:59:49 +00009789 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
9790$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
9791if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then :
9792 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009793else
9794 ac_check_lib_save_LIBS=$LIBS
9795LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009796cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009797/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009798
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009799/* Override any GCC internal prototype to avoid an error.
9800 Use char because int might match the return type of a GCC
9801 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009802#ifdef __cplusplus
9803extern "C"
9804#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009805char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009806int
9807main ()
9808{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009809return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009810 ;
9811 return 0;
9812}
9813_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009814if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009815 ac_cv_lib_resolv_inet_aton=yes
9816else
Matthias Kloseb9621712010-04-24 17:59:49 +00009817 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009818fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009819rm -f core conftest.err conftest.$ac_objext \
9820 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009821LIBS=$ac_check_lib_save_LIBS
9822fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009823{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
9824$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
9825if test "x$ac_cv_lib_resolv_inet_aton" = x""yes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009826 cat >>confdefs.h <<_ACEOF
9827#define HAVE_LIBRESOLV 1
9828_ACEOF
9829
9830 LIBS="-lresolv $LIBS"
9831
9832fi
9833
9834
9835fi
9836
9837
Christian Heimesd0764e22007-12-04 15:00:33 +00009838# On Tru64, chflags seems to be present, but calling it will
9839# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +00009840{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
9841$as_echo_n "checking for chflags... " >&6; }
9842if test "${ac_cv_have_chflags+set}" = set; then :
9843 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009844else
Matthias Kloseb9621712010-04-24 17:59:49 +00009845 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009846 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +00009847else
Matthias Kloseb9621712010-04-24 17:59:49 +00009848 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +00009849/* end confdefs.h. */
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009850[
Christian Heimesd0764e22007-12-04 15:00:33 +00009851#include <sys/stat.h>
9852#include <unistd.h>
9853int main(int argc, char*argv[])
9854{
9855 if(chflags(argv[0], 0) != 0)
9856 return 1;
9857 return 0;
9858}
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009859]
Christian Heimesd0764e22007-12-04 15:00:33 +00009860_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009861if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009862 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009863else
Matthias Kloseb9621712010-04-24 17:59:49 +00009864 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009865fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009866rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9867 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009868fi
9869
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009870
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009871fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009872{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
9873$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009874if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009875 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
9876if test "x$ac_cv_func_chflags" = x""yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009877 ac_cv_have_chflags="yes"
9878else
9879 ac_cv_have_chflags="no"
9880fi
9881
9882fi
9883if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009884
Matthias Kloseb9621712010-04-24 17:59:49 +00009885$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009886
9887fi
9888
Matthias Kloseb9621712010-04-24 17:59:49 +00009889{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
9890$as_echo_n "checking for lchflags... " >&6; }
9891if test "${ac_cv_have_lchflags+set}" = set; then :
9892 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009893else
Matthias Kloseb9621712010-04-24 17:59:49 +00009894 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009895 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +00009896else
Matthias Kloseb9621712010-04-24 17:59:49 +00009897 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +00009898/* end confdefs.h. */
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009899[
Christian Heimesd0764e22007-12-04 15:00:33 +00009900#include <sys/stat.h>
9901#include <unistd.h>
9902int main(int argc, char*argv[])
9903{
9904 if(lchflags(argv[0], 0) != 0)
9905 return 1;
9906 return 0;
9907}
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009908]
Christian Heimesd0764e22007-12-04 15:00:33 +00009909_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009910if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009911 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009912else
Matthias Kloseb9621712010-04-24 17:59:49 +00009913 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +00009914fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009915rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9916 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009917fi
9918
9919
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009920fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009921{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
9922$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009923if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009924 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
9925if test "x$ac_cv_func_lchflags" = x""yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009926 ac_cv_have_lchflags="yes"
9927else
9928 ac_cv_have_lchflags="no"
9929fi
9930
9931fi
9932if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009933
Matthias Kloseb9621712010-04-24 17:59:49 +00009934$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009935
9936fi
9937
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009938case $ac_sys_system/$ac_sys_release in
9939Darwin/*)
9940 _CUR_CFLAGS="${CFLAGS}"
9941 _CUR_LDFLAGS="${LDFLAGS}"
9942 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
9943 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
9944 ;;
9945esac
9946
Matthias Kloseb9621712010-04-24 17:59:49 +00009947{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
9948$as_echo_n "checking for inflateCopy in -lz... " >&6; }
9949if test "${ac_cv_lib_z_inflateCopy+set}" = set; then :
9950 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009951else
9952 ac_check_lib_save_LIBS=$LIBS
9953LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009954cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009955/* end confdefs.h. */
9956
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009957/* Override any GCC internal prototype to avoid an error.
9958 Use char because int might match the return type of a GCC
9959 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009960#ifdef __cplusplus
9961extern "C"
9962#endif
9963char inflateCopy ();
9964int
9965main ()
9966{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009967return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009968 ;
9969 return 0;
9970}
9971_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009972if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009973 ac_cv_lib_z_inflateCopy=yes
9974else
Matthias Kloseb9621712010-04-24 17:59:49 +00009975 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009976fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009977rm -f core conftest.err conftest.$ac_objext \
9978 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009979LIBS=$ac_check_lib_save_LIBS
9980fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009981{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
9982$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
9983if test "x$ac_cv_lib_z_inflateCopy" = x""yes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009984
Matthias Kloseb9621712010-04-24 17:59:49 +00009985$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009986
9987fi
9988
9989
9990case $ac_sys_system/$ac_sys_release in
9991Darwin/*)
9992 CFLAGS="${_CUR_CFLAGS}"
9993 LDFLAGS="${_CUR_LDFLAGS}"
9994 ;;
9995esac
9996
Matthias Kloseb9621712010-04-24 17:59:49 +00009997{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
9998$as_echo_n "checking for hstrerror... " >&6; }
9999cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010000/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010001
Martin v. Löwise9416172003-05-03 10:12:45 +000010002#include <netdb.h>
10003
Martin v. Löwise9416172003-05-03 10:12:45 +000010004int
10005main ()
10006{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010007void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010008 ;
10009 return 0;
10010}
10011_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010012if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010013
Matthias Kloseb9621712010-04-24 17:59:49 +000010014$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010015
Matthias Kloseb159a552010-04-25 21:00:44 +000010016 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010017$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010018else
Matthias Kloseb9621712010-04-24 17:59:49 +000010019 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10020$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010021
10022fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010023rm -f core conftest.err conftest.$ac_objext \
10024 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010025
Matthias Kloseb9621712010-04-24 17:59:49 +000010026{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
10027$as_echo_n "checking for inet_aton... " >&6; }
10028cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010029/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010030
Martin v. Löwis86d66262006-02-17 08:40:11 +000010031#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010032#include <sys/socket.h>
10033#include <netinet/in.h>
10034#include <arpa/inet.h>
10035
Martin v. Löwise9416172003-05-03 10:12:45 +000010036int
10037main ()
10038{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010039void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010040 ;
10041 return 0;
10042}
10043_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010044if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010045
Matthias Kloseb9621712010-04-24 17:59:49 +000010046$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010047
Matthias Kloseb159a552010-04-25 21:00:44 +000010048 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010049$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010050else
Matthias Kloseb9621712010-04-24 17:59:49 +000010051 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10052$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010053
10054fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010055rm -f core conftest.err conftest.$ac_objext \
10056 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010057
Matthias Kloseb9621712010-04-24 17:59:49 +000010058{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
10059$as_echo_n "checking for inet_pton... " >&6; }
10060cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010061/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010062
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010063#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010064#include <sys/socket.h>
10065#include <netinet/in.h>
10066#include <arpa/inet.h>
10067
Martin v. Löwise9416172003-05-03 10:12:45 +000010068int
10069main ()
10070{
10071void* p = inet_pton
10072 ;
10073 return 0;
10074}
10075_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010076if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010077
Matthias Kloseb9621712010-04-24 17:59:49 +000010078$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010079
Matthias Kloseb159a552010-04-25 21:00:44 +000010080 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010081$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010082else
Matthias Kloseb9621712010-04-24 17:59:49 +000010083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10084$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010085
10086fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010087rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000010088
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010089# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000010090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
10091$as_echo_n "checking for setgroups... " >&6; }
10092cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010093/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010094
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010095#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010096#ifdef HAVE_GRP_H
10097#include <grp.h>
10098#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000010099
Martin v. Löwisd5843682002-11-21 20:41:28 +000010100int
10101main ()
10102{
10103void* p = setgroups
10104 ;
10105 return 0;
10106}
10107_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010108if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010109
Matthias Kloseb9621712010-04-24 17:59:49 +000010110$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010111
Matthias Kloseb159a552010-04-25 21:00:44 +000010112 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010113$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010114else
Matthias Kloseb9621712010-04-24 17:59:49 +000010115 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10116$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010117
10118fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010119rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010120
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010121# check for openpty and forkpty
10122
10123for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010124do :
10125 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
10126if test "x$ac_cv_func_openpty" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010127 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010128#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010129_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010130
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010131else
Matthias Kloseb9621712010-04-24 17:59:49 +000010132 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
10133$as_echo_n "checking for openpty in -lutil... " >&6; }
10134if test "${ac_cv_lib_util_openpty+set}" = set; then :
10135 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010136else
Martin v. Löwis11437992002-04-12 09:54:03 +000010137 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010138LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010139cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010140/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010141
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010142/* Override any GCC internal prototype to avoid an error.
10143 Use char because int might match the return type of a GCC
10144 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010145#ifdef __cplusplus
10146extern "C"
10147#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010148char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010149int
10150main ()
10151{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010152return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010153 ;
10154 return 0;
10155}
10156_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010157if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010158 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010159else
Matthias Kloseb9621712010-04-24 17:59:49 +000010160 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010161fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010162rm -f core conftest.err conftest.$ac_objext \
10163 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010164LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010165fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010166{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
10167$as_echo "$ac_cv_lib_util_openpty" >&6; }
10168if test "x$ac_cv_lib_util_openpty" = x""yes; then :
10169 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010170 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010171else
Matthias Kloseb9621712010-04-24 17:59:49 +000010172 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
10173$as_echo_n "checking for openpty in -lbsd... " >&6; }
10174if test "${ac_cv_lib_bsd_openpty+set}" = set; then :
10175 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010176else
10177 ac_check_lib_save_LIBS=$LIBS
10178LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010179cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010180/* end confdefs.h. */
10181
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010182/* Override any GCC internal prototype to avoid an error.
10183 Use char because int might match the return type of a GCC
10184 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010185#ifdef __cplusplus
10186extern "C"
10187#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010188char openpty ();
10189int
10190main ()
10191{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010192return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010193 ;
10194 return 0;
10195}
10196_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010197if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010198 ac_cv_lib_bsd_openpty=yes
10199else
Matthias Kloseb9621712010-04-24 17:59:49 +000010200 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010201fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010202rm -f core conftest.err conftest.$ac_objext \
10203 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010204LIBS=$ac_check_lib_save_LIBS
10205fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010206{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
10207$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
10208if test "x$ac_cv_lib_bsd_openpty" = x""yes; then :
10209 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010210 LIBS="$LIBS -lbsd"
10211fi
10212
10213
10214fi
10215
Fred Drake8cef4cf2000-06-28 16:40:38 +000010216
10217fi
10218done
10219
10220for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010221do :
10222 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
10223if test "x$ac_cv_func_forkpty" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010224 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010225#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010226_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010227
Fred Drake8cef4cf2000-06-28 16:40:38 +000010228else
Matthias Kloseb9621712010-04-24 17:59:49 +000010229 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
10230$as_echo_n "checking for forkpty in -lutil... " >&6; }
10231if test "${ac_cv_lib_util_forkpty+set}" = set; then :
10232 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010233else
Martin v. Löwis11437992002-04-12 09:54:03 +000010234 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010235LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010236cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010237/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010238
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010239/* Override any GCC internal prototype to avoid an error.
10240 Use char because int might match the return type of a GCC
10241 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010242#ifdef __cplusplus
10243extern "C"
10244#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010245char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010246int
10247main ()
10248{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010249return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010250 ;
10251 return 0;
10252}
10253_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010254if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010255 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010256else
Matthias Kloseb9621712010-04-24 17:59:49 +000010257 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010258fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010259rm -f core conftest.err conftest.$ac_objext \
10260 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010261LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010262fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010263{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
10264$as_echo "$ac_cv_lib_util_forkpty" >&6; }
10265if test "x$ac_cv_lib_util_forkpty" = x""yes; then :
10266 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010267 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010268else
Matthias Kloseb9621712010-04-24 17:59:49 +000010269 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
10270$as_echo_n "checking for forkpty in -lbsd... " >&6; }
10271if test "${ac_cv_lib_bsd_forkpty+set}" = set; then :
10272 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010273else
10274 ac_check_lib_save_LIBS=$LIBS
10275LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010276cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010277/* end confdefs.h. */
10278
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010279/* Override any GCC internal prototype to avoid an error.
10280 Use char because int might match the return type of a GCC
10281 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010282#ifdef __cplusplus
10283extern "C"
10284#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010285char forkpty ();
10286int
10287main ()
10288{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010289return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010290 ;
10291 return 0;
10292}
10293_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010294if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010295 ac_cv_lib_bsd_forkpty=yes
10296else
Matthias Kloseb9621712010-04-24 17:59:49 +000010297 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010298fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010299rm -f core conftest.err conftest.$ac_objext \
10300 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010301LIBS=$ac_check_lib_save_LIBS
10302fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010303{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
10304$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
10305if test "x$ac_cv_lib_bsd_forkpty" = x""yes; then :
10306 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010307 LIBS="$LIBS -lbsd"
10308fi
10309
10310
10311fi
10312
Fred Drake8cef4cf2000-06-28 16:40:38 +000010313
10314fi
10315done
10316
Jack Jansendd19cf82001-12-06 22:36:17 +000010317
Christian Heimesb186d002008-03-18 15:15:01 +000010318# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000010319for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000010320do :
10321 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
10322if test "x$ac_cv_func_memmove" = x""yes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000010323 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010324#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000010325_ACEOF
10326
10327fi
10328done
10329
10330
Michael W. Hudson54241132001-12-07 15:38:26 +000010331# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000010332for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000010333do :
10334 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10335ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Benjamin Petersond7f73e92010-09-05 00:09:07 +000010336eval as_val=\$$as_ac_var
10337 if test "x$as_val" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010338 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010339#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010340_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000010341
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010342fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000010343done
10344
Michael W. Hudson54241132001-12-07 15:38:26 +000010345
Benjamin Petersond7f73e92010-09-05 00:09:07 +000010346for ac_func in dup2 getcwd strdup
10347do :
10348 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10349ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10350eval as_val=\$$as_ac_var
10351 if test "x$as_val" = x""yes; then :
10352 cat >>confdefs.h <<_ACEOF
10353#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
10354_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000010355
Martin v. Löwis1142de32002-03-29 16:28:31 +000010356else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010357 case " $LIBOBJS " in
Benjamin Petersond7f73e92010-09-05 00:09:07 +000010358 *" $ac_func.$ac_objext "* ) ;;
10359 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010360 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010361esac
10362
Martin v. Löwis1142de32002-03-29 16:28:31 +000010363fi
Benjamin Petersond7f73e92010-09-05 00:09:07 +000010364done
Martin v. Löwis1142de32002-03-29 16:28:31 +000010365
10366
10367for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010368do :
10369 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
10370if test "x$ac_cv_func_getpgrp" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010371 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010372#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010373_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010374 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010375/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010376#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010377int
10378main ()
10379{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010380getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010381 ;
10382 return 0;
10383}
10384_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010385if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010386
Matthias Kloseb9621712010-04-24 17:59:49 +000010387$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010388
Guido van Rossum627b2d71993-12-24 10:39:16 +000010389fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010390rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010391
Guido van Rossum627b2d71993-12-24 10:39:16 +000010392fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010393done
Guido van Rossum627b2d71993-12-24 10:39:16 +000010394
Jack Jansen150753c2003-03-29 22:07:47 +000010395for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010396do :
10397 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
10398if test "x$ac_cv_func_setpgrp" = x""yes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000010399 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010400#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000010401_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010402 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010403/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000010404#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000010405int
10406main ()
10407{
10408setpgrp(0,0);
10409 ;
10410 return 0;
10411}
10412_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010413if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010414
Matthias Kloseb9621712010-04-24 17:59:49 +000010415$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010416
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010417fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010418rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000010419
10420fi
10421done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010422
Thomas Wouters3a584202000-08-05 23:28:51 +000010423for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000010424do :
10425 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
10426if test "x$ac_cv_func_gettimeofday" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010427 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010428#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010429_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010430 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010431/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010432#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010433int
10434main ()
10435{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010436gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010437 ;
10438 return 0;
10439}
10440_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010441if ac_fn_c_try_compile "$LINENO"; then :
10442
Guido van Rossum627b2d71993-12-24 10:39:16 +000010443else
Skip Montanaro6dead952003-09-25 14:50:04 +000010444
Matthias Kloseb9621712010-04-24 17:59:49 +000010445$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010446
Martin v. Löwis11437992002-04-12 09:54:03 +000010447
Guido van Rossum627b2d71993-12-24 10:39:16 +000010448fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010449rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010450
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010451fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010452done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010453
Michael W. Hudson54241132001-12-07 15:38:26 +000010454
Matthias Kloseb9621712010-04-24 17:59:49 +000010455{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
10456$as_echo_n "checking for major... " >&6; }
10457cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010458/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010459
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010460#if defined(MAJOR_IN_MKDEV)
10461#include <sys/mkdev.h>
10462#elif defined(MAJOR_IN_SYSMACROS)
10463#include <sys/sysmacros.h>
10464#else
10465#include <sys/types.h>
10466#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010467
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010468int
10469main ()
10470{
10471
10472 makedev(major(0),minor(0));
10473
10474 ;
10475 return 0;
10476}
10477_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010478if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010479
10480
Matthias Kloseb9621712010-04-24 17:59:49 +000010481$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010482
Matthias Kloseb9621712010-04-24 17:59:49 +000010483 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10484$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010485
10486else
Skip Montanaro6dead952003-09-25 14:50:04 +000010487
Matthias Kloseb9621712010-04-24 17:59:49 +000010488 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10489$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010490
10491fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010492rm -f core conftest.err conftest.$ac_objext \
10493 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010494
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010495# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000010496# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000010497{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
10498$as_echo_n "checking for getaddrinfo... " >&6; }
10499cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010500/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010501
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010502#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010503#include <sys/socket.h>
10504#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010505#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010506
Martin v. Löwis11437992002-04-12 09:54:03 +000010507int
10508main ()
10509{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010510getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000010511 ;
10512 return 0;
10513}
10514_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010515if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010516 have_getaddrinfo=yes
10517else
Matthias Kloseb9621712010-04-24 17:59:49 +000010518 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010519fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010520rm -f core conftest.err conftest.$ac_objext \
10521 conftest$ac_exeext conftest.$ac_ext
10522{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
10523$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010524if test $have_getaddrinfo = yes
10525then
Matthias Kloseb9621712010-04-24 17:59:49 +000010526 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
10527$as_echo_n "checking getaddrinfo bug... " >&6; }
10528 if test "${ac_cv_buggy_getaddrinfo+set}" = set; then :
10529 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010530else
Matthias Kloseb9621712010-04-24 17:59:49 +000010531 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010532 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010533else
Matthias Kloseb9621712010-04-24 17:59:49 +000010534 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010535/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010536
10537#include <sys/types.h>
10538#include <netdb.h>
10539#include <string.h>
10540#include <sys/socket.h>
10541#include <netinet/in.h>
10542
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010543int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010544{
10545 int passive, gaierr, inet4 = 0, inet6 = 0;
10546 struct addrinfo hints, *ai, *aitop;
10547 char straddr[INET6_ADDRSTRLEN], strport[16];
10548
10549 for (passive = 0; passive <= 1; passive++) {
10550 memset(&hints, 0, sizeof(hints));
10551 hints.ai_family = AF_UNSPEC;
10552 hints.ai_flags = passive ? AI_PASSIVE : 0;
10553 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000010554 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010555 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
10556 (void)gai_strerror(gaierr);
10557 goto bad;
10558 }
10559 for (ai = aitop; ai; ai = ai->ai_next) {
10560 if (ai->ai_addr == NULL ||
10561 ai->ai_addrlen == 0 ||
10562 getnameinfo(ai->ai_addr, ai->ai_addrlen,
10563 straddr, sizeof(straddr), strport, sizeof(strport),
10564 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
10565 goto bad;
10566 }
10567 switch (ai->ai_family) {
10568 case AF_INET:
10569 if (strcmp(strport, "54321") != 0) {
10570 goto bad;
10571 }
10572 if (passive) {
10573 if (strcmp(straddr, "0.0.0.0") != 0) {
10574 goto bad;
10575 }
10576 } else {
10577 if (strcmp(straddr, "127.0.0.1") != 0) {
10578 goto bad;
10579 }
10580 }
10581 inet4++;
10582 break;
10583 case AF_INET6:
10584 if (strcmp(strport, "54321") != 0) {
10585 goto bad;
10586 }
10587 if (passive) {
10588 if (strcmp(straddr, "::") != 0) {
10589 goto bad;
10590 }
10591 } else {
10592 if (strcmp(straddr, "::1") != 0) {
10593 goto bad;
10594 }
10595 }
10596 inet6++;
10597 break;
10598 case AF_UNSPEC:
10599 goto bad;
10600 break;
10601 default:
10602 /* another family support? */
10603 break;
10604 }
10605 }
10606 }
10607
10608 if (!(inet4 == 0 || inet4 == 2))
10609 goto bad;
10610 if (!(inet6 == 0 || inet6 == 2))
10611 goto bad;
10612
10613 if (aitop)
10614 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010615 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010616
10617 bad:
10618 if (aitop)
10619 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010620 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010621}
10622
Martin v. Löwis11437992002-04-12 09:54:03 +000010623_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010624if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010625 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010626else
Matthias Kloseb9621712010-04-24 17:59:49 +000010627 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010628fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010629rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10630 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010631fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010632
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010633fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010634
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010635fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010636
Mark Dickinson2df5d282009-12-31 21:22:50 +000010637if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010638then
10639 if test $ipv6 = yes
10640 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010641 echo 'Fatal: You must get working getaddrinfo() function.'
10642 echo ' or you can specify "--disable-ipv6"'.
10643 exit 1
10644 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010645else
Martin v. Löwis11437992002-04-12 09:54:03 +000010646
Matthias Kloseb9621712010-04-24 17:59:49 +000010647$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010648
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010649fi
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010650for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000010651do :
10652 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
10653if test "x$ac_cv_func_getnameinfo" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010654 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010655#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010656_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010657
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010658fi
10659done
10660
Michael W. Hudson54241132001-12-07 15:38:26 +000010661
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010662# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000010663{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
10664$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
10665if test "${ac_cv_header_time+set}" = set; then :
10666 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010667else
Matthias Kloseb9621712010-04-24 17:59:49 +000010668 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010669/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010670#include <sys/types.h>
10671#include <sys/time.h>
10672#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010673
Martin v. Löwis11437992002-04-12 09:54:03 +000010674int
10675main ()
10676{
10677if ((struct tm *) 0)
10678return 0;
10679 ;
10680 return 0;
10681}
10682_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010683if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010684 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000010685else
Matthias Kloseb9621712010-04-24 17:59:49 +000010686 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010687fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010688rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010689fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010690{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
10691$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010692if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010693
Matthias Kloseb9621712010-04-24 17:59:49 +000010694$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010695
10696fi
10697
Matthias Kloseb9621712010-04-24 17:59:49 +000010698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
10699$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
10700if test "${ac_cv_struct_tm+set}" = set; then :
10701 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010702else
Matthias Kloseb9621712010-04-24 17:59:49 +000010703 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010704/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010705#include <sys/types.h>
10706#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010707
Martin v. Löwis11437992002-04-12 09:54:03 +000010708int
10709main ()
10710{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010711struct tm tm;
10712 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000010713 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000010714 ;
10715 return 0;
10716}
10717_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010718if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010719 ac_cv_struct_tm=time.h
10720else
Matthias Kloseb9621712010-04-24 17:59:49 +000010721 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010722fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010723rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010724fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010725{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
10726$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010727if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010728
Matthias Kloseb9621712010-04-24 17:59:49 +000010729$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010730
10731fi
10732
Matthias Kloseb9621712010-04-24 17:59:49 +000010733ac_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 +000010734#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000010735
Matthias Kloseb9621712010-04-24 17:59:49 +000010736"
10737if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010738
10739cat >>confdefs.h <<_ACEOF
10740#define HAVE_STRUCT_TM_TM_ZONE 1
10741_ACEOF
10742
10743
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010744fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010745
Martin v. Löwis11437992002-04-12 09:54:03 +000010746if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
10747
Matthias Kloseb9621712010-04-24 17:59:49 +000010748$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010749
10750else
Matthias Kloseb9621712010-04-24 17:59:49 +000010751 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
10752"
10753if test "x$ac_cv_have_decl_tzname" = x""yes; then :
10754 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010755else
Matthias Kloseb9621712010-04-24 17:59:49 +000010756 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010757fi
10758
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010759cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010760#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010761_ACEOF
10762
Matthias Kloseb9621712010-04-24 17:59:49 +000010763 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
10764$as_echo_n "checking for tzname... " >&6; }
10765if test "${ac_cv_var_tzname+set}" = set; then :
10766 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010767else
Matthias Kloseb9621712010-04-24 17:59:49 +000010768 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010769/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010770#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010771#if !HAVE_DECL_TZNAME
10772extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000010773#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010774
Martin v. Löwis11437992002-04-12 09:54:03 +000010775int
10776main ()
10777{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010778return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000010779 ;
10780 return 0;
10781}
10782_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010783if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010784 ac_cv_var_tzname=yes
10785else
Matthias Kloseb9621712010-04-24 17:59:49 +000010786 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010787fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010788rm -f core conftest.err conftest.$ac_objext \
10789 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000010790fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010791{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
10792$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010793 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010794
Matthias Kloseb9621712010-04-24 17:59:49 +000010795$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010796
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010797 fi
10798fi
10799
Matthias Kloseb9621712010-04-24 17:59:49 +000010800ac_fn_c_check_member "$LINENO" "struct stat" "st_rdev" "ac_cv_member_struct_stat_st_rdev" "$ac_includes_default"
10801if test "x$ac_cv_member_struct_stat_st_rdev" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010802
10803cat >>confdefs.h <<_ACEOF
10804#define HAVE_STRUCT_STAT_ST_RDEV 1
10805_ACEOF
10806
10807
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010808fi
10809
Matthias Kloseb9621712010-04-24 17:59:49 +000010810ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
10811if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000010812
Martin v. Löwis11437992002-04-12 09:54:03 +000010813cat >>confdefs.h <<_ACEOF
10814#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
10815_ACEOF
10816
10817
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010818fi
10819
Matthias Kloseb9621712010-04-24 17:59:49 +000010820ac_fn_c_check_member "$LINENO" "struct stat" "st_flags" "ac_cv_member_struct_stat_st_flags" "$ac_includes_default"
10821if test "x$ac_cv_member_struct_stat_st_flags" = x""yes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000010822
10823cat >>confdefs.h <<_ACEOF
10824#define HAVE_STRUCT_STAT_ST_FLAGS 1
10825_ACEOF
10826
10827
10828fi
10829
Matthias Kloseb9621712010-04-24 17:59:49 +000010830ac_fn_c_check_member "$LINENO" "struct stat" "st_gen" "ac_cv_member_struct_stat_st_gen" "$ac_includes_default"
10831if test "x$ac_cv_member_struct_stat_st_gen" = x""yes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000010832
10833cat >>confdefs.h <<_ACEOF
10834#define HAVE_STRUCT_STAT_ST_GEN 1
10835_ACEOF
10836
10837
10838fi
10839
Matthias Kloseb9621712010-04-24 17:59:49 +000010840ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtime" "ac_cv_member_struct_stat_st_birthtime" "$ac_includes_default"
10841if test "x$ac_cv_member_struct_stat_st_birthtime" = x""yes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000010842
10843cat >>confdefs.h <<_ACEOF
10844#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
10845_ACEOF
10846
10847
10848fi
10849
Matthias Kloseb9621712010-04-24 17:59:49 +000010850ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
10851if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000010852
Martin v. Löwis11437992002-04-12 09:54:03 +000010853cat >>confdefs.h <<_ACEOF
10854#define HAVE_STRUCT_STAT_ST_BLOCKS 1
10855_ACEOF
10856
10857
Matthias Kloseb9621712010-04-24 17:59:49 +000010858$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010859
10860else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010861 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000010862 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010863 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
10864 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010865esac
10866
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010867fi
10868
Michael W. Hudson54241132001-12-07 15:38:26 +000010869
Martin v. Löwis11437992002-04-12 09:54:03 +000010870
Matthias Kloseb9621712010-04-24 17:59:49 +000010871{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
10872$as_echo_n "checking for time.h that defines altzone... " >&6; }
10873if test "${ac_cv_header_time_altzone+set}" = set; then :
10874 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010875else
Matthias Kloseb159a552010-04-25 21:00:44 +000010876
Matthias Kloseb9621712010-04-24 17:59:49 +000010877 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010878/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000010879#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010880int
10881main ()
10882{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010883return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000010884 ;
10885 return 0;
10886}
10887_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010888if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010889 ac_cv_header_time_altzone=yes
10890else
Matthias Kloseb9621712010-04-24 17:59:49 +000010891 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000010892fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010893rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000010894
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010895fi
10896
Matthias Kloseb9621712010-04-24 17:59:49 +000010897{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
10898$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010899if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010900
Matthias Kloseb9621712010-04-24 17:59:49 +000010901$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010902
10903fi
10904
Guido van Rossumda88dad1995-01-26 00:46:29 +000010905was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000010906{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
10907$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
10908cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010909/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000010910
10911#include <sys/types.h>
10912#include <sys/select.h>
10913#include <sys/time.h>
10914
Martin v. Löwis11437992002-04-12 09:54:03 +000010915int
10916main ()
10917{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010918;
Martin v. Löwis11437992002-04-12 09:54:03 +000010919 ;
10920 return 0;
10921}
10922_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010923if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010924
10925
Matthias Kloseb9621712010-04-24 17:59:49 +000010926$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000010927
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010928 was_it_defined=yes
10929
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010930fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010931rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010932{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
10933$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010934
Matthias Kloseb9621712010-04-24 17:59:49 +000010935{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
10936$as_echo_n "checking for addrinfo... " >&6; }
10937if test "${ac_cv_struct_addrinfo+set}" = set; then :
10938 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010939else
Matthias Kloseb9621712010-04-24 17:59:49 +000010940 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010941/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010942#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010943int
10944main ()
10945{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010946struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000010947 ;
10948 return 0;
10949}
10950_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010951if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010952 ac_cv_struct_addrinfo=yes
10953else
Matthias Kloseb9621712010-04-24 17:59:49 +000010954 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010955fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010956rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10957fi
10958
Matthias Kloseb9621712010-04-24 17:59:49 +000010959{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
10960$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010961if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010962
Matthias Kloseb9621712010-04-24 17:59:49 +000010963$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010964
10965fi
10966
Matthias Kloseb9621712010-04-24 17:59:49 +000010967{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
10968$as_echo_n "checking for sockaddr_storage... " >&6; }
10969if test "${ac_cv_struct_sockaddr_storage+set}" = set; then :
10970 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010971else
Matthias Kloseb9621712010-04-24 17:59:49 +000010972 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010973/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010974
10975# include <sys/types.h>
10976# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010977int
10978main ()
10979{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010980struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000010981 ;
10982 return 0;
10983}
10984_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010985if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010986 ac_cv_struct_sockaddr_storage=yes
10987else
Matthias Kloseb9621712010-04-24 17:59:49 +000010988 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010989fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010990rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10991fi
10992
Matthias Kloseb9621712010-04-24 17:59:49 +000010993{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
10994$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010995if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010996
Matthias Kloseb9621712010-04-24 17:59:49 +000010997$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010998
10999fi
11000
Guido van Rossum627b2d71993-12-24 10:39:16 +000011001# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000011002
Matthias Kloseb9621712010-04-24 17:59:49 +000011003{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
11004$as_echo_n "checking whether char is unsigned... " >&6; }
11005if test "${ac_cv_c_char_unsigned+set}" = set; then :
11006 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000011007else
Matthias Kloseb9621712010-04-24 17:59:49 +000011008 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011009/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011010$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000011011int
11012main ()
11013{
11014static int test_array [1 - 2 * !(((char) -1) < 0)];
11015test_array [0] = 0
11016
11017 ;
11018 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000011019}
Martin v. Löwis11437992002-04-12 09:54:03 +000011020_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011021if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000011022 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011023else
Matthias Kloseb9621712010-04-24 17:59:49 +000011024 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011025fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011026rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011027fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011028{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
11029$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011030if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011031 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011032
11033fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000011034
Matthias Kloseb9621712010-04-24 17:59:49 +000011035{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
11036$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
11037if test "${ac_cv_c_const+set}" = set; then :
11038 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011039else
Matthias Kloseb9621712010-04-24 17:59:49 +000011040 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011041/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011042
Martin v. Löwis11437992002-04-12 09:54:03 +000011043int
11044main ()
11045{
11046/* FIXME: Include the comments suggested by Paul. */
11047#ifndef __cplusplus
11048 /* Ultrix mips cc rejects this. */
11049 typedef int charset[2];
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011050 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000011051 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011052 char const *const *pcpcc;
11053 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011054 /* NEC SVR4.0.2 mips cc rejects this. */
11055 struct point {int x, y;};
11056 static struct point const zero = {0,0};
11057 /* AIX XL C 1.02.0.0 rejects this.
11058 It does not let you subtract one const X* pointer from another in
11059 an arm of an if-expression whose if-part is not a constant
11060 expression */
11061 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011062 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011063 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011064 ++pcpcc;
11065 ppc = (char**) pcpcc;
11066 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011067 { /* SCO 3.2v4 cc rejects this. */
11068 char *t;
11069 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011070
Martin v. Löwis11437992002-04-12 09:54:03 +000011071 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011072 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011073 }
11074 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
11075 int x[] = {25, 17};
11076 const int *foo = &x[0];
11077 ++foo;
11078 }
11079 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11080 typedef const int *iptr;
11081 iptr p = 0;
11082 ++p;
11083 }
11084 { /* AIX XL C 1.02.0.0 rejects this saying
11085 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11086 struct s { int j; const int *ap[3]; };
11087 struct s *b; b->j = 5;
11088 }
11089 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11090 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011091 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011092 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011093 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000011094#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000011095
Martin v. Löwis11437992002-04-12 09:54:03 +000011096 ;
11097 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000011098}
Martin v. Löwis11437992002-04-12 09:54:03 +000011099_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011100if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011101 ac_cv_c_const=yes
11102else
Matthias Kloseb9621712010-04-24 17:59:49 +000011103 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011104fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011105rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011106fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011107{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
11108$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011109if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011110
Matthias Kloseb9621712010-04-24 17:59:49 +000011111$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011112
11113fi
11114
Michael W. Hudson54241132001-12-07 15:38:26 +000011115
Guido van Rossumda88dad1995-01-26 00:46:29 +000011116works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
11118$as_echo_n "checking for working volatile... " >&6; }
11119cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011120/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011121
Martin v. Löwis11437992002-04-12 09:54:03 +000011122int
11123main ()
11124{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011125volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011126 ;
11127 return 0;
11128}
11129_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011130if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011131 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011132else
Skip Montanaro6dead952003-09-25 14:50:04 +000011133
Matthias Kloseb9621712010-04-24 17:59:49 +000011134$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011135
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011136
Guido van Rossum627b2d71993-12-24 10:39:16 +000011137fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011138rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011139{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11140$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011141
Guido van Rossumda88dad1995-01-26 00:46:29 +000011142works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011143{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
11144$as_echo_n "checking for working signed char... " >&6; }
11145cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011146/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011147
Martin v. Löwis11437992002-04-12 09:54:03 +000011148int
11149main ()
11150{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011151signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000011152 ;
11153 return 0;
11154}
11155_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011156if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011157 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011158else
Skip Montanaro6dead952003-09-25 14:50:04 +000011159
Matthias Kloseb9621712010-04-24 17:59:49 +000011160$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000011161
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011162
Guido van Rossum7f43da71994-08-01 12:15:30 +000011163fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011164rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011165{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11166$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011167
Guido van Rossumda88dad1995-01-26 00:46:29 +000011168have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011169{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
11170$as_echo_n "checking for prototypes... " >&6; }
11171cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011172/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011173int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011174int
11175main ()
11176{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011177return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000011178 ;
11179 return 0;
11180}
11181_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011182if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011183
Matthias Kloseb9621712010-04-24 17:59:49 +000011184$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011185
Matthias Kloseb159a552010-04-25 21:00:44 +000011186 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011187fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011188rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011189{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
11190$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011191
Guido van Rossumda88dad1995-01-26 00:46:29 +000011192works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011193{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
11194$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
11195cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011196/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011197
11198#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000011199int foo(int x, ...) {
11200 va_list va;
11201 va_start(va, x);
11202 va_arg(va, int);
11203 va_arg(va, char *);
11204 va_arg(va, double);
11205 return 0;
11206}
Guido van Rossum7f43da71994-08-01 12:15:30 +000011207
Martin v. Löwis11437992002-04-12 09:54:03 +000011208int
11209main ()
11210{
Guido van Rossum90eea071996-08-30 20:58:57 +000011211return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000011212 ;
11213 return 0;
11214}
11215_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011216if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011217
11218
Matthias Kloseb9621712010-04-24 17:59:49 +000011219$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011220
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011221 works=yes
11222
Guido van Rossum627b2d71993-12-24 10:39:16 +000011223fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011224rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011225{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11226$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011227
Martin v. Löwisd6320502004-08-12 13:45:08 +000011228# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000011229{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
11230$as_echo_n "checking for socketpair... " >&6; }
11231cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011232/* end confdefs.h. */
11233
11234#include <sys/types.h>
11235#include <sys/socket.h>
11236
11237int
11238main ()
11239{
11240void *x=socketpair
11241 ;
11242 return 0;
11243}
11244_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011245if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000011246
Matthias Kloseb9621712010-04-24 17:59:49 +000011247$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000011248
Matthias Kloseb159a552010-04-25 21:00:44 +000011249 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011250$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011251else
Matthias Kloseb9621712010-04-24 17:59:49 +000011252 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11253$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011254
11255fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011256rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011257
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011258# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000011259{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
11260$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
11261cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011262/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011263#include <sys/types.h>
11264#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011265int
11266main ()
11267{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011268struct sockaddr x;
11269x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011270 ;
11271 return 0;
11272}
11273_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011274if ac_fn_c_try_compile "$LINENO"; then :
11275 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11276$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011277
Matthias Kloseb9621712010-04-24 17:59:49 +000011278$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011279
11280else
Matthias Kloseb9621712010-04-24 17:59:49 +000011281 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11282$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011283
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011284fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011285rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011286
Guido van Rossumda88dad1995-01-26 00:46:29 +000011287va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011288{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
11289$as_echo_n "checking whether va_list is an array... " >&6; }
11290cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011291/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011292
11293#ifdef HAVE_STDARG_PROTOTYPES
11294#include <stdarg.h>
11295#else
11296#include <varargs.h>
11297#endif
11298
Martin v. Löwis11437992002-04-12 09:54:03 +000011299int
11300main ()
11301{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011302va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000011303 ;
11304 return 0;
11305}
11306_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011307if ac_fn_c_try_compile "$LINENO"; then :
11308
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011309else
Skip Montanaro6dead952003-09-25 14:50:04 +000011310
Martin v. Löwis11437992002-04-12 09:54:03 +000011311
Matthias Kloseb9621712010-04-24 17:59:49 +000011312$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011313
Guido van Rossumda88dad1995-01-26 00:46:29 +000011314 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011315
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011316fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011317rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011318{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
11319$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011320
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011321# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000011322
11323
Matthias Kloseb9621712010-04-24 17:59:49 +000011324ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
11325if test "x$ac_cv_func_gethostbyname_r" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011326
Matthias Kloseb9621712010-04-24 17:59:49 +000011327 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000011328
Matthias Kloseb9621712010-04-24 17:59:49 +000011329 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
11330$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011331 OLD_CFLAGS=$CFLAGS
11332 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011333 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011334/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011335
11336# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011337
Martin v. Löwis11437992002-04-12 09:54:03 +000011338int
11339main ()
11340{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011341
11342 char *name;
11343 struct hostent *he, *res;
11344 char buffer[2048];
11345 int buflen = 2048;
11346 int h_errnop;
11347
11348 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011349
11350 ;
11351 return 0;
11352}
11353_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011354if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011355
Matthias Kloseb9621712010-04-24 17:59:49 +000011356 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011357
Martin v. Löwis11437992002-04-12 09:54:03 +000011358
Matthias Kloseb9621712010-04-24 17:59:49 +000011359$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011360
Matthias Kloseb9621712010-04-24 17:59:49 +000011361 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11362$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011363
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011364else
Skip Montanaro6dead952003-09-25 14:50:04 +000011365
Matthias Kloseb9621712010-04-24 17:59:49 +000011366 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11367$as_echo "no" >&6; }
11368 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
11369$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
11370 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011371/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011372
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011373# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011374
Martin v. Löwis11437992002-04-12 09:54:03 +000011375int
11376main ()
11377{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011378
11379 char *name;
11380 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000011381 char buffer[2048];
11382 int buflen = 2048;
11383 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011384
Matthias Kloseb159a552010-04-25 21:00:44 +000011385 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011386
11387 ;
11388 return 0;
11389}
11390_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011391if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011392
Matthias Kloseb9621712010-04-24 17:59:49 +000011393 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011394
Martin v. Löwis11437992002-04-12 09:54:03 +000011395
Matthias Kloseb159a552010-04-25 21:00:44 +000011396$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011397
Matthias Kloseb9621712010-04-24 17:59:49 +000011398 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11399$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011400
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011401else
Skip Montanaro6dead952003-09-25 14:50:04 +000011402
Matthias Kloseb9621712010-04-24 17:59:49 +000011403 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11404$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011405 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
11406$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
11407 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11408/* end confdefs.h. */
11409
11410# include <netdb.h>
11411
11412int
11413main ()
11414{
11415
11416 char *name;
11417 struct hostent *he;
11418 struct hostent_data data;
11419
11420 (void) gethostbyname_r(name, he, &data);
11421
11422 ;
11423 return 0;
11424}
11425_ACEOF
11426if ac_fn_c_try_compile "$LINENO"; then :
11427
11428 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
11429
11430
11431$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
11432
11433 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11434$as_echo "yes" >&6; }
11435
11436else
11437
11438 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11439$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011440
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011441fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011442rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011443
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011444fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011445rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011446
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011447fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011448rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011449 CFLAGS=$OLD_CFLAGS
11450
11451else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011452
Matthias Kloseb9621712010-04-24 17:59:49 +000011453 for ac_func in gethostbyname
11454do :
11455 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
11456if test "x$ac_cv_func_gethostbyname" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011457 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011458#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011459_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011460
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011461fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011462done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011463
Michael W. Hudson54241132001-12-07 15:38:26 +000011464
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011465fi
11466
Michael W. Hudson54241132001-12-07 15:38:26 +000011467
11468
11469
11470
11471
11472
Guido van Rossum627b2d71993-12-24 10:39:16 +000011473# checks for system services
11474# (none yet)
11475
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011476# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000011477ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
11478if test "x$ac_cv_func___fpu_control" = x""yes; then :
11479
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011480else
Matthias Kloseb9621712010-04-24 17:59:49 +000011481 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
11482$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
11483if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then :
11484 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011485else
Martin v. Löwis11437992002-04-12 09:54:03 +000011486 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011487LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011488cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011489/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011490
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011491/* Override any GCC internal prototype to avoid an error.
11492 Use char because int might match the return type of a GCC
11493 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011494#ifdef __cplusplus
11495extern "C"
11496#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011497char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011498int
11499main ()
11500{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011501return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011502 ;
11503 return 0;
11504}
11505_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011506if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011507 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011508else
Matthias Kloseb9621712010-04-24 17:59:49 +000011509 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011510fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011511rm -f core conftest.err conftest.$ac_objext \
11512 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011513LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011514fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011515{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
11516$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
11517if test "x$ac_cv_lib_ieee___fpu_control" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011518 cat >>confdefs.h <<_ACEOF
11519#define HAVE_LIBIEEE 1
11520_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011521
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011522 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011523
Guido van Rossum627b2d71993-12-24 10:39:16 +000011524fi
11525
Michael W. Hudson54241132001-12-07 15:38:26 +000011526
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011527fi
11528
Michael W. Hudson54241132001-12-07 15:38:26 +000011529
Guido van Rossum7f253911997-05-09 02:42:48 +000011530# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000011531{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
11532$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011533
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011534# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011535if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011536 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000011537if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000011538then
11539
Matthias Kloseb9621712010-04-24 17:59:49 +000011540$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011541
Matthias Kloseb9621712010-04-24 17:59:49 +000011542 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11543$as_echo "yes" >&6; }
11544else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11545$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011546fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000011547else
Matthias Kloseb9621712010-04-24 17:59:49 +000011548 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11549$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011550fi
11551
Guido van Rossum7f253911997-05-09 02:42:48 +000011552
Guido van Rossum7f43da71994-08-01 12:15:30 +000011553# check for --with-libm=...
11554
Guido van Rossum563e7081996-09-10 18:20:48 +000011555case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000011556Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000011557*) LIBM=-lm
11558esac
Matthias Kloseb9621712010-04-24 17:59:49 +000011559{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
11560$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011561
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011562# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011563if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011564 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000011565if test "$withval" = no
11566then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000011567 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
11568$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011569elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011570then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000011571 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
11572$as_echo "set LIBM=\"$withval\"" >&6; }
Benjamin Petersond7f73e92010-09-05 00:09:07 +000011573else as_fn_error "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011574fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011575else
Matthias Kloseb9621712010-04-24 17:59:49 +000011576 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
11577$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011578fi
11579
Guido van Rossum7f43da71994-08-01 12:15:30 +000011580
11581# check for --with-libc=...
11582
Matthias Kloseb9621712010-04-24 17:59:49 +000011583{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
11584$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011585
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011586# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011587if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011588 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000011589if test "$withval" = no
11590then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000011591 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
11592$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011593elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011594then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000011595 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
11596$as_echo "set LIBC=\"$withval\"" >&6; }
Benjamin Petersond7f73e92010-09-05 00:09:07 +000011597else as_fn_error "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011598fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011599else
Matthias Kloseb9621712010-04-24 17:59:49 +000011600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
11601$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011602fi
11603
Guido van Rossum7f43da71994-08-01 12:15:30 +000011604
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011605# **************************************************
11606# * Check for various properties of floating point *
11607# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011608
Matthias Kloseb9621712010-04-24 17:59:49 +000011609{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
11610$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
11611if test "${ac_cv_little_endian_double+set}" = set; then :
11612 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011613else
11614
Matthias Kloseb9621712010-04-24 17:59:49 +000011615if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011616 ac_cv_little_endian_double=no
11617else
Matthias Kloseb9621712010-04-24 17:59:49 +000011618 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011619/* end confdefs.h. */
11620
11621#include <string.h>
11622int main() {
11623 double x = 9006104071832581.0;
11624 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
11625 return 0;
11626 else
11627 return 1;
11628}
11629
11630_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011631if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011632 ac_cv_little_endian_double=yes
11633else
Matthias Kloseb9621712010-04-24 17:59:49 +000011634 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011635fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011636rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11637 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011638fi
11639
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011640fi
11641
Matthias Kloseb9621712010-04-24 17:59:49 +000011642{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
11643$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011644if test "$ac_cv_little_endian_double" = yes
11645then
11646
Matthias Kloseb9621712010-04-24 17:59:49 +000011647$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011648
11649fi
11650
Matthias Kloseb9621712010-04-24 17:59:49 +000011651{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
11652$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
11653if test "${ac_cv_big_endian_double+set}" = set; then :
11654 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011655else
11656
Matthias Kloseb9621712010-04-24 17:59:49 +000011657if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011658 ac_cv_big_endian_double=no
11659else
Matthias Kloseb9621712010-04-24 17:59:49 +000011660 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011661/* end confdefs.h. */
11662
11663#include <string.h>
11664int main() {
11665 double x = 9006104071832581.0;
11666 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
11667 return 0;
11668 else
11669 return 1;
11670}
11671
11672_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011673if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011674 ac_cv_big_endian_double=yes
11675else
Matthias Kloseb9621712010-04-24 17:59:49 +000011676 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011677fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011678rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11679 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011680fi
11681
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011682fi
11683
Matthias Kloseb9621712010-04-24 17:59:49 +000011684{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
11685$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011686if test "$ac_cv_big_endian_double" = yes
11687then
11688
Matthias Kloseb9621712010-04-24 17:59:49 +000011689$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011690
11691fi
11692
11693# Some ARM platforms use a mixed-endian representation for doubles.
11694# While Python doesn't currently have full support for these platforms
11695# (see e.g., issue 1762561), we can at least make sure that float <-> string
11696# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000011697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
11698$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
11699if test "${ac_cv_mixed_endian_double+set}" = set; then :
11700 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011701else
11702
Matthias Kloseb9621712010-04-24 17:59:49 +000011703if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011704 ac_cv_mixed_endian_double=no
11705else
Matthias Kloseb9621712010-04-24 17:59:49 +000011706 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011707/* end confdefs.h. */
11708
11709#include <string.h>
11710int main() {
11711 double x = 9006104071832581.0;
11712 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
11713 return 0;
11714 else
11715 return 1;
11716}
11717
11718_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011719if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011720 ac_cv_mixed_endian_double=yes
11721else
Matthias Kloseb9621712010-04-24 17:59:49 +000011722 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011723fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011724rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11725 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011726fi
11727
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011728fi
11729
Matthias Kloseb9621712010-04-24 17:59:49 +000011730{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
11731$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011732if test "$ac_cv_mixed_endian_double" = yes
11733then
11734
Matthias Kloseb9621712010-04-24 17:59:49 +000011735$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011736
11737fi
11738
Mark Dickinson7abf8d42009-04-18 20:17:52 +000011739# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000011740# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000011741# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000011742# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011743# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000011744# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011745
11746# This inline assembler syntax may also work for suncc and icc,
11747# so we try it on all platforms.
11748
Matthias Kloseb9621712010-04-24 17:59:49 +000011749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
11750$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
11751cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011752/* end confdefs.h. */
11753
11754int
11755main ()
11756{
11757
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011758 unsigned short cw;
11759 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
11760 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011761
11762 ;
11763 return 0;
11764}
11765_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011766if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011767 have_gcc_asm_for_x87=yes
11768else
Matthias Kloseb9621712010-04-24 17:59:49 +000011769 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011770fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011771rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011772{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
11773$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011774if test "$have_gcc_asm_for_x87" = yes
11775then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011776
Matthias Kloseb9621712010-04-24 17:59:49 +000011777$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011778
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011779fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011780
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011781# Detect whether system arithmetic is subject to x87-style double
11782# rounding issues. The result of this test has little meaning on non
11783# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
11784# mode is round-to-nearest and double rounding issues are present, and
11785# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000011786{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
11787$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011788# $BASECFLAGS may affect the result
11789ac_save_cc="$CC"
11790CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011791if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011792 ac_cv_x87_double_rounding=no
11793else
Matthias Kloseb9621712010-04-24 17:59:49 +000011794 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011795/* end confdefs.h. */
11796
11797#include <stdlib.h>
11798#include <math.h>
11799int main() {
11800 volatile double x, y, z;
11801 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
11802 x = 0.99999999999999989; /* 1-2**-53 */
11803 y = 1./x;
11804 if (y != 1.)
11805 exit(0);
11806 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
11807 x = 1e16;
11808 y = 2.99999;
11809 z = x + y;
11810 if (z != 1e16+4.)
11811 exit(0);
11812 /* both tests show evidence of double rounding */
11813 exit(1);
11814}
11815
11816_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011817if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011818 ac_cv_x87_double_rounding=no
11819else
Matthias Kloseb9621712010-04-24 17:59:49 +000011820 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011821fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011822rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11823 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011824fi
11825
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011826CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000011827{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
11828$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011829if test "$ac_cv_x87_double_rounding" = yes
11830then
11831
Matthias Kloseb9621712010-04-24 17:59:49 +000011832$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011833
11834fi
11835
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011836# ************************************
11837# * Check for mathematical functions *
11838# ************************************
11839
11840LIBS_SAVE=$LIBS
11841LIBS="$LIBS $LIBM"
11842
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011843# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
11844# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000011845{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
11846$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
11847if test "${ac_cv_tanh_preserves_zero_sign+set}" = set; then :
11848 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011849else
11850
Matthias Kloseb9621712010-04-24 17:59:49 +000011851if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011852 ac_cv_tanh_preserves_zero_sign=no
11853else
Matthias Kloseb9621712010-04-24 17:59:49 +000011854 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011855/* end confdefs.h. */
11856
11857#include <math.h>
11858#include <stdlib.h>
11859int main() {
11860 /* return 0 if either negative zeros don't exist
11861 on this platform or if negative zeros exist
11862 and tanh(-0.) == -0. */
11863 if (atan2(0., -1.) == atan2(-0., -1.) ||
11864 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
11865 else exit(1);
11866}
11867
11868_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011869if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011870 ac_cv_tanh_preserves_zero_sign=yes
11871else
Matthias Kloseb9621712010-04-24 17:59:49 +000011872 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011873fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011874rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11875 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011876fi
11877
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011878fi
11879
Matthias Kloseb9621712010-04-24 17:59:49 +000011880{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
11881$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011882if test "$ac_cv_tanh_preserves_zero_sign" = yes
11883then
11884
Matthias Kloseb9621712010-04-24 17:59:49 +000011885$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011886
11887fi
11888
Mark Dickinson9c113362009-09-05 10:36:23 +000011889for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
Matthias Kloseb9621712010-04-24 17:59:49 +000011890do :
11891 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11892ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Benjamin Petersond7f73e92010-09-05 00:09:07 +000011893eval as_val=\$$as_ac_var
11894 if test "x$as_val" = x""yes; then :
Mark Dickinson9c113362009-09-05 10:36:23 +000011895 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011896#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Mark Dickinson9c113362009-09-05 10:36:23 +000011897_ACEOF
11898
11899fi
11900done
11901
Mark Dickinson9c113362009-09-05 10:36:23 +000011902for ac_func in hypot lgamma log1p round tgamma
Matthias Kloseb9621712010-04-24 17:59:49 +000011903do :
11904 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11905ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Benjamin Petersond7f73e92010-09-05 00:09:07 +000011906eval as_val=\$$as_ac_var
11907 if test "x$as_val" = x""yes; then :
Christian Heimes99170a52007-12-19 02:07:34 +000011908 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011909#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimes99170a52007-12-19 02:07:34 +000011910_ACEOF
11911
11912fi
11913done
11914
Matthias Kloseb9621712010-04-24 17:59:49 +000011915ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
11916"
11917if test "x$ac_cv_have_decl_isinf" = x""yes; then :
11918 ac_have_decl=1
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011919else
Matthias Kloseb9621712010-04-24 17:59:49 +000011920 ac_have_decl=0
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011921fi
11922
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011923cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011924#define HAVE_DECL_ISINF $ac_have_decl
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011925_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011926ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
11927"
11928if test "x$ac_cv_have_decl_isnan" = x""yes; then :
11929 ac_have_decl=1
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011930else
Matthias Kloseb9621712010-04-24 17:59:49 +000011931 ac_have_decl=0
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011932fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011933
11934cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011935#define HAVE_DECL_ISNAN $ac_have_decl
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011936_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011937ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
11938"
11939if test "x$ac_cv_have_decl_isfinite" = x""yes; then :
11940 ac_have_decl=1
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011941else
Matthias Kloseb9621712010-04-24 17:59:49 +000011942 ac_have_decl=0
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011943fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011944
11945cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011946#define HAVE_DECL_ISFINITE $ac_have_decl
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011947_ACEOF
11948
11949
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000011950LIBS=$LIBS_SAVE
11951
Mark Dickinsona614f042009-11-28 12:48:43 +000011952# For multiprocessing module, check that sem_open
11953# actually works. For FreeBSD versions <= 7.2,
11954# the kernel module that provides POSIX semaphores
11955# isn't loaded by default, so an attempt to call
11956# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000011957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
11958$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
11959if test "${ac_cv_posix_semaphores_enabled+set}" = set; then :
11960 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000011961else
Matthias Kloseb9621712010-04-24 17:59:49 +000011962 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000011963 ac_cv_posix_semaphores_enabled=yes
11964else
Matthias Kloseb9621712010-04-24 17:59:49 +000011965 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000011966/* end confdefs.h. */
11967
11968#include <unistd.h>
11969#include <fcntl.h>
11970#include <stdio.h>
11971#include <semaphore.h>
11972#include <sys/stat.h>
11973
11974int main(void) {
11975 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
11976 if (a == SEM_FAILED) {
11977 perror("sem_open");
11978 return 1;
11979 }
11980 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000011981 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000011982 return 0;
11983}
11984
11985_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011986if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000011987 ac_cv_posix_semaphores_enabled=yes
11988else
Matthias Kloseb9621712010-04-24 17:59:49 +000011989 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000011990fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011991rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11992 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000011993fi
11994
11995
Mark Dickinsona614f042009-11-28 12:48:43 +000011996fi
11997
Matthias Kloseb9621712010-04-24 17:59:49 +000011998{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
11999$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000012000if test $ac_cv_posix_semaphores_enabled = no
12001then
12002
Matthias Kloseb9621712010-04-24 17:59:49 +000012003$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000012004
12005fi
12006
Mark Dickinson10683072009-04-18 21:18:19 +000012007# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000012008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
12009$as_echo_n "checking for broken sem_getvalue... " >&6; }
12010if test "${ac_cv_broken_sem_getvalue+set}" = set; then :
12011 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012012else
Matthias Kloseb9621712010-04-24 17:59:49 +000012013 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012014 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000012015else
Matthias Kloseb9621712010-04-24 17:59:49 +000012016 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000012017/* end confdefs.h. */
12018
12019#include <unistd.h>
12020#include <fcntl.h>
12021#include <stdio.h>
12022#include <semaphore.h>
12023#include <sys/stat.h>
12024
12025int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000012026 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000012027 int count;
12028 int res;
12029 if(a==SEM_FAILED){
12030 perror("sem_open");
12031 return 1;
12032
12033 }
12034 res = sem_getvalue(a, &count);
12035 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000012036 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000012037 return res==-1 ? 1 : 0;
12038}
12039
Mark Dickinson10683072009-04-18 21:18:19 +000012040_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012041if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012042 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000012043else
Matthias Kloseb9621712010-04-24 17:59:49 +000012044 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012045fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012046rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12047 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012048fi
12049
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012050
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012051fi
12052
Matthias Kloseb9621712010-04-24 17:59:49 +000012053{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
12054$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012055if test $ac_cv_broken_sem_getvalue = yes
12056then
12057
Matthias Kloseb9621712010-04-24 17:59:49 +000012058$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012059
12060fi
12061
Mark Dickinsonbd792642009-03-18 20:06:12 +000012062# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000012063{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
12064$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012065# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012066if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000012067 enableval=$enable_big_digits; case $enable_big_digits in
12068yes)
12069 enable_big_digits=30 ;;
12070no)
12071 enable_big_digits=15 ;;
1207215|30)
12073 ;;
12074*)
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012075 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 +000012076esac
Matthias Kloseb9621712010-04-24 17:59:49 +000012077{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
12078$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012079
12080cat >>confdefs.h <<_ACEOF
12081#define PYLONG_BITS_IN_DIGIT $enable_big_digits
12082_ACEOF
12083
12084
12085else
Matthias Kloseb9621712010-04-24 17:59:49 +000012086 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
12087$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012088fi
12089
12090
Guido van Rossumef2255b2000-03-10 22:30:29 +000012091# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012092ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
12093if test "x$ac_cv_header_wchar_h" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012094
12095
Matthias Kloseb9621712010-04-24 17:59:49 +000012096$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012097
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012098 wchar_h="yes"
12099
Guido van Rossumef2255b2000-03-10 22:30:29 +000012100else
Martin v. Löwis11437992002-04-12 09:54:03 +000012101 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000012102
12103fi
12104
Michael W. Hudson54241132001-12-07 15:38:26 +000012105
Martin v. Löwis11437992002-04-12 09:54:03 +000012106
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012107# determine wchar_t size
12108if test "$wchar_h" = yes
12109then
Matthias Kloseb9621712010-04-24 17:59:49 +000012110 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012111# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12112# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12113# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000012114{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
12115$as_echo_n "checking size of wchar_t... " >&6; }
12116if test "${ac_cv_sizeof_wchar_t+set}" = set; then :
12117 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012118else
Matthias Kloseb9621712010-04-24 17:59:49 +000012119 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
12120"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012121
Martin v. Löwis11437992002-04-12 09:54:03 +000012122else
Matthias Kloseb9621712010-04-24 17:59:49 +000012123 if test "$ac_cv_type_wchar_t" = yes; then
12124 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12125$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012126{ as_fn_set_status 77
12127as_fn_error "cannot compute sizeof (wchar_t)
12128See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012129 else
12130 ac_cv_sizeof_wchar_t=0
12131 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012132fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012133
Martin v. Löwis11437992002-04-12 09:54:03 +000012134fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012135{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
12136$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012137
12138
12139
Martin v. Löwis11437992002-04-12 09:54:03 +000012140cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012141#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012142_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012143
Michael W. Hudson54241132001-12-07 15:38:26 +000012144
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012145fi
12146
Matthias Kloseb9621712010-04-24 17:59:49 +000012147{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
12148$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012149have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012150cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012151/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012152
12153#include <tcl.h>
12154#if TCL_UTF_MAX != 6
12155# error "NOT UCS4_TCL"
12156#endif
12157int
12158main ()
12159{
12160
12161 ;
12162 return 0;
12163}
12164_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012165if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012166
12167
Matthias Kloseb9621712010-04-24 17:59:49 +000012168$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012169
12170 have_ucs4_tcl=yes
12171
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012172fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012173rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012174{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
12175$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012176
Skip Montanaro6dead952003-09-25 14:50:04 +000012177# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012178if test "$wchar_h" = yes
12179then
12180 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000012181 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
12182$as_echo_n "checking whether wchar_t is signed... " >&6; }
12183 if test "${ac_cv_wchar_t_signed+set}" = set; then :
12184 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012185else
12186
Matthias Kloseb9621712010-04-24 17:59:49 +000012187 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012188 ac_cv_wchar_t_signed=yes
12189else
Matthias Kloseb9621712010-04-24 17:59:49 +000012190 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012191/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012192
12193 #include <wchar.h>
12194 int main()
12195 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000012196 /* Success: exit code 0 */
12197 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012198 }
12199
12200_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012201if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012202 ac_cv_wchar_t_signed=yes
12203else
Matthias Kloseb9621712010-04-24 17:59:49 +000012204 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012205fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012206rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12207 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012208fi
12209
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012210fi
12211
Matthias Kloseb9621712010-04-24 17:59:49 +000012212 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
12213$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012214fi
12215
Matthias Kloseb9621712010-04-24 17:59:49 +000012216{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what type to use for str" >&5
12217$as_echo_n "checking what type to use for str... " >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000012218
12219# Check whether --with-wide-unicode was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012220if test "${with_wide_unicode+set}" = set; then :
Georg Brandl52d168a2008-01-07 18:10:24 +000012221 withval=$with_wide_unicode;
12222if test "$withval" != no
12223then unicode_size="4"
12224else unicode_size="2"
12225fi
12226
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012227else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012228
Georg Brandl52d168a2008-01-07 18:10:24 +000012229case "$have_ucs4_tcl" in
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012230 yes) unicode_size="4";;
Georg Brandl52d168a2008-01-07 18:10:24 +000012231 *) unicode_size="2" ;;
12232esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012233
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012234fi
12235
Martin v. Löwis0036cba2002-04-12 09:58:45 +000012236
12237
Georg Brandl52d168a2008-01-07 18:10:24 +000012238case "$unicode_size" in
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012239 4)
12240 $as_echo "#define Py_UNICODE_SIZE 4" >>confdefs.h
12241
12242 SOABI_QUALIFIERS="${SOABI_QUALIFIERS}u"
12243 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000012244 *) $as_echo "#define Py_UNICODE_SIZE 2" >>confdefs.h
Georg Brandl52d168a2008-01-07 18:10:24 +000012245 ;;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012246esac
12247
Michael W. Hudson54241132001-12-07 15:38:26 +000012248
Martin v. Löwis11437992002-04-12 09:54:03 +000012249
Georg Brandl52d168a2008-01-07 18:10:24 +000012250# wchar_t is only usable if it maps to an unsigned type
12251if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000012252 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000012253then
12254 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012255
Matthias Kloseb9621712010-04-24 17:59:49 +000012256$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012257
Matthias Kloseb9621712010-04-24 17:59:49 +000012258 $as_echo "#define PY_UNICODE_TYPE wchar_t" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012259
Georg Brandl52d168a2008-01-07 18:10:24 +000012260elif test "$ac_cv_sizeof_short" = "$unicode_size"
12261then
12262 PY_UNICODE_TYPE="unsigned short"
Matthias Kloseb9621712010-04-24 17:59:49 +000012263 $as_echo "#define PY_UNICODE_TYPE unsigned short" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012264
Georg Brandl52d168a2008-01-07 18:10:24 +000012265elif test "$ac_cv_sizeof_long" = "$unicode_size"
12266then
12267 PY_UNICODE_TYPE="unsigned long"
Matthias Kloseb9621712010-04-24 17:59:49 +000012268 $as_echo "#define PY_UNICODE_TYPE unsigned long" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012269
Georg Brandl52d168a2008-01-07 18:10:24 +000012270else
12271 PY_UNICODE_TYPE="no type found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012272fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012273{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PY_UNICODE_TYPE" >&5
12274$as_echo "$PY_UNICODE_TYPE" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000012275
12276# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000012277 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12278$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
12279if test "${ac_cv_c_bigendian+set}" = set; then :
12280 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000012281else
Matthias Kloseb9621712010-04-24 17:59:49 +000012282 ac_cv_c_bigendian=unknown
12283 # See if we're dealing with a universal compiler.
12284 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12285/* end confdefs.h. */
12286#ifndef __APPLE_CC__
12287 not a universal capable compiler
12288 #endif
12289 typedef int dummy;
12290
Skip Montanaro6dead952003-09-25 14:50:04 +000012291_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012292if ac_fn_c_try_compile "$LINENO"; then :
12293
12294 # Check for potential -arch flags. It is not universal unless
12295 # there are at least two -arch flags with different values.
12296 ac_arch=
12297 ac_prev=
12298 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12299 if test -n "$ac_prev"; then
12300 case $ac_word in
12301 i?86 | x86_64 | ppc | ppc64)
12302 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12303 ac_arch=$ac_word
12304 else
12305 ac_cv_c_bigendian=universal
12306 break
12307 fi
12308 ;;
12309 esac
12310 ac_prev=
12311 elif test "x$ac_word" = "x-arch"; then
12312 ac_prev=arch
12313 fi
12314 done
12315fi
12316rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12317 if test $ac_cv_c_bigendian = unknown; then
12318 # See if sys/param.h defines the BYTE_ORDER macro.
12319 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012320/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012321#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012322 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012323
Martin v. Löwis11437992002-04-12 09:54:03 +000012324int
12325main ()
12326{
Matthias Kloseb9621712010-04-24 17:59:49 +000012327#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12328 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12329 && LITTLE_ENDIAN)
12330 bogus endian macros
12331 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012332
12333 ;
12334 return 0;
12335}
12336_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012337if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012338 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000012339 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012340/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012341#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012342 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012343
Martin v. Löwis11437992002-04-12 09:54:03 +000012344int
12345main ()
12346{
Guido van Rossumef2255b2000-03-10 22:30:29 +000012347#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000012348 not big endian
12349 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012350
12351 ;
12352 return 0;
12353}
12354_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012355if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012356 ac_cv_c_bigendian=yes
12357else
Matthias Kloseb9621712010-04-24 17:59:49 +000012358 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000012359fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012360rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012361fi
12362rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12363 fi
12364 if test $ac_cv_c_bigendian = unknown; then
12365 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12366 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012367/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000012368#include <limits.h>
12369
Martin v. Löwis11437992002-04-12 09:54:03 +000012370int
12371main ()
12372{
Matthias Kloseb9621712010-04-24 17:59:49 +000012373#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12374 bogus endian macros
12375 #endif
12376
Martin v. Löwis11437992002-04-12 09:54:03 +000012377 ;
12378 return 0;
12379}
12380_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012381if ac_fn_c_try_compile "$LINENO"; then :
12382 # It does; now see whether it defined to _BIG_ENDIAN or not.
12383 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12384/* end confdefs.h. */
12385#include <limits.h>
12386
12387int
12388main ()
12389{
12390#ifndef _BIG_ENDIAN
12391 not big endian
12392 #endif
12393
12394 ;
12395 return 0;
12396}
12397_ACEOF
12398if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012399 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012400else
Matthias Kloseb9621712010-04-24 17:59:49 +000012401 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012402fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012403rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12404fi
12405rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12406 fi
12407 if test $ac_cv_c_bigendian = unknown; then
12408 # Compile a test program.
12409 if test "$cross_compiling" = yes; then :
12410 # Try to guess by grepping values from an object file.
12411 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12412/* end confdefs.h. */
12413short int ascii_mm[] =
12414 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12415 short int ascii_ii[] =
12416 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12417 int use_ascii (int i) {
12418 return ascii_mm[i] + ascii_ii[i];
12419 }
12420 short int ebcdic_ii[] =
12421 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12422 short int ebcdic_mm[] =
12423 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12424 int use_ebcdic (int i) {
12425 return ebcdic_mm[i] + ebcdic_ii[i];
12426 }
12427 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012428
Matthias Kloseb9621712010-04-24 17:59:49 +000012429int
12430main ()
12431{
12432return use_ascii (foo) == use_ebcdic (foo);
12433 ;
12434 return 0;
12435}
12436_ACEOF
12437if ac_fn_c_try_compile "$LINENO"; then :
12438 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12439 ac_cv_c_bigendian=yes
12440 fi
12441 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12442 if test "$ac_cv_c_bigendian" = unknown; then
12443 ac_cv_c_bigendian=no
12444 else
12445 # finding both strings is unlikely to happen, but who knows?
12446 ac_cv_c_bigendian=unknown
12447 fi
12448 fi
12449fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012450rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012451else
Matthias Kloseb9621712010-04-24 17:59:49 +000012452 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012453/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012454$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012455int
12456main ()
12457{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012458
Matthias Kloseb9621712010-04-24 17:59:49 +000012459 /* Are we little or big endian? From Harbison&Steele. */
12460 union
12461 {
12462 long int l;
12463 char c[sizeof (long int)];
12464 } u;
12465 u.l = 1;
12466 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012467
12468 ;
12469 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000012470}
Martin v. Löwis11437992002-04-12 09:54:03 +000012471_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012472if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012473 ac_cv_c_bigendian=no
12474else
Matthias Kloseb9621712010-04-24 17:59:49 +000012475 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000012476fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012477rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12478 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000012479fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012480
Matthias Kloseb9621712010-04-24 17:59:49 +000012481 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012482fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012483{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12484$as_echo "$ac_cv_c_bigendian" >&6; }
12485 case $ac_cv_c_bigendian in #(
12486 yes)
12487 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12488;; #(
12489 no)
12490 ;; #(
12491 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012492
Matthias Kloseb9621712010-04-24 17:59:49 +000012493$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012494
Matthias Kloseb9621712010-04-24 17:59:49 +000012495 ;; #(
12496 *)
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012497 as_fn_error "unknown endianness
12498 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000012499 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000012500
Michael W. Hudson54241132001-12-07 15:38:26 +000012501
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012502# ABI version string for Python extension modules. This appears between the
12503# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
12504# from the following attributes which affect the ABI of this Python build (in
12505# this order):
12506#
12507# * The Python implementation (always 'cpython-' for us)
12508# * The major and minor version numbers
12509# * --with-pydebug (adds a 'd')
12510# * --with-pymalloc (adds a 'm')
12511# * --with-wide-unicode (adds a 'u')
12512#
12513# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012514# would get a shared library ABI version tag of 'cpython-32dmu' and shared
12515# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012516
12517{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
12518$as_echo_n "checking SOABI... " >&6; }
12519SOABI='cpython-'`echo $VERSION | tr -d .`${SOABI_QUALIFIERS}
12520{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
12521$as_echo "$SOABI" >&6; }
12522
12523# SO is the extension of shared libraries `(including the dot!)
12524# -- usually .so, .sl on HP-UX, .dll on Cygwin
12525{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SO" >&5
12526$as_echo_n "checking SO... " >&6; }
12527if test -z "$SO"
12528then
12529 case $ac_sys_system in
12530 hp*|HP*)
12531 case `uname -m` in
12532 ia64) SO=.so;;
12533 *) SO=.sl;;
12534 esac
12535 ;;
12536 CYGWIN*) SO=.dll;;
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012537 Linux*) SO=.${SOABI}.so;;
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012538 *) SO=.so;;
12539 esac
12540else
12541 # this might also be a termcap variable, see #610332
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012542 echo
12543 echo '====================================================================='
12544 echo '+ +'
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012545 echo '+ WARNING: You have set SO in your environment. +'
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012546 echo '+ Do you really mean to change the extension for shared libraries? +'
12547 echo '+ Continuing in 10 seconds to let you to ponder. +'
12548 echo '+ +'
12549 echo '====================================================================='
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012550 sleep 10
12551fi
12552{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SO" >&5
12553$as_echo "$SO" >&6; }
12554
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012555# Check whether right shifting a negative integer extends the sign bit
12556# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000012557{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
12558$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
12559if test "${ac_cv_rshift_extends_sign+set}" = set; then :
12560 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000012561else
Martin v. Löwis11437992002-04-12 09:54:03 +000012562
Matthias Kloseb9621712010-04-24 17:59:49 +000012563if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000012564 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012565else
Matthias Kloseb9621712010-04-24 17:59:49 +000012566 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012567/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012568
12569int main()
12570{
Vladimir Marangozova6180282000-07-12 05:05:06 +000012571 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012572}
12573
Martin v. Löwis11437992002-04-12 09:54:03 +000012574_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012575if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000012576 ac_cv_rshift_extends_sign=yes
12577else
Matthias Kloseb9621712010-04-24 17:59:49 +000012578 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000012579fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012580rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12581 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000012582fi
12583
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012584fi
12585
Matthias Kloseb9621712010-04-24 17:59:49 +000012586{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
12587$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000012588if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012589then
Martin v. Löwis11437992002-04-12 09:54:03 +000012590
Matthias Kloseb9621712010-04-24 17:59:49 +000012591$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012592
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012593fi
12594
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012595# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000012596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
12597$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
12598if test "${ac_cv_have_getc_unlocked+set}" = set; then :
12599 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012600else
Martin v. Löwis11437992002-04-12 09:54:03 +000012601
Matthias Kloseb9621712010-04-24 17:59:49 +000012602cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012603/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012604#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012605int
12606main ()
12607{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012608
12609 FILE *f = fopen("/dev/null", "r");
12610 flockfile(f);
12611 getc_unlocked(f);
12612 funlockfile(f);
12613
Martin v. Löwis11437992002-04-12 09:54:03 +000012614 ;
12615 return 0;
12616}
12617_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012618if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012619 ac_cv_have_getc_unlocked=yes
12620else
Matthias Kloseb9621712010-04-24 17:59:49 +000012621 ac_cv_have_getc_unlocked=no
12622fi
12623rm -f core conftest.err conftest.$ac_objext \
12624 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012625fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012626
Matthias Kloseb9621712010-04-24 17:59:49 +000012627{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
12628$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012629if test "$ac_cv_have_getc_unlocked" = yes
12630then
Martin v. Löwis11437992002-04-12 09:54:03 +000012631
Matthias Kloseb9621712010-04-24 17:59:49 +000012632$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012633
12634fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012635
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012636# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000012637# save the value of LIBS so we don't actually link Python with readline
12638LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012639
Gregory P. Smith18820942008-09-07 06:24:49 +000012640# On some systems we need to link readline to a termcap compatible
12641# library. NOTE: Keep the precedence of listed libraries synchronised
12642# with setup.py.
12643py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012644{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
12645$as_echo_n "checking how to link readline libs... " >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012646for py_libtermcap in "" ncursesw ncurses curses termcap; do
12647 if test -z "$py_libtermcap"; then
12648 READLINE_LIBS="-lreadline"
12649 else
12650 READLINE_LIBS="-lreadline -l$py_libtermcap"
12651 fi
12652 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000012653 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012654/* end confdefs.h. */
12655
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012656/* Override any GCC internal prototype to avoid an error.
12657 Use char because int might match the return type of a GCC
12658 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012659#ifdef __cplusplus
12660extern "C"
12661#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012662char readline ();
12663int
12664main ()
12665{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012666return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012667 ;
12668 return 0;
12669}
12670_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012671if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000012672 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012673fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012674rm -f core conftest.err conftest.$ac_objext \
12675 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000012676 if test $py_cv_lib_readline = yes; then
12677 break
12678 fi
12679done
12680# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
12681#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000012682if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012683 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
12684$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012685else
Matthias Kloseb9621712010-04-24 17:59:49 +000012686 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
12687$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012688
Matthias Kloseb9621712010-04-24 17:59:49 +000012689$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012690
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012691fi
12692
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012693# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000012694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
12695$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
12696if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then :
12697 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012698else
12699 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012700LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012701cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012702/* end confdefs.h. */
12703
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012704/* Override any GCC internal prototype to avoid an error.
12705 Use char because int might match the return type of a GCC
12706 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012707#ifdef __cplusplus
12708extern "C"
12709#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012710char rl_callback_handler_install ();
12711int
12712main ()
12713{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012714return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012715 ;
12716 return 0;
12717}
12718_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012719if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012720 ac_cv_lib_readline_rl_callback_handler_install=yes
12721else
Matthias Kloseb9621712010-04-24 17:59:49 +000012722 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012723fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012724rm -f core conftest.err conftest.$ac_objext \
12725 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012726LIBS=$ac_check_lib_save_LIBS
12727fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012728{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
12729$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
12730if test "x$ac_cv_lib_readline_rl_callback_handler_install" = x""yes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012731
Matthias Kloseb9621712010-04-24 17:59:49 +000012732$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012733
12734fi
12735
12736
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012737# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000012738cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012739/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012740#include <readline/readline.h>
12741_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012742if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012743 have_readline=yes
12744else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012745 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000012746
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012747fi
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012748rm -f conftest.err conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012749if test $have_readline = yes
12750then
Matthias Kloseb9621712010-04-24 17:59:49 +000012751 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012752/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012753#include <readline/readline.h>
12754
12755_ACEOF
12756if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012757 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012758
Matthias Kloseb9621712010-04-24 17:59:49 +000012759$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012760
12761fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012762rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012763
Matthias Kloseb9621712010-04-24 17:59:49 +000012764 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000012765/* end confdefs.h. */
12766#include <readline/readline.h>
12767
12768_ACEOF
12769if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012770 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000012771
Matthias Kloseb9621712010-04-24 17:59:49 +000012772$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000012773
12774fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012775rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000012776
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012777fi
12778
Martin v. Löwis0daad592001-09-30 21:09:59 +000012779# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000012780{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
12781$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
12782if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then :
12783 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000012784else
Martin v. Löwis11437992002-04-12 09:54:03 +000012785 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012786LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012787cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012788/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012789
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012790/* Override any GCC internal prototype to avoid an error.
12791 Use char because int might match the return type of a GCC
12792 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012793#ifdef __cplusplus
12794extern "C"
12795#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012796char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012797int
12798main ()
12799{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012800return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012801 ;
12802 return 0;
12803}
12804_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012805if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012806 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000012807else
Matthias Kloseb9621712010-04-24 17:59:49 +000012808 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000012809fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012810rm -f core conftest.err conftest.$ac_objext \
12811 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012812LIBS=$ac_check_lib_save_LIBS
12813fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012814{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
12815$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
12816if test "x$ac_cv_lib_readline_rl_pre_input_hook" = x""yes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012817
Matthias Kloseb9621712010-04-24 17:59:49 +000012818$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000012819
Martin v. Löwis0daad592001-09-30 21:09:59 +000012820fi
12821
Michael W. Hudson54241132001-12-07 15:38:26 +000012822
Thomas Wouters89d996e2007-09-08 17:39:28 +000012823# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000012824{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
12825$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
12826if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then :
12827 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000012828else
12829 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012830LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012831cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000012832/* end confdefs.h. */
12833
12834/* Override any GCC internal prototype to avoid an error.
12835 Use char because int might match the return type of a GCC
12836 builtin and then its argument prototype would still apply. */
12837#ifdef __cplusplus
12838extern "C"
12839#endif
12840char rl_completion_display_matches_hook ();
12841int
12842main ()
12843{
12844return rl_completion_display_matches_hook ();
12845 ;
12846 return 0;
12847}
12848_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012849if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000012850 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
12851else
Matthias Kloseb9621712010-04-24 17:59:49 +000012852 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000012853fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012854rm -f core conftest.err conftest.$ac_objext \
12855 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000012856LIBS=$ac_check_lib_save_LIBS
12857fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012858{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
12859$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
12860if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = x""yes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000012861
Matthias Kloseb9621712010-04-24 17:59:49 +000012862$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000012863
12864fi
12865
12866
Martin v. Löwis0daad592001-09-30 21:09:59 +000012867# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000012868{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
12869$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
12870if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then :
12871 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000012872else
Martin v. Löwis11437992002-04-12 09:54:03 +000012873 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012874LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012875cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012876/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012877
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012878/* Override any GCC internal prototype to avoid an error.
12879 Use char because int might match the return type of a GCC
12880 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012881#ifdef __cplusplus
12882extern "C"
12883#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012884char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012885int
12886main ()
12887{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012888return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012889 ;
12890 return 0;
12891}
12892_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012893if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012894 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000012895else
Matthias Kloseb9621712010-04-24 17:59:49 +000012896 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000012897fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012898rm -f core conftest.err conftest.$ac_objext \
12899 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012900LIBS=$ac_check_lib_save_LIBS
12901fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012902{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
12903$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
12904if test "x$ac_cv_lib_readline_rl_completion_matches" = x""yes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012905
Matthias Kloseb9621712010-04-24 17:59:49 +000012906$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000012907
Guido van Rossum353ae582001-07-10 16:45:32 +000012908fi
12909
Jack Jansendd19cf82001-12-06 22:36:17 +000012910
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012911# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000012912cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012913/* end confdefs.h. */
12914#include <readline/readline.h>
12915_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012916if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012917 have_readline=yes
12918else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012919 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000012920
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012921fi
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012922rm -f conftest.err conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012923if test $have_readline = yes
12924then
Matthias Kloseb9621712010-04-24 17:59:49 +000012925 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012926/* end confdefs.h. */
12927#include <readline/readline.h>
12928
12929_ACEOF
12930if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012931 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012932
Matthias Kloseb9621712010-04-24 17:59:49 +000012933$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012934
12935fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012936rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012937
12938fi
12939
Martin v. Löwis82bca632006-02-10 20:49:30 +000012940# End of readline checks: restore LIBS
12941LIBS=$LIBS_no_readline
12942
Matthias Kloseb9621712010-04-24 17:59:49 +000012943{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
12944$as_echo_n "checking for broken nice()... " >&6; }
12945if test "${ac_cv_broken_nice+set}" = set; then :
12946 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000012947else
Martin v. Löwis11437992002-04-12 09:54:03 +000012948
Matthias Kloseb9621712010-04-24 17:59:49 +000012949if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000012950 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012951else
Matthias Kloseb9621712010-04-24 17:59:49 +000012952 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012953/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012954
12955int main()
12956{
12957 int val1 = nice(1);
12958 if (val1 != -1 && val1 == nice(2))
12959 exit(0);
12960 exit(1);
12961}
12962
Martin v. Löwis11437992002-04-12 09:54:03 +000012963_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012964if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012965 ac_cv_broken_nice=yes
12966else
Matthias Kloseb9621712010-04-24 17:59:49 +000012967 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012968fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012969rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12970 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012971fi
12972
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012973fi
12974
Matthias Kloseb9621712010-04-24 17:59:49 +000012975{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
12976$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012977if test "$ac_cv_broken_nice" = yes
12978then
Martin v. Löwis11437992002-04-12 09:54:03 +000012979
Matthias Kloseb9621712010-04-24 17:59:49 +000012980$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012981
12982fi
12983
Matthias Kloseb9621712010-04-24 17:59:49 +000012984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
12985$as_echo_n "checking for broken poll()... " >&6; }
12986if test "${ac_cv_broken_poll+set}" = set; then :
12987 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012988else
Matthias Kloseb9621712010-04-24 17:59:49 +000012989 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012990 ac_cv_broken_poll=no
12991else
Matthias Kloseb9621712010-04-24 17:59:49 +000012992 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012993/* end confdefs.h. */
12994
12995#include <poll.h>
12996
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012997int main()
12998{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012999 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013000 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013001
13002 close (42);
13003
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013004 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013005 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013006 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013007 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013008 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013009 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013010 return 1;
13011}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013012
13013_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013014if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013015 ac_cv_broken_poll=yes
13016else
Matthias Kloseb9621712010-04-24 17:59:49 +000013017 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013018fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013019rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13020 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013021fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013022
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013023fi
13024
Matthias Kloseb9621712010-04-24 17:59:49 +000013025{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
13026$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013027if test "$ac_cv_broken_poll" = yes
13028then
13029
Matthias Kloseb9621712010-04-24 17:59:49 +000013030$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013031
13032fi
13033
Brett Cannon43802422005-02-10 20:48:03 +000013034# 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 +000013035# (which is not required by ISO C or UNIX spec) and/or if we support
13036# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000013037ac_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 +000013038#include <$ac_cv_struct_tm>
13039
Matthias Kloseb9621712010-04-24 17:59:49 +000013040"
13041if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then :
Brett Cannon43802422005-02-10 20:48:03 +000013042
13043cat >>confdefs.h <<_ACEOF
13044#define HAVE_STRUCT_TM_TM_ZONE 1
13045_ACEOF
13046
13047
13048fi
13049
13050if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13051
Matthias Kloseb9621712010-04-24 17:59:49 +000013052$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013053
13054else
Matthias Kloseb9621712010-04-24 17:59:49 +000013055 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13056"
13057if test "x$ac_cv_have_decl_tzname" = x""yes; then :
13058 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013059else
Matthias Kloseb9621712010-04-24 17:59:49 +000013060 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013061fi
13062
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013063cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013064#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013065_ACEOF
13066
Matthias Kloseb9621712010-04-24 17:59:49 +000013067 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13068$as_echo_n "checking for tzname... " >&6; }
13069if test "${ac_cv_var_tzname+set}" = set; then :
13070 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013071else
Matthias Kloseb9621712010-04-24 17:59:49 +000013072 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013073/* end confdefs.h. */
13074#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013075#if !HAVE_DECL_TZNAME
13076extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000013077#endif
13078
13079int
13080main ()
13081{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013082return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000013083 ;
13084 return 0;
13085}
13086_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013087if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000013088 ac_cv_var_tzname=yes
13089else
Matthias Kloseb9621712010-04-24 17:59:49 +000013090 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000013091fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013092rm -f core conftest.err conftest.$ac_objext \
13093 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013094fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013095{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13096$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000013097 if test $ac_cv_var_tzname = yes; then
13098
Matthias Kloseb9621712010-04-24 17:59:49 +000013099$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013100
13101 fi
13102fi
13103
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013104
Martin v. Löwis1d459062005-03-14 21:23:33 +000013105# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000013106{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
13107$as_echo_n "checking for working tzset()... " >&6; }
13108if test "${ac_cv_working_tzset+set}" = set; then :
13109 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013110else
13111
Matthias Kloseb9621712010-04-24 17:59:49 +000013112if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013113 ac_cv_working_tzset=no
13114else
Matthias Kloseb9621712010-04-24 17:59:49 +000013115 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013116/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013117
13118#include <stdlib.h>
13119#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000013120#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000013121
13122#if HAVE_TZNAME
13123extern char *tzname[];
13124#endif
13125
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013126int main()
13127{
Brett Cannon18367812003-09-19 00:59:16 +000013128 /* Note that we need to ensure that not only does tzset(3)
13129 do 'something' with localtime, but it works as documented
13130 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000013131 This includes making sure that tzname is set properly if
13132 tm->tm_zone does not exist since it is the alternative way
13133 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000013134
13135 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000013136 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000013137 */
13138
Martin v. Löwis1d459062005-03-14 21:23:33 +000013139 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000013140 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
13141
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013142 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013143 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013144 if (localtime(&groundhogday)->tm_hour != 0)
13145 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013146#if HAVE_TZNAME
13147 /* For UTC, tzname[1] is sometimes "", sometimes " " */
13148 if (strcmp(tzname[0], "UTC") ||
13149 (tzname[1][0] != 0 && tzname[1][0] != ' '))
13150 exit(1);
13151#endif
Brett Cannon18367812003-09-19 00:59:16 +000013152
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013153 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013154 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013155 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013156 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013157#if HAVE_TZNAME
13158 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
13159 exit(1);
13160#endif
Brett Cannon18367812003-09-19 00:59:16 +000013161
13162 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
13163 tzset();
13164 if (localtime(&groundhogday)->tm_hour != 11)
13165 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013166#if HAVE_TZNAME
13167 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
13168 exit(1);
13169#endif
13170
13171#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000013172 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
13173 exit(1);
13174 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
13175 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013176#endif
Brett Cannon18367812003-09-19 00:59:16 +000013177
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013178 exit(0);
13179}
13180
13181_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013182if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013183 ac_cv_working_tzset=yes
13184else
Matthias Kloseb9621712010-04-24 17:59:49 +000013185 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013186fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013187rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13188 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013189fi
13190
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013191fi
13192
Matthias Kloseb9621712010-04-24 17:59:49 +000013193{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
13194$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013195if test "$ac_cv_working_tzset" = yes
13196then
13197
Matthias Kloseb9621712010-04-24 17:59:49 +000013198$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013199
13200fi
13201
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013202# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013203{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
13204$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
13205if test "${ac_cv_stat_tv_nsec+set}" = set; then :
13206 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013207else
Matthias Kloseb9621712010-04-24 17:59:49 +000013208 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013209/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013210#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013211int
13212main ()
13213{
13214
13215struct stat st;
13216st.st_mtim.tv_nsec = 1;
13217
13218 ;
13219 return 0;
13220}
13221_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013222if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000013223 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013224else
Matthias Kloseb9621712010-04-24 17:59:49 +000013225 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013226fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013227rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13228fi
13229
Matthias Kloseb9621712010-04-24 17:59:49 +000013230{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
13231$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013232if test "$ac_cv_stat_tv_nsec" = yes
13233then
13234
Matthias Kloseb9621712010-04-24 17:59:49 +000013235$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013236
13237fi
13238
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013239# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013240{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
13241$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
13242if test "${ac_cv_stat_tv_nsec2+set}" = set; then :
13243 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013244else
Matthias Kloseb9621712010-04-24 17:59:49 +000013245 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013246/* end confdefs.h. */
13247#include <sys/stat.h>
13248int
13249main ()
13250{
13251
13252struct stat st;
13253st.st_mtimespec.tv_nsec = 1;
13254
13255 ;
13256 return 0;
13257}
13258_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013259if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013260 ac_cv_stat_tv_nsec2=yes
13261else
Matthias Kloseb9621712010-04-24 17:59:49 +000013262 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013263fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013264rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13265fi
13266
Matthias Kloseb9621712010-04-24 17:59:49 +000013267{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
13268$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013269if test "$ac_cv_stat_tv_nsec2" = yes
13270then
13271
Matthias Kloseb9621712010-04-24 17:59:49 +000013272$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013273
13274fi
13275
Jack Jansen666b1e72001-10-31 12:11:48 +000013276# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000013277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
13278$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
13279if test "${ac_cv_mvwdelch_is_expression+set}" = set; then :
13280 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013281else
Matthias Kloseb9621712010-04-24 17:59:49 +000013282 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013283/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013284#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013285int
13286main ()
13287{
Jack Jansen666b1e72001-10-31 12:11:48 +000013288
13289 int rtn;
13290 rtn = mvwdelch(0,0,0);
13291
Martin v. Löwis11437992002-04-12 09:54:03 +000013292 ;
13293 return 0;
13294}
13295_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013296if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013297 ac_cv_mvwdelch_is_expression=yes
13298else
Matthias Kloseb9621712010-04-24 17:59:49 +000013299 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013300fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013301rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13302fi
13303
Matthias Kloseb9621712010-04-24 17:59:49 +000013304{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
13305$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000013306
13307if test "$ac_cv_mvwdelch_is_expression" = yes
13308then
Martin v. Löwis11437992002-04-12 09:54:03 +000013309
Matthias Kloseb9621712010-04-24 17:59:49 +000013310$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013311
13312fi
13313
Matthias Kloseb9621712010-04-24 17:59:49 +000013314{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
13315$as_echo_n "checking whether WINDOW has _flags... " >&6; }
13316if test "${ac_cv_window_has_flags+set}" = set; then :
13317 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013318else
Matthias Kloseb9621712010-04-24 17:59:49 +000013319 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013320/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013321#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013322int
13323main ()
13324{
Jack Jansen666b1e72001-10-31 12:11:48 +000013325
13326 WINDOW *w;
13327 w->_flags = 0;
13328
Martin v. Löwis11437992002-04-12 09:54:03 +000013329 ;
13330 return 0;
13331}
13332_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013333if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013334 ac_cv_window_has_flags=yes
13335else
Matthias Kloseb9621712010-04-24 17:59:49 +000013336 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013337fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013338rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13339fi
13340
Matthias Kloseb9621712010-04-24 17:59:49 +000013341{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
13342$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013343
Jack Jansen666b1e72001-10-31 12:11:48 +000013344
13345if test "$ac_cv_window_has_flags" = yes
13346then
Martin v. Löwis11437992002-04-12 09:54:03 +000013347
Matthias Kloseb9621712010-04-24 17:59:49 +000013348$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013349
13350fi
13351
Matthias Kloseb9621712010-04-24 17:59:49 +000013352{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
13353$as_echo_n "checking for is_term_resized... " >&6; }
13354cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013355/* end confdefs.h. */
13356#include <curses.h>
13357int
13358main ()
13359{
13360void *x=is_term_resized
13361 ;
13362 return 0;
13363}
13364_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013365if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013366
Matthias Kloseb9621712010-04-24 17:59:49 +000013367$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013368
Matthias Kloseb159a552010-04-25 21:00:44 +000013369 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013370$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013371else
Matthias Kloseb9621712010-04-24 17:59:49 +000013372 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13373$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013374
13375fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013376rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13377
Matthias Kloseb9621712010-04-24 17:59:49 +000013378{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
13379$as_echo_n "checking for resize_term... " >&6; }
13380cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013381/* end confdefs.h. */
13382#include <curses.h>
13383int
13384main ()
13385{
13386void *x=resize_term
13387 ;
13388 return 0;
13389}
13390_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013391if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013392
Matthias Kloseb9621712010-04-24 17:59:49 +000013393$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013394
Matthias Kloseb159a552010-04-25 21:00:44 +000013395 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013396$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013397else
Matthias Kloseb9621712010-04-24 17:59:49 +000013398 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13399$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013400
13401fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013402rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13403
Matthias Kloseb9621712010-04-24 17:59:49 +000013404{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
13405$as_echo_n "checking for resizeterm... " >&6; }
13406cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013407/* end confdefs.h. */
13408#include <curses.h>
13409int
13410main ()
13411{
13412void *x=resizeterm
13413 ;
13414 return 0;
13415}
13416_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013417if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013418
Matthias Kloseb9621712010-04-24 17:59:49 +000013419$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013420
Matthias Kloseb159a552010-04-25 21:00:44 +000013421 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013422$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013423else
Matthias Kloseb9621712010-04-24 17:59:49 +000013424 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13425$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013426
13427fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013428rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13429
Matthias Kloseb9621712010-04-24 17:59:49 +000013430{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
13431$as_echo_n "checking for /dev/ptmx... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013432
13433if test -r /dev/ptmx
13434then
Matthias Kloseb9621712010-04-24 17:59:49 +000013435 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13436$as_echo "yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013437
Matthias Kloseb9621712010-04-24 17:59:49 +000013438$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013439
Thomas Wouters89f507f2006-12-13 04:49:30 +000013440else
Matthias Kloseb9621712010-04-24 17:59:49 +000013441 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13442$as_echo "no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013443fi
13444
Matthias Kloseb9621712010-04-24 17:59:49 +000013445{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
13446$as_echo_n "checking for /dev/ptc... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013447
13448if test -r /dev/ptc
13449then
Matthias Kloseb9621712010-04-24 17:59:49 +000013450 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13451$as_echo "yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013452
Matthias Kloseb9621712010-04-24 17:59:49 +000013453$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000013454
Thomas Wouters89f507f2006-12-13 04:49:30 +000013455else
Matthias Kloseb9621712010-04-24 17:59:49 +000013456 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13457$as_echo "no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013458fi
13459
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013460if test "$have_long_long" = yes
13461then
Matthias Kloseb9621712010-04-24 17:59:49 +000013462 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
13463$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
13464 if test "${ac_cv_have_long_long_format+set}" = set; then :
13465 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013466else
Matthias Kloseb9621712010-04-24 17:59:49 +000013467 if test "$cross_compiling" = yes; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013468 ac_cv_have_long_long_format=no
13469else
Matthias Kloseb9621712010-04-24 17:59:49 +000013470 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013471/* end confdefs.h. */
13472
13473 #include <stdio.h>
13474 #include <stddef.h>
13475 #include <string.h>
13476
13477 #ifdef HAVE_SYS_TYPES_H
13478 #include <sys/types.h>
13479 #endif
13480
13481 int main()
13482 {
13483 char buffer[256];
13484
13485 if (sprintf(buffer, "%lld", (long long)123) < 0)
13486 return 1;
13487 if (strcmp(buffer, "123"))
13488 return 1;
13489
13490 if (sprintf(buffer, "%lld", (long long)-123) < 0)
13491 return 1;
13492 if (strcmp(buffer, "-123"))
13493 return 1;
13494
13495 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
13496 return 1;
13497 if (strcmp(buffer, "123"))
13498 return 1;
13499
13500 return 0;
13501 }
13502
13503_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013504if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013505 ac_cv_have_long_long_format=yes
13506else
Matthias Kloseb9621712010-04-24 17:59:49 +000013507 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013508fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013509rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13510 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013511fi
13512
13513
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013514fi
13515
Matthias Kloseb9621712010-04-24 17:59:49 +000013516 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
13517$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013518fi
13519
Mark Dickinson89d7d412009-12-31 20:50:59 +000013520if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013521then
13522
Matthias Kloseb9621712010-04-24 17:59:49 +000013523$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013524
13525fi
13526
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000013527if test $ac_sys_system = Darwin
13528then
13529 LIBS="$LIBS -framework CoreFoundation"
13530fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013531
Matthias Kloseb9621712010-04-24 17:59:49 +000013532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
13533$as_echo_n "checking for %zd printf() format support... " >&6; }
13534if test "${ac_cv_have_size_t_format+set}" = set; then :
13535 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013536else
Matthias Kloseb9621712010-04-24 17:59:49 +000013537 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000013538 ac_cv_have_size_t_format="cross -- assuming yes"
13539
Thomas Wouters477c8d52006-05-27 19:21:47 +000013540else
Matthias Kloseb9621712010-04-24 17:59:49 +000013541 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000013542/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013543
Thomas Wouters477c8d52006-05-27 19:21:47 +000013544#include <stdio.h>
13545#include <stddef.h>
13546#include <string.h>
13547
Christian Heimes2c181612007-12-17 20:04:13 +000013548#ifdef HAVE_SYS_TYPES_H
13549#include <sys/types.h>
13550#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000013551
13552#ifdef HAVE_SSIZE_T
13553typedef ssize_t Py_ssize_t;
13554#elif SIZEOF_VOID_P == SIZEOF_LONG
13555typedef long Py_ssize_t;
13556#else
13557typedef int Py_ssize_t;
13558#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000013559
Christian Heimes2c181612007-12-17 20:04:13 +000013560int main()
13561{
13562 char buffer[256];
13563
Thomas Wouters477c8d52006-05-27 19:21:47 +000013564 if(sprintf(buffer, "%zd", (size_t)123) < 0)
13565 return 1;
13566
Thomas Wouters89f507f2006-12-13 04:49:30 +000013567 if (strcmp(buffer, "123"))
13568 return 1;
13569
13570 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
13571 return 1;
13572
13573 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000013574 return 1;
13575
13576 return 0;
13577}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013578
Thomas Wouters477c8d52006-05-27 19:21:47 +000013579_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013580if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013581 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013582else
Matthias Kloseb9621712010-04-24 17:59:49 +000013583 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013584fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013585rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13586 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013587fi
13588
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013589fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013590{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
13591$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000013592if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013593
Matthias Kloseb9621712010-04-24 17:59:49 +000013594$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013595
13596fi
13597
Matthias Kloseb9621712010-04-24 17:59:49 +000013598ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000013599#ifdef HAVE_SYS_TYPES_H
13600#include <sys/types.h>
13601#endif
13602#ifdef HAVE_SYS_SOCKET_H
13603#include <sys/socket.h>
13604#endif
13605
Matthias Kloseb9621712010-04-24 17:59:49 +000013606"
13607if test "x$ac_cv_type_socklen_t" = x""yes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000013608
Martin v. Löwis11437992002-04-12 09:54:03 +000013609else
Guido van Rossum95713eb2000-05-18 20:53:31 +000013610
Matthias Kloseb9621712010-04-24 17:59:49 +000013611$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000013612
13613fi
13614
Michael W. Hudson54241132001-12-07 15:38:26 +000013615
Matthias Kloseb9621712010-04-24 17:59:49 +000013616{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
13617$as_echo_n "checking for broken mbstowcs... " >&6; }
13618if test "${ac_cv_broken_mbstowcs+set}" = set; then :
13619 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013620else
Matthias Kloseb9621712010-04-24 17:59:49 +000013621 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000013622 ac_cv_broken_mbstowcs=no
13623else
Matthias Kloseb9621712010-04-24 17:59:49 +000013624 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000013625/* end confdefs.h. */
13626
13627#include<stdlib.h>
13628int main() {
13629 size_t len = -1;
13630 const char *str = "text";
13631 len = mbstowcs(NULL, str, 0);
13632 return (len != 4);
13633}
13634
13635_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013636if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000013637 ac_cv_broken_mbstowcs=no
13638else
Matthias Kloseb9621712010-04-24 17:59:49 +000013639 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000013640fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013641rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13642 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000013643fi
13644
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013645fi
13646
Matthias Kloseb9621712010-04-24 17:59:49 +000013647{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
13648$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000013649if test "$ac_cv_broken_mbstowcs" = yes
13650then
13651
Matthias Kloseb9621712010-04-24 17:59:49 +000013652$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000013653
13654fi
13655
Antoine Pitrou042b1282010-08-13 21:15:58 +000013656{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
13657$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
13658if test "${ac_cv_computed_gotos+set}" = set; then :
13659 $as_echo_n "(cached) " >&6
13660else
13661 if test "$cross_compiling" = yes; then :
13662 ac_cv_computed_gotos=no
13663else
13664 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13665/* end confdefs.h. */
13666
13667int main(int argc, char **argv)
13668{
13669 static void *targets[1] = { &&LABEL1 };
13670 goto LABEL2;
13671LABEL1:
13672 return 0;
13673LABEL2:
13674 goto *targets[0];
13675 return 1;
13676}
13677
13678_ACEOF
13679if ac_fn_c_try_run "$LINENO"; then :
13680 ac_cv_computed_gotos=yes
13681else
13682 ac_cv_computed_gotos=no
13683fi
13684rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13685 conftest.$ac_objext conftest.beam conftest.$ac_ext
13686fi
13687
13688fi
13689
13690{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
13691$as_echo "$ac_cv_computed_gotos" >&6; }
13692if test "$ac_cv_computed_gotos" = yes
13693then
13694
13695$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
13696
13697fi
13698
Antoine Pitroub52ec782009-01-25 16:34:23 +000013699# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000013700{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
13701$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013702
13703# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013704if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000013705 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000013706if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000013707then
13708
Matthias Kloseb9621712010-04-24 17:59:49 +000013709$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000013710
Matthias Kloseb9621712010-04-24 17:59:49 +000013711 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13712$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013713fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000013714if test "$withval" = no
13715then
13716
13717$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
13718
Matthias Kloseb9621712010-04-24 17:59:49 +000013719 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13720$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013721fi
13722
Antoine Pitrou042b1282010-08-13 21:15:58 +000013723else
13724 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
13725$as_echo "no value specified" >&6; }
13726fi
13727
Antoine Pitroub52ec782009-01-25 16:34:23 +000013728
13729
Michael W. Hudson54241132001-12-07 15:38:26 +000013730
Jesus Cea6a792292010-05-03 21:18:48 +000013731case $ac_sys_system in
Benjamin Petersond7f73e92010-09-05 00:09:07 +000013732 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 +000013733esac
13734
13735
13736
Mark Dickinsonb2153e92010-05-05 22:31:36 +000013737
13738
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000013739for h in `(cd $srcdir;echo Python/thread_*.h)`
13740do
13741 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
13742done
13743
Michael W. Hudson54241132001-12-07 15:38:26 +000013744
Neal Norwitzd24499d2005-12-18 21:36:39 +000013745SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Kloseb9621712010-04-24 17:59:49 +000013746{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
13747$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013748for dir in $SRCDIRS; do
13749 if test ! -d $dir; then
13750 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000013751 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013752done
Matthias Kloseb9621712010-04-24 17:59:49 +000013753{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
13754$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000013755
Guido van Rossum627b2d71993-12-24 10:39:16 +000013756# generate output files
Antoine Pitrou20327222009-05-24 20:39:11 +000013757ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000013758
Martin v. Löwis11437992002-04-12 09:54:03 +000013759cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013760# This file is a shell script that caches the results of configure
13761# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000013762# scripts and configure runs, see configure's option --config-cache.
13763# It is not useful on other systems. If it contains results you don't
13764# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013765#
Martin v. Löwis11437992002-04-12 09:54:03 +000013766# config.status only pays attention to the cache file if you give it
13767# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013768#
Skip Montanaro6dead952003-09-25 14:50:04 +000013769# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000013770# loading this file, other *unset* `ac_cv_foo' will be assigned the
13771# following values.
13772
13773_ACEOF
13774
Guido van Rossumf78abae1997-01-21 22:02:36 +000013775# The following way of writing the cache mishandles newlines in values,
13776# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013777# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013778# Ultrix sh set writes to stderr and can't be redirected directly,
13779# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013780(
13781 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
13782 eval ac_val=\$$ac_var
13783 case $ac_val in #(
13784 *${as_nl}*)
13785 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000013786 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
13787$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013788 esac
13789 case $ac_var in #(
13790 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000013791 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
13792 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013793 esac ;;
13794 esac
13795 done
13796
Martin v. Löwis11437992002-04-12 09:54:03 +000013797 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013798 case $as_nl`(ac_space=' '; set) 2>&1` in #(
13799 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000013800 # `set' does not quote correctly, so add quotes: double-quote
13801 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000013802 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013803 "s/'/'\\\\''/g;
13804 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013805 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000013806 *)
13807 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013808 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000013809 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013810 esac |
13811 sort
13812) |
Martin v. Löwis11437992002-04-12 09:54:03 +000013813 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013814 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000013815 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013816 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000013817 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
13818 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013819 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
13820 :end' >>confcache
13821if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
13822 if test -w "$cache_file"; then
13823 test "x$cache_file" != "x/dev/null" &&
Matthias Kloseb9621712010-04-24 17:59:49 +000013824 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
13825$as_echo "$as_me: updating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000013826 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013827 else
Matthias Kloseb9621712010-04-24 17:59:49 +000013828 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
13829$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013830 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013831fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013832rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000013833
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013834test "x$prefix" = xNONE && prefix=$ac_default_prefix
13835# Let make expand exec_prefix.
13836test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000013837
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013838DEFS=-DHAVE_CONFIG_H
13839
Skip Montanaro6dead952003-09-25 14:50:04 +000013840ac_libobjs=
13841ac_ltlibobjs=
13842for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
13843 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013844 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000013845 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013846 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
13847 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000013848 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
13849 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000013850done
13851LIBOBJS=$ac_libobjs
13852
13853LTLIBOBJS=$ac_ltlibobjs
13854
13855
Martin v. Löwis11437992002-04-12 09:54:03 +000013856
Matthias Kloseb9621712010-04-24 17:59:49 +000013857
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013858: ${CONFIG_STATUS=./config.status}
Matthias Kloseb9621712010-04-24 17:59:49 +000013859ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000013860ac_clean_files_save=$ac_clean_files
13861ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013862{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
13863$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
13864as_write_fail=0
13865cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000013866#! $SHELL
13867# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000013868# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013869# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000013870# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000013871
Martin v. Löwis11437992002-04-12 09:54:03 +000013872debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000013873ac_cs_recheck=false
13874ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000013875
Matthias Kloseb9621712010-04-24 17:59:49 +000013876SHELL=\${CONFIG_SHELL-$SHELL}
13877export SHELL
13878_ASEOF
13879cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
13880## -------------------- ##
13881## M4sh Initialization. ##
13882## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000013883
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013884# Be more Bourne compatible
13885DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000013886if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013887 emulate sh
13888 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000013889 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000013890 # is contrary to our usage. Disable this feature.
13891 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013892 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013893else
Matthias Kloseb9621712010-04-24 17:59:49 +000013894 case `(set -o) 2>/dev/null` in #(
13895 *posix*) :
13896 set -o posix ;; #(
13897 *) :
13898 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013899esac
Michael W. Hudson54241132001-12-07 15:38:26 +000013900fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000013901
13902
Matthias Kloseb9621712010-04-24 17:59:49 +000013903as_nl='
13904'
13905export as_nl
13906# Printing a long string crashes Solaris 7 /usr/bin/printf.
13907as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
13908as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
13909as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
13910# Prefer a ksh shell builtin over an external printf program on Solaris,
13911# but without wasting forks for bash or zsh.
13912if test -z "$BASH_VERSION$ZSH_VERSION" \
13913 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
13914 as_echo='print -r --'
13915 as_echo_n='print -rn --'
13916elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
13917 as_echo='printf %s\n'
13918 as_echo_n='printf %s'
13919else
13920 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
13921 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
13922 as_echo_n='/usr/ucb/echo -n'
13923 else
13924 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
13925 as_echo_n_body='eval
13926 arg=$1;
13927 case $arg in #(
13928 *"$as_nl"*)
13929 expr "X$arg" : "X\\(.*\\)$as_nl";
13930 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
13931 esac;
13932 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
13933 '
13934 export as_echo_n_body
13935 as_echo_n='sh -c $as_echo_n_body as_echo'
13936 fi
13937 export as_echo_body
13938 as_echo='sh -c $as_echo_body as_echo'
13939fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013940
13941# The user is always right.
13942if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013943 PATH_SEPARATOR=:
13944 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
13945 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
13946 PATH_SEPARATOR=';'
13947 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013948fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013949
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013950
13951# IFS
13952# We need space, tab and new line, in precisely that order. Quoting is
13953# there to prevent editors from complaining about space-tab.
13954# (If _AS_PATH_WALK were called with IFS unset, it would disable word
13955# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013956IFS=" "" $as_nl"
13957
13958# Find who we are. Look in the path if we contain no directory separator.
Matthias Kloseb9621712010-04-24 17:59:49 +000013959case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013960 *[\\/]* ) as_myself=$0 ;;
13961 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000013962for as_dir in $PATH
13963do
13964 IFS=$as_save_IFS
13965 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000013966 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
13967 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013968IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000013969
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013970 ;;
13971esac
13972# We did not find ourselves, most probably we were run as `sh COMMAND'
13973# in which case we are not to be found in the path.
13974if test "x$as_myself" = x; then
13975 as_myself=$0
13976fi
13977if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013978 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
13979 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013980fi
13981
Matthias Kloseb9621712010-04-24 17:59:49 +000013982# Unset variables that we do not need and which cause bugs (e.g. in
13983# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
13984# suppresses any "Segmentation fault" message there. '((' could
13985# trigger a bug in pdksh 5.2.14.
13986for as_var in BASH_ENV ENV MAIL MAILPATH
13987do eval test x\${$as_var+set} = xset \
13988 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013989done
13990PS1='$ '
13991PS2='> '
13992PS4='+ '
13993
13994# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000013995LC_ALL=C
13996export LC_ALL
13997LANGUAGE=C
13998export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013999
Matthias Kloseb9621712010-04-24 17:59:49 +000014000# CDPATH.
14001(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
14002
14003
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014004# as_fn_error ERROR [LINENO LOG_FD]
14005# ---------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000014006# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
14007# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014008# script with status $?, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000014009as_fn_error ()
14010{
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014011 as_status=$?; test $as_status -eq 0 && as_status=1
14012 if test "$3"; then
14013 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
14014 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
Matthias Kloseb9621712010-04-24 17:59:49 +000014015 fi
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014016 $as_echo "$as_me: error: $1" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000014017 as_fn_exit $as_status
14018} # as_fn_error
14019
14020
14021# as_fn_set_status STATUS
14022# -----------------------
14023# Set $? to STATUS, without forking.
14024as_fn_set_status ()
14025{
14026 return $1
14027} # as_fn_set_status
14028
14029# as_fn_exit STATUS
14030# -----------------
14031# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
14032as_fn_exit ()
14033{
14034 set +e
14035 as_fn_set_status $1
14036 exit $1
14037} # as_fn_exit
14038
14039# as_fn_unset VAR
14040# ---------------
14041# Portably unset VAR.
14042as_fn_unset ()
14043{
14044 { eval $1=; unset $1;}
14045}
14046as_unset=as_fn_unset
14047# as_fn_append VAR VALUE
14048# ----------------------
14049# Append the text in VALUE to the end of the definition contained in VAR. Take
14050# advantage of any shell optimizations that allow amortized linear growth over
14051# repeated appends, instead of the typical quadratic growth present in naive
14052# implementations.
14053if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
14054 eval 'as_fn_append ()
14055 {
14056 eval $1+=\$2
14057 }'
14058else
14059 as_fn_append ()
14060 {
14061 eval $1=\$$1\$2
14062 }
14063fi # as_fn_append
14064
14065# as_fn_arith ARG...
14066# ------------------
14067# Perform arithmetic evaluation on the ARGs, and store the result in the
14068# global $as_val. Take advantage of shells that can avoid forks. The arguments
14069# must be portable across $(()) and expr.
14070if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
14071 eval 'as_fn_arith ()
14072 {
14073 as_val=$(( $* ))
14074 }'
14075else
14076 as_fn_arith ()
14077 {
14078 as_val=`expr "$@" || test $? -eq 1`
14079 }
14080fi # as_fn_arith
14081
14082
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014083if expr a : '\(a\)' >/dev/null 2>&1 &&
14084 test "X`expr 00001 : '.*\(...\)'`" = X001; then
14085 as_expr=expr
14086else
14087 as_expr=false
14088fi
14089
14090if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
14091 as_basename=basename
14092else
14093 as_basename=false
14094fi
14095
Matthias Kloseb9621712010-04-24 17:59:49 +000014096if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
14097 as_dirname=dirname
14098else
14099 as_dirname=false
14100fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014101
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014102as_me=`$as_basename -- "$0" ||
14103$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
14104 X"$0" : 'X\(//\)$' \| \
14105 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014106$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014107 sed '/^.*\/\([^/][^/]*\)\/*$/{
14108 s//\1/
14109 q
14110 }
14111 /^X\/\(\/\/\)$/{
14112 s//\1/
14113 q
14114 }
14115 /^X\/\(\/\).*/{
14116 s//\1/
14117 q
14118 }
14119 s/.*/./; q'`
14120
Matthias Kloseb9621712010-04-24 17:59:49 +000014121# Avoid depending upon Character Ranges.
14122as_cr_letters='abcdefghijklmnopqrstuvwxyz'
14123as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14124as_cr_Letters=$as_cr_letters$as_cr_LETTERS
14125as_cr_digits='0123456789'
14126as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014127
14128ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000014129case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014130-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014131 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014132 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000014133 xy) ECHO_C='\c';;
14134 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
14135 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014136 esac;;
14137*)
14138 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000014139esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014140
Martin v. Löwis11437992002-04-12 09:54:03 +000014141rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014142if test -d conf$$.dir; then
14143 rm -f conf$$.dir/conf$$.file
14144else
14145 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000014146 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014147fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014148if (echo >conf$$.file) 2>/dev/null; then
14149 if ln -s conf$$.file conf$$ 2>/dev/null; then
14150 as_ln_s='ln -s'
14151 # ... but there are two gotchas:
14152 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
14153 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
14154 # In both cases, we have to default to `cp -p'.
14155 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
14156 as_ln_s='cp -p'
14157 elif ln conf$$.file conf$$ 2>/dev/null; then
14158 as_ln_s=ln
14159 else
Martin v. Löwis11437992002-04-12 09:54:03 +000014160 as_ln_s='cp -p'
Matthias Kloseb9621712010-04-24 17:59:49 +000014161 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014162else
14163 as_ln_s='cp -p'
14164fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014165rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
14166rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000014167
Matthias Kloseb9621712010-04-24 17:59:49 +000014168
14169# as_fn_mkdir_p
14170# -------------
14171# Create "$as_dir" as a directory, including parents if necessary.
14172as_fn_mkdir_p ()
14173{
14174
14175 case $as_dir in #(
14176 -*) as_dir=./$as_dir;;
14177 esac
14178 test -d "$as_dir" || eval $as_mkdir_p || {
14179 as_dirs=
14180 while :; do
14181 case $as_dir in #(
14182 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
14183 *) as_qdir=$as_dir;;
14184 esac
14185 as_dirs="'$as_qdir' $as_dirs"
14186 as_dir=`$as_dirname -- "$as_dir" ||
14187$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
14188 X"$as_dir" : 'X\(//\)[^/]' \| \
14189 X"$as_dir" : 'X\(//\)$' \| \
14190 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
14191$as_echo X"$as_dir" |
14192 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14193 s//\1/
14194 q
14195 }
14196 /^X\(\/\/\)[^/].*/{
14197 s//\1/
14198 q
14199 }
14200 /^X\(\/\/\)$/{
14201 s//\1/
14202 q
14203 }
14204 /^X\(\/\).*/{
14205 s//\1/
14206 q
14207 }
14208 s/.*/./; q'`
14209 test -d "$as_dir" && break
14210 done
14211 test -z "$as_dirs" || eval "mkdir $as_dirs"
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014212 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000014213
14214
14215} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000014216if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014217 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000014218else
Skip Montanarof0d5f792004-08-15 14:08:23 +000014219 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000014220 as_mkdir_p=false
14221fi
14222
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014223if test -x / >/dev/null 2>&1; then
14224 as_test_x='test -x'
14225else
14226 if ls -dL / >/dev/null 2>&1; then
14227 as_ls_L_option=L
14228 else
14229 as_ls_L_option=
14230 fi
14231 as_test_x='
14232 eval sh -c '\''
14233 if test -d "$1"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014234 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014235 else
Matthias Kloseb9621712010-04-24 17:59:49 +000014236 case $1 in #(
14237 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014238 esac;
Matthias Kloseb9621712010-04-24 17:59:49 +000014239 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014240 ???[sx]*):;;*)false;;esac;fi
14241 '\'' sh
14242 '
14243fi
14244as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000014245
14246# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014247as_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 +000014248
14249# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014250as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014251
14252
Martin v. Löwis11437992002-04-12 09:54:03 +000014253exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000014254## ----------------------------------- ##
14255## Main body of $CONFIG_STATUS script. ##
14256## ----------------------------------- ##
14257_ASEOF
14258test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014259
Matthias Kloseb9621712010-04-24 17:59:49 +000014260cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14261# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000014262# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014263# values after options handling.
14264ac_log="
Benjamin Peterson46ea4f72009-06-27 21:40:27 +000014265This file was extended by python $as_me 3.2, which was
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014266generated by GNU Autoconf 2.65. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000014267
14268 CONFIG_FILES = $CONFIG_FILES
14269 CONFIG_HEADERS = $CONFIG_HEADERS
14270 CONFIG_LINKS = $CONFIG_LINKS
14271 CONFIG_COMMANDS = $CONFIG_COMMANDS
14272 $ $0 $@
14273
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014274on `(hostname || uname -n) 2>/dev/null | sed 1q`
14275"
14276
Martin v. Löwis11437992002-04-12 09:54:03 +000014277_ACEOF
14278
Matthias Kloseb9621712010-04-24 17:59:49 +000014279case $ac_config_files in *"
14280"*) set x $ac_config_files; shift; ac_config_files=$*;;
14281esac
14282
14283case $ac_config_headers in *"
14284"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
14285esac
14286
14287
14288cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014289# Files that config.status was made for.
Antoine Pitroua3000072010-09-07 14:52:42 +000014290config_files="`echo $ac_config_files`"
14291config_headers="`echo $ac_config_headers`"
Martin v. Löwis11437992002-04-12 09:54:03 +000014292
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014293_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014294
Matthias Kloseb9621712010-04-24 17:59:49 +000014295cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014296ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000014297\`$as_me' instantiates files and other configuration actions
14298from templates according to the current configuration. Unless the files
14299and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000014300
Matthias Kloseb9621712010-04-24 17:59:49 +000014301Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000014302
14303 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014304 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000014305 --config print configuration, then exit
14306 -q, --quiet, --silent
14307 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000014308 -d, --debug don't remove temporary files
14309 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000014310 --file=FILE[:TEMPLATE]
14311 instantiate the configuration file FILE
14312 --header=FILE[:TEMPLATE]
14313 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000014314
14315Configuration files:
14316$config_files
14317
14318Configuration headers:
14319$config_headers
14320
Matthias Kloseb9621712010-04-24 17:59:49 +000014321Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014322
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014323_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014324cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14325ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000014326ac_cs_version="\\
Benjamin Peterson46ea4f72009-06-27 21:40:27 +000014327python config.status 3.2
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014328configured by $0, generated by GNU Autoconf 2.65,
Matthias Kloseb9621712010-04-24 17:59:49 +000014329 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000014330
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014331Copyright (C) 2009 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000014332This config.status script is free software; the Free Software Foundation
14333gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014334
14335ac_pwd='$ac_pwd'
14336srcdir='$srcdir'
14337INSTALL='$INSTALL'
Matthias Kloseb9621712010-04-24 17:59:49 +000014338test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000014339_ACEOF
14340
Matthias Kloseb9621712010-04-24 17:59:49 +000014341cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14342# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000014343ac_need_defaults=:
14344while test $# != 0
14345do
14346 case $1 in
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014347 --*=*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014348 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14349 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000014350 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000014351 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014352 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000014353 ac_option=$1
14354 ac_optarg=$2
14355 ac_shift=shift
14356 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014357 esac
14358
Skip Montanaro6dead952003-09-25 14:50:04 +000014359 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000014360 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000014361 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14362 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014363 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000014364 $as_echo "$ac_cs_version"; exit ;;
14365 --config | --confi | --conf | --con | --co | --c )
14366 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014367 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000014368 debug=: ;;
14369 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000014370 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014371 case $ac_optarg in
14372 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14373 esac
14374 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014375 ac_need_defaults=false;;
14376 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000014377 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014378 case $ac_optarg in
14379 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14380 esac
14381 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014382 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014383 --he | --h)
14384 # Conflict between --help and --header
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014385 as_fn_error "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000014386Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014387 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000014388 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000014389 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
14390 | -silent | --silent | --silen | --sile | --sil | --si | --s)
14391 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014392
14393 # This is an error.
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014394 -*) as_fn_error "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000014395Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014396
Matthias Kloseb9621712010-04-24 17:59:49 +000014397 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014398 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014399
14400 esac
14401 shift
14402done
14403
Skip Montanaro6dead952003-09-25 14:50:04 +000014404ac_configure_extra_args=
14405
14406if $ac_cs_silent; then
14407 exec 6>/dev/null
14408 ac_configure_extra_args="$ac_configure_extra_args --silent"
14409fi
14410
14411_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014412cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000014413if \$ac_cs_recheck; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014414 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
14415 shift
14416 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
14417 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014418 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000014419 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000014420fi
14421
Martin v. Löwis11437992002-04-12 09:54:03 +000014422_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014423cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014424exec 5>>config.log
14425{
14426 echo
14427 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
14428## Running $as_me. ##
14429_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000014430 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014431} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014432
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014433_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014434cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014435_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014436
Matthias Kloseb9621712010-04-24 17:59:49 +000014437cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014438
14439# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000014440for ac_config_target in $ac_config_targets
14441do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014442 case $ac_config_target in
14443 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
14444 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
14445 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014446 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
14447 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014448 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
14449 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000014450 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014451
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014452 *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014453 esac
14454done
14455
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014456
Martin v. Löwis11437992002-04-12 09:54:03 +000014457# If the user did not use the arguments to specify the items to instantiate,
14458# then the envvar interface is used. Set only those that are not.
14459# We use the long form for the default assignment because of an extremely
14460# bizarre bug on SunOS 4.1.3.
14461if $ac_need_defaults; then
14462 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
14463 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
14464fi
14465
Skip Montanaro6dead952003-09-25 14:50:04 +000014466# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014467# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000014468# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014469# Hook for its removal unless debugging.
14470# Note that there is a small window in which the directory will not be cleaned:
14471# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000014472$debug ||
14473{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014474 tmp=
14475 trap 'exit_status=$?
14476 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
14477' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000014478 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000014479}
Martin v. Löwis11437992002-04-12 09:54:03 +000014480# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000014481
Martin v. Löwis11437992002-04-12 09:54:03 +000014482{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014483 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000014484 test -n "$tmp" && test -d "$tmp"
14485} ||
14486{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014487 tmp=./conf$$-$RANDOM
14488 (umask 077 && mkdir "$tmp")
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014489} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000014490
Matthias Kloseb9621712010-04-24 17:59:49 +000014491# Set up the scripts for CONFIG_FILES section.
14492# No need to generate them if there are no CONFIG_FILES.
14493# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014494if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014495
Matthias Kloseb9621712010-04-24 17:59:49 +000014496
14497ac_cr=`echo X | tr X '\015'`
14498# On cygwin, bash can eat \r inside `` if the user requested igncr.
14499# But we know of no other shell where ac_cr would be empty at this
14500# point, so we can use a bashism as a fallback.
14501if test "x$ac_cr" = x; then
14502 eval ac_cr=\$\'\\r\'
14503fi
14504ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
14505if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014506 ac_cs_awk_cr='\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000014507else
14508 ac_cs_awk_cr=$ac_cr
14509fi
14510
14511echo 'BEGIN {' >"$tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000014512_ACEOF
14513
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014514
Matthias Kloseb9621712010-04-24 17:59:49 +000014515{
14516 echo "cat >conf$$subs.awk <<_ACEOF" &&
14517 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
14518 echo "_ACEOF"
14519} >conf$$subs.sh ||
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014520 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
14521ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014522ac_delim='%!_!# '
14523for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000014524 . ./conf$$subs.sh ||
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014525 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014526
Matthias Kloseb9621712010-04-24 17:59:49 +000014527 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
14528 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014529 break
14530 elif $ac_last_try; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014531 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014532 else
14533 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000014534 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014535done
Matthias Kloseb9621712010-04-24 17:59:49 +000014536rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014537
Matthias Kloseb9621712010-04-24 17:59:49 +000014538cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14539cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014540_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014541sed -n '
14542h
14543s/^/S["/; s/!.*/"]=/
14544p
14545g
14546s/^[^!]*!//
14547:repl
14548t repl
14549s/'"$ac_delim"'$//
14550t delim
14551:nl
14552h
14553s/\(.\{148\}\)..*/\1/
14554t more1
14555s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
14556p
14557n
14558b repl
14559:more1
14560s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14561p
14562g
14563s/.\{148\}//
14564t nl
14565:delim
14566h
14567s/\(.\{148\}\)..*/\1/
14568t more2
14569s/["\\]/\\&/g; s/^/"/; s/$/"/
14570p
14571b
14572:more2
14573s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14574p
14575g
14576s/.\{148\}//
14577t delim
14578' <conf$$subs.awk | sed '
14579/^[^""]/{
14580 N
14581 s/\n//
14582}
14583' >>$CONFIG_STATUS || ac_write_fail=1
14584rm -f conf$$subs.awk
14585cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14586_ACAWK
14587cat >>"\$tmp/subs1.awk" <<_ACAWK &&
14588 for (key in S) S_is_set[key] = 1
14589 FS = ""
14590
14591}
14592{
14593 line = $ 0
14594 nfields = split(line, field, "@")
14595 substed = 0
14596 len = length(field[1])
14597 for (i = 2; i < nfields; i++) {
14598 key = field[i]
14599 keylen = length(key)
14600 if (S_is_set[key]) {
14601 value = S[key]
14602 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
14603 len += length(value) + length(field[++i])
14604 substed = 1
14605 } else
14606 len += 1 + keylen
14607 }
14608
14609 print line
14610}
14611
14612_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014613_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014614cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14615if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
14616 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
14617else
14618 cat
14619fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014620 || as_fn_error "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014621_ACEOF
14622
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014623# VPATH may cause trouble with some makes, so we remove $(srcdir),
14624# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014625# trailing colons and then remove the whole line if VPATH becomes empty
14626# (actually we leave an empty line to preserve line numbers).
14627if test "x$srcdir" = x.; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014628 ac_vpsub='/^[ ]*VPATH[ ]*=/{
14629s/:*\$(srcdir):*/:/
14630s/:*\${srcdir}:*/:/
14631s/:*@srcdir@:*/:/
14632s/^\([^=]*=[ ]*\):*/\1/
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014633s/:*$//
14634s/^[^=]*=[ ]*$//
14635}'
14636fi
14637
Matthias Kloseb9621712010-04-24 17:59:49 +000014638cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014639fi # test -n "$CONFIG_FILES"
14640
Matthias Kloseb9621712010-04-24 17:59:49 +000014641# Set up the scripts for CONFIG_HEADERS section.
14642# No need to generate them if there are no CONFIG_HEADERS.
14643# This happens for instance with `./config.status Makefile'.
14644if test -n "$CONFIG_HEADERS"; then
14645cat >"$tmp/defines.awk" <<\_ACAWK ||
14646BEGIN {
14647_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014648
Matthias Kloseb9621712010-04-24 17:59:49 +000014649# Transform confdefs.h into an awk script `defines.awk', embedded as
14650# here-document in config.status, that substitutes the proper values into
14651# config.h.in to produce config.h.
14652
14653# Create a delimiter string that does not exist in confdefs.h, to ease
14654# handling of long lines.
14655ac_delim='%!_!# '
14656for ac_last_try in false false :; do
14657 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
14658 if test -z "$ac_t"; then
14659 break
14660 elif $ac_last_try; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014661 as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000014662 else
14663 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
14664 fi
14665done
14666
14667# For the awk script, D is an array of macro values keyed by name,
14668# likewise P contains macro parameters if any. Preserve backslash
14669# newline sequences.
14670
14671ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
14672sed -n '
14673s/.\{148\}/&'"$ac_delim"'/g
14674t rset
14675:rset
14676s/^[ ]*#[ ]*define[ ][ ]*/ /
14677t def
14678d
14679:def
14680s/\\$//
14681t bsnl
14682s/["\\]/\\&/g
14683s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14684D["\1"]=" \3"/p
14685s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
14686d
14687:bsnl
14688s/["\\]/\\&/g
14689s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14690D["\1"]=" \3\\\\\\n"\\/p
14691t cont
14692s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
14693t cont
14694d
14695:cont
14696n
14697s/.\{148\}/&'"$ac_delim"'/g
14698t clear
14699:clear
14700s/\\$//
14701t bsnlc
14702s/["\\]/\\&/g; s/^/"/; s/$/"/p
14703d
14704:bsnlc
14705s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
14706b cont
14707' <confdefs.h | sed '
14708s/'"$ac_delim"'/"\\\
14709"/g' >>$CONFIG_STATUS || ac_write_fail=1
14710
14711cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14712 for (key in D) D_is_set[key] = 1
14713 FS = ""
14714}
14715/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
14716 line = \$ 0
14717 split(line, arg, " ")
14718 if (arg[1] == "#") {
14719 defundef = arg[2]
14720 mac1 = arg[3]
14721 } else {
14722 defundef = substr(arg[1], 2)
14723 mac1 = arg[2]
14724 }
14725 split(mac1, mac2, "(") #)
14726 macro = mac2[1]
14727 prefix = substr(line, 1, index(line, defundef) - 1)
14728 if (D_is_set[macro]) {
14729 # Preserve the white space surrounding the "#".
14730 print prefix "define", macro P[macro] D[macro]
14731 next
14732 } else {
14733 # Replace #undef with comments. This is necessary, for example,
14734 # in the case of _POSIX_SOURCE, which is predefined and required
14735 # on some systems where configure will not decide to define it.
14736 if (defundef == "undef") {
14737 print "/*", prefix defundef, macro, "*/"
14738 next
14739 }
14740 }
14741}
14742{ print }
14743_ACAWK
14744_ACEOF
14745cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014746 as_fn_error "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000014747fi # test -n "$CONFIG_HEADERS"
14748
14749
14750eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
14751shift
14752for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014753do
14754 case $ac_tag in
14755 :[FHLC]) ac_mode=$ac_tag; continue;;
14756 esac
14757 case $ac_mode$ac_tag in
14758 :[FHL]*:*);;
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014759 :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014760 :[FH]-) ac_tag=-:-;;
14761 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
14762 esac
14763 ac_save_IFS=$IFS
14764 IFS=:
14765 set x $ac_tag
14766 IFS=$ac_save_IFS
14767 shift
14768 ac_file=$1
14769 shift
14770
14771 case $ac_mode in
14772 :L) ac_source=$1;;
14773 :[FH])
14774 ac_file_inputs=
14775 for ac_f
14776 do
14777 case $ac_f in
14778 -) ac_f="$tmp/stdin";;
14779 *) # Look for the file first in the build tree, then in the source tree
14780 # (if the path is not absolute). The absolute path cannot be DOS-style,
14781 # because $ac_f cannot contain `:'.
14782 test -f "$ac_f" ||
14783 case $ac_f in
14784 [\\/$]*) false;;
14785 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
14786 esac ||
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014787 as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014788 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014789 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
14790 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014791 done
14792
14793 # Let's still pretend it is `configure' which instantiates (i.e., don't
14794 # use $as_me), people would be surprised to read:
14795 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014796 configure_input='Generated from '`
14797 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
14798 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014799 if test x"$ac_file" != x-; then
14800 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000014801 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
14802$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014803 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014804 # Neutralize special characters interpreted by sed in replacement strings.
14805 case $configure_input in #(
14806 *\&* | *\|* | *\\* )
14807 ac_sed_conf_input=`$as_echo "$configure_input" |
14808 sed 's/[\\\\&|]/\\\\&/g'`;; #(
14809 *) ac_sed_conf_input=$configure_input;;
14810 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014811
14812 case $ac_tag in
Matthias Kloseb9621712010-04-24 17:59:49 +000014813 *:-:* | *:-) cat >"$tmp/stdin" \
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014814 || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014815 esac
14816 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014817 esac
14818
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014819 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000014820$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014821 X"$ac_file" : 'X\(//\)[^/]' \| \
14822 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014823 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014824$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014825 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14826 s//\1/
14827 q
14828 }
14829 /^X\(\/\/\)[^/].*/{
14830 s//\1/
14831 q
14832 }
14833 /^X\(\/\/\)$/{
14834 s//\1/
14835 q
14836 }
14837 /^X\(\/\).*/{
14838 s//\1/
14839 q
14840 }
14841 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000014842 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000014843 ac_builddir=.
14844
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014845case "$ac_dir" in
14846.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
14847*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014848 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014849 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000014850 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014851 case $ac_top_builddir_sub in
14852 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
14853 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
14854 esac ;;
14855esac
14856ac_abs_top_builddir=$ac_pwd
14857ac_abs_builddir=$ac_pwd$ac_dir_suffix
14858# for backward compatibility:
14859ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000014860
14861case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014862 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000014863 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014864 ac_top_srcdir=$ac_top_builddir_sub
14865 ac_abs_top_srcdir=$ac_pwd ;;
14866 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000014867 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014868 ac_top_srcdir=$srcdir
14869 ac_abs_top_srcdir=$srcdir ;;
14870 *) # Relative name.
14871 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
14872 ac_top_srcdir=$ac_top_build_prefix$srcdir
14873 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014874esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014875ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000014876
Martin v. Löwis11437992002-04-12 09:54:03 +000014877
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014878 case $ac_mode in
14879 :F)
14880 #
14881 # CONFIG_FILE
14882 #
Martin v. Löwis11437992002-04-12 09:54:03 +000014883
14884 case $INSTALL in
14885 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014886 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014887 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000014888_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014889
Matthias Kloseb9621712010-04-24 17:59:49 +000014890cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014891# If the template does not know about datarootdir, expand it.
14892# FIXME: This hack should be removed a few years after 2.60.
14893ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000014894ac_sed_dataroot='
14895/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014896 p
14897 q
14898}
14899/@datadir@/p
14900/@docdir@/p
14901/@infodir@/p
14902/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000014903/@mandir@/p'
14904case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014905*datarootdir*) ac_datarootdir_seen=yes;;
14906*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014907 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
14908$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014909_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014910cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014911 ac_datarootdir_hack='
14912 s&@datadir@&$datadir&g
14913 s&@docdir@&$docdir&g
14914 s&@infodir@&$infodir&g
14915 s&@localedir@&$localedir&g
14916 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000014917 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014918esac
14919_ACEOF
14920
14921# Neutralize VPATH when `$srcdir' = `.'.
14922# Shell code in configure.ac might set extrasub.
14923# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000014924cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14925ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000014926$extrasub
14927_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014928cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014929:t
14930/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000014931s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014932s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000014933s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014934s&@srcdir@&$ac_srcdir&;t t
14935s&@abs_srcdir@&$ac_abs_srcdir&;t t
14936s&@top_srcdir@&$ac_top_srcdir&;t t
14937s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
14938s&@builddir@&$ac_builddir&;t t
14939s&@abs_builddir@&$ac_abs_builddir&;t t
14940s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
14941s&@INSTALL@&$ac_INSTALL&;t t
14942$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000014943"
14944eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014945 || as_fn_error "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014946
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014947test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
14948 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
14949 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000014950 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014951which seems to be undefined. Please make sure it is defined." >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014952$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014953which seems to be undefined. Please make sure it is defined." >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014954
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014955 rm -f "$tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000014956 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +000014957 -) cat "$tmp/out" && rm -f "$tmp/out";;
14958 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
14959 esac \
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014960 || as_fn_error "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014961 ;;
14962 :H)
14963 #
14964 # CONFIG_HEADER
14965 #
Martin v. Löwis11437992002-04-12 09:54:03 +000014966 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014967 {
14968 $as_echo "/* $configure_input */" \
14969 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
14970 } >"$tmp/config.h" \
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014971 || as_fn_error "could not create $ac_file" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000014972 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
14973 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
14974$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000014975 else
Matthias Kloseb9621712010-04-24 17:59:49 +000014976 rm -f "$ac_file"
14977 mv "$tmp/config.h" "$ac_file" \
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014978 || as_fn_error "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000014979 fi
14980 else
Matthias Kloseb9621712010-04-24 17:59:49 +000014981 $as_echo "/* $configure_input */" \
14982 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014983 || as_fn_error "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000014984 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014985 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000014986
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014987
14988 esac
14989
14990done # for ac_tag
14991
Guido van Rossum627b2d71993-12-24 10:39:16 +000014992
Matthias Kloseb9621712010-04-24 17:59:49 +000014993as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000014994_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014995ac_clean_files=$ac_clean_files_save
14996
Matthias Kloseb9621712010-04-24 17:59:49 +000014997test $ac_write_fail = 0 ||
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014998 as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000014999
Martin v. Löwis11437992002-04-12 09:54:03 +000015000
15001# configure is writing to config.log, and then calls config.status.
15002# config.status does its own redirection, appending to config.log.
15003# Unfortunately, on DOS this fails, as config.log is still kept open
15004# by configure, so config.status won't be able to write to it; its
15005# output is simply discarded. So we exec the FD to /dev/null,
15006# effectively closing config.log, so it can be properly (re)opened and
15007# appended to by config.status. When coming back to configure, we
15008# need to make the FD available again.
15009if test "$no_create" != yes; then
15010 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000015011 ac_config_status_args=
15012 test "$silent" = yes &&
15013 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000015014 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000015015 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000015016 exec 5>>config.log
15017 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
15018 # would make configure fail if this is the last instruction.
Benjamin Petersond7f73e92010-09-05 00:09:07 +000015019 $ac_cs_success || as_fn_exit $?
Matthias Kloseb9621712010-04-24 17:59:49 +000015020fi
15021if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
15022 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
15023$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015024fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000015025
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015026
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015027echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015028if test ! -f Modules/Setup
15029then
15030 cp $srcdir/Modules/Setup.dist Modules/Setup
15031fi
15032
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015033echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015034if test ! -f Modules/Setup.local
15035then
15036 echo "# Edit this file for local setup changes" >Modules/Setup.local
15037fi
15038
15039echo "creating Makefile"
15040$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
15041 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000015042 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000015043mv config.c Modules