blob: a3826ef169bf06a0a2c48a70492fb6c11372b133 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00002# From configure.in Revision: 84674 .
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Benjamin Petersond7f73e92010-09-05 00:09:07 +00004# Generated by GNU Autoconf 2.65 for python 3.2.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005#
Georg Brandle2e15612009-05-20 18:25:10 +00006# Report bugs to <http://bugs.python.org/>.
Martin v. Löwis1d459062005-03-14 21:23:33 +00007#
Matthias Kloseb9621712010-04-24 17:59:49 +00008#
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000010# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
11# Inc.
Matthias Kloseb9621712010-04-24 17:59:49 +000012#
13#
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014# This configure script is free software; the Free Software Foundation
15# gives unlimited permission to copy, distribute and modify it.
Matthias Kloseb9621712010-04-24 17:59:49 +000016## -------------------- ##
17## M4sh Initialization. ##
18## -------------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +000019
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020# Be more Bourne compatible
21DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000022if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000023 emulate sh
24 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000025 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000026 # is contrary to our usage. Disable this feature.
27 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000029else
Matthias Kloseb9621712010-04-24 17:59:49 +000030 case `(set -o) 2>/dev/null` in #(
31 *posix*) :
32 set -o posix ;; #(
33 *) :
34 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000035esac
Martin v. Löwis11437992002-04-12 09:54:03 +000036fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000037
38
Matthias Kloseb9621712010-04-24 17:59:49 +000039as_nl='
40'
41export as_nl
42# Printing a long string crashes Solaris 7 /usr/bin/printf.
43as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
44as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
45as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
46# Prefer a ksh shell builtin over an external printf program on Solaris,
47# but without wasting forks for bash or zsh.
48if test -z "$BASH_VERSION$ZSH_VERSION" \
49 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
50 as_echo='print -r --'
51 as_echo_n='print -rn --'
52elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
53 as_echo='printf %s\n'
54 as_echo_n='printf %s'
55else
56 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
57 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
58 as_echo_n='/usr/ucb/echo -n'
59 else
60 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
61 as_echo_n_body='eval
62 arg=$1;
63 case $arg in #(
64 *"$as_nl"*)
65 expr "X$arg" : "X\\(.*\\)$as_nl";
66 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
67 esac;
68 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
69 '
70 export as_echo_n_body
71 as_echo_n='sh -c $as_echo_n_body as_echo'
72 fi
73 export as_echo_body
74 as_echo='sh -c $as_echo_body as_echo'
75fi
Martin v. Löwis11437992002-04-12 09:54:03 +000076
77# The user is always right.
78if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000079 PATH_SEPARATOR=:
80 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
81 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
82 PATH_SEPARATOR=';'
83 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000084fi
Martin v. Löwis11437992002-04-12 09:54:03 +000085
Thomas Wouters47b49bf2007-08-30 22:15:33 +000086
87# IFS
88# We need space, tab and new line, in precisely that order. Quoting is
89# there to prevent editors from complaining about space-tab.
90# (If _AS_PATH_WALK were called with IFS unset, it would disable word
91# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000092IFS=" "" $as_nl"
93
94# Find who we are. Look in the path if we contain no directory separator.
Matthias Kloseb9621712010-04-24 17:59:49 +000095case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000096 *[\\/]* ) as_myself=$0 ;;
97 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000098for as_dir in $PATH
99do
100 IFS=$as_save_IFS
101 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +0000102 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
103 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000104IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +0000105
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000106 ;;
107esac
108# We did not find ourselves, most probably we were run as `sh COMMAND'
109# in which case we are not to be found in the path.
110if test "x$as_myself" = x; then
111 as_myself=$0
112fi
113if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000114 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
115 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000116fi
117
Matthias Kloseb9621712010-04-24 17:59:49 +0000118# Unset variables that we do not need and which cause bugs (e.g. in
119# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
120# suppresses any "Segmentation fault" message there. '((' could
121# trigger a bug in pdksh 5.2.14.
122for as_var in BASH_ENV ENV MAIL MAILPATH
123do eval test x\${$as_var+set} = xset \
124 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000125done
126PS1='$ '
127PS2='> '
128PS4='+ '
129
130# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +0000131LC_ALL=C
132export LC_ALL
133LANGUAGE=C
134export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000135
Matthias Kloseb9621712010-04-24 17:59:49 +0000136# CDPATH.
137(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
138
139if test "x$CONFIG_SHELL" = x; then
140 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
141 emulate sh
142 NULLCMD=:
143 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
144 # is contrary to our usage. Disable this feature.
145 alias -g '\${1+\"\$@\"}'='\"\$@\"'
146 setopt NO_GLOB_SUBST
147else
148 case \`(set -o) 2>/dev/null\` in #(
149 *posix*) :
150 set -o posix ;; #(
151 *) :
152 ;;
153esac
154fi
155"
156 as_required="as_fn_return () { (exit \$1); }
157as_fn_success () { as_fn_return 0; }
158as_fn_failure () { as_fn_return 1; }
159as_fn_ret_success () { return 0; }
160as_fn_ret_failure () { return 1; }
161
162exitcode=0
163as_fn_success || { exitcode=1; echo as_fn_success failed.; }
164as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
165as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
166as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
167if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
168
169else
170 exitcode=1; echo positional parameters were not saved.
171fi
172test x\$exitcode = x0 || exit 1"
173 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
174 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
175 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
176 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
177test \$(( 1 + 1 )) = 2 || exit 1"
178 if (eval "$as_required") 2>/dev/null; then :
179 as_have_required=yes
180else
181 as_have_required=no
182fi
183 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
184
185else
186 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
187as_found=false
188for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
189do
190 IFS=$as_save_IFS
191 test -z "$as_dir" && as_dir=.
192 as_found=:
193 case $as_dir in #(
194 /*)
195 for as_base in sh bash ksh sh5; do
196 # Try only shells that exist, to save several forks.
197 as_shell=$as_dir/$as_base
198 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
199 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
200 CONFIG_SHELL=$as_shell as_have_required=yes
201 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
202 break 2
203fi
204fi
205 done;;
206 esac
207 as_found=false
208done
209$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
210 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
211 CONFIG_SHELL=$SHELL as_have_required=yes
212fi; }
213IFS=$as_save_IFS
214
215
216 if test "x$CONFIG_SHELL" != x; then :
217 # We cannot yet assume a decent shell, so we have to provide a
218 # neutralization value for shells without unset; and this also
219 # works around shells that cannot unset nonexistent variables.
220 BASH_ENV=/dev/null
221 ENV=/dev/null
222 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
223 export CONFIG_SHELL
224 exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
225fi
226
227 if test x$as_have_required = xno; then :
228 $as_echo "$0: This script requires a shell more modern than all"
229 $as_echo "$0: the shells that I found on your system."
230 if test x${ZSH_VERSION+set} = xset ; then
231 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
232 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
233 else
234 $as_echo "$0: Please tell bug-autoconf@gnu.org and
235$0: http://bugs.python.org/ about your system, including
236$0: any error possibly output before this message. Then
237$0: install a modern shell, or manually run the script
238$0: under such a shell if you do have one."
239 fi
240 exit 1
241fi
242fi
243fi
244SHELL=${CONFIG_SHELL-/bin/sh}
245export SHELL
246# Unset more variables known to interfere with behavior of common tools.
247CLICOLOR_FORCE= GREP_OPTIONS=
248unset CLICOLOR_FORCE GREP_OPTIONS
249
250## --------------------- ##
251## M4sh Shell Functions. ##
252## --------------------- ##
253# as_fn_unset VAR
254# ---------------
255# Portably unset VAR.
256as_fn_unset ()
257{
258 { eval $1=; unset $1;}
259}
260as_unset=as_fn_unset
261
262# as_fn_set_status STATUS
263# -----------------------
264# Set $? to STATUS, without forking.
265as_fn_set_status ()
266{
267 return $1
268} # as_fn_set_status
269
270# as_fn_exit STATUS
271# -----------------
272# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
273as_fn_exit ()
274{
275 set +e
276 as_fn_set_status $1
277 exit $1
278} # as_fn_exit
279
280# as_fn_mkdir_p
281# -------------
282# Create "$as_dir" as a directory, including parents if necessary.
283as_fn_mkdir_p ()
284{
285
286 case $as_dir in #(
287 -*) as_dir=./$as_dir;;
288 esac
289 test -d "$as_dir" || eval $as_mkdir_p || {
290 as_dirs=
291 while :; do
292 case $as_dir in #(
293 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
294 *) as_qdir=$as_dir;;
295 esac
296 as_dirs="'$as_qdir' $as_dirs"
297 as_dir=`$as_dirname -- "$as_dir" ||
298$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
299 X"$as_dir" : 'X\(//\)[^/]' \| \
300 X"$as_dir" : 'X\(//\)$' \| \
301 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
302$as_echo X"$as_dir" |
303 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
304 s//\1/
305 q
306 }
307 /^X\(\/\/\)[^/].*/{
308 s//\1/
309 q
310 }
311 /^X\(\/\/\)$/{
312 s//\1/
313 q
314 }
315 /^X\(\/\).*/{
316 s//\1/
317 q
318 }
319 s/.*/./; q'`
320 test -d "$as_dir" && break
321 done
322 test -z "$as_dirs" || eval "mkdir $as_dirs"
Benjamin Petersond7f73e92010-09-05 00:09:07 +0000323 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +0000324
325
326} # as_fn_mkdir_p
327# as_fn_append VAR VALUE
328# ----------------------
329# Append the text in VALUE to the end of the definition contained in VAR. Take
330# advantage of any shell optimizations that allow amortized linear growth over
331# repeated appends, instead of the typical quadratic growth present in naive
332# implementations.
333if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
334 eval 'as_fn_append ()
335 {
336 eval $1+=\$2
337 }'
338else
339 as_fn_append ()
340 {
341 eval $1=\$$1\$2
342 }
343fi # as_fn_append
344
345# as_fn_arith ARG...
346# ------------------
347# Perform arithmetic evaluation on the ARGs, and store the result in the
348# global $as_val. Take advantage of shells that can avoid forks. The arguments
349# must be portable across $(()) and expr.
350if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
351 eval 'as_fn_arith ()
352 {
353 as_val=$(( $* ))
354 }'
355else
356 as_fn_arith ()
357 {
358 as_val=`expr "$@" || test $? -eq 1`
359 }
360fi # as_fn_arith
361
362
Benjamin Petersond7f73e92010-09-05 00:09:07 +0000363# as_fn_error ERROR [LINENO LOG_FD]
364# ---------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +0000365# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
366# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Benjamin Petersond7f73e92010-09-05 00:09:07 +0000367# script with status $?, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +0000368as_fn_error ()
369{
Benjamin Petersond7f73e92010-09-05 00:09:07 +0000370 as_status=$?; test $as_status -eq 0 && as_status=1
371 if test "$3"; then
372 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
373 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
Matthias Kloseb9621712010-04-24 17:59:49 +0000374 fi
Benjamin Petersond7f73e92010-09-05 00:09:07 +0000375 $as_echo "$as_me: error: $1" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +0000376 as_fn_exit $as_status
377} # as_fn_error
378
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000379if expr a : '\(a\)' >/dev/null 2>&1 &&
380 test "X`expr 00001 : '.*\(...\)'`" = X001; then
381 as_expr=expr
382else
383 as_expr=false
384fi
385
386if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
387 as_basename=basename
388else
389 as_basename=false
390fi
391
Matthias Kloseb9621712010-04-24 17:59:49 +0000392if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
393 as_dirname=dirname
394else
395 as_dirname=false
396fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000397
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000398as_me=`$as_basename -- "$0" ||
399$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
400 X"$0" : 'X\(//\)$' \| \
401 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000402$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000403 sed '/^.*\/\([^/][^/]*\)\/*$/{
404 s//\1/
405 q
406 }
407 /^X\/\(\/\/\)$/{
408 s//\1/
409 q
410 }
411 /^X\/\(\/\).*/{
412 s//\1/
413 q
414 }
415 s/.*/./; q'`
416
Matthias Kloseb9621712010-04-24 17:59:49 +0000417# Avoid depending upon Character Ranges.
418as_cr_letters='abcdefghijklmnopqrstuvwxyz'
419as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
420as_cr_Letters=$as_cr_letters$as_cr_LETTERS
421as_cr_digits='0123456789'
422as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000423
424
Matthias Kloseb9621712010-04-24 17:59:49 +0000425 as_lineno_1=$LINENO as_lineno_1a=$LINENO
426 as_lineno_2=$LINENO as_lineno_2a=$LINENO
427 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
428 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
429 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000430 sed -n '
431 p
432 /[$]LINENO/=
433 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +0000434 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000435 s/[$]LINENO.*/&-/
436 t lineno
437 b
438 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +0000439 N
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000440 :loop
441 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +0000442 t loop
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000443 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +0000444 ' >$as_me.lineno &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000445 chmod +x "$as_me.lineno" ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000446 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
Martin v. Löwis11437992002-04-12 09:54:03 +0000447
448 # Don't try to exec as it changes $[0], causing all sort of problems
449 # (the dirname of $[0] is not the place where we might find the
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000450 # original and so on. Autoconf is especially sensitive to this).
451 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +0000452 # Exit status is that of the last command.
453 exit
454}
455
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000456ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +0000457case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000458-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000459 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000460 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +0000461 xy) ECHO_C='\c';;
462 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
463 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000464 esac;;
465*)
466 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +0000467esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000468
Martin v. Löwis11437992002-04-12 09:54:03 +0000469rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000470if test -d conf$$.dir; then
471 rm -f conf$$.dir/conf$$.file
472else
473 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +0000474 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000475fi
Matthias Kloseb9621712010-04-24 17:59:49 +0000476if (echo >conf$$.file) 2>/dev/null; then
477 if ln -s conf$$.file conf$$ 2>/dev/null; then
478 as_ln_s='ln -s'
479 # ... but there are two gotchas:
480 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
481 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
482 # In both cases, we have to default to `cp -p'.
483 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
484 as_ln_s='cp -p'
485 elif ln conf$$.file conf$$ 2>/dev/null; then
486 as_ln_s=ln
487 else
Martin v. Löwis11437992002-04-12 09:54:03 +0000488 as_ln_s='cp -p'
Matthias Kloseb9621712010-04-24 17:59:49 +0000489 fi
Martin v. Löwis11437992002-04-12 09:54:03 +0000490else
491 as_ln_s='cp -p'
492fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000493rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
494rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +0000495
Skip Montanaro6dead952003-09-25 14:50:04 +0000496if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000497 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +0000498else
Skip Montanarof0d5f792004-08-15 14:08:23 +0000499 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +0000500 as_mkdir_p=false
501fi
502
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000503if test -x / >/dev/null 2>&1; then
504 as_test_x='test -x'
505else
506 if ls -dL / >/dev/null 2>&1; then
507 as_ls_L_option=L
508 else
509 as_ls_L_option=
510 fi
511 as_test_x='
512 eval sh -c '\''
513 if test -d "$1"; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000514 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000515 else
Matthias Kloseb9621712010-04-24 17:59:49 +0000516 case $1 in #(
517 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000518 esac;
Matthias Kloseb9621712010-04-24 17:59:49 +0000519 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000520 ???[sx]*):;;*)false;;esac;fi
521 '\'' sh
522 '
523fi
524as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +0000525
526# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000527as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000528
529# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000530as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000531
532
Matthias Kloseb9621712010-04-24 17:59:49 +0000533test -n "$DJDIR" || exec 7<&0 </dev/null
534exec 6>&1
Martin v. Löwis11437992002-04-12 09:54:03 +0000535
536# Name of the host.
Benjamin Petersond7f73e92010-09-05 00:09:07 +0000537# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
Martin v. Löwis11437992002-04-12 09:54:03 +0000538# so uname gets run too.
539ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
540
Martin v. Löwis11437992002-04-12 09:54:03 +0000541#
542# Initializations.
543#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000544ac_default_prefix=/usr/local
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000545ac_clean_files=
Skip Montanaro6dead952003-09-25 14:50:04 +0000546ac_config_libobj_dir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000547LIBOBJS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000548cross_compiling=no
549subdirs=
550MFLAGS=
551MAKEFLAGS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000552
Martin v. Löwis11437992002-04-12 09:54:03 +0000553# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000554PACKAGE_NAME='python'
555PACKAGE_TARNAME='python'
Benjamin Peterson46ea4f72009-06-27 21:40:27 +0000556PACKAGE_VERSION='3.2'
557PACKAGE_STRING='python 3.2'
Georg Brandle2e15612009-05-20 18:25:10 +0000558PACKAGE_BUGREPORT='http://bugs.python.org/'
Matthias Kloseb9621712010-04-24 17:59:49 +0000559PACKAGE_URL=''
Martin v. Löwis11437992002-04-12 09:54:03 +0000560
561ac_unique_file="Include/object.h"
562# Factoring default headers for most tests.
563ac_includes_default="\
564#include <stdio.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000565#ifdef HAVE_SYS_TYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000566# include <sys/types.h>
567#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000568#ifdef HAVE_SYS_STAT_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000569# include <sys/stat.h>
570#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000571#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000572# include <stdlib.h>
573# include <stddef.h>
574#else
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000575# ifdef HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000576# include <stdlib.h>
577# endif
578#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000579#ifdef HAVE_STRING_H
580# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000581# include <memory.h>
582# endif
583# include <string.h>
584#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000585#ifdef HAVE_STRINGS_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000586# include <strings.h>
587#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000588#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000589# include <inttypes.h>
Thomas Wouters477c8d52006-05-27 19:21:47 +0000590#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000591#ifdef HAVE_STDINT_H
592# include <stdint.h>
593#endif
594#ifdef HAVE_UNISTD_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000595# include <unistd.h>
596#endif"
597
Matthias Kloseb9621712010-04-24 17:59:49 +0000598ac_subst_vars='LTLIBOBJS
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000599SRCDIRS
Matthias Kloseb9621712010-04-24 17:59:49 +0000600THREADHEADERS
Barry Warsaw35f3a2c2010-09-03 18:30:30 +0000601SOABI
Matthias Kloseb9621712010-04-24 17:59:49 +0000602LIBC
603LIBM
604HAVE_GETHOSTBYNAME
605HAVE_GETHOSTBYNAME_R
606HAVE_GETHOSTBYNAME_R_3_ARG
607HAVE_GETHOSTBYNAME_R_5_ARG
608HAVE_GETHOSTBYNAME_R_6_ARG
609LIBOBJS
610TRUE
611MACHDEP_OBJS
612DYNLOADFILE
613DLINCLDIR
614THREADOBJ
615LDLAST
616USE_THREAD_MODULE
617SIGNAL_OBJS
618USE_SIGNAL_MODULE
619LIBFFI_INCLUDEDIR
620PKG_CONFIG
621SHLIBS
622CFLAGSFORSHARED
623LINKFORSHARED
624CCSHARED
625BLDSHARED
626LDCXXSHARED
627LDSHARED
628SO
629LIBTOOL_CRUFT
630OTHER_LIBTOOL_OPT
631UNIVERSAL_ARCH_FLAGS
632BASECFLAGS
633OPT
634LN
635INSTALL_DATA
636INSTALL_SCRIPT
637INSTALL_PROGRAM
638SVNVERSION
639ARFLAGS
640AR
641RANLIB
Daniel Stutzbacha606faa2010-08-31 19:51:07 +0000642USE_INLINE
Matthias Kloseb9621712010-04-24 17:59:49 +0000643GNULD
644LINKCC
645RUNSHARED
646INSTSONAME
647LDLIBRARYDIR
648BLDLIBRARY
649DLLLIBRARY
650LDLIBRARY
651LIBRARY
652BUILDEXEEXT
653EGREP
654GREP
655CPP
656MAINCC
657CXX
658OBJEXT
659EXEEXT
660ac_ct_CC
661CPPFLAGS
662LDFLAGS
663CFLAGS
664CC
665EXPORT_MACOSX_DEPLOYMENT_TARGET
666CONFIGURE_MACOSX_DEPLOYMENT_TARGET
667SGI_ABI
668MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000669FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000670FRAMEWORKUNIXTOOLSPREFIX
671FRAMEWORKALTINSTALLLAST
672FRAMEWORKALTINSTALLFIRST
673FRAMEWORKINSTALLLAST
674FRAMEWORKINSTALLFIRST
675PYTHONFRAMEWORKINSTALLDIR
676PYTHONFRAMEWORKPREFIX
677PYTHONFRAMEWORKDIR
678PYTHONFRAMEWORKIDENTIFIER
679PYTHONFRAMEWORK
680LIPO_32BIT_FLAGS
681ARCH_RUN_32BIT
682UNIVERSALSDK
683CONFIG_ARGS
684SOVERSION
685VERSION
686target_alias
687host_alias
688build_alias
689LIBS
690ECHO_T
691ECHO_N
692ECHO_C
693DEFS
694mandir
695localedir
696libdir
697psdir
698pdfdir
699dvidir
700htmldir
701infodir
702docdir
703oldincludedir
704includedir
705localstatedir
706sharedstatedir
707sysconfdir
708datadir
709datarootdir
710libexecdir
711sbindir
712bindir
713program_transform_name
714prefix
715exec_prefix
716PACKAGE_URL
717PACKAGE_BUGREPORT
718PACKAGE_STRING
719PACKAGE_VERSION
720PACKAGE_TARNAME
721PACKAGE_NAME
722PATH_SEPARATOR
723SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000724ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000725ac_user_opts='
726enable_option_checking
727enable_universalsdk
728with_universal_archs
729with_framework_name
730enable_framework
731with_gcc
732with_cxx_main
733with_suffix
734enable_shared
735enable_profiling
736with_pydebug
737with_libs
738with_system_expat
739with_system_ffi
740with_dbmliborder
741with_signal_module
742with_dec_threads
743with_threads
744with_thread
745enable_ipv6
746with_doc_strings
747with_tsc
748with_pymalloc
749with_valgrind
Matthias Kloseb9621712010-04-24 17:59:49 +0000750with_fpectl
751with_libm
752with_libc
753enable_big_digits
754with_wide_unicode
755with_computed_gotos
756'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000757 ac_precious_vars='build_alias
758host_alias
759target_alias
760CC
761CFLAGS
762LDFLAGS
763LIBS
764CPPFLAGS
765CPP'
766
Guido van Rossum627b2d71993-12-24 10:39:16 +0000767
Guido van Rossum7f43da71994-08-01 12:15:30 +0000768# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000769ac_init_help=
770ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000771ac_unrecognized_opts=
772ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000773# The variables have the same names as the options, with
774# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000775cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000776exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000777no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000778no_recursion=
779prefix=NONE
780program_prefix=NONE
781program_suffix=NONE
782program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000783silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000784site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000785srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000786verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000787x_includes=NONE
788x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000789
790# Installation directory options.
791# These are left unexpanded so users can "make install exec_prefix=/foo"
792# and all the variables that are supposed to be based on exec_prefix
793# by default will actually change.
794# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000795# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000796bindir='${exec_prefix}/bin'
797sbindir='${exec_prefix}/sbin'
798libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000799datarootdir='${prefix}/share'
800datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000801sysconfdir='${prefix}/etc'
802sharedstatedir='${prefix}/com'
803localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000804includedir='${prefix}/include'
805oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000806docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
807infodir='${datarootdir}/info'
808htmldir='${docdir}'
809dvidir='${docdir}'
810pdfdir='${docdir}'
811psdir='${docdir}'
812libdir='${exec_prefix}/lib'
813localedir='${datarootdir}/locale'
814mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000815
Guido van Rossum7f43da71994-08-01 12:15:30 +0000816ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000817ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000818for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000819do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000820 # If the previous option needs an argument, assign it.
821 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000822 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000823 ac_prev=
824 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000825 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000826
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000827 case $ac_option in
Benjamin Petersond7f73e92010-09-05 00:09:07 +0000828 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
829 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000830 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000831
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000832 # Accept the important Cygnus configure options, so we can diagnose typos.
833
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000834 case $ac_dashdash$ac_option in
835 --)
836 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000837
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000838 -bindir | --bindir | --bindi | --bind | --bin | --bi)
839 ac_prev=bindir ;;
840 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000841 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000842
843 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000844 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000845 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000846 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000847
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000848 -cache-file | --cache-file | --cache-fil | --cache-fi \
849 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
850 ac_prev=cache_file ;;
851 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
852 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000853 cache_file=$ac_optarg ;;
854
855 --config-cache | -C)
856 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000857
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000858 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000859 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000860 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000861 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000862
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000863 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
864 | --dataroo | --dataro | --datar)
865 ac_prev=datarootdir ;;
866 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
867 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
868 datarootdir=$ac_optarg ;;
869
Guido van Rossum7f43da71994-08-01 12:15:30 +0000870 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000871 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000872 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000873 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Benjamin Petersond7f73e92010-09-05 00:09:07 +0000874 as_fn_error "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000875 ac_useropt_orig=$ac_useropt
876 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
877 case $ac_user_opts in
878 *"
879"enable_$ac_useropt"
880"*) ;;
881 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
882 ac_unrecognized_sep=', ';;
883 esac
884 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000885
886 -docdir | --docdir | --docdi | --doc | --do)
887 ac_prev=docdir ;;
888 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
889 docdir=$ac_optarg ;;
890
891 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
892 ac_prev=dvidir ;;
893 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
894 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000895
896 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000897 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000898 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000899 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Benjamin Petersond7f73e92010-09-05 00:09:07 +0000900 as_fn_error "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000901 ac_useropt_orig=$ac_useropt
902 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
903 case $ac_user_opts in
904 *"
905"enable_$ac_useropt"
906"*) ;;
907 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
908 ac_unrecognized_sep=', ';;
909 esac
910 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000911
Guido van Rossum7f43da71994-08-01 12:15:30 +0000912 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
913 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
914 | --exec | --exe | --ex)
915 ac_prev=exec_prefix ;;
916 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
917 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
918 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000919 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000920
921 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000922 # Obsolete; use --with-gas.
923 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000924
Martin v. Löwis11437992002-04-12 09:54:03 +0000925 -help | --help | --hel | --he | -h)
926 ac_init_help=long ;;
927 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
928 ac_init_help=recursive ;;
929 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
930 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000931
932 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000933 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000934 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000935 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000936
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000937 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
938 ac_prev=htmldir ;;
939 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
940 | --ht=*)
941 htmldir=$ac_optarg ;;
942
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000943 -includedir | --includedir | --includedi | --included | --include \
944 | --includ | --inclu | --incl | --inc)
945 ac_prev=includedir ;;
946 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
947 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000948 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000949
950 -infodir | --infodir | --infodi | --infod | --info | --inf)
951 ac_prev=infodir ;;
952 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000953 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000954
955 -libdir | --libdir | --libdi | --libd)
956 ac_prev=libdir ;;
957 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000958 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000959
960 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
961 | --libexe | --libex | --libe)
962 ac_prev=libexecdir ;;
963 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
964 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000965 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000966
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000967 -localedir | --localedir | --localedi | --localed | --locale)
968 ac_prev=localedir ;;
969 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
970 localedir=$ac_optarg ;;
971
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000972 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000973 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000974 ac_prev=localstatedir ;;
975 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000976 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000977 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000978
979 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
980 ac_prev=mandir ;;
981 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000982 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000983
Guido van Rossum7f43da71994-08-01 12:15:30 +0000984 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000985 # Obsolete; use --without-fp.
986 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000987
988 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +0000989 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000990 no_create=yes ;;
991
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000992 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
993 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
994 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000995
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000996 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
997 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
998 | --oldin | --oldi | --old | --ol | --o)
999 ac_prev=oldincludedir ;;
1000 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1001 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1002 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001003 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001004
Guido van Rossum7f43da71994-08-01 12:15:30 +00001005 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1006 ac_prev=prefix ;;
1007 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001008 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001009
1010 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1011 | --program-pre | --program-pr | --program-p)
1012 ac_prev=program_prefix ;;
1013 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1014 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001015 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001016
1017 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1018 | --program-suf | --program-su | --program-s)
1019 ac_prev=program_suffix ;;
1020 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1021 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001022 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001023
1024 -program-transform-name | --program-transform-name \
1025 | --program-transform-nam | --program-transform-na \
1026 | --program-transform-n | --program-transform- \
1027 | --program-transform | --program-transfor \
1028 | --program-transfo | --program-transf \
1029 | --program-trans | --program-tran \
1030 | --progr-tra | --program-tr | --program-t)
1031 ac_prev=program_transform_name ;;
1032 -program-transform-name=* | --program-transform-name=* \
1033 | --program-transform-nam=* | --program-transform-na=* \
1034 | --program-transform-n=* | --program-transform-=* \
1035 | --program-transform=* | --program-transfor=* \
1036 | --program-transfo=* | --program-transf=* \
1037 | --program-trans=* | --program-tran=* \
1038 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001039 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001040
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001041 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1042 ac_prev=pdfdir ;;
1043 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1044 pdfdir=$ac_optarg ;;
1045
1046 -psdir | --psdir | --psdi | --psd | --ps)
1047 ac_prev=psdir ;;
1048 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1049 psdir=$ac_optarg ;;
1050
Guido van Rossum7f43da71994-08-01 12:15:30 +00001051 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1052 | -silent | --silent | --silen | --sile | --sil)
1053 silent=yes ;;
1054
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001055 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1056 ac_prev=sbindir ;;
1057 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1058 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001059 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001060
1061 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1062 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1063 | --sharedst | --shareds | --shared | --share | --shar \
1064 | --sha | --sh)
1065 ac_prev=sharedstatedir ;;
1066 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1067 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1068 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1069 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001070 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001071
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001072 -site | --site | --sit)
1073 ac_prev=site ;;
1074 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001075 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001076
Guido van Rossum7f43da71994-08-01 12:15:30 +00001077 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1078 ac_prev=srcdir ;;
1079 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001080 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001081
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001082 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1083 | --syscon | --sysco | --sysc | --sys | --sy)
1084 ac_prev=sysconfdir ;;
1085 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1086 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001087 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001088
Guido van Rossum7f43da71994-08-01 12:15:30 +00001089 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001090 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001091 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001092 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001093
1094 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1095 verbose=yes ;;
1096
Martin v. Löwis11437992002-04-12 09:54:03 +00001097 -version | --version | --versio | --versi | --vers | -V)
1098 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001099
1100 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001101 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001102 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001103 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Benjamin Petersond7f73e92010-09-05 00:09:07 +00001104 as_fn_error "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001105 ac_useropt_orig=$ac_useropt
1106 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1107 case $ac_user_opts in
1108 *"
1109"with_$ac_useropt"
1110"*) ;;
1111 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1112 ac_unrecognized_sep=', ';;
1113 esac
1114 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001115
1116 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001117 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001118 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001119 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Benjamin Petersond7f73e92010-09-05 00:09:07 +00001120 as_fn_error "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001121 ac_useropt_orig=$ac_useropt
1122 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1123 case $ac_user_opts in
1124 *"
1125"with_$ac_useropt"
1126"*) ;;
1127 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1128 ac_unrecognized_sep=', ';;
1129 esac
1130 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001131
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001132 --x)
1133 # Obsolete; use --with-x.
1134 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001135
1136 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1137 | --x-incl | --x-inc | --x-in | --x-i)
1138 ac_prev=x_includes ;;
1139 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1140 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001141 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001142
1143 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1144 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1145 ac_prev=x_libraries ;;
1146 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1147 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001148 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001149
Benjamin Petersond7f73e92010-09-05 00:09:07 +00001150 -*) as_fn_error "unrecognized option: \`$ac_option'
1151Try \`$0 --help' for more information."
Guido van Rossum7f43da71994-08-01 12:15:30 +00001152 ;;
1153
Martin v. Löwis11437992002-04-12 09:54:03 +00001154 *=*)
1155 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1156 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001157 case $ac_envvar in #(
1158 '' | [0-9]* | *[!_$as_cr_alnum]* )
Benjamin Petersond7f73e92010-09-05 00:09:07 +00001159 as_fn_error "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001160 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001161 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001162 export $ac_envvar ;;
1163
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001164 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001165 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001166 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001167 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001168 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001169 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
Guido van Rossum7f43da71994-08-01 12:15:30 +00001170 ;;
1171
1172 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001173done
1174
Guido van Rossum7f43da71994-08-01 12:15:30 +00001175if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001176 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Benjamin Petersond7f73e92010-09-05 00:09:07 +00001177 as_fn_error "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001178fi
1179
Matthias Kloseb9621712010-04-24 17:59:49 +00001180if test -n "$ac_unrecognized_opts"; then
1181 case $enable_option_checking in
1182 no) ;;
Benjamin Petersond7f73e92010-09-05 00:09:07 +00001183 fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001184 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1185 esac
1186fi
1187
1188# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001189for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1190 datadir sysconfdir sharedstatedir localstatedir includedir \
1191 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1192 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001193do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001194 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001195 # Remove trailing slashes.
1196 case $ac_val in
1197 */ )
1198 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1199 eval $ac_var=\$ac_val;;
1200 esac
1201 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001202 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001203 [\\/$]* | ?:[\\/]* ) continue;;
1204 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001205 esac
Benjamin Petersond7f73e92010-09-05 00:09:07 +00001206 as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001207done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001208
Martin v. Löwis11437992002-04-12 09:54:03 +00001209# There might be people who depend on the old broken behavior: `$host'
1210# used to hold the argument of --host etc.
1211# FIXME: To remove some day.
1212build=$build_alias
1213host=$host_alias
1214target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001215
Martin v. Löwis11437992002-04-12 09:54:03 +00001216# FIXME: To remove some day.
1217if test "x$host_alias" != x; then
1218 if test "x$build_alias" = x; then
1219 cross_compiling=maybe
Benjamin Petersond7f73e92010-09-05 00:09:07 +00001220 $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
1221 If a cross compiler is detected then cross compile mode will be used." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001222 elif test "x$build_alias" != "x$host_alias"; then
1223 cross_compiling=yes
1224 fi
1225fi
1226
1227ac_tool_prefix=
1228test -n "$host_alias" && ac_tool_prefix=$host_alias-
1229
1230test "$silent" = yes && exec 6>/dev/null
1231
Guido van Rossum627b2d71993-12-24 10:39:16 +00001232
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001233ac_pwd=`pwd` && test -n "$ac_pwd" &&
1234ac_ls_di=`ls -di .` &&
1235ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Benjamin Petersond7f73e92010-09-05 00:09:07 +00001236 as_fn_error "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001237test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Benjamin Petersond7f73e92010-09-05 00:09:07 +00001238 as_fn_error "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001239
1240
Guido van Rossum627b2d71993-12-24 10:39:16 +00001241# Find the source files, if location was not specified.
1242if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001243 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001244 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001245 ac_confdir=`$as_dirname -- "$as_myself" ||
1246$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1247 X"$as_myself" : 'X\(//\)[^/]' \| \
1248 X"$as_myself" : 'X\(//\)$' \| \
1249 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1250$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001251 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1252 s//\1/
1253 q
1254 }
1255 /^X\(\/\/\)[^/].*/{
1256 s//\1/
1257 q
1258 }
1259 /^X\(\/\/\)$/{
1260 s//\1/
1261 q
1262 }
1263 /^X\(\/\).*/{
1264 s//\1/
1265 q
1266 }
1267 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001268 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001269 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001270 srcdir=..
1271 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001272else
1273 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001274fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001275if test ! -r "$srcdir/$ac_unique_file"; then
1276 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Benjamin Petersond7f73e92010-09-05 00:09:07 +00001277 as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001278fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001279ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1280ac_abs_confdir=`(
Benjamin Petersond7f73e92010-09-05 00:09:07 +00001281 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001282 pwd)`
1283# When building in place, set srcdir=.
1284if test "$ac_abs_confdir" = "$ac_pwd"; then
1285 srcdir=.
1286fi
1287# Remove unnecessary trailing slashes from srcdir.
1288# Double slashes in file names in object file debugging info
1289# mess up M-x gdb in Emacs.
1290case $srcdir in
1291*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1292esac
1293for ac_var in $ac_precious_vars; do
1294 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1295 eval ac_env_${ac_var}_value=\$${ac_var}
1296 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1297 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1298done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001299
Martin v. Löwis11437992002-04-12 09:54:03 +00001300#
1301# Report the --help message.
1302#
1303if test "$ac_init_help" = "long"; then
1304 # Omit some internal or obsolete options to make the list less imposing.
1305 # This message is too long to be a string in the A/UX 3.1 sh.
1306 cat <<_ACEOF
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001307\`configure' configures python 3.2 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001308
1309Usage: $0 [OPTION]... [VAR=VALUE]...
1310
1311To assign environment variables (e.g., CC, CFLAGS...), specify them as
1312VAR=VALUE. See below for descriptions of some of the useful variables.
1313
1314Defaults for the options are specified in brackets.
1315
1316Configuration:
1317 -h, --help display this help and exit
1318 --help=short display options specific to this package
1319 --help=recursive display the short help of all the included packages
1320 -V, --version display version information and exit
Benjamin Petersond7f73e92010-09-05 00:09:07 +00001321 -q, --quiet, --silent do not print \`checking...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001322 --cache-file=FILE cache test results in FILE [disabled]
1323 -C, --config-cache alias for \`--cache-file=config.cache'
1324 -n, --no-create do not create output files
1325 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1326
Martin v. Löwis11437992002-04-12 09:54:03 +00001327Installation directories:
1328 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001329 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001330 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001331 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001332
1333By default, \`make install' will install all the files in
1334\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1335an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1336for instance \`--prefix=\$HOME'.
1337
1338For better control, use the options below.
1339
1340Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001341 --bindir=DIR user executables [EPREFIX/bin]
1342 --sbindir=DIR system admin executables [EPREFIX/sbin]
1343 --libexecdir=DIR program executables [EPREFIX/libexec]
1344 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1345 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1346 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1347 --libdir=DIR object code libraries [EPREFIX/lib]
1348 --includedir=DIR C header files [PREFIX/include]
1349 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1350 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1351 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1352 --infodir=DIR info documentation [DATAROOTDIR/info]
1353 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1354 --mandir=DIR man documentation [DATAROOTDIR/man]
1355 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1356 --htmldir=DIR html documentation [DOCDIR]
1357 --dvidir=DIR dvi documentation [DOCDIR]
1358 --pdfdir=DIR pdf documentation [DOCDIR]
1359 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001360_ACEOF
1361
1362 cat <<\_ACEOF
1363_ACEOF
1364fi
1365
1366if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001367 case $ac_init_help in
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001368 short | recursive ) echo "Configuration of python 3.2:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001369 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001370 cat <<\_ACEOF
1371
1372Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001373 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001374 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1375 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001376 --enable-universalsdk[=SDKDIR]
Christian Heimes292d3512008-02-03 16:51:08 +00001377 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001378 --enable-framework[=INSTALLDIR]
1379 Build (MacOSX|Darwin) framework
1380 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001381 --enable-profiling enable C-level code profiling
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001382 --enable-ipv6 Enable ipv6 (with ipv4) support
1383 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001384 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001385 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001386
1387Optional Packages:
1388 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1389 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001390 --with-universal-archs=ARCH
1391 select architectures for universal build ("32-bit",
Ronald Oussoren3c064c12009-09-08 07:12:42 +00001392 "64-bit", "3-way", "intel" or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001393 --with-framework-name=FRAMEWORK
1394 specify an alternate name of the framework built
1395 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001396 --without-gcc never use gcc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001397 --with-cxx-main=<compiler>
1398 compile main() and link python executable with C++
1399 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001400 --with-suffix=.exe set executable suffix
1401 --with-pydebug build with Py_DEBUG defined
1402 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001403 --with-system-expat build pyexpat module using an installed expat
1404 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001405 --with-system-ffi build _ctypes module using an installed ffi library
Matthias Klose55708cc2009-04-30 08:06:49 +00001406 --with-dbmliborder=db1:db2:...
1407 order to check db backends for dbm. Valid value is a
1408 colon separated string with the backend names
1409 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001410 --with-signal-module disable/enable signal module
1411 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1412 --with(out)-threads[=DIRECTORY]
1413 disable/enable thread support
1414 --with(out)-thread[=DIRECTORY]
1415 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001416 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001417 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001418 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001419 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001420 --with-fpectl enable SIGFPE catching
1421 --with-libm=STRING math library
1422 --with-libc=STRING C library
Georg Brandl52d168a2008-01-07 18:10:24 +00001423 --with-wide-unicode Use 4-byte Unicode characters (default is 2 bytes)
Antoine Pitrou042b1282010-08-13 21:15:58 +00001424 --with(out)-computed-gotos
1425 Use computed gotos in evaluation loop (enabled by
1426 default on supported compilers)
Martin v. Löwis11437992002-04-12 09:54:03 +00001427
1428Some influential environment variables:
1429 CC C compiler command
1430 CFLAGS C compiler flags
1431 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1432 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001433 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001434 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001435 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001436 CPP C preprocessor
1437
1438Use these variables to override the choices made by `configure' or to help
1439it to find libraries and programs with nonstandard names/locations.
1440
Georg Brandle2e15612009-05-20 18:25:10 +00001441Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001442_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001443ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001444fi
1445
1446if test "$ac_init_help" = "recursive"; then
1447 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001448 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001449 test -d "$ac_dir" ||
1450 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1451 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001452 ac_builddir=.
1453
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001454case "$ac_dir" in
1455.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1456*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001457 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001458 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001459 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001460 case $ac_top_builddir_sub in
1461 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1462 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1463 esac ;;
1464esac
1465ac_abs_top_builddir=$ac_pwd
1466ac_abs_builddir=$ac_pwd$ac_dir_suffix
1467# for backward compatibility:
1468ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001469
1470case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001471 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001472 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001473 ac_top_srcdir=$ac_top_builddir_sub
1474 ac_abs_top_srcdir=$ac_pwd ;;
1475 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001476 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001477 ac_top_srcdir=$srcdir
1478 ac_abs_top_srcdir=$srcdir ;;
1479 *) # Relative name.
1480 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1481 ac_top_srcdir=$ac_top_build_prefix$srcdir
1482 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001483esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001484ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001485
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001486 cd "$ac_dir" || { ac_status=$?; continue; }
1487 # Check for guested configure.
1488 if test -f "$ac_srcdir/configure.gnu"; then
1489 echo &&
1490 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1491 elif test -f "$ac_srcdir/configure"; then
1492 echo &&
1493 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001494 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001495 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001496 fi || ac_status=$?
1497 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001498 done
1499fi
1500
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001501test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001502if $ac_init_version; then
1503 cat <<\_ACEOF
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001504python configure 3.2
Benjamin Petersond7f73e92010-09-05 00:09:07 +00001505generated by GNU Autoconf 2.65
Martin v. Löwis11437992002-04-12 09:54:03 +00001506
Benjamin Petersond7f73e92010-09-05 00:09:07 +00001507Copyright (C) 2009 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001508This configure script is free software; the Free Software Foundation
1509gives unlimited permission to copy, distribute and modify it.
1510_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001511 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001512fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001513
1514## ------------------------ ##
1515## Autoconf initialization. ##
1516## ------------------------ ##
1517
1518# ac_fn_c_try_compile LINENO
1519# --------------------------
1520# Try to compile conftest.$ac_ext, and return whether this succeeded.
1521ac_fn_c_try_compile ()
1522{
1523 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1524 rm -f conftest.$ac_objext
1525 if { { ac_try="$ac_compile"
1526case "(($ac_try" in
1527 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1528 *) ac_try_echo=$ac_try;;
1529esac
1530eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1531$as_echo "$ac_try_echo"; } >&5
1532 (eval "$ac_compile") 2>conftest.err
1533 ac_status=$?
1534 if test -s conftest.err; then
1535 grep -v '^ *+' conftest.err >conftest.er1
1536 cat conftest.er1 >&5
1537 mv -f conftest.er1 conftest.err
1538 fi
1539 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1540 test $ac_status = 0; } && {
1541 test -z "$ac_c_werror_flag" ||
1542 test ! -s conftest.err
1543 } && test -s conftest.$ac_objext; then :
1544 ac_retval=0
1545else
1546 $as_echo "$as_me: failed program was:" >&5
1547sed 's/^/| /' conftest.$ac_ext >&5
1548
1549 ac_retval=1
1550fi
1551 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1552 as_fn_set_status $ac_retval
1553
1554} # ac_fn_c_try_compile
1555
1556# ac_fn_c_try_cpp LINENO
1557# ----------------------
1558# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1559ac_fn_c_try_cpp ()
1560{
1561 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1562 if { { ac_try="$ac_cpp conftest.$ac_ext"
1563case "(($ac_try" in
1564 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1565 *) ac_try_echo=$ac_try;;
1566esac
1567eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1568$as_echo "$ac_try_echo"; } >&5
1569 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1570 ac_status=$?
1571 if test -s conftest.err; then
1572 grep -v '^ *+' conftest.err >conftest.er1
1573 cat conftest.er1 >&5
1574 mv -f conftest.er1 conftest.err
1575 fi
1576 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Benjamin Petersond7f73e92010-09-05 00:09:07 +00001577 test $ac_status = 0; } >/dev/null && {
Matthias Kloseb9621712010-04-24 17:59:49 +00001578 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1579 test ! -s conftest.err
1580 }; then :
1581 ac_retval=0
1582else
1583 $as_echo "$as_me: failed program was:" >&5
1584sed 's/^/| /' conftest.$ac_ext >&5
1585
1586 ac_retval=1
1587fi
1588 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1589 as_fn_set_status $ac_retval
1590
1591} # ac_fn_c_try_cpp
1592
1593# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1594# -------------------------------------------------------
1595# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1596# the include files in INCLUDES and setting the cache variable VAR
1597# accordingly.
1598ac_fn_c_check_header_mongrel ()
1599{
1600 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Benjamin Petersond7f73e92010-09-05 00:09:07 +00001601 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001602 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1603$as_echo_n "checking for $2... " >&6; }
Benjamin Petersond7f73e92010-09-05 00:09:07 +00001604if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001605 $as_echo_n "(cached) " >&6
1606fi
1607eval ac_res=\$$3
1608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1609$as_echo "$ac_res" >&6; }
1610else
1611 # Is the header compilable?
1612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1613$as_echo_n "checking $2 usability... " >&6; }
1614cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1615/* end confdefs.h. */
1616$4
1617#include <$2>
1618_ACEOF
1619if ac_fn_c_try_compile "$LINENO"; then :
1620 ac_header_compiler=yes
1621else
1622 ac_header_compiler=no
1623fi
1624rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1625{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1626$as_echo "$ac_header_compiler" >&6; }
1627
1628# Is the header present?
1629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1630$as_echo_n "checking $2 presence... " >&6; }
1631cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1632/* end confdefs.h. */
1633#include <$2>
1634_ACEOF
1635if ac_fn_c_try_cpp "$LINENO"; then :
1636 ac_header_preproc=yes
1637else
1638 ac_header_preproc=no
1639fi
Benjamin Petersond7f73e92010-09-05 00:09:07 +00001640rm -f conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001641{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1642$as_echo "$ac_header_preproc" >&6; }
1643
1644# So? What about this header?
1645case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1646 yes:no: )
1647 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1648$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1649 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1650$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1651 ;;
1652 no:yes:* )
1653 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1654$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1655 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1656$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1657 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1658$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1659 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1660$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1661 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1662$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Benjamin Petersond7f73e92010-09-05 00:09:07 +00001663( cat <<\_ASBOX
1664## -------------------------------------- ##
Matthias Kloseb9621712010-04-24 17:59:49 +00001665## Report this to http://bugs.python.org/ ##
Benjamin Petersond7f73e92010-09-05 00:09:07 +00001666## -------------------------------------- ##
1667_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +00001668 ) | sed "s/^/$as_me: WARNING: /" >&2
1669 ;;
1670esac
1671 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1672$as_echo_n "checking for $2... " >&6; }
Benjamin Petersond7f73e92010-09-05 00:09:07 +00001673if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001674 $as_echo_n "(cached) " >&6
1675else
1676 eval "$3=\$ac_header_compiler"
1677fi
1678eval ac_res=\$$3
1679 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1680$as_echo "$ac_res" >&6; }
1681fi
1682 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1683
1684} # ac_fn_c_check_header_mongrel
1685
1686# ac_fn_c_try_run LINENO
1687# ----------------------
1688# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1689# that executables *can* be run.
1690ac_fn_c_try_run ()
1691{
1692 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1693 if { { ac_try="$ac_link"
1694case "(($ac_try" in
1695 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1696 *) ac_try_echo=$ac_try;;
1697esac
1698eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1699$as_echo "$ac_try_echo"; } >&5
1700 (eval "$ac_link") 2>&5
1701 ac_status=$?
1702 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1703 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1704 { { case "(($ac_try" in
1705 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1706 *) ac_try_echo=$ac_try;;
1707esac
1708eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1709$as_echo "$ac_try_echo"; } >&5
1710 (eval "$ac_try") 2>&5
1711 ac_status=$?
1712 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1713 test $ac_status = 0; }; }; then :
1714 ac_retval=0
1715else
1716 $as_echo "$as_me: program exited with status $ac_status" >&5
1717 $as_echo "$as_me: failed program was:" >&5
1718sed 's/^/| /' conftest.$ac_ext >&5
1719
1720 ac_retval=$ac_status
1721fi
1722 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1723 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1724 as_fn_set_status $ac_retval
1725
1726} # ac_fn_c_try_run
1727
1728# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1729# -------------------------------------------------------
1730# Tests whether HEADER exists and can be compiled using the include files in
1731# INCLUDES, setting the cache variable VAR accordingly.
1732ac_fn_c_check_header_compile ()
1733{
1734 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1735 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1736$as_echo_n "checking for $2... " >&6; }
Benjamin Petersond7f73e92010-09-05 00:09:07 +00001737if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001738 $as_echo_n "(cached) " >&6
1739else
1740 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1741/* end confdefs.h. */
1742$4
1743#include <$2>
1744_ACEOF
1745if ac_fn_c_try_compile "$LINENO"; then :
1746 eval "$3=yes"
1747else
1748 eval "$3=no"
1749fi
1750rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1751fi
1752eval ac_res=\$$3
1753 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1754$as_echo "$ac_res" >&6; }
1755 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1756
1757} # ac_fn_c_check_header_compile
1758
1759# ac_fn_c_try_link LINENO
1760# -----------------------
1761# Try to link conftest.$ac_ext, and return whether this succeeded.
1762ac_fn_c_try_link ()
1763{
1764 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1765 rm -f conftest.$ac_objext conftest$ac_exeext
1766 if { { ac_try="$ac_link"
1767case "(($ac_try" in
1768 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1769 *) ac_try_echo=$ac_try;;
1770esac
1771eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1772$as_echo "$ac_try_echo"; } >&5
1773 (eval "$ac_link") 2>conftest.err
1774 ac_status=$?
1775 if test -s conftest.err; then
1776 grep -v '^ *+' conftest.err >conftest.er1
1777 cat conftest.er1 >&5
1778 mv -f conftest.er1 conftest.err
1779 fi
1780 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1781 test $ac_status = 0; } && {
1782 test -z "$ac_c_werror_flag" ||
1783 test ! -s conftest.err
1784 } && test -s conftest$ac_exeext && {
1785 test "$cross_compiling" = yes ||
1786 $as_test_x conftest$ac_exeext
1787 }; then :
1788 ac_retval=0
1789else
1790 $as_echo "$as_me: failed program was:" >&5
1791sed 's/^/| /' conftest.$ac_ext >&5
1792
1793 ac_retval=1
1794fi
1795 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1796 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1797 # interfere with the next link command; also delete a directory that is
1798 # left behind by Apple's compiler. We do this before executing the actions.
1799 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1800 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1801 as_fn_set_status $ac_retval
1802
1803} # ac_fn_c_try_link
1804
1805# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1806# -------------------------------------------
1807# Tests whether TYPE exists after having included INCLUDES, setting cache
1808# variable VAR accordingly.
1809ac_fn_c_check_type ()
1810{
1811 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1812 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1813$as_echo_n "checking for $2... " >&6; }
Benjamin Petersond7f73e92010-09-05 00:09:07 +00001814if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001815 $as_echo_n "(cached) " >&6
1816else
1817 eval "$3=no"
1818 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1819/* end confdefs.h. */
1820$4
1821int
1822main ()
1823{
1824if (sizeof ($2))
1825 return 0;
1826 ;
1827 return 0;
1828}
1829_ACEOF
1830if ac_fn_c_try_compile "$LINENO"; then :
1831 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1832/* end confdefs.h. */
1833$4
1834int
1835main ()
1836{
1837if (sizeof (($2)))
1838 return 0;
1839 ;
1840 return 0;
1841}
1842_ACEOF
1843if ac_fn_c_try_compile "$LINENO"; then :
1844
1845else
1846 eval "$3=yes"
1847fi
1848rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1849fi
1850rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1851fi
1852eval ac_res=\$$3
1853 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1854$as_echo "$ac_res" >&6; }
1855 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1856
1857} # ac_fn_c_check_type
1858
1859# ac_fn_c_find_uintX_t LINENO BITS VAR
1860# ------------------------------------
1861# Finds an unsigned integer type with width BITS, setting cache variable VAR
1862# accordingly.
1863ac_fn_c_find_uintX_t ()
1864{
1865 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1866 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1867$as_echo_n "checking for uint$2_t... " >&6; }
Benjamin Petersond7f73e92010-09-05 00:09:07 +00001868if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001869 $as_echo_n "(cached) " >&6
1870else
1871 eval "$3=no"
1872 # Order is important - never check a type that is potentially smaller
1873 # than half of the expected target width.
1874 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1875 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1876 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1877/* end confdefs.h. */
1878$ac_includes_default
1879int
1880main ()
1881{
1882static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
1883test_array [0] = 0
1884
1885 ;
1886 return 0;
1887}
1888_ACEOF
1889if ac_fn_c_try_compile "$LINENO"; then :
1890 case $ac_type in #(
1891 uint$2_t) :
1892 eval "$3=yes" ;; #(
1893 *) :
1894 eval "$3=\$ac_type" ;;
1895esac
1896fi
1897rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Petersond7f73e92010-09-05 00:09:07 +00001898 eval as_val=\$$3
1899 if test "x$as_val" = x""no; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001900
1901else
1902 break
1903fi
1904 done
1905fi
1906eval ac_res=\$$3
1907 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1908$as_echo "$ac_res" >&6; }
1909 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1910
1911} # ac_fn_c_find_uintX_t
1912
1913# ac_fn_c_find_intX_t LINENO BITS VAR
1914# -----------------------------------
1915# Finds a signed integer type with width BITS, setting cache variable VAR
1916# accordingly.
1917ac_fn_c_find_intX_t ()
1918{
1919 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1920 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
1921$as_echo_n "checking for int$2_t... " >&6; }
Benjamin Petersond7f73e92010-09-05 00:09:07 +00001922if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001923 $as_echo_n "(cached) " >&6
1924else
1925 eval "$3=no"
1926 # Order is important - never check a type that is potentially smaller
1927 # than half of the expected target width.
1928 for ac_type in int$2_t 'int' 'long int' \
1929 'long long int' 'short int' 'signed char'; do
1930 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1931/* end confdefs.h. */
1932$ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00001933int
1934main ()
1935{
Benjamin Petersond7f73e92010-09-05 00:09:07 +00001936static int test_array [1 - 2 * !(enum { N = $2 / 2 - 1 };
1937 0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
Matthias Kloseb9621712010-04-24 17:59:49 +00001938test_array [0] = 0
1939
1940 ;
1941 return 0;
1942}
1943_ACEOF
1944if ac_fn_c_try_compile "$LINENO"; then :
1945 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1946/* end confdefs.h. */
1947$ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00001948int
1949main ()
1950{
Benjamin Petersond7f73e92010-09-05 00:09:07 +00001951static int test_array [1 - 2 * !(enum { N = $2 / 2 - 1 };
1952 ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Kloseb9621712010-04-24 17:59:49 +00001953 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
1954test_array [0] = 0
1955
1956 ;
1957 return 0;
1958}
1959_ACEOF
1960if ac_fn_c_try_compile "$LINENO"; then :
1961
1962else
1963 case $ac_type in #(
1964 int$2_t) :
1965 eval "$3=yes" ;; #(
1966 *) :
1967 eval "$3=\$ac_type" ;;
1968esac
1969fi
1970rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1971fi
1972rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Petersond7f73e92010-09-05 00:09:07 +00001973 eval as_val=\$$3
1974 if test "x$as_val" = x""no; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001975
1976else
1977 break
1978fi
1979 done
1980fi
1981eval ac_res=\$$3
1982 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1983$as_echo "$ac_res" >&6; }
1984 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1985
1986} # ac_fn_c_find_intX_t
1987
1988# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1989# --------------------------------------------
1990# Tries to find the compile-time value of EXPR in a program that includes
1991# INCLUDES, setting VAR accordingly. Returns whether the value could be
1992# computed
1993ac_fn_c_compute_int ()
1994{
1995 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1996 if test "$cross_compiling" = yes; then
1997 # Depending upon the size, compute the lo and hi bounds.
1998cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1999/* end confdefs.h. */
2000$4
2001int
2002main ()
2003{
2004static int test_array [1 - 2 * !(($2) >= 0)];
2005test_array [0] = 0
2006
2007 ;
2008 return 0;
2009}
2010_ACEOF
2011if ac_fn_c_try_compile "$LINENO"; then :
2012 ac_lo=0 ac_mid=0
2013 while :; do
2014 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2015/* end confdefs.h. */
2016$4
2017int
2018main ()
2019{
2020static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2021test_array [0] = 0
2022
2023 ;
2024 return 0;
2025}
2026_ACEOF
2027if ac_fn_c_try_compile "$LINENO"; then :
2028 ac_hi=$ac_mid; break
2029else
2030 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2031 if test $ac_lo -le $ac_mid; then
2032 ac_lo= ac_hi=
2033 break
2034 fi
2035 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2036fi
2037rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2038 done
2039else
2040 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2041/* end confdefs.h. */
2042$4
2043int
2044main ()
2045{
2046static int test_array [1 - 2 * !(($2) < 0)];
2047test_array [0] = 0
2048
2049 ;
2050 return 0;
2051}
2052_ACEOF
2053if ac_fn_c_try_compile "$LINENO"; then :
2054 ac_hi=-1 ac_mid=-1
2055 while :; do
2056 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2057/* end confdefs.h. */
2058$4
2059int
2060main ()
2061{
2062static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2063test_array [0] = 0
2064
2065 ;
2066 return 0;
2067}
2068_ACEOF
2069if ac_fn_c_try_compile "$LINENO"; then :
2070 ac_lo=$ac_mid; break
2071else
2072 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2073 if test $ac_mid -le $ac_hi; then
2074 ac_lo= ac_hi=
2075 break
2076 fi
2077 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2078fi
2079rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2080 done
2081else
2082 ac_lo= ac_hi=
2083fi
2084rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2085fi
2086rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2087# Binary search between lo and hi bounds.
2088while test "x$ac_lo" != "x$ac_hi"; do
2089 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2090 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2091/* end confdefs.h. */
2092$4
2093int
2094main ()
2095{
2096static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2097test_array [0] = 0
2098
2099 ;
2100 return 0;
2101}
2102_ACEOF
2103if ac_fn_c_try_compile "$LINENO"; then :
2104 ac_hi=$ac_mid
2105else
2106 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2107fi
2108rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2109done
2110case $ac_lo in #((
2111?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2112'') ac_retval=1 ;;
2113esac
2114 else
2115 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2116/* end confdefs.h. */
2117$4
2118static long int longval () { return $2; }
2119static unsigned long int ulongval () { return $2; }
2120#include <stdio.h>
2121#include <stdlib.h>
2122int
2123main ()
2124{
2125
2126 FILE *f = fopen ("conftest.val", "w");
2127 if (! f)
2128 return 1;
2129 if (($2) < 0)
2130 {
2131 long int i = longval ();
2132 if (i != ($2))
2133 return 1;
2134 fprintf (f, "%ld", i);
2135 }
2136 else
2137 {
2138 unsigned long int i = ulongval ();
2139 if (i != ($2))
2140 return 1;
2141 fprintf (f, "%lu", i);
2142 }
2143 /* Do not output a trailing newline, as this causes \r\n confusion
2144 on some platforms. */
2145 return ferror (f) || fclose (f) != 0;
2146
2147 ;
2148 return 0;
2149}
2150_ACEOF
2151if ac_fn_c_try_run "$LINENO"; then :
2152 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2153else
2154 ac_retval=1
2155fi
2156rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2157 conftest.$ac_objext conftest.beam conftest.$ac_ext
2158rm -f conftest.val
2159
2160 fi
2161 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2162 as_fn_set_status $ac_retval
2163
2164} # ac_fn_c_compute_int
2165
2166# ac_fn_c_check_func LINENO FUNC VAR
2167# ----------------------------------
2168# Tests whether FUNC exists, setting the cache variable VAR accordingly
2169ac_fn_c_check_func ()
2170{
2171 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2172 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2173$as_echo_n "checking for $2... " >&6; }
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002174if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002175 $as_echo_n "(cached) " >&6
2176else
2177 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2178/* end confdefs.h. */
2179/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2180 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2181#define $2 innocuous_$2
2182
2183/* System header to define __stub macros and hopefully few prototypes,
2184 which can conflict with char $2 (); below.
2185 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2186 <limits.h> exists even on freestanding compilers. */
2187
2188#ifdef __STDC__
2189# include <limits.h>
2190#else
2191# include <assert.h>
2192#endif
2193
2194#undef $2
2195
2196/* Override any GCC internal prototype to avoid an error.
2197 Use char because int might match the return type of a GCC
2198 builtin and then its argument prototype would still apply. */
2199#ifdef __cplusplus
2200extern "C"
2201#endif
2202char $2 ();
2203/* The GNU C library defines this for functions which it implements
2204 to always fail with ENOSYS. Some functions are actually named
2205 something starting with __ and the normal name is an alias. */
2206#if defined __stub_$2 || defined __stub___$2
2207choke me
2208#endif
2209
2210int
2211main ()
2212{
2213return $2 ();
2214 ;
2215 return 0;
2216}
2217_ACEOF
2218if ac_fn_c_try_link "$LINENO"; then :
2219 eval "$3=yes"
2220else
2221 eval "$3=no"
2222fi
2223rm -f core conftest.err conftest.$ac_objext \
2224 conftest$ac_exeext conftest.$ac_ext
2225fi
2226eval ac_res=\$$3
2227 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2228$as_echo "$ac_res" >&6; }
2229 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2230
2231} # ac_fn_c_check_func
2232
2233# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2234# ----------------------------------------------------
2235# Tries to find if the field MEMBER exists in type AGGR, after including
2236# INCLUDES, setting cache variable VAR accordingly.
2237ac_fn_c_check_member ()
2238{
2239 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2240 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2241$as_echo_n "checking for $2.$3... " >&6; }
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002242if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002243 $as_echo_n "(cached) " >&6
2244else
2245 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2246/* end confdefs.h. */
2247$5
2248int
2249main ()
2250{
2251static $2 ac_aggr;
2252if (ac_aggr.$3)
2253return 0;
2254 ;
2255 return 0;
2256}
2257_ACEOF
2258if ac_fn_c_try_compile "$LINENO"; then :
2259 eval "$4=yes"
2260else
2261 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2262/* end confdefs.h. */
2263$5
2264int
2265main ()
2266{
2267static $2 ac_aggr;
2268if (sizeof ac_aggr.$3)
2269return 0;
2270 ;
2271 return 0;
2272}
2273_ACEOF
2274if ac_fn_c_try_compile "$LINENO"; then :
2275 eval "$4=yes"
2276else
2277 eval "$4=no"
2278fi
2279rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2280fi
2281rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2282fi
2283eval ac_res=\$$4
2284 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2285$as_echo "$ac_res" >&6; }
2286 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2287
2288} # ac_fn_c_check_member
2289
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002290# ac_fn_c_check_decl LINENO SYMBOL VAR
2291# ------------------------------------
2292# Tests whether SYMBOL is declared, setting cache variable VAR accordingly.
Matthias Kloseb9621712010-04-24 17:59:49 +00002293ac_fn_c_check_decl ()
2294{
2295 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002296 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $2 is declared" >&5
2297$as_echo_n "checking whether $2 is declared... " >&6; }
2298if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002299 $as_echo_n "(cached) " >&6
2300else
2301 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2302/* end confdefs.h. */
2303$4
2304int
2305main ()
2306{
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002307#ifndef $2
2308 (void) $2;
Matthias Kloseb9621712010-04-24 17:59:49 +00002309#endif
2310
2311 ;
2312 return 0;
2313}
2314_ACEOF
2315if ac_fn_c_try_compile "$LINENO"; then :
2316 eval "$3=yes"
2317else
2318 eval "$3=no"
2319fi
2320rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2321fi
2322eval ac_res=\$$3
2323 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2324$as_echo "$ac_res" >&6; }
2325 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2326
2327} # ac_fn_c_check_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002328cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002329This file contains any messages produced by compilers while
2330running configure, to aid debugging if configure makes a mistake.
2331
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00002332It was created by python $as_me 3.2, which was
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002333generated by GNU Autoconf 2.65. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002334
2335 $ $0 $@
2336
2337_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002338exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002339{
2340cat <<_ASUNAME
2341## --------- ##
2342## Platform. ##
2343## --------- ##
2344
2345hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2346uname -m = `(uname -m) 2>/dev/null || echo unknown`
2347uname -r = `(uname -r) 2>/dev/null || echo unknown`
2348uname -s = `(uname -s) 2>/dev/null || echo unknown`
2349uname -v = `(uname -v) 2>/dev/null || echo unknown`
2350
2351/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2352/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2353
2354/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2355/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2356/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002357/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002358/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2359/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2360/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2361
2362_ASUNAME
2363
2364as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2365for as_dir in $PATH
2366do
2367 IFS=$as_save_IFS
2368 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002369 $as_echo "PATH: $as_dir"
2370 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002371IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002372
2373} >&5
2374
2375cat >&5 <<_ACEOF
2376
2377
2378## ----------- ##
2379## Core tests. ##
2380## ----------- ##
2381
2382_ACEOF
2383
2384
2385# Keep a trace of the command line.
2386# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002387# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002388# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002389# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002390ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002391ac_configure_args0=
2392ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002393ac_must_keep_next=false
2394for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002395do
Skip Montanaro6dead952003-09-25 14:50:04 +00002396 for ac_arg
2397 do
2398 case $ac_arg in
2399 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2400 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2401 | -silent | --silent | --silen | --sile | --sil)
2402 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002403 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002404 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002405 esac
2406 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002407 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002408 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002409 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002410 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002411 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002412 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002413 case $ac_arg in
2414 *=* | --config-cache | -C | -disable-* | --disable-* \
2415 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2416 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2417 | -with-* | --with-* | -without-* | --without-* | --x)
2418 case "$ac_configure_args0 " in
2419 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2420 esac
2421 ;;
2422 -* ) ac_must_keep_next=true ;;
2423 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002424 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002425 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002426 ;;
2427 esac
2428 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002429done
Matthias Kloseb9621712010-04-24 17:59:49 +00002430{ ac_configure_args0=; unset ac_configure_args0;}
2431{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002432
2433# When interrupted or exit'd, cleanup temporary files, and complete
2434# config.log. We remove comments because anyway the quotes in there
2435# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002436# WARNING: Use '\'' to represent an apostrophe within the trap.
2437# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
Martin v. Löwis11437992002-04-12 09:54:03 +00002438trap 'exit_status=$?
2439 # Save into config.log some information that might help in debugging.
2440 {
2441 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002442
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002443 cat <<\_ASBOX
2444## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002445## Cache variables. ##
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002446## ---------------- ##
2447_ASBOX
Martin v. Löwis11437992002-04-12 09:54:03 +00002448 echo
2449 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002450(
2451 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2452 eval ac_val=\$$ac_var
2453 case $ac_val in #(
2454 *${as_nl}*)
2455 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002456 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2457$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002458 esac
2459 case $ac_var in #(
2460 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002461 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2462 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002463 esac ;;
2464 esac
2465 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002466 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002467 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2468 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002469 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002470 "s/'\''/'\''\\\\'\'''\''/g;
2471 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2472 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002473 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002474 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002475 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002476 esac |
2477 sort
2478)
Martin v. Löwis11437992002-04-12 09:54:03 +00002479 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002480
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002481 cat <<\_ASBOX
2482## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002483## Output variables. ##
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002484## ----------------- ##
2485_ASBOX
Skip Montanaro6dead952003-09-25 14:50:04 +00002486 echo
2487 for ac_var in $ac_subst_vars
2488 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002489 eval ac_val=\$$ac_var
2490 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002491 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002492 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002493 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002494 done | sort
2495 echo
2496
2497 if test -n "$ac_subst_files"; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002498 cat <<\_ASBOX
2499## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002500## File substitutions. ##
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002501## ------------------- ##
2502_ASBOX
Skip Montanaro6dead952003-09-25 14:50:04 +00002503 echo
2504 for ac_var in $ac_subst_files
2505 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002506 eval ac_val=\$$ac_var
2507 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002508 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002509 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002510 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002511 done | sort
2512 echo
2513 fi
2514
Martin v. Löwis11437992002-04-12 09:54:03 +00002515 if test -s confdefs.h; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002516 cat <<\_ASBOX
2517## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002518## confdefs.h. ##
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002519## ----------- ##
2520_ASBOX
Martin v. Löwis11437992002-04-12 09:54:03 +00002521 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002522 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002523 echo
2524 fi
2525 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002526 $as_echo "$as_me: caught signal $ac_signal"
2527 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002528 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002529 rm -f core *.core core.conftest.* &&
2530 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002531 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002532' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002533for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002534 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002535done
2536ac_signal=0
2537
2538# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002539rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002540
Matthias Kloseb9621712010-04-24 17:59:49 +00002541$as_echo "/* confdefs.h */" > confdefs.h
2542
Martin v. Löwis11437992002-04-12 09:54:03 +00002543# Predefined preprocessor variables.
2544
2545cat >>confdefs.h <<_ACEOF
2546#define PACKAGE_NAME "$PACKAGE_NAME"
2547_ACEOF
2548
Martin v. Löwis11437992002-04-12 09:54:03 +00002549cat >>confdefs.h <<_ACEOF
2550#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2551_ACEOF
2552
Martin v. Löwis11437992002-04-12 09:54:03 +00002553cat >>confdefs.h <<_ACEOF
2554#define PACKAGE_VERSION "$PACKAGE_VERSION"
2555_ACEOF
2556
Martin v. Löwis11437992002-04-12 09:54:03 +00002557cat >>confdefs.h <<_ACEOF
2558#define PACKAGE_STRING "$PACKAGE_STRING"
2559_ACEOF
2560
Martin v. Löwis11437992002-04-12 09:54:03 +00002561cat >>confdefs.h <<_ACEOF
2562#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2563_ACEOF
2564
Matthias Kloseb9621712010-04-24 17:59:49 +00002565cat >>confdefs.h <<_ACEOF
2566#define PACKAGE_URL "$PACKAGE_URL"
2567_ACEOF
2568
Martin v. Löwis11437992002-04-12 09:54:03 +00002569
2570# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002571# Prefer an explicitly selected file to automatically selected ones.
2572ac_site_file1=NONE
2573ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002574if test -n "$CONFIG_SITE"; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002575 ac_site_file1=$CONFIG_SITE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002576elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002577 ac_site_file1=$prefix/share/config.site
2578 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002579else
Matthias Kloseb9621712010-04-24 17:59:49 +00002580 ac_site_file1=$ac_default_prefix/share/config.site
2581 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002582fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002583for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002584do
Matthias Kloseb9621712010-04-24 17:59:49 +00002585 test "x$ac_site_file" = xNONE && continue
2586 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2587 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2588$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002589 sed 's/^/| /' "$ac_site_file" >&5
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002590 . "$ac_site_file"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002591 fi
2592done
2593
2594if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002595 # Some versions of bash will fail to source /dev/null (special files
2596 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2597 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2598 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2599$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002600 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002601 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2602 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002603 esac
2604 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002605else
Matthias Kloseb9621712010-04-24 17:59:49 +00002606 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2607$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002608 >$cache_file
2609fi
2610
2611# Check that the precious variables saved in the cache have kept the same
2612# value.
2613ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002614for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002615 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2616 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002617 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2618 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002619 case $ac_old_set,$ac_new_set in
2620 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002621 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2622$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002623 ac_cache_corrupted=: ;;
2624 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002625 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2626$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002627 ac_cache_corrupted=: ;;
2628 ,);;
2629 *)
2630 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002631 # differences in whitespace do not lead to failure.
2632 ac_old_val_w=`echo x $ac_old_val`
2633 ac_new_val_w=`echo x $ac_new_val`
2634 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2635 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2636$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2637 ac_cache_corrupted=:
2638 else
2639 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2640$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2641 eval $ac_var=\$ac_old_val
2642 fi
2643 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2644$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2645 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2646$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002647 fi;;
2648 esac
2649 # Pass precious variables to config.status.
2650 if test "$ac_new_set" = set; then
2651 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002652 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002653 *) ac_arg=$ac_var=$ac_new_val ;;
2654 esac
2655 case " $ac_configure_args " in
2656 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002657 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002658 esac
2659 fi
2660done
2661if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002662 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2663$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2664 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2665$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002666 as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002667fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002668## -------------------- ##
2669## Main body of script. ##
2670## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002671
Guido van Rossum7f43da71994-08-01 12:15:30 +00002672ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002673ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002674ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2675ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2676ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002677
Guido van Rossum627b2d71993-12-24 10:39:16 +00002678
Michael W. Hudson54241132001-12-07 15:38:26 +00002679
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002680ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002681
2682
Martin v. Löwis11437992002-04-12 09:54:03 +00002683
Benjamin Petersond23f8222009-04-05 19:13:16 +00002684if test "$prefix" != "/"; then
2685 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2686fi
2687
2688
Martin v. Löwis11437992002-04-12 09:54:03 +00002689
2690
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002691# We don't use PACKAGE_ variables, and they cause conflicts
2692# with other autoconf-based packages that include Python.h
2693grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2694rm confdefs.h
2695mv confdefs.h.new confdefs.h
2696
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002697
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00002698VERSION=3.2
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002699
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002700# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002701
2702SOVERSION=1.0
2703
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002704# The later defininition of _XOPEN_SOURCE disables certain features
2705# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2706
Matthias Kloseb9621712010-04-24 17:59:49 +00002707$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002708
2709
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002710# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2711# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2712# them.
2713
Matthias Kloseb9621712010-04-24 17:59:49 +00002714$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002715
2716
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002717# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2718# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2719# them.
2720
Matthias Kloseb9621712010-04-24 17:59:49 +00002721$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002722
2723
Martin v. Löwisd6320502004-08-12 13:45:08 +00002724# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2725# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
2726
Matthias Kloseb9621712010-04-24 17:59:49 +00002727$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00002728
2729
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002730# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2731# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2732# them.
2733
Matthias Kloseb9621712010-04-24 17:59:49 +00002734$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002735
2736
2737
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002738define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002739
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00002740# Arguments passed to configure.
2741
2742CONFIG_ARGS="$ac_configure_args"
2743
Matthias Kloseb9621712010-04-24 17:59:49 +00002744{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
2745$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002746# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002747if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002748 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00002749 case $enableval in
2750 yes)
2751 enableval=/Developer/SDKs/MacOSX10.4u.sdk
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002752 if test ! -d "${enableval}"
2753 then
2754 enableval=/
2755 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002756 ;;
2757 esac
2758 case $enableval in
2759 no)
2760 UNIVERSALSDK=
2761 enable_universalsdk=
2762 ;;
2763 *)
2764 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002765 if test ! -d "${UNIVERSALSDK}"
2766 then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002767 as_fn_error "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002768 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002769 ;;
2770 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002771
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002772
Thomas Wouters477c8d52006-05-27 19:21:47 +00002773else
2774
2775 UNIVERSALSDK=
2776 enable_universalsdk=
2777
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002778fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002779
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002780if test -n "${UNIVERSALSDK}"
2781then
Matthias Kloseb9621712010-04-24 17:59:49 +00002782 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
2783$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002784else
Matthias Kloseb9621712010-04-24 17:59:49 +00002785 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2786$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002787fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002788
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002789
Benjamin Peterson6794aa32008-07-16 20:33:37 +00002790
2791
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002792UNIVERSAL_ARCHS="32-bit"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00002793
Matthias Kloseb9621712010-04-24 17:59:49 +00002794{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
2795$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002796
2797# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002798if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002799 withval=$with_universal_archs;
Matthias Kloseb9621712010-04-24 17:59:49 +00002800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
2801$as_echo "$withval" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002802 UNIVERSAL_ARCHS="$withval"
2803
2804else
2805
Matthias Kloseb9621712010-04-24 17:59:49 +00002806 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 32-bit" >&5
2807$as_echo "32-bit" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002808
2809fi
2810
2811
2812
2813
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002814
2815# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002816if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002817 withval=$with_framework_name;
2818 PYTHONFRAMEWORK=${withval}
2819 PYTHONFRAMEWORKDIR=${withval}.framework
2820 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
2821
2822else
2823
2824 PYTHONFRAMEWORK=Python
2825 PYTHONFRAMEWORKDIR=Python.framework
2826 PYTHONFRAMEWORKIDENTIFIER=org.python.python
2827
2828fi
2829
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002830# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002831if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002832 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00002833 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00002834 yes)
Jack Jansene578a632001-08-15 01:27:14 +00002835 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00002836 esac
2837 case $enableval in
2838 no)
2839 PYTHONFRAMEWORK=
2840 PYTHONFRAMEWORKDIR=no-framework
2841 PYTHONFRAMEWORKPREFIX=
2842 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002843 FRAMEWORKINSTALLFIRST=
2844 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002845 FRAMEWORKALTINSTALLFIRST=
2846 FRAMEWORKALTINSTALLLAST=
2847 if test "x${prefix}" = "xNONE"; then
2848 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2849 else
2850 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2851 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00002852 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00002853 ;;
2854 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002855 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00002856 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00002857 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00002858 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00002859 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
2860 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002861 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002862
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002863 if test "x${prefix}" = "xNONE" ; then
2864 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002865
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002866 else
2867 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2868 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002869
2870 case "${enableval}" in
2871 /System*)
2872 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2873 if test "${prefix}" = "NONE" ; then
2874 # See below
2875 FRAMEWORKUNIXTOOLSPREFIX="/usr"
2876 fi
2877 ;;
2878
2879 /Library*)
2880 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2881 ;;
2882
2883 */Library/Frameworks)
2884 MDIR="`dirname "${enableval}"`"
2885 MDIR="`dirname "${MDIR}"`"
2886 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
2887
2888 if test "${prefix}" = "NONE"; then
2889 # User hasn't specified the
2890 # --prefix option, but wants to install
2891 # the framework in a non-default location,
2892 # ensure that the compatibility links get
2893 # installed relative to that prefix as well
2894 # instead of in /usr/local.
2895 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
2896 fi
2897 ;;
2898
2899 *)
2900 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2901 ;;
2902 esac
2903
Jack Jansen127e56e2001-09-11 14:41:54 +00002904 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00002905
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002906 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00002907 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002908 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002909
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002910 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002911
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002912 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
2913
2914 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
2915
Jack Jansene578a632001-08-15 01:27:14 +00002916 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002917
Guido van Rossum563e7081996-09-10 18:20:48 +00002918else
Martin v. Löwis11437992002-04-12 09:54:03 +00002919
Jack Jansene578a632001-08-15 01:27:14 +00002920 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00002921 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00002922 PYTHONFRAMEWORKPREFIX=
2923 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002924 FRAMEWORKINSTALLFIRST=
2925 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002926 FRAMEWORKALTINSTALLFIRST=
2927 FRAMEWORKALTINSTALLLAST=
2928 if test "x${prefix}" = "xNONE" ; then
2929 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2930 else
2931 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2932 fi
Jack Jansene578a632001-08-15 01:27:14 +00002933 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002934
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002935
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002936fi
2937
Thomas Wouters477c8d52006-05-27 19:21:47 +00002938
2939
Michael W. Hudson54241132001-12-07 15:38:26 +00002940
2941
2942
2943
Jack Jansene578a632001-08-15 01:27:14 +00002944
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002945
2946
2947
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002948
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002949
Jack Jansene578a632001-08-15 01:27:14 +00002950##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00002951## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00002952## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00002953##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002954# Set name for machine-dependent library files
2955
Matthias Kloseb9621712010-04-24 17:59:49 +00002956{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
2957$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002958if test -z "$MACHDEP"
2959then
Guido van Rossum563e7081996-09-10 18:20:48 +00002960 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002961 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00002962 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00002963 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002964 else
Guido van Rossum563e7081996-09-10 18:20:48 +00002965 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002966 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00002967 ac_md_system=`echo $ac_sys_system |
2968 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
2969 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00002970 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00002971 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00002972
Guido van Rossum07397971997-04-29 21:49:50 +00002973 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002974 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002975 darwin*) MACHDEP="darwin";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00002976 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00002977 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002978 esac
2979fi
Guido van Rossum91922671997-10-09 20:24:13 +00002980
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002981# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
2982# disable features if it is defined, without any means to access these
2983# features as extensions. For these systems, we skip the definition of
2984# _XOPEN_SOURCE. Before adding a system to the list to gain access to
2985# some feature, make sure there is no alternative way to access this
2986# feature. Also, when using wildcards, make sure you have verified the
2987# need for not defining _XOPEN_SOURCE on all systems matching the
2988# wildcard, and that the wildcard does not include future systems
2989# (which may remove their limitations).
2990case $ac_sys_system/$ac_sys_release in
2991 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
2992 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00002993 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00002994 # In addition, Stefan Krah confirms that issue #1244610 exists through
2995 # OpenBSD 4.6, but is fixed in 4.7.
2996 OpenBSD/2.* | OpenBSD/3.[0123456789] | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00002997 define_xopen_source=no
2998 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
2999 # also defined. This can be overridden by defining _BSD_SOURCE
3000 # As this has a different meaning on Linux, only define it on OpenBSD
3001
Matthias Kloseb9621712010-04-24 17:59:49 +00003002$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003003
3004 ;;
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003005 OpenBSD/4.[789])
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003006 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3007 # also defined. This can be overridden by defining _BSD_SOURCE
3008 # As this has a different meaning on Linux, only define it on OpenBSD
3009
Matthias Kloseb9621712010-04-24 17:59:49 +00003010$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003011
3012 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003013 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3014 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3015 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003016 NetBSD/1.5 | NetBSD/1.5.* | NetBSD/1.6 | NetBSD/1.6.* | NetBSD/1.6[A-S])
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003017 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003018 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3019 # request to enable features supported by the standard as a request
3020 # to disable features not supported by the standard. The best way
3021 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3022 # entirely and define __EXTENSIONS__ instead.
3023 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003024 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003025 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3026 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003027 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003028 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003029 define_xopen_source=no;;
3030 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003031 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003032 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003033 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003034 # On FreeBSD 4, the math functions C89 does not cover are never defined
3035 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3036 FreeBSD/4.*)
3037 define_xopen_source=no;;
3038 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3039 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3040 # identifies itself as Darwin/7.*
3041 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3042 # disables platform specific features beyond repair.
3043 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3044 # has no effect, don't bother defining them
3045 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003046 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003047 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003048 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003049 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3050 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3051 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003052 AIX/4)
3053 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003054 AIX/5)
3055 if test `uname -r` -eq 1; then
3056 define_xopen_source=no
3057 fi
3058 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003059 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3060 # defining NI_NUMERICHOST.
3061 QNX/6.3.2)
3062 define_xopen_source=no
3063 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003064
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003065esac
3066
3067if test $define_xopen_source = yes
3068then
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003069
Matthias Kloseb9621712010-04-24 17:59:49 +00003070$as_echo "#define _XOPEN_SOURCE 600" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003071
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003072
3073 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3074 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3075 # several APIs are not declared. Since this is also needed in some
3076 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003077
Matthias Kloseb9621712010-04-24 17:59:49 +00003078$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003079
3080
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003081
Matthias Kloseb9621712010-04-24 17:59:49 +00003082$as_echo "#define _POSIX_C_SOURCE 200112L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003083
3084
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003085fi
3086
Guido van Rossum91922671997-10-09 20:24:13 +00003087#
3088# SGI compilers allow the specification of the both the ABI and the
3089# ISA on the command line. Depending on the values of these switches,
3090# different and often incompatable code will be generated.
3091#
3092# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3093# thus supply support for various ABI/ISA combinations. The MACHDEP
3094# variable is also adjusted.
3095#
3096
3097if test ! -z "$SGI_ABI"
3098then
3099 CC="cc $SGI_ABI"
3100 LDFLAGS="$SGI_ABI $LDFLAGS"
3101 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3102fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003103{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3104$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003105
Jack Jansen6b08a402004-06-03 12:41:45 +00003106# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3107# it may influence the way we can build extensions, so distutils
3108# needs to check it
3109
Thomas Wouters477c8d52006-05-27 19:21:47 +00003110
Jack Jansen6b08a402004-06-03 12:41:45 +00003111CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003112EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003113
Matthias Kloseb9621712010-04-24 17:59:49 +00003114{ $as_echo "$as_me:${as_lineno-$LINENO}: checking machine type as reported by uname -m" >&5
3115$as_echo_n "checking machine type as reported by uname -m... " >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00003116ac_sys_machine=`uname -m`
Matthias Kloseb9621712010-04-24 17:59:49 +00003117{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_sys_machine" >&5
3118$as_echo "$ac_sys_machine" >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00003119
Guido van Rossum627b2d71993-12-24 10:39:16 +00003120# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003121
3122# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3123# for debug/optimization stuff. BASECFLAGS is for flags that are required
3124# just to get things to compile and link. Users are free to override OPT
3125# when running configure or make. The build should not break if they do.
3126# BASECFLAGS should generally not be messed with, however.
3127
3128# XXX shouldn't some/most/all of this code be merged with the stuff later
3129# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003130{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3131$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003132
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003133# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003134if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003135 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003136 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003137 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003138 without_gcc=yes;;
3139 yes) CC=gcc
3140 without_gcc=no;;
3141 *) CC=$withval
3142 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003143 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003144else
Martin v. Löwis11437992002-04-12 09:54:03 +00003145
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003146 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003147 AIX*) CC=cc_r
3148 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003149 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003150 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003151fi
3152
Matthias Kloseb9621712010-04-24 17:59:49 +00003153{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3154$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003155
Guido van Rossum8b131c51995-03-09 14:10:13 +00003156# If the user switches compilers, we can't believe the cache
3157if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3158then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00003159 as_fn_error "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003160(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003161fi
3162
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003163# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3164# when the compiler supports them, but we don't always want -O2, and
3165# we set -g later.
3166if test -z "$CFLAGS"; then
3167 CFLAGS=
3168fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003169ac_ext=c
3170ac_cpp='$CPP $CPPFLAGS'
3171ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3172ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3173ac_compiler_gnu=$ac_cv_c_compiler_gnu
3174if test -n "$ac_tool_prefix"; then
3175 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3176set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003177{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3178$as_echo_n "checking for $ac_word... " >&6; }
3179if test "${ac_cv_prog_CC+set}" = set; then :
3180 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003181else
3182 if test -n "$CC"; then
3183 ac_cv_prog_CC="$CC" # Let the user override the test.
3184else
Martin v. Löwis11437992002-04-12 09:54:03 +00003185as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3186for as_dir in $PATH
3187do
3188 IFS=$as_save_IFS
3189 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003190 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003191 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003192 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003193 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003194 break 2
3195 fi
3196done
Matthias Kloseb9621712010-04-24 17:59:49 +00003197 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003198IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003199
Jack Jansendd19cf82001-12-06 22:36:17 +00003200fi
3201fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003202CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003203if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003204 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3205$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003206else
Matthias Kloseb9621712010-04-24 17:59:49 +00003207 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3208$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003209fi
3210
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003211
Martin v. Löwis11437992002-04-12 09:54:03 +00003212fi
3213if test -z "$ac_cv_prog_CC"; then
3214 ac_ct_CC=$CC
3215 # Extract the first word of "gcc", so it can be a program name with args.
3216set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003217{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3218$as_echo_n "checking for $ac_word... " >&6; }
3219if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
3220 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003221else
3222 if test -n "$ac_ct_CC"; then
3223 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3224else
3225as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3226for as_dir in $PATH
3227do
3228 IFS=$as_save_IFS
3229 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003230 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003231 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003232 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003233 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003234 break 2
3235 fi
3236done
Matthias Kloseb9621712010-04-24 17:59:49 +00003237 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003238IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003239
3240fi
3241fi
3242ac_ct_CC=$ac_cv_prog_ac_ct_CC
3243if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003244 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3245$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003246else
Matthias Kloseb9621712010-04-24 17:59:49 +00003247 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3248$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003249fi
3250
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003251 if test "x$ac_ct_CC" = x; then
3252 CC=""
3253 else
3254 case $cross_compiling:$ac_tool_warned in
3255yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003256{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3257$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003258ac_tool_warned=yes ;;
3259esac
3260 CC=$ac_ct_CC
3261 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003262else
3263 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003264fi
3265
Jack Jansendd19cf82001-12-06 22:36:17 +00003266if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003267 if test -n "$ac_tool_prefix"; then
3268 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
Martin v. Löwis11437992002-04-12 09:54:03 +00003269set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003270{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3271$as_echo_n "checking for $ac_word... " >&6; }
3272if test "${ac_cv_prog_CC+set}" = set; then :
3273 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003274else
3275 if test -n "$CC"; then
3276 ac_cv_prog_CC="$CC" # Let the user override the test.
3277else
Martin v. Löwis11437992002-04-12 09:54:03 +00003278as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3279for as_dir in $PATH
3280do
3281 IFS=$as_save_IFS
3282 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003283 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003284 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003285 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003286 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003287 break 2
3288 fi
3289done
Matthias Kloseb9621712010-04-24 17:59:49 +00003290 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003291IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003292
3293fi
3294fi
3295CC=$ac_cv_prog_CC
3296if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003297 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3298$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003299else
Matthias Kloseb9621712010-04-24 17:59:49 +00003300 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3301$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003302fi
3303
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003304
Martin v. Löwis11437992002-04-12 09:54:03 +00003305 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003306fi
3307if test -z "$CC"; then
3308 # Extract the first word of "cc", so it can be a program name with args.
3309set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3311$as_echo_n "checking for $ac_word... " >&6; }
3312if test "${ac_cv_prog_CC+set}" = set; then :
3313 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003314else
3315 if test -n "$CC"; then
3316 ac_cv_prog_CC="$CC" # Let the user override the test.
3317else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003318 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003319as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3320for as_dir in $PATH
3321do
3322 IFS=$as_save_IFS
3323 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003324 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003325 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003326 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3327 ac_prog_rejected=yes
3328 continue
3329 fi
3330 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003331 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003332 break 2
3333 fi
3334done
Matthias Kloseb9621712010-04-24 17:59:49 +00003335 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003336IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003337
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003338if test $ac_prog_rejected = yes; then
3339 # We found a bogon in the path, so make sure we never use it.
3340 set dummy $ac_cv_prog_CC
3341 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003342 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003343 # We chose a different compiler from the bogus one.
3344 # However, it has the same basename, so the bogon will be chosen
3345 # first if we set CC to just the basename; use the full file name.
3346 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003347 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003348 fi
3349fi
3350fi
3351fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003352CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003353if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003354 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3355$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003356else
Matthias Kloseb9621712010-04-24 17:59:49 +00003357 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3358$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003359fi
3360
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003361
Martin v. Löwis11437992002-04-12 09:54:03 +00003362fi
3363if test -z "$CC"; then
3364 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003365 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003366 do
3367 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3368set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003369{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3370$as_echo_n "checking for $ac_word... " >&6; }
3371if test "${ac_cv_prog_CC+set}" = set; then :
3372 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003373else
3374 if test -n "$CC"; then
3375 ac_cv_prog_CC="$CC" # Let the user override the test.
3376else
Martin v. Löwis11437992002-04-12 09:54:03 +00003377as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3378for as_dir in $PATH
3379do
3380 IFS=$as_save_IFS
3381 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003382 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003383 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003384 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003385 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003386 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003387 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003388done
Matthias Kloseb9621712010-04-24 17:59:49 +00003389 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003390IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003391
3392fi
3393fi
3394CC=$ac_cv_prog_CC
3395if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003396 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3397$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003398else
Matthias Kloseb9621712010-04-24 17:59:49 +00003399 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3400$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003401fi
3402
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003403
Martin v. Löwis11437992002-04-12 09:54:03 +00003404 test -n "$CC" && break
3405 done
3406fi
3407if test -z "$CC"; then
3408 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003409 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003410do
3411 # Extract the first word of "$ac_prog", so it can be a program name with args.
3412set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003413{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3414$as_echo_n "checking for $ac_word... " >&6; }
3415if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
3416 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003417else
3418 if test -n "$ac_ct_CC"; then
3419 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3420else
3421as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3422for as_dir in $PATH
3423do
3424 IFS=$as_save_IFS
3425 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003426 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003427 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003428 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003429 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003430 break 2
3431 fi
3432done
Matthias Kloseb9621712010-04-24 17:59:49 +00003433 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003434IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003435
Martin v. Löwis11437992002-04-12 09:54:03 +00003436fi
3437fi
3438ac_ct_CC=$ac_cv_prog_ac_ct_CC
3439if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003440 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3441$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003442else
Matthias Kloseb9621712010-04-24 17:59:49 +00003443 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3444$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003445fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003446
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003447
Martin v. Löwis11437992002-04-12 09:54:03 +00003448 test -n "$ac_ct_CC" && break
3449done
Michael W. Hudson54241132001-12-07 15:38:26 +00003450
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003451 if test "x$ac_ct_CC" = x; then
3452 CC=""
3453 else
3454 case $cross_compiling:$ac_tool_warned in
3455yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003456{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3457$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003458ac_tool_warned=yes ;;
3459esac
3460 CC=$ac_ct_CC
3461 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003462fi
3463
3464fi
3465
3466
Matthias Kloseb9621712010-04-24 17:59:49 +00003467test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3468$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Petersond7f73e92010-09-05 00:09:07 +00003469as_fn_error "no acceptable C compiler found in \$PATH
3470See \`config.log' for more details." "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003471
3472# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003473$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3474set X $ac_compile
3475ac_compiler=$2
3476for ac_option in --version -v -V -qversion; do
3477 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003478case "(($ac_try" in
3479 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3480 *) ac_try_echo=$ac_try;;
3481esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003482eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3483$as_echo "$ac_try_echo"; } >&5
3484 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003485 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003486 if test -s conftest.err; then
3487 sed '10a\
3488... rest of stderr output deleted ...
3489 10q' conftest.err >conftest.er1
3490 cat conftest.er1 >&5
3491 fi
3492 rm -f conftest.er1 conftest.err
3493 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3494 test $ac_status = 0; }
3495done
Martin v. Löwis11437992002-04-12 09:54:03 +00003496
Matthias Kloseb9621712010-04-24 17:59:49 +00003497cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003498/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003499
Martin v. Löwis11437992002-04-12 09:54:03 +00003500int
3501main ()
3502{
3503
3504 ;
3505 return 0;
3506}
3507_ACEOF
3508ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003509ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003510# Try to create an executable without -o first, disregard a.out.
3511# It will help us diagnose broken compilers, and finding out an intuition
3512# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003513{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3514$as_echo_n "checking whether the C compiler works... " >&6; }
3515ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3516
3517# The possible output files:
3518ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3519
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003520ac_rmfiles=
3521for ac_file in $ac_files
3522do
3523 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003524 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003525 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3526 esac
3527done
3528rm -f $ac_rmfiles
3529
Matthias Kloseb9621712010-04-24 17:59:49 +00003530if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003531case "(($ac_try" in
3532 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3533 *) ac_try_echo=$ac_try;;
3534esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003535eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3536$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003537 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003538 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003539 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3540 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003541 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3542# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3543# in a Makefile. We should not override ac_cv_exeext if it was cached,
3544# so that the user can short-circuit this test for compilers unknown to
3545# Autoconf.
3546for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003547do
3548 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003549 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003550 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003551 ;;
3552 [ab].out )
3553 # We found the default executable, but exeext='' is most
3554 # certainly right.
3555 break;;
3556 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003557 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003558 then :; else
3559 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3560 fi
3561 # We set ac_cv_exeext here because the later test for it is not
3562 # safe: cross compilers may not add the suffix if given an `-o'
3563 # argument, so we may need to know it at that point already.
3564 # Even if this section looks crufty: it has the advantage of
3565 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003566 break;;
3567 * )
3568 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003569 esac
3570done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003571test "$ac_cv_exeext" = no && ac_cv_exeext=
3572
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003573else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003574 ac_file=''
3575fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003576if test -z "$ac_file"; then :
3577 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3578$as_echo "no" >&6; }
3579$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003580sed 's/^/| /' conftest.$ac_ext >&5
3581
Matthias Kloseb9621712010-04-24 17:59:49 +00003582{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3583$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Petersond7f73e92010-09-05 00:09:07 +00003584{ as_fn_set_status 77
3585as_fn_error "C compiler cannot create executables
3586See \`config.log' for more details." "$LINENO" 5; }; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003587else
3588 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3589$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003590fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003591{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3592$as_echo_n "checking for C compiler default output file name... " >&6; }
3593{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3594$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003595ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003596
Matthias Kloseb9621712010-04-24 17:59:49 +00003597rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003598ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00003599{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3600$as_echo_n "checking for suffix of executables... " >&6; }
3601if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003602case "(($ac_try" in
3603 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3604 *) ac_try_echo=$ac_try;;
3605esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003606eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3607$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003608 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003609 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003610 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3611 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003612 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3613# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3614# work properly (i.e., refer to `conftest.exe'), while it won't with
3615# `rm'.
3616for ac_file in conftest.exe conftest conftest.*; do
3617 test -f "$ac_file" || continue
3618 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003619 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003620 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3621 break;;
3622 * ) break;;
3623 esac
3624done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003625else
Matthias Kloseb9621712010-04-24 17:59:49 +00003626 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3627$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Petersond7f73e92010-09-05 00:09:07 +00003628as_fn_error "cannot compute suffix of executables: cannot compile and link
3629See \`config.log' for more details." "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003630fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003631rm -f conftest conftest$ac_cv_exeext
3632{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3633$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003634
3635rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003636EXEEXT=$ac_cv_exeext
3637ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003638cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3639/* end confdefs.h. */
3640#include <stdio.h>
3641int
3642main ()
3643{
3644FILE *f = fopen ("conftest.out", "w");
3645 return ferror (f) || fclose (f) != 0;
3646
3647 ;
3648 return 0;
3649}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003650_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003651ac_clean_files="$ac_clean_files conftest.out"
3652# Check that the compiler produces executables we can run. If not, either
3653# the compiler is broken, or we cross compile.
3654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3655$as_echo_n "checking whether we are cross compiling... " >&6; }
3656if test "$cross_compiling" != yes; then
3657 { { ac_try="$ac_link"
3658case "(($ac_try" in
3659 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3660 *) ac_try_echo=$ac_try;;
3661esac
3662eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3663$as_echo "$ac_try_echo"; } >&5
3664 (eval "$ac_link") 2>&5
3665 ac_status=$?
3666 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3667 test $ac_status = 0; }
3668 if { ac_try='./conftest$ac_cv_exeext'
3669 { { case "(($ac_try" in
3670 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3671 *) ac_try_echo=$ac_try;;
3672esac
3673eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3674$as_echo "$ac_try_echo"; } >&5
3675 (eval "$ac_try") 2>&5
3676 ac_status=$?
3677 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3678 test $ac_status = 0; }; }; then
3679 cross_compiling=no
3680 else
3681 if test "$cross_compiling" = maybe; then
3682 cross_compiling=yes
3683 else
3684 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3685$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Petersond7f73e92010-09-05 00:09:07 +00003686as_fn_error "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00003687If you meant to cross compile, use \`--host'.
Benjamin Petersond7f73e92010-09-05 00:09:07 +00003688See \`config.log' for more details." "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003689 fi
3690 fi
3691fi
3692{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3693$as_echo "$cross_compiling" >&6; }
3694
3695rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3696ac_clean_files=$ac_clean_files_save
3697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3698$as_echo_n "checking for suffix of object files... " >&6; }
3699if test "${ac_cv_objext+set}" = set; then :
3700 $as_echo_n "(cached) " >&6
3701else
3702 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003703/* end confdefs.h. */
3704
3705int
3706main ()
3707{
3708
3709 ;
3710 return 0;
3711}
3712_ACEOF
3713rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00003714if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003715case "(($ac_try" in
3716 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3717 *) ac_try_echo=$ac_try;;
3718esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003719eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3720$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003721 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003722 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003723 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3724 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003725 for ac_file in conftest.o conftest.obj conftest.*; do
3726 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00003727 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003728 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003729 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3730 break;;
3731 esac
3732done
3733else
Matthias Kloseb9621712010-04-24 17:59:49 +00003734 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003735sed 's/^/| /' conftest.$ac_ext >&5
3736
Matthias Kloseb9621712010-04-24 17:59:49 +00003737{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3738$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Petersond7f73e92010-09-05 00:09:07 +00003739as_fn_error "cannot compute suffix of object files: cannot compile
3740See \`config.log' for more details." "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003741fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003742rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003743fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003744{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3745$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003746OBJEXT=$ac_cv_objext
3747ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3749$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3750if test "${ac_cv_c_compiler_gnu+set}" = set; then :
3751 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003752else
Matthias Kloseb9621712010-04-24 17:59:49 +00003753 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003754/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003755
Martin v. Löwis11437992002-04-12 09:54:03 +00003756int
3757main ()
3758{
3759#ifndef __GNUC__
3760 choke me
3761#endif
3762
3763 ;
3764 return 0;
3765}
3766_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003767if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00003768 ac_compiler_gnu=yes
3769else
Matthias Kloseb9621712010-04-24 17:59:49 +00003770 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003771fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003772rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003773ac_cv_c_compiler_gnu=$ac_compiler_gnu
3774
3775fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003776{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3777$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3778if test $ac_compiler_gnu = yes; then
3779 GCC=yes
3780else
3781 GCC=
3782fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003783ac_test_CFLAGS=${CFLAGS+set}
3784ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00003785{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3786$as_echo_n "checking whether $CC accepts -g... " >&6; }
3787if test "${ac_cv_prog_cc_g+set}" = set; then :
3788 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003789else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003790 ac_save_c_werror_flag=$ac_c_werror_flag
3791 ac_c_werror_flag=yes
3792 ac_cv_prog_cc_g=no
3793 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00003794 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003795/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003796
Martin v. Löwis11437992002-04-12 09:54:03 +00003797int
3798main ()
3799{
3800
3801 ;
3802 return 0;
3803}
3804_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003805if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00003806 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003807else
Matthias Kloseb9621712010-04-24 17:59:49 +00003808 CFLAGS=""
3809 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003810/* end confdefs.h. */
3811
3812int
3813main ()
3814{
3815
3816 ;
3817 return 0;
3818}
3819_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003820if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003821
Matthias Kloseb9621712010-04-24 17:59:49 +00003822else
3823 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003824 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00003825 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003826/* end confdefs.h. */
3827
3828int
3829main ()
3830{
3831
3832 ;
3833 return 0;
3834}
3835_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003836if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003837 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00003838fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003839rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003840fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003841rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3842fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003843rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3844 ac_c_werror_flag=$ac_save_c_werror_flag
3845fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003846{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3847$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003848if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003849 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003850elif test $ac_cv_prog_cc_g = yes; then
3851 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003852 CFLAGS="-g -O2"
3853 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003854 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003855 fi
3856else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003857 if test "$GCC" = yes; then
3858 CFLAGS="-O2"
3859 else
3860 CFLAGS=
3861 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003862fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003863{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3864$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3865if test "${ac_cv_prog_cc_c89+set}" = set; then :
3866 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003867else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003868 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003869ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00003870cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003871/* end confdefs.h. */
3872#include <stdarg.h>
3873#include <stdio.h>
3874#include <sys/types.h>
3875#include <sys/stat.h>
3876/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3877struct buf { int x; };
3878FILE * (*rcsopen) (struct buf *, struct stat *, int);
3879static char *e (p, i)
3880 char **p;
3881 int i;
3882{
3883 return p[i];
3884}
3885static char *f (char * (*g) (char **, int), char **p, ...)
3886{
3887 char *s;
3888 va_list v;
3889 va_start (v,p);
3890 s = g (p, va_arg (v,int));
3891 va_end (v);
3892 return s;
3893}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003894
3895/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3896 function prototypes and stuff, but not '\xHH' hex character constants.
3897 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003898 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003899 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3900 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003901 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003902int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3903
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003904/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3905 inside strings and character constants. */
3906#define FOO(x) 'x'
3907int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3908
Skip Montanaro6dead952003-09-25 14:50:04 +00003909int test (int i, double x);
3910struct s1 {int (*f) (int a);};
3911struct s2 {int (*f) (double a);};
3912int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3913int argc;
3914char **argv;
3915int
3916main ()
3917{
3918return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3919 ;
3920 return 0;
3921}
3922_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003923for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3924 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003925do
3926 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00003927 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003928 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00003929fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003930rm -f core conftest.err conftest.$ac_objext
3931 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00003932done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003933rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003934CC=$ac_save_CC
3935
3936fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003937# AC_CACHE_VAL
3938case "x$ac_cv_prog_cc_c89" in
3939 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00003940 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3941$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003942 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00003943 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3944$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003945 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003946 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00003947 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3948$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003949esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003950if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00003951
Matthias Kloseb9621712010-04-24 17:59:49 +00003952fi
Skip Montanaro6dead952003-09-25 14:50:04 +00003953
Martin v. Löwis11437992002-04-12 09:54:03 +00003954ac_ext=c
3955ac_cpp='$CPP $CPPFLAGS'
3956ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3957ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3958ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003959
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003960
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003961
3962
Matthias Kloseb9621712010-04-24 17:59:49 +00003963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
3964$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003965
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003966# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003967if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003968 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003969
3970 case $withval in
3971 no) with_cxx_main=no
3972 MAINCC='$(CC)';;
3973 yes) with_cxx_main=yes
3974 MAINCC='$(CXX)';;
3975 *) with_cxx_main=yes
3976 MAINCC=$withval
3977 if test -z "$CXX"
3978 then
3979 CXX=$withval
3980 fi;;
3981 esac
3982else
3983
3984 with_cxx_main=no
3985 MAINCC='$(CC)'
3986
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003987fi
3988
Matthias Kloseb9621712010-04-24 17:59:49 +00003989{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
3990$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003991
3992preset_cxx="$CXX"
3993if test -z "$CXX"
3994then
3995 case "$CC" in
3996 gcc) # Extract the first word of "g++", so it can be a program name with args.
3997set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003998{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3999$as_echo_n "checking for $ac_word... " >&6; }
4000if test "${ac_cv_path_CXX+set}" = set; then :
4001 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004002else
4003 case $CXX in
4004 [\\/]* | ?:[\\/]*)
4005 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4006 ;;
4007 *)
4008 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4009for as_dir in notfound
4010do
4011 IFS=$as_save_IFS
4012 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004013 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004014 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004015 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004016 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004017 break 2
4018 fi
4019done
Matthias Kloseb9621712010-04-24 17:59:49 +00004020 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004021IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004022
4023 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
4024 ;;
4025esac
4026fi
4027CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004028if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004029 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4030$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004031else
Matthias Kloseb9621712010-04-24 17:59:49 +00004032 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4033$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004034fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004035
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004036 ;;
4037 cc) # Extract the first word of "c++", so it can be a program name with args.
4038set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004039{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4040$as_echo_n "checking for $ac_word... " >&6; }
4041if test "${ac_cv_path_CXX+set}" = set; then :
4042 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004043else
4044 case $CXX in
4045 [\\/]* | ?:[\\/]*)
4046 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4047 ;;
4048 *)
4049 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4050for as_dir in notfound
4051do
4052 IFS=$as_save_IFS
4053 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004054 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004055 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004056 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004057 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004058 break 2
4059 fi
4060done
Matthias Kloseb9621712010-04-24 17:59:49 +00004061 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004062IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004063
4064 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
4065 ;;
4066esac
4067fi
4068CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004069if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004070 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4071$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004072else
Matthias Kloseb9621712010-04-24 17:59:49 +00004073 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4074$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004075fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004076
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004077 ;;
4078 esac
4079 if test "$CXX" = "notfound"
4080 then
4081 CXX=""
4082 fi
4083fi
4084if test -z "$CXX"
4085then
4086 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4087do
4088 # Extract the first word of "$ac_prog", so it can be a program name with args.
4089set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4091$as_echo_n "checking for $ac_word... " >&6; }
4092if test "${ac_cv_prog_CXX+set}" = set; then :
4093 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004094else
4095 if test -n "$CXX"; then
4096 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4097else
4098as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4099for as_dir in $PATH
4100do
4101 IFS=$as_save_IFS
4102 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004103 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004104 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004105 ac_cv_prog_CXX="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00004106 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004107 break 2
4108 fi
4109done
Matthias Kloseb9621712010-04-24 17:59:49 +00004110 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004111IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004112
4113fi
4114fi
4115CXX=$ac_cv_prog_CXX
4116if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004117 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4118$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004119else
Matthias Kloseb9621712010-04-24 17:59:49 +00004120 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4121$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004122fi
4123
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004124
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004125 test -n "$CXX" && break
4126done
4127test -n "$CXX" || CXX="notfound"
4128
4129 if test "$CXX" = "notfound"
4130 then
4131 CXX=""
4132 fi
4133fi
4134if test "$preset_cxx" != "$CXX"
4135then
Matthias Kloseb9621712010-04-24 17:59:49 +00004136 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004137
4138 By default, distutils will build C++ extension modules with \"$CXX\".
4139 If this is not intended, then set CXX on the configure command line.
4140 " >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00004141$as_echo "$as_me: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004142
4143 By default, distutils will build C++ extension modules with \"$CXX\".
4144 If this is not intended, then set CXX on the configure command line.
4145 " >&2;}
4146fi
4147
4148
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004149# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004150
4151ac_ext=c
4152ac_cpp='$CPP $CPPFLAGS'
4153ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4154ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4155ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Kloseb9621712010-04-24 17:59:49 +00004156{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4157$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004158# On Suns, sometimes $CPP names a directory.
4159if test -n "$CPP" && test -d "$CPP"; then
4160 CPP=
4161fi
4162if test -z "$CPP"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004163 if test "${ac_cv_prog_CPP+set}" = set; then :
4164 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004165else
Martin v. Löwis11437992002-04-12 09:54:03 +00004166 # Double quotes because CPP needs to be expanded
4167 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4168 do
4169 ac_preproc_ok=false
4170for ac_c_preproc_warn_flag in '' yes
4171do
4172 # Use a header file that comes with gcc, so configuring glibc
4173 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004174 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4175 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004176 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004177 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004178 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004179/* end confdefs.h. */
4180#ifdef __STDC__
4181# include <limits.h>
4182#else
4183# include <assert.h>
4184#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004185 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004186_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004187if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004188
Matthias Kloseb9621712010-04-24 17:59:49 +00004189else
Martin v. Löwis11437992002-04-12 09:54:03 +00004190 # Broken: fails on valid input.
4191continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004192fi
Benjamin Petersond7f73e92010-09-05 00:09:07 +00004193rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004194
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004195 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004196 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004197 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004198/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004199#include <ac_nonexistent.h>
4200_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004201if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004202 # Broken: success on invalid input.
4203continue
4204else
Martin v. Löwis11437992002-04-12 09:54:03 +00004205 # Passes both tests.
4206ac_preproc_ok=:
4207break
4208fi
Benjamin Petersond7f73e92010-09-05 00:09:07 +00004209rm -f conftest.err conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004210
4211done
4212# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Benjamin Petersond7f73e92010-09-05 00:09:07 +00004213rm -f conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004214if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004215 break
4216fi
4217
4218 done
4219 ac_cv_prog_CPP=$CPP
4220
4221fi
4222 CPP=$ac_cv_prog_CPP
4223else
4224 ac_cv_prog_CPP=$CPP
4225fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004226{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4227$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004228ac_preproc_ok=false
4229for ac_c_preproc_warn_flag in '' yes
4230do
4231 # Use a header file that comes with gcc, so configuring glibc
4232 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004233 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4234 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004235 # On the NeXT, cc -E runs the code through the compiler's parser,
4236 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004237 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004238/* end confdefs.h. */
4239#ifdef __STDC__
4240# include <limits.h>
4241#else
4242# include <assert.h>
4243#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004244 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004245_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004246if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004247
Matthias Kloseb9621712010-04-24 17:59:49 +00004248else
Martin v. Löwis11437992002-04-12 09:54:03 +00004249 # Broken: fails on valid input.
4250continue
4251fi
Benjamin Petersond7f73e92010-09-05 00:09:07 +00004252rm -f conftest.err conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004253
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004254 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004255 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004256 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004257/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004258#include <ac_nonexistent.h>
4259_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004260if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004261 # Broken: success on invalid input.
4262continue
4263else
Martin v. Löwis11437992002-04-12 09:54:03 +00004264 # Passes both tests.
4265ac_preproc_ok=:
4266break
4267fi
Benjamin Petersond7f73e92010-09-05 00:09:07 +00004268rm -f conftest.err conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004269
4270done
4271# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Benjamin Petersond7f73e92010-09-05 00:09:07 +00004272rm -f conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004273if $ac_preproc_ok; then :
4274
Martin v. Löwis11437992002-04-12 09:54:03 +00004275else
Matthias Kloseb9621712010-04-24 17:59:49 +00004276 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4277$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Petersond7f73e92010-09-05 00:09:07 +00004278as_fn_error "C preprocessor \"$CPP\" fails sanity check
4279See \`config.log' for more details." "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004280fi
4281
4282ac_ext=c
4283ac_cpp='$CPP $CPPFLAGS'
4284ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4285ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4286ac_compiler_gnu=$ac_cv_c_compiler_gnu
4287
4288
Matthias Kloseb9621712010-04-24 17:59:49 +00004289{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4290$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4291if test "${ac_cv_path_GREP+set}" = set; then :
4292 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004293else
Matthias Kloseb9621712010-04-24 17:59:49 +00004294 if test -z "$GREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004295 ac_path_GREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004296 # Loop through the user's path and test for each of PROGNAME-LIST
4297 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004298for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4299do
4300 IFS=$as_save_IFS
4301 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004302 for ac_prog in grep ggrep; do
4303 for ac_exec_ext in '' $ac_executable_extensions; do
4304 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4305 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
4306# Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004307 # Check for GNU $ac_path_GREP
4308case `"$ac_path_GREP" --version 2>&1` in
4309*GNU*)
4310 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4311*)
4312 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004313 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004314 while :
4315 do
4316 cat "conftest.in" "conftest.in" >"conftest.tmp"
4317 mv "conftest.tmp" "conftest.in"
4318 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00004319 $as_echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004320 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4321 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00004322 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004323 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4324 # Best one so far, save it but keep looking for a better one
4325 ac_cv_path_GREP="$ac_path_GREP"
4326 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00004327 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004328 # 10*(2^10) chars as input seems more than enough
4329 test $ac_count -gt 10 && break
4330 done
4331 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4332esac
4333
Matthias Kloseb9621712010-04-24 17:59:49 +00004334 $ac_path_GREP_found && break 3
4335 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004336 done
Matthias Kloseb9621712010-04-24 17:59:49 +00004337 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004338IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00004339 if test -z "$ac_cv_path_GREP"; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00004340 as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +00004341 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004342else
4343 ac_cv_path_GREP=$GREP
4344fi
4345
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004346fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004347{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4348$as_echo "$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004349 GREP="$ac_cv_path_GREP"
4350
4351
Matthias Kloseb9621712010-04-24 17:59:49 +00004352{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4353$as_echo_n "checking for egrep... " >&6; }
4354if test "${ac_cv_path_EGREP+set}" = set; then :
4355 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004356else
4357 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4358 then ac_cv_path_EGREP="$GREP -E"
4359 else
Matthias Kloseb9621712010-04-24 17:59:49 +00004360 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004361 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004362 # Loop through the user's path and test for each of PROGNAME-LIST
4363 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004364for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4365do
4366 IFS=$as_save_IFS
4367 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004368 for ac_prog in egrep; do
4369 for ac_exec_ext in '' $ac_executable_extensions; do
4370 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4371 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
4372# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004373 # Check for GNU $ac_path_EGREP
4374case `"$ac_path_EGREP" --version 2>&1` in
4375*GNU*)
4376 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4377*)
4378 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004379 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004380 while :
4381 do
4382 cat "conftest.in" "conftest.in" >"conftest.tmp"
4383 mv "conftest.tmp" "conftest.in"
4384 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00004385 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004386 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4387 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00004388 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004389 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4390 # Best one so far, save it but keep looking for a better one
4391 ac_cv_path_EGREP="$ac_path_EGREP"
4392 ac_path_EGREP_max=$ac_count
4393 fi
4394 # 10*(2^10) chars as input seems more than enough
4395 test $ac_count -gt 10 && break
4396 done
4397 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4398esac
4399
Matthias Kloseb9621712010-04-24 17:59:49 +00004400 $ac_path_EGREP_found && break 3
4401 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004402 done
Matthias Kloseb9621712010-04-24 17:59:49 +00004403 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004404IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00004405 if test -z "$ac_cv_path_EGREP"; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00004406 as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +00004407 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004408else
4409 ac_cv_path_EGREP=$EGREP
4410fi
4411
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004412 fi
4413fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004414{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4415$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004416 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00004417
4418
Matthias Kloseb9621712010-04-24 17:59:49 +00004419{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4420$as_echo_n "checking for ANSI C header files... " >&6; }
4421if test "${ac_cv_header_stdc+set}" = set; then :
4422 $as_echo_n "(cached) " >&6
4423else
4424 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004425/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00004426#include <stdlib.h>
4427#include <stdarg.h>
4428#include <string.h>
4429#include <float.h>
4430
4431int
4432main ()
4433{
4434
4435 ;
4436 return 0;
4437}
4438_ACEOF
4439if ac_fn_c_try_compile "$LINENO"; then :
4440 ac_cv_header_stdc=yes
4441else
4442 ac_cv_header_stdc=no
4443fi
4444rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4445
4446if test $ac_cv_header_stdc = yes; then
4447 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4448 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4449/* end confdefs.h. */
4450#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004451
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004452_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004453if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00004454 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004455
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004456else
Matthias Kloseb9621712010-04-24 17:59:49 +00004457 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004458fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00004459rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004460
Matthias Kloseb9621712010-04-24 17:59:49 +00004461fi
4462
4463if test $ac_cv_header_stdc = yes; then
4464 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4465 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4466/* end confdefs.h. */
4467#include <stdlib.h>
4468
4469_ACEOF
4470if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4471 $EGREP "free" >/dev/null 2>&1; then :
4472
4473else
4474 ac_cv_header_stdc=no
4475fi
4476rm -f conftest*
4477
4478fi
4479
4480if test $ac_cv_header_stdc = yes; then
4481 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4482 if test "$cross_compiling" = yes; then :
4483 :
4484else
4485 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4486/* end confdefs.h. */
4487#include <ctype.h>
4488#include <stdlib.h>
4489#if ((' ' & 0x0FF) == 0x020)
4490# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4491# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4492#else
4493# define ISLOWER(c) \
4494 (('a' <= (c) && (c) <= 'i') \
4495 || ('j' <= (c) && (c) <= 'r') \
4496 || ('s' <= (c) && (c) <= 'z'))
4497# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4498#endif
4499
4500#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4501int
4502main ()
4503{
4504 int i;
4505 for (i = 0; i < 256; i++)
4506 if (XOR (islower (i), ISLOWER (i))
4507 || toupper (i) != TOUPPER (i))
4508 return 2;
4509 return 0;
4510}
4511_ACEOF
4512if ac_fn_c_try_run "$LINENO"; then :
4513
4514else
4515 ac_cv_header_stdc=no
4516fi
4517rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4518 conftest.$ac_objext conftest.beam conftest.$ac_ext
4519fi
4520
4521fi
4522fi
4523{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4524$as_echo "$ac_cv_header_stdc" >&6; }
4525if test $ac_cv_header_stdc = yes; then
4526
4527$as_echo "#define STDC_HEADERS 1" >>confdefs.h
4528
4529fi
4530
4531# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4532for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4533 inttypes.h stdint.h unistd.h
4534do :
4535 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4536ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4537"
Benjamin Petersond7f73e92010-09-05 00:09:07 +00004538eval as_val=\$$as_ac_Header
4539 if test "x$as_val" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004540 cat >>confdefs.h <<_ACEOF
4541#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4542_ACEOF
4543
4544fi
4545
4546done
4547
4548
4549
4550 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
4551if test "x$ac_cv_header_minix_config_h" = x""yes; then :
4552 MINIX=yes
4553else
4554 MINIX=
4555fi
4556
4557
4558 if test "$MINIX" = yes; then
4559
4560$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4561
4562
4563$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4564
4565
4566$as_echo "#define _MINIX 1" >>confdefs.h
4567
4568 fi
4569
4570
4571 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4572$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
4573if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
4574 $as_echo_n "(cached) " >&6
4575else
4576 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4577/* end confdefs.h. */
4578
4579# define __EXTENSIONS__ 1
4580 $ac_includes_default
4581int
4582main ()
4583{
4584
4585 ;
4586 return 0;
4587}
4588_ACEOF
4589if ac_fn_c_try_compile "$LINENO"; then :
4590 ac_cv_safe_to_define___extensions__=yes
4591else
4592 ac_cv_safe_to_define___extensions__=no
4593fi
4594rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4595fi
4596{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4597$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4598 test $ac_cv_safe_to_define___extensions__ = yes &&
4599 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4600
4601 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4602
4603 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4604
4605 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4606
4607 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4608
4609
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004610
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004611# Check for unsupported systems
4612case $ac_sys_system/$ac_sys_release in
4613atheos*|Linux*/1*)
4614 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
4615 echo See README for details.
4616 exit 1;;
4617esac
4618
4619
Matthias Kloseb9621712010-04-24 17:59:49 +00004620{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
4621$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004622
4623# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004624if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004625 withval=$with_suffix;
4626 case $withval in
4627 no) EXEEXT=;;
4628 yes) EXEEXT=.exe;;
4629 *) EXEEXT=$withval;;
4630 esac
4631fi
4632
Matthias Kloseb9621712010-04-24 17:59:49 +00004633{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
4634$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004635
4636# Test whether we're running on a non-case-sensitive system, in which
4637# case we give a warning if no ext is given
4638
Matthias Kloseb9621712010-04-24 17:59:49 +00004639{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
4640$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004641if test ! -d CaseSensitiveTestDir; then
4642mkdir CaseSensitiveTestDir
4643fi
4644
4645if test -d casesensitivetestdir
4646then
Matthias Kloseb9621712010-04-24 17:59:49 +00004647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4648$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004649 BUILDEXEEXT=.exe
4650else
Matthias Kloseb9621712010-04-24 17:59:49 +00004651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4652$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004653 BUILDEXEEXT=$EXEEXT
4654fi
4655rmdir CaseSensitiveTestDir
4656
4657case $MACHDEP in
4658bsdos*)
4659 case $CC in
4660 gcc) CC="$CC -D_HAVE_BSDI";;
4661 esac;;
4662esac
4663
4664case $ac_sys_system in
4665hp*|HP*)
4666 case $CC in
4667 cc|*/cc) CC="$CC -Ae";;
4668 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004669esac
4670
4671
4672
Matthias Kloseb9621712010-04-24 17:59:49 +00004673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
4674$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004675if test -z "$LIBRARY"
4676then
4677 LIBRARY='libpython$(VERSION).a'
4678fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004679{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
4680$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004681
4682# LDLIBRARY is the name of the library to link against (as opposed to the
4683# name of the library into which to insert object files). BLDLIBRARY is also
4684# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
4685# is blank as the main program is not linked directly against LDLIBRARY.
4686# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
4687# systems without shared libraries, LDLIBRARY is the same as LIBRARY
4688# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
4689# DLLLIBRARY is the shared (i.e., DLL) library.
4690#
4691# RUNSHARED is used to run shared python without installed libraries
4692#
4693# INSTSONAME is the name of the shared library that will be use to install
4694# on the system - some systems like version suffix, others don't
4695
4696
4697
4698
4699
4700
4701LDLIBRARY="$LIBRARY"
4702BLDLIBRARY='$(LDLIBRARY)'
4703INSTSONAME='$(LDLIBRARY)'
4704DLLLIBRARY=''
4705LDLIBRARYDIR=''
4706RUNSHARED=''
4707
4708# LINKCC is the command that links the python executable -- default is $(CC).
4709# If CXX is set, and if it is needed to link a main function that was
4710# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
4711# python might then depend on the C++ runtime
4712# This is altered for AIX in order to build the export list before
4713# linking.
4714
Matthias Kloseb9621712010-04-24 17:59:49 +00004715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
4716$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004717if test -z "$LINKCC"
4718then
4719 LINKCC='$(PURIFY) $(MAINCC)'
4720 case $ac_sys_system in
4721 AIX*)
4722 exp_extra="\"\""
4723 if test $ac_sys_release -ge 5 -o \
4724 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
4725 exp_extra="."
4726 fi
4727 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004728 QNX*)
4729 # qcc must be used because the other compilers do not
4730 # support -N.
4731 LINKCC=qcc;;
4732 esac
4733fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004734{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
4735$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004736
4737# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
4738# make sure we default having it set to "no": this is used by
4739# distutils.unixccompiler to know if it should add --enable-new-dtags
4740# to linker command lines, and failing to detect GNU ld simply results
4741# in the same bahaviour as before.
4742
Matthias Kloseb9621712010-04-24 17:59:49 +00004743{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
4744$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004745ac_prog=ld
4746if test "$GCC" = yes; then
4747 ac_prog=`$CC -print-prog-name=ld`
4748fi
4749case `"$ac_prog" -V 2>&1 < /dev/null` in
4750 *GNU*)
4751 GNULD=yes;;
4752 *)
4753 GNULD=no;;
4754esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004755{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
4756$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004757
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004758{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
4759$as_echo_n "checking for inline... " >&6; }
4760if test "${ac_cv_c_inline+set}" = set; then :
4761 $as_echo_n "(cached) " >&6
4762else
4763 ac_cv_c_inline=no
4764for ac_kw in inline __inline__ __inline; do
4765 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4766/* end confdefs.h. */
4767#ifndef __cplusplus
4768typedef int foo_t;
4769static $ac_kw foo_t static_foo () {return 0; }
4770$ac_kw foo_t foo () {return 0; }
4771#endif
4772
4773_ACEOF
4774if ac_fn_c_try_compile "$LINENO"; then :
4775 ac_cv_c_inline=$ac_kw
4776fi
4777rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4778 test "$ac_cv_c_inline" != no && break
4779done
4780
4781fi
4782{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
4783$as_echo "$ac_cv_c_inline" >&6; }
4784
4785case $ac_cv_c_inline in
4786 inline | yes) ;;
4787 *)
4788 case $ac_cv_c_inline in
4789 no) ac_val=;;
4790 *) ac_val=$ac_cv_c_inline;;
4791 esac
4792 cat >>confdefs.h <<_ACEOF
4793#ifndef __cplusplus
4794#define inline $ac_val
4795#endif
4796_ACEOF
4797 ;;
4798esac
4799
4800if test "$ac_cv_c_inline" != no ; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00004801
4802$as_echo "#define USE_INLINE 1" >>confdefs.h
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004803
4804
4805fi
4806
4807
Matthias Kloseb9621712010-04-24 17:59:49 +00004808{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
4809$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004810# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004811if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004812 enableval=$enable_shared;
4813fi
4814
4815
4816if test -z "$enable_shared"
4817then
4818 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00004819 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004820 enable_shared="yes";;
4821 *)
4822 enable_shared="no";;
4823 esac
4824fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004825{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
4826$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004827
Matthias Kloseb9621712010-04-24 17:59:49 +00004828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
4829$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004830# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004831if test "${enable_profiling+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004832 enableval=$enable_profiling; ac_save_cc="$CC"
4833 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004834 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004835 ac_enable_profiling="no"
4836else
Matthias Kloseb9621712010-04-24 17:59:49 +00004837 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004838/* end confdefs.h. */
4839int main() { return 0; }
4840_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004841if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004842 ac_enable_profiling="yes"
4843else
Matthias Kloseb9621712010-04-24 17:59:49 +00004844 ac_enable_profiling="no"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004845fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004846rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4847 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004848fi
4849
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004850 CC="$ac_save_cc"
4851fi
4852
Matthias Kloseb9621712010-04-24 17:59:49 +00004853{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_profiling" >&5
4854$as_echo "$ac_enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004855
4856case "$ac_enable_profiling" in
4857 "yes")
4858 BASECFLAGS="-pg $BASECFLAGS"
4859 LDFLAGS="-pg $LDFLAGS"
4860 ;;
4861esac
4862
Matthias Kloseb9621712010-04-24 17:59:49 +00004863{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
4864$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004865
4866# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4867# library that we build, but we do not want to link against it (we
4868# will find it with a -framework option). For this reason there is an
4869# extra variable BLDLIBRARY against which Python and the extension
4870# modules are linked, BLDLIBRARY. This is normally the same as
4871# LDLIBRARY, but empty for MacOSX framework builds.
4872if test "$enable_framework"
4873then
4874 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
4875 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
4876 BLDLIBRARY=''
4877else
4878 BLDLIBRARY='$(LDLIBRARY)'
4879fi
4880
4881# Other platforms follow
4882if test $enable_shared = "yes"; then
4883
Matthias Kloseb9621712010-04-24 17:59:49 +00004884$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004885
4886 case $ac_sys_system in
4887 CYGWIN*)
4888 LDLIBRARY='libpython$(VERSION).dll.a'
4889 DLLLIBRARY='libpython$(VERSION).dll'
4890 ;;
4891 SunOS*)
4892 LDLIBRARY='libpython$(VERSION).so'
4893 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
4894 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4895 INSTSONAME="$LDLIBRARY".$SOVERSION
4896 ;;
4897 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
4898 LDLIBRARY='libpython$(VERSION).so'
4899 BLDLIBRARY='-L. -lpython$(VERSION)'
4900 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4901 case $ac_sys_system in
4902 FreeBSD*)
4903 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4904 ;;
4905 esac
4906 INSTSONAME="$LDLIBRARY".$SOVERSION
4907 ;;
4908 hp*|HP*)
4909 case `uname -m` in
4910 ia64)
4911 LDLIBRARY='libpython$(VERSION).so'
4912 ;;
4913 *)
4914 LDLIBRARY='libpython$(VERSION).sl'
4915 ;;
4916 esac
4917 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
4918 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
4919 ;;
4920 OSF*)
4921 LDLIBRARY='libpython$(VERSION).so'
4922 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
4923 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4924 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004925 Darwin*)
4926 LDLIBRARY='libpython$(VERSION).dylib'
4927 BLDLIBRARY='-L. -lpython$(VERSION)'
4928 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
4929 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00004930 AIX*)
4931 LDLIBRARY='libpython$(VERSION).so'
4932 RUNSHARED=LIBPATH=`pwd`:${LIBPATH}
4933 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004934
4935 esac
4936else # shared is disabled
4937 case $ac_sys_system in
4938 CYGWIN*)
4939 BLDLIBRARY='$(LIBRARY)'
4940 LDLIBRARY='libpython$(VERSION).dll.a'
4941 ;;
4942 esac
4943fi
4944
Matthias Kloseb9621712010-04-24 17:59:49 +00004945{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
4946$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004947
4948if test -n "$ac_tool_prefix"; then
4949 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4950set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004951{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4952$as_echo_n "checking for $ac_word... " >&6; }
4953if test "${ac_cv_prog_RANLIB+set}" = set; then :
4954 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004955else
4956 if test -n "$RANLIB"; then
4957 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4958else
4959as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4960for as_dir in $PATH
4961do
4962 IFS=$as_save_IFS
4963 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004964 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004965 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4966 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00004967 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004968 break 2
4969 fi
4970done
Matthias Kloseb9621712010-04-24 17:59:49 +00004971 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004972IFS=$as_save_IFS
4973
4974fi
4975fi
4976RANLIB=$ac_cv_prog_RANLIB
4977if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004978 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
4979$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004980else
Matthias Kloseb9621712010-04-24 17:59:49 +00004981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4982$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004983fi
4984
4985
4986fi
4987if test -z "$ac_cv_prog_RANLIB"; then
4988 ac_ct_RANLIB=$RANLIB
4989 # Extract the first word of "ranlib", so it can be a program name with args.
4990set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4992$as_echo_n "checking for $ac_word... " >&6; }
4993if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
4994 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004995else
4996 if test -n "$ac_ct_RANLIB"; then
4997 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4998else
4999as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5000for as_dir in $PATH
5001do
5002 IFS=$as_save_IFS
5003 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005004 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005005 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5006 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005007 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005008 break 2
5009 fi
5010done
Matthias Kloseb9621712010-04-24 17:59:49 +00005011 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005012IFS=$as_save_IFS
5013
5014fi
5015fi
5016ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5017if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005018 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5019$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005020else
Matthias Kloseb9621712010-04-24 17:59:49 +00005021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5022$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005023fi
5024
5025 if test "x$ac_ct_RANLIB" = x; then
5026 RANLIB=":"
5027 else
5028 case $cross_compiling:$ac_tool_warned in
5029yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00005030{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5031$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005032ac_tool_warned=yes ;;
5033esac
5034 RANLIB=$ac_ct_RANLIB
5035 fi
5036else
5037 RANLIB="$ac_cv_prog_RANLIB"
5038fi
5039
5040
5041for ac_prog in ar aal
5042do
5043 # Extract the first word of "$ac_prog", so it can be a program name with args.
5044set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005045{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5046$as_echo_n "checking for $ac_word... " >&6; }
5047if test "${ac_cv_prog_AR+set}" = set; then :
5048 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005049else
5050 if test -n "$AR"; then
5051 ac_cv_prog_AR="$AR" # Let the user override the test.
5052else
5053as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5054for as_dir in $PATH
5055do
5056 IFS=$as_save_IFS
5057 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005058 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005059 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5060 ac_cv_prog_AR="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005061 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005062 break 2
5063 fi
5064done
Matthias Kloseb9621712010-04-24 17:59:49 +00005065 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005066IFS=$as_save_IFS
5067
5068fi
5069fi
5070AR=$ac_cv_prog_AR
5071if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005072 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5073$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005074else
Matthias Kloseb9621712010-04-24 17:59:49 +00005075 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5076$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005077fi
5078
5079
5080 test -n "$AR" && break
5081done
5082test -n "$AR" || AR="ar"
5083
5084
5085# tweak ARFLAGS only if the user didn't set it on the command line
5086
5087if test -z "$ARFLAGS"
5088then
5089 ARFLAGS="rc"
5090fi
5091
5092
5093# Extract the first word of "svnversion", so it can be a program name with args.
5094set dummy svnversion; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005095{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5096$as_echo_n "checking for $ac_word... " >&6; }
5097if test "${ac_cv_prog_SVNVERSION+set}" = set; then :
5098 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005099else
5100 if test -n "$SVNVERSION"; then
5101 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
5102else
5103as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5104for as_dir in $PATH
5105do
5106 IFS=$as_save_IFS
5107 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005108 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005109 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5110 ac_cv_prog_SVNVERSION="found"
Matthias Kloseb9621712010-04-24 17:59:49 +00005111 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005112 break 2
5113 fi
5114done
Matthias Kloseb9621712010-04-24 17:59:49 +00005115 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005116IFS=$as_save_IFS
5117
5118 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
5119fi
5120fi
5121SVNVERSION=$ac_cv_prog_SVNVERSION
5122if test -n "$SVNVERSION"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005123 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SVNVERSION" >&5
5124$as_echo "$SVNVERSION" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005125else
Matthias Kloseb9621712010-04-24 17:59:49 +00005126 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5127$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005128fi
5129
5130
5131if test $SVNVERSION = found
5132then
5133 SVNVERSION="svnversion \$(srcdir)"
5134else
5135 SVNVERSION="echo Unversioned directory"
5136fi
5137
5138case $MACHDEP in
5139bsdos*|hp*|HP*)
5140 # install -d does not work on BSDI or HP-UX
5141 if test -z "$INSTALL"
5142 then
5143 INSTALL="${srcdir}/install-sh -c"
5144 fi
5145esac
5146ac_aux_dir=
5147for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
Benjamin Petersond7f73e92010-09-05 00:09:07 +00005148 for ac_t in install-sh install.sh shtool; do
5149 if test -f "$ac_dir/$ac_t"; then
5150 ac_aux_dir=$ac_dir
5151 ac_install_sh="$ac_aux_dir/$ac_t -c"
5152 break 2
5153 fi
5154 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005155done
5156if test -z "$ac_aux_dir"; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00005157 as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005158fi
5159
5160# These three variables are undocumented and unsupported,
5161# and are intended to be withdrawn in a future Autoconf release.
5162# They can cause serious problems if a builder's source tree is in a directory
5163# whose full name contains unusual characters.
5164ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
5165ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
5166ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
5167
5168
5169# Find a good install program. We prefer a C program (faster),
5170# so one script is as good as another. But avoid the broken or
5171# incompatible versions:
5172# SysV /etc/install, /usr/sbin/install
5173# SunOS /usr/etc/install
5174# IRIX /sbin/install
5175# AIX /bin/install
5176# AmigaOS /C/install, which installs bootblocks on floppy discs
5177# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5178# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5179# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5180# OS/2's system install, which has a completely different semantic
5181# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00005182# Reject install programs that cannot install multiple files.
5183{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
5184$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005185if test -z "$INSTALL"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005186if test "${ac_cv_path_install+set}" = set; then :
5187 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005188else
5189 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5190for as_dir in $PATH
5191do
5192 IFS=$as_save_IFS
5193 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005194 # Account for people who put trailing slashes in PATH elements.
5195case $as_dir/ in #((
5196 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005197 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00005198 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005199 /usr/ucb/* ) ;;
5200 *)
5201 # OSF1 and SCO ODT 3.0 have their own names for install.
5202 # Don't use installbsd from OSF since it installs stuff as root
5203 # by default.
5204 for ac_prog in ginstall scoinst install; do
5205 for ac_exec_ext in '' $ac_executable_extensions; do
5206 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
5207 if test $ac_prog = install &&
5208 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5209 # AIX install. It has an incompatible calling convention.
5210 :
5211 elif test $ac_prog = install &&
5212 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5213 # program-specific install script used by HP pwplus--don't use.
5214 :
5215 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005216 rm -rf conftest.one conftest.two conftest.dir
5217 echo one > conftest.one
5218 echo two > conftest.two
5219 mkdir conftest.dir
5220 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5221 test -s conftest.one && test -s conftest.two &&
5222 test -s conftest.dir/conftest.one &&
5223 test -s conftest.dir/conftest.two
5224 then
5225 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5226 break 3
5227 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005228 fi
5229 fi
5230 done
5231 done
5232 ;;
5233esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005234
5235 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005236IFS=$as_save_IFS
5237
Matthias Kloseb9621712010-04-24 17:59:49 +00005238rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005239
5240fi
5241 if test "${ac_cv_path_install+set}" = set; then
5242 INSTALL=$ac_cv_path_install
5243 else
5244 # As a last resort, use the slow shell script. Don't cache a
5245 # value for INSTALL within a source directory, because that will
5246 # break other packages using the cache if that directory is
5247 # removed, or if the value is a relative name.
5248 INSTALL=$ac_install_sh
5249 fi
5250fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005251{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
5252$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005253
5254# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5255# It thinks the first close brace ends the variable substitution.
5256test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5257
5258test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
5259
5260test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5261
5262
5263# Not every filesystem supports hard links
5264
5265if test -z "$LN" ; then
5266 case $ac_sys_system in
5267 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005268 *) LN=ln;;
5269 esac
5270fi
5271
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00005272# For calculating the .so ABI tag.
5273SOABI_QUALIFIERS=""
5274
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005275# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00005276{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
5277$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005278
5279# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005280if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005281 withval=$with_pydebug;
5282if test "$withval" != no
5283then
5284
Matthias Kloseb9621712010-04-24 17:59:49 +00005285$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005286
Matthias Kloseb9621712010-04-24 17:59:49 +00005287 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5288$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005289 Py_DEBUG='true'
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00005290 SOABI_QUALIFIERS="${SOABI_QUALIFIERS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00005291else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5292$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005293fi
5294else
Matthias Kloseb9621712010-04-24 17:59:49 +00005295 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5296$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005297fi
5298
5299
5300# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
5301# merged with this chunk of code?
5302
5303# Optimizer/debugger flags
5304# ------------------------
5305# (The following bit of code is complicated enough - please keep things
5306# indented properly. Just pretend you're editing Python code. ;-)
5307
5308# There are two parallel sets of case statements below, one that checks to
5309# see if OPT was set and one that does BASECFLAGS setting based upon
5310# compiler and platform. BASECFLAGS tweaks need to be made even if the
5311# user set OPT.
5312
5313# tweak OPT based on compiler and platform, only if the user didn't set
5314# it on the command line
5315
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00005316if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005317then
5318 case $GCC in
5319 yes)
5320 if test "$CC" != 'g++' ; then
5321 STRICT_PROTO="-Wstrict-prototypes"
5322 fi
5323 # For gcc 4.x we need to use -fwrapv so lets check if its supported
5324 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
5325 WRAP="-fwrapv"
5326 fi
5327 case $ac_cv_prog_cc_g in
5328 yes)
5329 if test "$Py_DEBUG" = 'true' ; then
5330 # Optimization messes up debuggers, so turn it off for
5331 # debug builds.
Mark Dickinsonb2153e92010-05-05 22:31:36 +00005332 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005333 else
5334 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
5335 fi
5336 ;;
5337 *)
5338 OPT="-O3 -Wall $STRICT_PROTO"
5339 ;;
5340 esac
5341 case $ac_sys_system in
5342 SCO_SV*) OPT="$OPT -m486 -DSCO5"
5343 ;;
5344 esac
5345 ;;
5346
5347 *)
5348 OPT="-O"
5349 ;;
5350 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005351fi
5352
5353
5354
5355# The -arch flags for universal builds on OSX
5356UNIVERSAL_ARCH_FLAGS=
5357
5358
5359# tweak BASECFLAGS based on compiler and platform
5360case $GCC in
5361yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005362 # Python doesn't violate C99 aliasing rules, but older versions of
5363 # GCC produce warnings for legal Python code. Enable
5364 # -fno-strict-aliasing on versions of GCC that support but produce
5365 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00005366 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
5367$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005368 ac_save_cc="$CC"
5369 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005370 save_CFLAGS="$CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +00005371 if test "${ac_cv_no_strict_aliasing+set}" = set; then :
5372 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00005373else
Matthias Kloseb9621712010-04-24 17:59:49 +00005374 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005375/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005376
Matthias Kloseb159a552010-04-25 21:00:44 +00005377
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005378int
5379main ()
5380{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005381
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005382 ;
5383 return 0;
5384}
Matthias Kloseb159a552010-04-25 21:00:44 +00005385
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005386_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005387if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00005388
5389 CC="$ac_save_cc -fstrict-aliasing"
5390 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
5391 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005392/* end confdefs.h. */
5393
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005394 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005395int
5396main ()
5397{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005398double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005399 ;
5400 return 0;
5401}
Matthias Kloseb159a552010-04-25 21:00:44 +00005402
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005403_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005404if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00005405
5406 ac_cv_no_strict_aliasing=no
5407
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005408else
Matthias Kloseb159a552010-04-25 21:00:44 +00005409
5410 ac_cv_no_strict_aliasing=yes
5411
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005412fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005413rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00005414
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005415else
Matthias Kloseb159a552010-04-25 21:00:44 +00005416
5417 ac_cv_no_strict_aliasing=no
5418
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005419fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005420rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00005421fi
5422
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005423 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005424 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00005425 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
5426$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005427 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005428 then
5429 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
5430 fi
5431
5432 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
5433 # support. Without this, treatment of subnormals doesn't follow
5434 # the standard.
5435 case $ac_sys_machine in
5436 alpha*)
5437 BASECFLAGS="$BASECFLAGS -mieee"
5438 ;;
5439 esac
5440
5441 case $ac_sys_system in
5442 SCO_SV*)
5443 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
5444 ;;
5445 # is there any other compiler on Darwin besides gcc?
5446 Darwin*)
5447 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
5448 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussoren666028b2010-04-18 19:07:43 +00005449 if test "${CC}" = gcc
5450 then
Matthias Kloseb9621712010-04-24 17:59:49 +00005451 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
5452$as_echo_n "checking which compiler should be used... " >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00005453 case "${UNIVERSALSDK}" in
5454 */MacOSX10.4u.sdk)
5455 # Build using 10.4 SDK, force usage of gcc when the
5456 # compiler is gcc, otherwise the user will get very
5457 # confusing error messages when building on OSX 10.6
5458 CC=gcc-4.0
5459 CPP=cpp-4.0
5460 ;;
5461 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005462 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5463$as_echo "$CC" >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00005464 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005465
5466
5467 if test "${enable_universalsdk}"; then
5468 UNIVERSAL_ARCH_FLAGS=""
5469 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
5470 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
5471 ARCH_RUN_32BIT=""
Benjamin Peterson99f03762010-04-11 22:15:28 +00005472 LIPO_32BIT_FLAGS=""
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005473 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
5474 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005475 LIPO_32BIT_FLAGS=""
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005476 ARCH_RUN_32BIT="true"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005477
5478 elif test "$UNIVERSAL_ARCHS" = "all" ; then
5479 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005480 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005481 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005482
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005483 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
5484 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005485 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005486 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005487
5488 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
5489 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005490 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005491 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005492
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005493 else
Benjamin Petersond7f73e92010-09-05 00:09:07 +00005494 as_fn_error "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005495
5496 fi
5497
5498
Ronald Oussoren666028b2010-04-18 19:07:43 +00005499 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
5500 if test "${UNIVERSALSDK}" != "/"
5501 then
5502 CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
5503 LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren712979d2010-04-20 19:51:33 +00005504 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005505 fi
5506 fi
5507
5508 # Calculate the right deployment target for this build.
5509 #
5510 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
5511 if test ${cur_target} '>' 10.2; then
5512 cur_target=10.3
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005513 if test ${enable_universalsdk}; then
5514 if test "${UNIVERSAL_ARCHS}" = "all"; then
5515 # Ensure that the default platform for a
5516 # 4-way universal build is OSX 10.5,
5517 # that's the first OS release where
5518 # 4-way builds make sense.
5519 cur_target='10.5'
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005520
5521 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
5522 cur_target='10.5'
5523
5524 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
5525 cur_target='10.5'
5526
5527 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
5528 cur_target='10.5'
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005529 fi
5530 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00005531 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005532 # On Intel macs default to a deployment
5533 # target of 10.4, that's the first OSX
5534 # release with Intel support.
5535 cur_target="10.4"
5536 fi
5537 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005538 fi
5539 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
5540
5541 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
5542 # environment with a value that is the same as what we'll use
5543 # in the Makefile to ensure that we'll get the same compiler
5544 # environment during configure and build time.
5545 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
5546 export MACOSX_DEPLOYMENT_TARGET
5547 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
5548
5549 ;;
5550 OSF*)
5551 BASECFLAGS="$BASECFLAGS -mieee"
5552 ;;
5553 esac
5554 ;;
5555
5556*)
5557 case $ac_sys_system in
5558 OpenUNIX*|UnixWare*)
5559 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
5560 ;;
5561 OSF*)
5562 BASECFLAGS="$BASECFLAGS -ieee -std"
5563 ;;
5564 SCO_SV*)
5565 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
5566 ;;
5567 esac
5568 ;;
5569esac
5570
5571if test "$Py_DEBUG" = 'true'; then
5572 :
5573else
5574 OPT="-DNDEBUG $OPT"
5575fi
5576
5577if test "$ac_arch_flags"
5578then
5579 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
5580fi
5581
5582# disable check for icc since it seems to pass, but generates a warning
5583if test "$CC" = icc
5584then
5585 ac_cv_opt_olimit_ok=no
5586fi
5587
Matthias Kloseb9621712010-04-24 17:59:49 +00005588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -OPT:Olimit=0" >&5
5589$as_echo_n "checking whether $CC accepts -OPT:Olimit=0... " >&6; }
5590if test "${ac_cv_opt_olimit_ok+set}" = set; then :
5591 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005592else
5593 ac_save_cc="$CC"
5594CC="$CC -OPT:Olimit=0"
Matthias Kloseb9621712010-04-24 17:59:49 +00005595cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005596/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005597
5598int
5599main ()
5600{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005601
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005602 ;
5603 return 0;
5604}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005605_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005606if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005607 ac_cv_opt_olimit_ok=yes
5608else
Matthias Kloseb9621712010-04-24 17:59:49 +00005609 ac_cv_opt_olimit_ok=no
Matthias Kloseb159a552010-04-25 21:00:44 +00005610
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005611fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005612rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005613CC="$ac_save_cc"
5614fi
5615
Matthias Kloseb9621712010-04-24 17:59:49 +00005616{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_opt_olimit_ok" >&5
5617$as_echo "$ac_cv_opt_olimit_ok" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005618if test $ac_cv_opt_olimit_ok = yes; then
5619 case $ac_sys_system in
5620 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
5621 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
5622 # environment?
5623 Darwin*)
5624 ;;
5625 *)
5626 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
5627 ;;
5628 esac
5629else
Matthias Kloseb9621712010-04-24 17:59:49 +00005630 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Olimit 1500" >&5
5631$as_echo_n "checking whether $CC accepts -Olimit 1500... " >&6; }
5632 if test "${ac_cv_olimit_ok+set}" = set; then :
5633 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005634else
5635 ac_save_cc="$CC"
5636 CC="$CC -Olimit 1500"
Matthias Kloseb9621712010-04-24 17:59:49 +00005637 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005638/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005639
5640int
5641main ()
5642{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005643
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005644 ;
5645 return 0;
5646}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005647_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005648if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005649 ac_cv_olimit_ok=yes
5650else
Matthias Kloseb9621712010-04-24 17:59:49 +00005651 ac_cv_olimit_ok=no
Matthias Kloseb159a552010-04-25 21:00:44 +00005652
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005653fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005654rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005655 CC="$ac_save_cc"
5656fi
5657
Matthias Kloseb9621712010-04-24 17:59:49 +00005658 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_olimit_ok" >&5
5659$as_echo "$ac_cv_olimit_ok" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005660 if test $ac_cv_olimit_ok = yes; then
5661 BASECFLAGS="$BASECFLAGS -Olimit 1500"
5662 fi
5663fi
5664
5665# Check whether GCC supports PyArg_ParseTuple format
5666if test "$GCC" = "yes"
5667then
Matthias Kloseb9621712010-04-24 17:59:49 +00005668 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5
5669$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005670 save_CFLAGS=$CFLAGS
5671 CFLAGS="$CFLAGS -Werror"
Matthias Kloseb9621712010-04-24 17:59:49 +00005672 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005673/* end confdefs.h. */
5674
5675 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005676int
5677main ()
5678{
5679
5680 ;
5681 return 0;
5682}
Matthias Kloseb159a552010-04-25 21:00:44 +00005683
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005684_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005685if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005686
Matthias Kloseb159a552010-04-25 21:00:44 +00005687
Matthias Kloseb9621712010-04-24 17:59:49 +00005688$as_echo "#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005689
Matthias Kloseb159a552010-04-25 21:00:44 +00005690 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00005691$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00005692
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005693else
Matthias Kloseb159a552010-04-25 21:00:44 +00005694
5695 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00005696$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005697
5698fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005699rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5700 CFLAGS=$save_CFLAGS
5701fi
5702
5703# On some compilers, pthreads are available without further options
5704# (e.g. MacOS X). On some of these systems, the compiler will not
5705# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
5706# So we have to see first whether pthreads are available without
5707# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00005708{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
5709$as_echo_n "checking whether pthreads are available without options... " >&6; }
5710if test "${ac_cv_pthread_is_default+set}" = set; then :
5711 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005712else
Matthias Kloseb9621712010-04-24 17:59:49 +00005713 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005714 ac_cv_pthread_is_default=no
5715else
Matthias Kloseb9621712010-04-24 17:59:49 +00005716 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005717/* end confdefs.h. */
5718
5719#include <pthread.h>
5720
5721void* routine(void* p){return NULL;}
5722
5723int main(){
5724 pthread_t p;
5725 if(pthread_create(&p,NULL,routine,NULL)!=0)
5726 return 1;
5727 (void)pthread_detach(p);
5728 return 0;
5729}
5730
5731_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005732if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005733
5734 ac_cv_pthread_is_default=yes
5735 ac_cv_kthread=no
5736 ac_cv_pthread=no
5737
5738else
Matthias Kloseb9621712010-04-24 17:59:49 +00005739 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005740fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005741rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5742 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005743fi
5744
5745
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005746fi
5747
Matthias Kloseb9621712010-04-24 17:59:49 +00005748{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
5749$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005750
5751
5752if test $ac_cv_pthread_is_default = yes
5753then
5754 ac_cv_kpthread=no
5755else
5756# -Kpthread, if available, provides the right #defines
5757# and linker options to make pthread_create available
5758# Some compilers won't report that they do not support -Kpthread,
5759# so we need to run a program to see whether it really made the
5760# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
5762$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
5763if test "${ac_cv_kpthread+set}" = set; then :
5764 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005765else
5766 ac_save_cc="$CC"
5767CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005768if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005769 ac_cv_kpthread=no
5770else
Matthias Kloseb9621712010-04-24 17:59:49 +00005771 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005772/* end confdefs.h. */
5773
5774#include <pthread.h>
5775
5776void* routine(void* p){return NULL;}
5777
5778int main(){
5779 pthread_t p;
5780 if(pthread_create(&p,NULL,routine,NULL)!=0)
5781 return 1;
5782 (void)pthread_detach(p);
5783 return 0;
5784}
5785
5786_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005787if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005788 ac_cv_kpthread=yes
5789else
Matthias Kloseb9621712010-04-24 17:59:49 +00005790 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005791fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005792rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5793 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005794fi
5795
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005796CC="$ac_save_cc"
5797fi
5798
Matthias Kloseb9621712010-04-24 17:59:49 +00005799{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
5800$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005801fi
5802
5803if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
5804then
5805# -Kthread, if available, provides the right #defines
5806# and linker options to make pthread_create available
5807# Some compilers won't report that they do not support -Kthread,
5808# so we need to run a program to see whether it really made the
5809# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005810{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
5811$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
5812if test "${ac_cv_kthread+set}" = set; then :
5813 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005814else
5815 ac_save_cc="$CC"
5816CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005817if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005818 ac_cv_kthread=no
5819else
Matthias Kloseb9621712010-04-24 17:59:49 +00005820 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005821/* end confdefs.h. */
5822
5823#include <pthread.h>
5824
5825void* routine(void* p){return NULL;}
5826
5827int main(){
5828 pthread_t p;
5829 if(pthread_create(&p,NULL,routine,NULL)!=0)
5830 return 1;
5831 (void)pthread_detach(p);
5832 return 0;
5833}
5834
5835_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005836if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005837 ac_cv_kthread=yes
5838else
Matthias Kloseb9621712010-04-24 17:59:49 +00005839 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005840fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005841rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5842 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005843fi
5844
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005845CC="$ac_save_cc"
5846fi
5847
Matthias Kloseb9621712010-04-24 17:59:49 +00005848{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
5849$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005850fi
5851
5852if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
5853then
5854# -pthread, if available, provides the right #defines
5855# and linker options to make pthread_create available
5856# Some compilers won't report that they do not support -pthread,
5857# so we need to run a program to see whether it really made the
5858# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005859{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
5860$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
5861if test "${ac_cv_thread+set}" = set; then :
5862 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005863else
5864 ac_save_cc="$CC"
5865CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005866if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005867 ac_cv_pthread=no
5868else
Matthias Kloseb9621712010-04-24 17:59:49 +00005869 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005870/* end confdefs.h. */
5871
5872#include <pthread.h>
5873
5874void* routine(void* p){return NULL;}
5875
5876int main(){
5877 pthread_t p;
5878 if(pthread_create(&p,NULL,routine,NULL)!=0)
5879 return 1;
5880 (void)pthread_detach(p);
5881 return 0;
5882}
5883
5884_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005885if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005886 ac_cv_pthread=yes
5887else
Matthias Kloseb9621712010-04-24 17:59:49 +00005888 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005889fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005890rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5891 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005892fi
5893
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005894CC="$ac_save_cc"
5895fi
5896
Matthias Kloseb9621712010-04-24 17:59:49 +00005897{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
5898$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005899fi
5900
5901# If we have set a CC compiler flag for thread support then
5902# check if it works for CXX, too.
5903ac_cv_cxx_thread=no
5904if test ! -z "$CXX"
5905then
Matthias Kloseb9621712010-04-24 17:59:49 +00005906{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
5907$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005908ac_save_cxx="$CXX"
5909
5910if test "$ac_cv_kpthread" = "yes"
5911then
5912 CXX="$CXX -Kpthread"
5913 ac_cv_cxx_thread=yes
5914elif test "$ac_cv_kthread" = "yes"
5915then
5916 CXX="$CXX -Kthread"
5917 ac_cv_cxx_thread=yes
5918elif test "$ac_cv_pthread" = "yes"
5919then
5920 CXX="$CXX -pthread"
5921 ac_cv_cxx_thread=yes
5922fi
5923
5924if test $ac_cv_cxx_thread = yes
5925then
5926 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5927 $CXX -c conftest.$ac_ext 2>&5
5928 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5929 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5930 then
5931 ac_cv_cxx_thread=yes
5932 else
5933 ac_cv_cxx_thread=no
5934 fi
5935 rm -fr conftest*
5936fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005937{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
5938$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005939fi
5940CXX="$ac_save_cxx"
5941
5942
5943# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00005944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5945$as_echo_n "checking for ANSI C header files... " >&6; }
5946if test "${ac_cv_header_stdc+set}" = set; then :
5947 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005948else
Matthias Kloseb9621712010-04-24 17:59:49 +00005949 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005950/* end confdefs.h. */
5951#include <stdlib.h>
5952#include <stdarg.h>
5953#include <string.h>
5954#include <float.h>
5955
5956int
5957main ()
5958{
5959
5960 ;
5961 return 0;
5962}
5963_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005964if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005965 ac_cv_header_stdc=yes
5966else
Matthias Kloseb9621712010-04-24 17:59:49 +00005967 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005968fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005969rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5970
5971if test $ac_cv_header_stdc = yes; then
5972 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00005973 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005974/* end confdefs.h. */
5975#include <string.h>
5976
5977_ACEOF
5978if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005979 $EGREP "memchr" >/dev/null 2>&1; then :
5980
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005981else
5982 ac_cv_header_stdc=no
5983fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005984rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005985
5986fi
5987
5988if test $ac_cv_header_stdc = yes; then
5989 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00005990 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005991/* end confdefs.h. */
5992#include <stdlib.h>
5993
5994_ACEOF
5995if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005996 $EGREP "free" >/dev/null 2>&1; then :
5997
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005998else
5999 ac_cv_header_stdc=no
6000fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006001rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006002
6003fi
6004
6005if test $ac_cv_header_stdc = yes; then
6006 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00006007 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006008 :
6009else
Matthias Kloseb9621712010-04-24 17:59:49 +00006010 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006011/* end confdefs.h. */
6012#include <ctype.h>
6013#include <stdlib.h>
6014#if ((' ' & 0x0FF) == 0x020)
6015# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6016# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6017#else
6018# define ISLOWER(c) \
6019 (('a' <= (c) && (c) <= 'i') \
6020 || ('j' <= (c) && (c) <= 'r') \
6021 || ('s' <= (c) && (c) <= 'z'))
6022# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6023#endif
6024
6025#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6026int
6027main ()
6028{
6029 int i;
6030 for (i = 0; i < 256; i++)
6031 if (XOR (islower (i), ISLOWER (i))
6032 || toupper (i) != TOUPPER (i))
6033 return 2;
6034 return 0;
6035}
6036_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006037if ac_fn_c_try_run "$LINENO"; then :
6038
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006039else
Matthias Kloseb9621712010-04-24 17:59:49 +00006040 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006041fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006042rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6043 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006044fi
6045
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006046fi
6047fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006048{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6049$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006050if test $ac_cv_header_stdc = yes; then
6051
Matthias Kloseb9621712010-04-24 17:59:49 +00006052$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006053
6054fi
6055
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006056for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
6057fcntl.h grp.h \
Christian Heimesbbe741d2008-03-28 10:53:29 +00006058ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Thomas Wouters89f507f2006-12-13 04:49:30 +00006059shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00006060unistd.h utime.h \
Christian Heimes4fbc72b2008-03-22 00:47:35 +00006061sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
6062sys/lock.h sys/mkdev.h sys/modem.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006063sys/param.h sys/poll.h sys/select.h sys/socket.h sys/statvfs.h sys/stat.h \
Benjamin Petersonde9c8692008-07-01 18:23:09 +00006064sys/termio.h sys/time.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006065sys/times.h sys/types.h sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h \
Hye-Shik Chang81268602004-02-02 06:05:24 +00006066sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Ronald Oussoren755740f2010-02-07 19:56:39 +00006067bluetooth/bluetooth.h linux/tipc.h spawn.h util.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006068do :
6069 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6070ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Benjamin Petersond7f73e92010-09-05 00:09:07 +00006071eval as_val=\$$as_ac_Header
6072 if test "x$as_val" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006073 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006074#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006075_ACEOF
6076
6077fi
6078
Guido van Rossum627b2d71993-12-24 10:39:16 +00006079done
6080
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006081ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006082for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00006083 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6084{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
6085$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Benjamin Petersond7f73e92010-09-05 00:09:07 +00006086if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006087 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006088else
Matthias Kloseb9621712010-04-24 17:59:49 +00006089 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006090/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006091#include <sys/types.h>
6092#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00006093
Martin v. Löwis11437992002-04-12 09:54:03 +00006094int
6095main ()
6096{
6097if ((DIR *) 0)
6098return 0;
6099 ;
6100 return 0;
6101}
6102_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006103if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006104 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00006105else
Matthias Kloseb9621712010-04-24 17:59:49 +00006106 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006107fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006108rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006109fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006110eval ac_res=\$$as_ac_Header
6111 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6112$as_echo "$ac_res" >&6; }
Benjamin Petersond7f73e92010-09-05 00:09:07 +00006113eval as_val=\$$as_ac_Header
6114 if test "x$as_val" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006115 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006116#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006117_ACEOF
6118
6119ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00006120fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006121
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006122done
6123# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6124if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006125 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6126$as_echo_n "checking for library containing opendir... " >&6; }
6127if test "${ac_cv_search_opendir+set}" = set; then :
6128 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006129else
Martin v. Löwis11437992002-04-12 09:54:03 +00006130 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006131cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006132/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006133
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006134/* Override any GCC internal prototype to avoid an error.
6135 Use char because int might match the return type of a GCC
6136 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006137#ifdef __cplusplus
6138extern "C"
6139#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006140char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006141int
6142main ()
6143{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006144return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006145 ;
6146 return 0;
6147}
6148_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006149for ac_lib in '' dir; do
6150 if test -z "$ac_lib"; then
6151 ac_res="none required"
6152 else
6153 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006154 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006155 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006156 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006157 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006158fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006159rm -f core conftest.err conftest.$ac_objext \
6160 conftest$ac_exeext
6161 if test "${ac_cv_search_opendir+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006162 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006163fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006164done
Matthias Kloseb9621712010-04-24 17:59:49 +00006165if test "${ac_cv_search_opendir+set}" = set; then :
6166
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006167else
6168 ac_cv_search_opendir=no
6169fi
6170rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006171LIBS=$ac_func_search_save_LIBS
6172fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006173{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6174$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006175ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006176if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006177 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00006178
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006179fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006180
Michael W. Hudson54241132001-12-07 15:38:26 +00006181else
Matthias Kloseb9621712010-04-24 17:59:49 +00006182 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6183$as_echo_n "checking for library containing opendir... " >&6; }
6184if test "${ac_cv_search_opendir+set}" = set; then :
6185 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006186else
6187 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006188cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006189/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006190
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006191/* Override any GCC internal prototype to avoid an error.
6192 Use char because int might match the return type of a GCC
6193 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006194#ifdef __cplusplus
6195extern "C"
6196#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006197char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006198int
6199main ()
6200{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006201return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006202 ;
6203 return 0;
6204}
6205_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006206for ac_lib in '' x; do
6207 if test -z "$ac_lib"; then
6208 ac_res="none required"
6209 else
6210 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006211 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006212 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006213 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006214 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006215fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006216rm -f core conftest.err conftest.$ac_objext \
6217 conftest$ac_exeext
6218 if test "${ac_cv_search_opendir+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006219 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006220fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006221done
Matthias Kloseb9621712010-04-24 17:59:49 +00006222if test "${ac_cv_search_opendir+set}" = set; then :
6223
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006224else
6225 ac_cv_search_opendir=no
6226fi
6227rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006228LIBS=$ac_func_search_save_LIBS
6229fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006230{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6231$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006232ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006233if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006234 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006235
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006236fi
6237
6238fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006239
Matthias Kloseb9621712010-04-24 17:59:49 +00006240{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
6241$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
6242if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then :
6243 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006244else
Matthias Kloseb9621712010-04-24 17:59:49 +00006245 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006246/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006247#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006248int
6249main ()
6250{
6251return makedev(0, 0);
6252 ;
6253 return 0;
6254}
6255_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006256if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006257 ac_cv_header_sys_types_h_makedev=yes
6258else
Matthias Kloseb9621712010-04-24 17:59:49 +00006259 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006260fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006261rm -f core conftest.err conftest.$ac_objext \
6262 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006263
6264fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006265{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
6266$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006267
6268if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006269ac_fn_c_check_header_mongrel "$LINENO" "sys/mkdev.h" "ac_cv_header_sys_mkdev_h" "$ac_includes_default"
6270if test "x$ac_cv_header_sys_mkdev_h" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006271
Matthias Kloseb9621712010-04-24 17:59:49 +00006272$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006273
6274fi
6275
6276
6277
6278 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006279 ac_fn_c_check_header_mongrel "$LINENO" "sys/sysmacros.h" "ac_cv_header_sys_sysmacros_h" "$ac_includes_default"
6280if test "x$ac_cv_header_sys_sysmacros_h" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006281
Matthias Kloseb9621712010-04-24 17:59:49 +00006282$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006283
6284fi
6285
6286
6287 fi
6288fi
6289
Michael W. Hudson54241132001-12-07 15:38:26 +00006290
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006291# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006292for ac_header in term.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006293do :
6294 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006295#ifdef HAVE_CURSES_H
6296#include <curses.h>
6297#endif
6298
Matthias Kloseb9621712010-04-24 17:59:49 +00006299"
6300if test "x$ac_cv_header_term_h" = x""yes; then :
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006301 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006302#define HAVE_TERM_H 1
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006303_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006304
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006305fi
6306
6307done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006308
6309
Martin v. Löwis11017b12006-01-14 18:12:57 +00006310# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00006311for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006312do :
6313 ac_fn_c_check_header_compile "$LINENO" "linux/netlink.h" "ac_cv_header_linux_netlink_h" "
Martin v. Löwis11017b12006-01-14 18:12:57 +00006314#ifdef HAVE_ASM_TYPES_H
6315#include <asm/types.h>
6316#endif
6317#ifdef HAVE_SYS_SOCKET_H
6318#include <sys/socket.h>
6319#endif
6320
Matthias Kloseb9621712010-04-24 17:59:49 +00006321"
6322if test "x$ac_cv_header_linux_netlink_h" = x""yes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00006323 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006324#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006325_ACEOF
6326
6327fi
6328
6329done
6330
6331
Guido van Rossum627b2d71993-12-24 10:39:16 +00006332# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006333was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006334{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
6335$as_echo_n "checking for clock_t in time.h... " >&6; }
6336cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006337/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006338#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006339
6340_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006341if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006342 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00006343 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006344else
Martin v. Löwis11437992002-04-12 09:54:03 +00006345
6346
Matthias Kloseb9621712010-04-24 17:59:49 +00006347$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00006348
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006349
Guido van Rossum627b2d71993-12-24 10:39:16 +00006350fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006351rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006352
Matthias Kloseb9621712010-04-24 17:59:49 +00006353{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
6354$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006355
Neal Norwitz11690112002-07-30 01:08:28 +00006356# Check whether using makedev requires defining _OSF_SOURCE
Matthias Kloseb9621712010-04-24 17:59:49 +00006357{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
6358$as_echo_n "checking for makedev... " >&6; }
6359cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006360/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00006361
Jesus Cea740f53a2010-04-28 11:35:30 +00006362#if defined(MAJOR_IN_MKDEV)
6363#include <sys/mkdev.h>
6364#elif defined(MAJOR_IN_SYSMACROS)
6365#include <sys/sysmacros.h>
6366#else
6367#include <sys/types.h>
6368#endif
6369
Neal Norwitz11690112002-07-30 01:08:28 +00006370int
6371main ()
6372{
Jesus Cea740f53a2010-04-28 11:35:30 +00006373
6374 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00006375 ;
6376 return 0;
6377}
Matthias Kloseb159a552010-04-25 21:00:44 +00006378
Neal Norwitz11690112002-07-30 01:08:28 +00006379_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006380if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006381 ac_cv_has_makedev=yes
6382else
Matthias Kloseb9621712010-04-24 17:59:49 +00006383 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006384fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006385rm -f core conftest.err conftest.$ac_objext \
6386 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006387if test "$ac_cv_has_makedev" = "no"; then
6388 # we didn't link, try if _OSF_SOURCE will allow us to link
Matthias Kloseb9621712010-04-24 17:59:49 +00006389 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006390/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006391
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006392#define _OSF_SOURCE 1
6393#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006394
Neal Norwitz11690112002-07-30 01:08:28 +00006395int
6396main ()
6397{
6398 makedev(0, 0)
6399 ;
6400 return 0;
6401}
6402_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006403if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006404 ac_cv_has_makedev=yes
6405else
Matthias Kloseb9621712010-04-24 17:59:49 +00006406 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006407fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006408rm -f core conftest.err conftest.$ac_objext \
6409 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006410 if test "$ac_cv_has_makedev" = "yes"; then
6411
Matthias Kloseb9621712010-04-24 17:59:49 +00006412$as_echo "#define _OSF_SOURCE 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006413
6414 fi
6415fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006416{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
6417$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006418if test "$ac_cv_has_makedev" = "yes"; then
6419
Matthias Kloseb9621712010-04-24 17:59:49 +00006420$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006421
6422fi
6423
Martin v. Löwis399a6892002-10-04 10:22:02 +00006424# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6425# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6426# defined, but the compiler does not support pragma redefine_extname,
6427# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6428# structures (such as rlimit64) without declaring them. As a
6429# work-around, disable LFS on such configurations
6430
6431use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00006432{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
6433$as_echo_n "checking Solaris LFS bug... " >&6; }
6434cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006435/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006436
6437#define _LARGEFILE_SOURCE 1
6438#define _FILE_OFFSET_BITS 64
6439#include <sys/resource.h>
6440
Martin v. Löwis399a6892002-10-04 10:22:02 +00006441int
6442main ()
6443{
6444struct rlimit foo;
6445 ;
6446 return 0;
6447}
6448_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006449if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00006450 sol_lfs_bug=no
6451else
Matthias Kloseb9621712010-04-24 17:59:49 +00006452 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006453fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006454rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006455{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
6456$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006457if test "$sol_lfs_bug" = "yes"; then
6458 use_lfs=no
6459fi
6460
6461if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006462# Two defines needed to enable largefile support on various platforms
6463# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00006464
Matthias Kloseb9621712010-04-24 17:59:49 +00006465$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006466
6467
Matthias Kloseb9621712010-04-24 17:59:49 +00006468$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00006469
Martin v. Löwis399a6892002-10-04 10:22:02 +00006470fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006471
Guido van Rossum84e7b241996-08-19 21:59:00 +00006472# Add some code to confdefs.h so that the test for off_t works on SCO
6473cat >> confdefs.h <<\EOF
6474#if defined(SCO_DS)
6475#undef _OFF_T
6476#endif
6477EOF
6478
Guido van Rossumef2255b2000-03-10 22:30:29 +00006479# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00006480ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
6481if test "x$ac_cv_type_mode_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006482
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006483else
Martin v. Löwis11437992002-04-12 09:54:03 +00006484
6485cat >>confdefs.h <<_ACEOF
6486#define mode_t int
6487_ACEOF
6488
6489fi
6490
Matthias Kloseb9621712010-04-24 17:59:49 +00006491ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
6492if test "x$ac_cv_type_off_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006493
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006494else
Martin v. Löwis11437992002-04-12 09:54:03 +00006495
6496cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006497#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006498_ACEOF
6499
6500fi
6501
Matthias Kloseb9621712010-04-24 17:59:49 +00006502ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
6503if test "x$ac_cv_type_pid_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006504
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006505else
Martin v. Löwis11437992002-04-12 09:54:03 +00006506
6507cat >>confdefs.h <<_ACEOF
6508#define pid_t int
6509_ACEOF
6510
6511fi
6512
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006513
Martin v. Löwis11437992002-04-12 09:54:03 +00006514cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00006515#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00006516_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006517
Matthias Kloseb9621712010-04-24 17:59:49 +00006518ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
6519if test "x$ac_cv_type_size_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006520
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006521else
Martin v. Löwis11437992002-04-12 09:54:03 +00006522
6523cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006524#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00006525_ACEOF
6526
6527fi
6528
Matthias Kloseb9621712010-04-24 17:59:49 +00006529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
6530$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
6531if test "${ac_cv_type_uid_t+set}" = set; then :
6532 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006533else
Matthias Kloseb9621712010-04-24 17:59:49 +00006534 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006535/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006536#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006537
6538_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006539if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006540 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006541 ac_cv_type_uid_t=yes
6542else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006543 ac_cv_type_uid_t=no
6544fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006545rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006546
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006547fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006548{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
6549$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00006550if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006551
Matthias Kloseb9621712010-04-24 17:59:49 +00006552$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006553
6554
Matthias Kloseb9621712010-04-24 17:59:49 +00006555$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006556
6557fi
6558
Matthias Kloseb9621712010-04-24 17:59:49 +00006559ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
6560case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006561 no|yes) ;; #(
6562 *)
6563
Matthias Kloseb9621712010-04-24 17:59:49 +00006564$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006565
6566
6567cat >>confdefs.h <<_ACEOF
6568#define uint32_t $ac_cv_c_uint32_t
6569_ACEOF
6570;;
6571 esac
6572
Matthias Kloseb9621712010-04-24 17:59:49 +00006573ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
6574case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006575 no|yes) ;; #(
6576 *)
6577
Matthias Kloseb9621712010-04-24 17:59:49 +00006578$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006579
6580
6581cat >>confdefs.h <<_ACEOF
6582#define uint64_t $ac_cv_c_uint64_t
6583_ACEOF
6584;;
6585 esac
6586
Matthias Kloseb9621712010-04-24 17:59:49 +00006587ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
6588case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006589 no|yes) ;; #(
6590 *)
6591
6592cat >>confdefs.h <<_ACEOF
6593#define int32_t $ac_cv_c_int32_t
6594_ACEOF
6595;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00006596esac
6597
Matthias Kloseb9621712010-04-24 17:59:49 +00006598ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
6599case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006600 no|yes) ;; #(
6601 *)
6602
6603cat >>confdefs.h <<_ACEOF
6604#define int64_t $ac_cv_c_int64_t
6605_ACEOF
6606;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006607esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00006608
Matthias Kloseb9621712010-04-24 17:59:49 +00006609ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
6610if test "x$ac_cv_type_ssize_t" = x""yes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006611
Matthias Kloseb9621712010-04-24 17:59:49 +00006612$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00006613
6614fi
6615
Jack Jansendd19cf82001-12-06 22:36:17 +00006616
Michael W. Hudson54241132001-12-07 15:38:26 +00006617# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00006618# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006619# The cast to long int works around a bug in the HP C Compiler
6620# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6621# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6622# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
6624$as_echo_n "checking size of int... " >&6; }
6625if test "${ac_cv_sizeof_int+set}" = set; then :
6626 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006627else
Matthias Kloseb9621712010-04-24 17:59:49 +00006628 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006629
Martin v. Löwis11437992002-04-12 09:54:03 +00006630else
Matthias Kloseb9621712010-04-24 17:59:49 +00006631 if test "$ac_cv_type_int" = yes; then
6632 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6633$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Petersond7f73e92010-09-05 00:09:07 +00006634{ as_fn_set_status 77
6635as_fn_error "cannot compute sizeof (int)
6636See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006637 else
6638 ac_cv_sizeof_int=0
6639 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006640fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006641
Martin v. Löwis11437992002-04-12 09:54:03 +00006642fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006643{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
6644$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006645
6646
6647
Martin v. Löwis11437992002-04-12 09:54:03 +00006648cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006649#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00006650_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006651
6652
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006653# The cast to long int works around a bug in the HP C Compiler
6654# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6655# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6656# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006657{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
6658$as_echo_n "checking size of long... " >&6; }
6659if test "${ac_cv_sizeof_long+set}" = set; then :
6660 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006661else
Matthias Kloseb9621712010-04-24 17:59:49 +00006662 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006663
Martin v. Löwis11437992002-04-12 09:54:03 +00006664else
Matthias Kloseb9621712010-04-24 17:59:49 +00006665 if test "$ac_cv_type_long" = yes; then
6666 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6667$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Petersond7f73e92010-09-05 00:09:07 +00006668{ as_fn_set_status 77
6669as_fn_error "cannot compute sizeof (long)
6670See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006671 else
6672 ac_cv_sizeof_long=0
6673 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006674fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006675
Martin v. Löwis11437992002-04-12 09:54:03 +00006676fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006677{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
6678$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006679
6680
6681
Martin v. Löwis11437992002-04-12 09:54:03 +00006682cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006683#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006684_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006685
6686
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006687# The cast to long int works around a bug in the HP C Compiler
6688# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6689# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6690# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
6692$as_echo_n "checking size of void *... " >&6; }
6693if test "${ac_cv_sizeof_void_p+set}" = set; then :
6694 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006695else
Matthias Kloseb9621712010-04-24 17:59:49 +00006696 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006697
Martin v. Löwis11437992002-04-12 09:54:03 +00006698else
Matthias Kloseb9621712010-04-24 17:59:49 +00006699 if test "$ac_cv_type_void_p" = yes; then
6700 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6701$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Petersond7f73e92010-09-05 00:09:07 +00006702{ as_fn_set_status 77
6703as_fn_error "cannot compute sizeof (void *)
6704See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006705 else
6706 ac_cv_sizeof_void_p=0
6707 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006708fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006709
Martin v. Löwis11437992002-04-12 09:54:03 +00006710fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006711{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
6712$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006713
6714
6715
Martin v. Löwis11437992002-04-12 09:54:03 +00006716cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006717#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00006718_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006719
6720
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006721# The cast to long int works around a bug in the HP C Compiler
6722# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6723# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6724# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
6726$as_echo_n "checking size of short... " >&6; }
6727if test "${ac_cv_sizeof_short+set}" = set; then :
6728 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006729else
Matthias Kloseb9621712010-04-24 17:59:49 +00006730 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006731
Martin v. Löwis11437992002-04-12 09:54:03 +00006732else
Matthias Kloseb9621712010-04-24 17:59:49 +00006733 if test "$ac_cv_type_short" = yes; then
6734 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6735$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Petersond7f73e92010-09-05 00:09:07 +00006736{ as_fn_set_status 77
6737as_fn_error "cannot compute sizeof (short)
6738See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006739 else
6740 ac_cv_sizeof_short=0
6741 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006742fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006743
Martin v. Löwis11437992002-04-12 09:54:03 +00006744fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006745{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
6746$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006747
6748
6749
Martin v. Löwis11437992002-04-12 09:54:03 +00006750cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006751#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00006752_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006753
6754
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006755# The cast to long int works around a bug in the HP C Compiler
6756# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6757# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6758# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006759{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
6760$as_echo_n "checking size of float... " >&6; }
6761if test "${ac_cv_sizeof_float+set}" = set; then :
6762 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006763else
Matthias Kloseb9621712010-04-24 17:59:49 +00006764 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (float))" "ac_cv_sizeof_float" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006765
Martin v. Löwis11437992002-04-12 09:54:03 +00006766else
Matthias Kloseb9621712010-04-24 17:59:49 +00006767 if test "$ac_cv_type_float" = yes; then
6768 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6769$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Petersond7f73e92010-09-05 00:09:07 +00006770{ as_fn_set_status 77
6771as_fn_error "cannot compute sizeof (float)
6772See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006773 else
6774 ac_cv_sizeof_float=0
6775 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006776fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006777
Martin v. Löwis11437992002-04-12 09:54:03 +00006778fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006779{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
6780$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006781
6782
6783
Martin v. Löwis11437992002-04-12 09:54:03 +00006784cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006785#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00006786_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006787
6788
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006789# The cast to long int works around a bug in the HP C Compiler
6790# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6791# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6792# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006793{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
6794$as_echo_n "checking size of double... " >&6; }
6795if test "${ac_cv_sizeof_double+set}" = set; then :
6796 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006797else
Matthias Kloseb9621712010-04-24 17:59:49 +00006798 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (double))" "ac_cv_sizeof_double" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006799
Martin v. Löwis11437992002-04-12 09:54:03 +00006800else
Matthias Kloseb9621712010-04-24 17:59:49 +00006801 if test "$ac_cv_type_double" = yes; then
6802 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6803$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Petersond7f73e92010-09-05 00:09:07 +00006804{ as_fn_set_status 77
6805as_fn_error "cannot compute sizeof (double)
6806See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006807 else
6808 ac_cv_sizeof_double=0
6809 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006810fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006811
Martin v. Löwis11437992002-04-12 09:54:03 +00006812fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006813{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
6814$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006815
6816
6817
Martin v. Löwis11437992002-04-12 09:54:03 +00006818cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006819#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00006820_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006821
6822
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006823# The cast to long int works around a bug in the HP C Compiler
6824# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6825# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6826# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
6828$as_echo_n "checking size of fpos_t... " >&6; }
6829if test "${ac_cv_sizeof_fpos_t+set}" = set; then :
6830 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006831else
Matthias Kloseb9621712010-04-24 17:59:49 +00006832 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (fpos_t))" "ac_cv_sizeof_fpos_t" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006833
Martin v. Löwis11437992002-04-12 09:54:03 +00006834else
Matthias Kloseb9621712010-04-24 17:59:49 +00006835 if test "$ac_cv_type_fpos_t" = yes; then
6836 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6837$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Petersond7f73e92010-09-05 00:09:07 +00006838{ as_fn_set_status 77
6839as_fn_error "cannot compute sizeof (fpos_t)
6840See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006841 else
6842 ac_cv_sizeof_fpos_t=0
6843 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006844fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006845
Martin v. Löwis11437992002-04-12 09:54:03 +00006846fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006847{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
6848$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006849
6850
6851
Martin v. Löwis11437992002-04-12 09:54:03 +00006852cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006853#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00006854_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006855
Michael W. Hudson54241132001-12-07 15:38:26 +00006856
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006857# The cast to long int works around a bug in the HP C Compiler
6858# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6859# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6860# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
6862$as_echo_n "checking size of size_t... " >&6; }
6863if test "${ac_cv_sizeof_size_t+set}" = set; then :
6864 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00006865else
Matthias Kloseb9621712010-04-24 17:59:49 +00006866 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t" "$ac_includes_default"; then :
Martin v. Löwis18e16552006-02-15 17:27:45 +00006867
Martin v. Löwis18e16552006-02-15 17:27:45 +00006868else
Matthias Kloseb9621712010-04-24 17:59:49 +00006869 if test "$ac_cv_type_size_t" = yes; then
6870 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6871$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Petersond7f73e92010-09-05 00:09:07 +00006872{ as_fn_set_status 77
6873as_fn_error "cannot compute sizeof (size_t)
6874See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006875 else
6876 ac_cv_sizeof_size_t=0
6877 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00006878fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006879
Martin v. Löwis18e16552006-02-15 17:27:45 +00006880fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006881{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
6882$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006883
6884
6885
Martin v. Löwis18e16552006-02-15 17:27:45 +00006886cat >>confdefs.h <<_ACEOF
6887#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
6888_ACEOF
6889
6890
Christian Heimes400adb02008-02-01 08:12:03 +00006891# The cast to long int works around a bug in the HP C Compiler
6892# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6893# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6894# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006895{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
6896$as_echo_n "checking size of pid_t... " >&6; }
6897if test "${ac_cv_sizeof_pid_t+set}" = set; then :
6898 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00006899else
Matthias Kloseb9621712010-04-24 17:59:49 +00006900 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pid_t))" "ac_cv_sizeof_pid_t" "$ac_includes_default"; then :
Christian Heimes400adb02008-02-01 08:12:03 +00006901
Christian Heimes400adb02008-02-01 08:12:03 +00006902else
Matthias Kloseb9621712010-04-24 17:59:49 +00006903 if test "$ac_cv_type_pid_t" = yes; then
6904 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6905$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Petersond7f73e92010-09-05 00:09:07 +00006906{ as_fn_set_status 77
6907as_fn_error "cannot compute sizeof (pid_t)
6908See \`config.log' for more details." "$LINENO" 5; }; }
Christian Heimes400adb02008-02-01 08:12:03 +00006909 else
6910 ac_cv_sizeof_pid_t=0
6911 fi
6912fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006913
Christian Heimes400adb02008-02-01 08:12:03 +00006914fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006915{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
6916$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00006917
6918
6919
6920cat >>confdefs.h <<_ACEOF
6921#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
6922_ACEOF
6923
6924
Michael W. Hudson54241132001-12-07 15:38:26 +00006925
Matthias Kloseb9621712010-04-24 17:59:49 +00006926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
6927$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006928have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006929cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006930/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006931
Martin v. Löwis11437992002-04-12 09:54:03 +00006932int
6933main ()
6934{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006935long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00006936 ;
6937 return 0;
6938}
6939_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006940if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006941
6942
Matthias Kloseb9621712010-04-24 17:59:49 +00006943$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006944
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006945 have_long_long=yes
6946
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006947fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006948rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006949{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
6950$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00006951if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006952# The cast to long int works around a bug in the HP C Compiler
6953# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6954# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6955# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006956{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
6957$as_echo_n "checking size of long long... " >&6; }
6958if test "${ac_cv_sizeof_long_long+set}" = set; then :
6959 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006960else
Matthias Kloseb9621712010-04-24 17:59:49 +00006961 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006962
Martin v. Löwis11437992002-04-12 09:54:03 +00006963else
Matthias Kloseb9621712010-04-24 17:59:49 +00006964 if test "$ac_cv_type_long_long" = yes; then
6965 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6966$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Petersond7f73e92010-09-05 00:09:07 +00006967{ as_fn_set_status 77
6968as_fn_error "cannot compute sizeof (long long)
6969See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006970 else
6971 ac_cv_sizeof_long_long=0
6972 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006973fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006974
Martin v. Löwis11437992002-04-12 09:54:03 +00006975fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006976{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
6977$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006978
6979
6980
Martin v. Löwis11437992002-04-12 09:54:03 +00006981cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006982#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006983_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006984
Michael W. Hudson54241132001-12-07 15:38:26 +00006985
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006986fi
6987
Matthias Kloseb9621712010-04-24 17:59:49 +00006988{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
6989$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006990have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006991cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006992/* end confdefs.h. */
6993
6994int
6995main ()
6996{
6997long double x; x = (long double)0;
6998 ;
6999 return 0;
7000}
7001_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007002if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007003
7004
Matthias Kloseb9621712010-04-24 17:59:49 +00007005$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007006
7007 have_long_double=yes
7008
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007009fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007010rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007011{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
7012$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007013if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007014# The cast to long int works around a bug in the HP C Compiler
7015# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7016# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7017# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007018{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
7019$as_echo_n "checking size of long double... " >&6; }
7020if test "${ac_cv_sizeof_long_double+set}" = set; then :
7021 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007022else
Matthias Kloseb9621712010-04-24 17:59:49 +00007023 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long double))" "ac_cv_sizeof_long_double" "$ac_includes_default"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007024
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007025else
Matthias Kloseb9621712010-04-24 17:59:49 +00007026 if test "$ac_cv_type_long_double" = yes; then
7027 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7028$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Petersond7f73e92010-09-05 00:09:07 +00007029{ as_fn_set_status 77
7030as_fn_error "cannot compute sizeof (long double)
7031See \`config.log' for more details." "$LINENO" 5; }; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007032 else
7033 ac_cv_sizeof_long_double=0
7034 fi
7035fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007036
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007037fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007038{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
7039$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007040
7041
7042
7043cat >>confdefs.h <<_ACEOF
7044#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
7045_ACEOF
7046
7047
7048fi
7049
7050
Matthias Kloseb9621712010-04-24 17:59:49 +00007051{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
7052$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007053have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007054cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00007055/* end confdefs.h. */
7056
7057int
7058main ()
7059{
7060_Bool x; x = (_Bool)0;
7061 ;
7062 return 0;
7063}
7064_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007065if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00007066
7067
Matthias Kloseb9621712010-04-24 17:59:49 +00007068$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00007069
7070 have_c99_bool=yes
7071
Thomas Woutersb2137042007-02-01 18:02:27 +00007072fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007073rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007074{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
7075$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007076if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007077# The cast to long int works around a bug in the HP C Compiler
7078# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7079# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7080# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007081{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
7082$as_echo_n "checking size of _Bool... " >&6; }
7083if test "${ac_cv_sizeof__Bool+set}" = set; then :
7084 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00007085else
Matthias Kloseb9621712010-04-24 17:59:49 +00007086 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (_Bool))" "ac_cv_sizeof__Bool" "$ac_includes_default"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00007087
Thomas Woutersb2137042007-02-01 18:02:27 +00007088else
Matthias Kloseb9621712010-04-24 17:59:49 +00007089 if test "$ac_cv_type__Bool" = yes; then
7090 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7091$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Petersond7f73e92010-09-05 00:09:07 +00007092{ as_fn_set_status 77
7093as_fn_error "cannot compute sizeof (_Bool)
7094See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007095 else
7096 ac_cv_sizeof__Bool=0
7097 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00007098fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007099
Thomas Woutersb2137042007-02-01 18:02:27 +00007100fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007101{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
7102$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007103
7104
7105
Thomas Woutersb2137042007-02-01 18:02:27 +00007106cat >>confdefs.h <<_ACEOF
7107#define SIZEOF__BOOL $ac_cv_sizeof__Bool
7108_ACEOF
7109
7110
7111fi
7112
Matthias Kloseb9621712010-04-24 17:59:49 +00007113ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00007114 #include <stdint.h>
7115 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00007116"
7117if test "x$ac_cv_type_uintptr_t" = x""yes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00007118
7119cat >>confdefs.h <<_ACEOF
7120#define HAVE_UINTPTR_T 1
7121_ACEOF
7122
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007123# The cast to long int works around a bug in the HP C Compiler
7124# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7125# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7126# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
7128$as_echo_n "checking size of uintptr_t... " >&6; }
7129if test "${ac_cv_sizeof_uintptr_t+set}" = set; then :
7130 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007131else
Matthias Kloseb9621712010-04-24 17:59:49 +00007132 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uintptr_t))" "ac_cv_sizeof_uintptr_t" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007133
Martin v. Löwis11437992002-04-12 09:54:03 +00007134else
Matthias Kloseb9621712010-04-24 17:59:49 +00007135 if test "$ac_cv_type_uintptr_t" = yes; then
7136 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7137$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Petersond7f73e92010-09-05 00:09:07 +00007138{ as_fn_set_status 77
7139as_fn_error "cannot compute sizeof (uintptr_t)
7140See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007141 else
7142 ac_cv_sizeof_uintptr_t=0
7143 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007144fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007145
Martin v. Löwis11437992002-04-12 09:54:03 +00007146fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007147{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
7148$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007149
7150
7151
Martin v. Löwis11437992002-04-12 09:54:03 +00007152cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007153#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007154_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007155
Michael W. Hudson54241132001-12-07 15:38:26 +00007156
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007157fi
7158
Thomas Wouters89f507f2006-12-13 04:49:30 +00007159
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007160# The cast to long int works around a bug in the HP C Compiler
7161# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7162# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7163# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
7165$as_echo_n "checking size of off_t... " >&6; }
7166if test "${ac_cv_sizeof_off_t+set}" = set; then :
7167 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007168else
Matthias Kloseb9621712010-04-24 17:59:49 +00007169 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007170#ifdef HAVE_SYS_TYPES_H
7171#include <sys/types.h>
7172#endif
7173
Matthias Kloseb9621712010-04-24 17:59:49 +00007174"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007175
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007176else
Matthias Kloseb9621712010-04-24 17:59:49 +00007177 if test "$ac_cv_type_off_t" = yes; then
7178 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7179$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Petersond7f73e92010-09-05 00:09:07 +00007180{ as_fn_set_status 77
7181as_fn_error "cannot compute sizeof (off_t)
7182See \`config.log' for more details." "$LINENO" 5; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007183 else
7184 ac_cv_sizeof_off_t=0
7185 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007186fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007187
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007188fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007189{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
7190$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007191
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007192
7193
Martin v. Löwis11437992002-04-12 09:54:03 +00007194cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007195#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007196_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007197
Michael W. Hudson54241132001-12-07 15:38:26 +00007198
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007199
Matthias Kloseb9621712010-04-24 17:59:49 +00007200{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
7201$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007202if test "$have_long_long" = yes
7203then
7204if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007205 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007206
Matthias Kloseb9621712010-04-24 17:59:49 +00007207$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007208
Matthias Kloseb9621712010-04-24 17:59:49 +00007209 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7210$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007211else
Matthias Kloseb9621712010-04-24 17:59:49 +00007212 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7213$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007214fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00007215else
Matthias Kloseb9621712010-04-24 17:59:49 +00007216 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7217$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007218fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007219
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007220# The cast to long int works around a bug in the HP C Compiler
7221# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7222# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7223# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007224{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
7225$as_echo_n "checking size of time_t... " >&6; }
7226if test "${ac_cv_sizeof_time_t+set}" = set; then :
7227 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007228else
Matthias Kloseb9621712010-04-24 17:59:49 +00007229 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007230#ifdef HAVE_SYS_TYPES_H
7231#include <sys/types.h>
7232#endif
7233#ifdef HAVE_TIME_H
7234#include <time.h>
7235#endif
7236
Matthias Kloseb9621712010-04-24 17:59:49 +00007237"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007238
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007239else
Matthias Kloseb9621712010-04-24 17:59:49 +00007240 if test "$ac_cv_type_time_t" = yes; then
7241 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7242$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Petersond7f73e92010-09-05 00:09:07 +00007243{ as_fn_set_status 77
7244as_fn_error "cannot compute sizeof (time_t)
7245See \`config.log' for more details." "$LINENO" 5; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007246 else
7247 ac_cv_sizeof_time_t=0
7248 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007249fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007250
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007251fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007252{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
7253$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007254
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007255
7256
Martin v. Löwis11437992002-04-12 09:54:03 +00007257cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007258#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007259_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007260
Michael W. Hudson54241132001-12-07 15:38:26 +00007261
7262
Trent Mick635f6fb2000-08-23 21:33:05 +00007263# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007264ac_save_cc="$CC"
7265if test "$ac_cv_kpthread" = "yes"
7266then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00007267elif test "$ac_cv_kthread" = "yes"
7268then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00007269elif test "$ac_cv_pthread" = "yes"
7270then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007271fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007272
Matthias Kloseb9621712010-04-24 17:59:49 +00007273{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
7274$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007275have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007276cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007277/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007278
7279 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007280int
7281main ()
7282{
Guido van Rossum12580492000-09-24 16:47:19 +00007283pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007284 ;
7285 return 0;
7286}
Matthias Kloseb159a552010-04-25 21:00:44 +00007287
Martin v. Löwis11437992002-04-12 09:54:03 +00007288_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007289if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00007290 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00007291fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007292rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007293{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
7294$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007295if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007296 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007297# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7298# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7299# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007300{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
7301$as_echo_n "checking size of pthread_t... " >&6; }
7302if test "${ac_cv_sizeof_pthread_t+set}" = set; then :
7303 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007304else
Matthias Kloseb9621712010-04-24 17:59:49 +00007305 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007306#ifdef HAVE_PTHREAD_H
7307#include <pthread.h>
7308#endif
7309
Matthias Kloseb9621712010-04-24 17:59:49 +00007310"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007311
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007312else
Matthias Kloseb9621712010-04-24 17:59:49 +00007313 if test "$ac_cv_type_pthread_t" = yes; then
7314 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7315$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Petersond7f73e92010-09-05 00:09:07 +00007316{ as_fn_set_status 77
7317as_fn_error "cannot compute sizeof (pthread_t)
7318See \`config.log' for more details." "$LINENO" 5; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007319 else
7320 ac_cv_sizeof_pthread_t=0
7321 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00007322fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007323
Trent Mick635f6fb2000-08-23 21:33:05 +00007324fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007325{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
7326$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007327
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007328
7329
Martin v. Löwis11437992002-04-12 09:54:03 +00007330cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007331#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007332_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007333
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007334
Trent Mick635f6fb2000-08-23 21:33:05 +00007335fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007336CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00007337
Michael W. Hudson54241132001-12-07 15:38:26 +00007338
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007339case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007340 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007341 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
7342 ;;
7343 Darwin/*)
7344 OTHER_LIBTOOL_OPT=""
7345 ;;
7346esac
7347
7348
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007349ARCH_RUN_32BIT=""
7350
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007351case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007352 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00007353 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
7354 if test "${enable_universalsdk}"; then
7355 :
7356 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007357 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007358 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00007359 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007360 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00007361 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00007362 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007363 if test ${gcc_version} '<' 4.0
7364 then
7365 LIBTOOL_CRUFT="-lcc_dynamic"
7366 else
7367 LIBTOOL_CRUFT=""
7368 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007369 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007370 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007371else
Matthias Kloseb9621712010-04-24 17:59:49 +00007372 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007373/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007374
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007375 #include <unistd.h>
7376 int main(int argc, char*argv[])
7377 {
7378 if (sizeof(long) == 4) {
7379 return 0;
7380 } else {
7381 return 1;
7382 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007383 }
7384
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007385_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007386if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007387 ac_osx_32bit=yes
7388else
Matthias Kloseb9621712010-04-24 17:59:49 +00007389 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007390fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007391rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7392 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007393fi
7394
7395
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007396 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007397 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007398 i386)
7399 MACOSX_DEFAULT_ARCH="i386"
7400 ;;
7401 ppc)
7402 MACOSX_DEFAULT_ARCH="ppc"
7403 ;;
7404 *)
Benjamin Petersond7f73e92010-09-05 00:09:07 +00007405 as_fn_error "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007406 ;;
7407 esac
7408 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007409 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007410 i386)
7411 MACOSX_DEFAULT_ARCH="x86_64"
7412 ;;
7413 ppc)
7414 MACOSX_DEFAULT_ARCH="ppc64"
7415 ;;
7416 *)
Benjamin Petersond7f73e92010-09-05 00:09:07 +00007417 as_fn_error "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007418 ;;
7419 esac
7420
7421 #ARCH_RUN_32BIT="true"
7422 fi
7423
7424 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00007425 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007426 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007427esac
7428
Matthias Kloseb9621712010-04-24 17:59:49 +00007429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
7430$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007431if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007432then
Skip Montanarodecc6a42003-01-01 20:07:49 +00007433 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00007434 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00007435 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007436
Matthias Kloseb9621712010-04-24 17:59:49 +00007437$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007438
Matthias Kloseb9621712010-04-24 17:59:49 +00007439 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7440$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00007441 if test $enable_shared = "yes"
7442 then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00007443 as_fn_error "Specifying both --enable-shared and --enable-framework is not supported, use only --enable-framework instead" "$LINENO" 5
Ronald Oussoren99aab652009-06-08 21:22:57 +00007444 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007445else
Matthias Kloseb9621712010-04-24 17:59:49 +00007446 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7447$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007448fi
7449
Matthias Kloseb9621712010-04-24 17:59:49 +00007450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
7451$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007452case $ac_sys_system/$ac_sys_release in
7453 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007454
Matthias Kloseb9621712010-04-24 17:59:49 +00007455$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007456
Matthias Kloseb9621712010-04-24 17:59:49 +00007457 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
7458$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007459 ;;
7460 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00007461 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7462$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007463 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007464esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007465
Guido van Rossum0a516c91994-09-12 10:58:40 +00007466# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00007467
Michael W. Hudson54241132001-12-07 15:38:26 +00007468
7469
7470
7471
Benjamin Peterson99f03762010-04-11 22:15:28 +00007472
Thomas Wouters477c8d52006-05-27 19:21:47 +00007473
Georg Brandlb1441c72009-01-03 22:33:39 +00007474
Thomas Wouters477c8d52006-05-27 19:21:47 +00007475cat >>confdefs.h <<_ACEOF
7476#define SHLIB_EXT "$SO"
7477_ACEOF
7478
Guido van Rossum0a516c91994-09-12 10:58:40 +00007479# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00007480# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007481# (Shared libraries in this instance are shared modules to be loaded into
7482# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00007483{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
7484$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007485if test -z "$LDSHARED"
7486then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007487 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007488 AIX*)
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00007489 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp -L\$(srcdir)"
Guido van Rossumce608b02001-09-28 15:59:38 +00007490 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007491 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00007492 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00007493 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00007494 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007495 if test "$GCC" = "yes" ; then
7496 LDSHARED='$(CC) -shared'
7497 LDCXXSHARED='$(CXX) -shared'
7498 else
7499 LDSHARED='$(CC) -G'
7500 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00007501 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007502 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007503 if test "$GCC" = "yes" ; then
7504 LDSHARED='$(CC) -shared'
7505 LDCXXSHARED='$(CXX) -shared'
7506 else
7507 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007508 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +00007509 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +00007510 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +00007511 LDSHARED='$(CC) $(LDFLAGS) -bundle'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007512 LDCXXSHARED='$(CXX) $(LDFLAGS) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00007513 if test "$enable_framework" ; then
7514 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007515 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7516 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007517 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007518 else
7519 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00007520 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00007521 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00007522 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007523 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Jack Jansene578a632001-08-15 01:27:14 +00007524 LDSHARED='$(CC) $(LDFLAGS) -bundle'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007525 LDCXXSHARED='$(CXX) $(LDFLAGS) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00007526 if test "$enable_framework" ; then
7527 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007528 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7529 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007530 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007531 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00007532 # No framework, use the Python app as bundle-loader
7533 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00007534 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007535 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007536 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007537 Darwin/*)
7538 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
7539 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00007540
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007541 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +00007542 then
Thomas Wouters477c8d52006-05-27 19:21:47 +00007543 if test "${enable_universalsdk}"; then
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007544 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007545 fi
Jack Jansen6b08a402004-06-03 12:41:45 +00007546 LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007547 LDCXXSHARED='$(CXX) $(LDFLAGS) -bundle -undefined dynamic_lookup'
Jack Jansen6b08a402004-06-03 12:41:45 +00007548 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00007549 else
7550 LDSHARED='$(CC) $(LDFLAGS) -bundle'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007551 LDCXXSHARED='$(CXX) $(LDFLAGS) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00007552 if test "$enable_framework" ; then
7553 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007554 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7555 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007556 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007557 else
7558 # No framework, use the Python app as bundle-loader
7559 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
7560 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007561 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007562 fi
7563 fi
7564 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007565 Linux*|GNU*|QNX*)
7566 LDSHARED='$(CC) -shared'
7567 LDCXXSHARED='$(CXX) -shared';;
7568 BSD/OS*/4*)
7569 LDSHARED="gcc -shared"
7570 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007571 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00007572 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00007573 then
Benjamin Petersonab0a7522010-03-14 15:18:25 +00007574 LDSHARED='$(CC) -shared ${LDFLAGS}'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007575 LDCXXSHARED='$(CXX) -shared ${LDFLAGS}'
Guido van Rossum0286ae82000-08-29 15:06:49 +00007576 else
7577 LDSHARED="ld -Bshareable ${LDFLAGS}"
7578 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007579 OpenBSD*)
7580 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7581 then
7582 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007583 LDCXXSHARED='$(CXX) -shared $(CCSHARED) ${LDFLAGS}'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007584 else
7585 case `uname -r` in
7586 [01].* | 2.[0-7] | 2.[0-7].*)
7587 LDSHARED="ld -Bshareable ${LDFLAGS}"
7588 ;;
7589 *)
7590 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007591 LDCXXSHARED='$(CXX) -shared $(CCSHARED) ${LDFLAGS}'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007592 ;;
7593 esac
7594 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007595 NetBSD*|DragonFly*)
7596 LDSHARED="cc -shared ${LDFLAGS}"
7597 LDCXXSHARED="c++ -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007598 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007599 if test "$GCC" = "yes" ; then
7600 LDSHARED='$(CC) -shared'
7601 LDCXXSHARED='$(CXX) -shared'
7602 else
7603 LDSHARED='$(CC) -G'
7604 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00007605 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007606 SCO_SV*)
7607 LDSHARED='$(CC) -Wl,-G,-Bexport'
7608 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
7609 CYGWIN*)
7610 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
7611 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007612 *) LDSHARED="ld";;
7613 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007614fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007615{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
7616$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00007617LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007618BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00007619# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007620# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007621{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
7622$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007623if test -z "$CCSHARED"
7624then
Guido van Rossum07397971997-04-29 21:49:50 +00007625 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00007626 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007627 then CCSHARED="-fPIC";
7628 elif test `uname -p` = sparc;
7629 then CCSHARED="-xcode=pic32";
7630 else CCSHARED="-Kpic";
7631 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00007632 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00007633 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00007634 else CCSHARED="+z";
7635 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007636 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007637 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007638 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007639 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00007640 if test "$GCC" = "yes"
7641 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00007642 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00007643 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007644 SCO_SV*)
7645 if test "$GCC" = "yes"
7646 then CCSHARED="-fPIC"
7647 else CCSHARED="-Kpic -belf"
7648 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007649 IRIX*/6*) case $CC in
7650 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00007651 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007652 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007653 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007654fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007655{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
7656$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007657# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007658# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007659{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
7660$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007661if test -z "$LINKFORSHARED"
7662then
Guido van Rossum07397971997-04-29 21:49:50 +00007663 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007664 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007665 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00007666 LINKFORSHARED="-Wl,-E -Wl,+s";;
7667# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007668 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007669 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007670 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00007671 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00007672 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Jack Jansene578a632001-08-15 01:27:14 +00007673 if test "$enable_framework"
7674 then
Jack Jansenda49e192005-01-07 13:08:22 +00007675 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007676 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007677 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007678 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007679 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00007680 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007681 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00007682 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7683 then
7684 LINKFORSHARED="-Wl,--export-dynamic"
7685 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007686 SunOS/5*) case $CC in
7687 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00007688 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00007689 then
7690 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007691 fi;;
7692 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00007693 CYGWIN*)
7694 if test $enable_shared = "no"
7695 then
7696 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
7697 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00007698 QNX*)
7699 # -Wl,-E causes the symbols to be added to the dynamic
7700 # symbol table so that they can be found when a module
7701 # is loaded. -N 2048K causes the stack size to be set
7702 # to 2048 kilobytes so that the stack doesn't overflow
7703 # when running test_compile.py.
7704 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007705 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007706fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007707{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
7708$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007709
Michael W. Hudson54241132001-12-07 15:38:26 +00007710
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00007711
Matthias Kloseb9621712010-04-24 17:59:49 +00007712{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
7713$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007714if test ! "$LIBRARY" = "$LDLIBRARY"
7715then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00007716 case $ac_sys_system in
7717 CYGWIN*)
7718 # Cygwin needs CCSHARED when building extension DLLs
7719 # but not when building the interpreter DLL.
7720 CFLAGSFORSHARED='';;
7721 *)
7722 CFLAGSFORSHARED='$(CCSHARED)'
7723 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007724fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007725{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
7726$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007727
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007728# SHLIBS are libraries (except -lc and -lm) to link to the python shared
7729# library (with --enable-shared).
7730# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007731# symbols, this must be set to $(LIBS) (expanded by make). We do this even
7732# if it is not required, since it creates a dependency of the shared library
7733# to LIBS. This, in turn, means that applications linking the shared libpython
7734# don't need to link LIBS explicitly. The default should be only changed
7735# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007736
Matthias Kloseb9621712010-04-24 17:59:49 +00007737{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
7738$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007739case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007740 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007741 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007742esac
Matthias Kloseb9621712010-04-24 17:59:49 +00007743{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
7744$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007745
7746
Guido van Rossum627b2d71993-12-24 10:39:16 +00007747# checks for libraries
Matthias Kloseb9621712010-04-24 17:59:49 +00007748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
7749$as_echo_n "checking for dlopen in -ldl... " >&6; }
7750if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
7751 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007752else
Martin v. Löwis11437992002-04-12 09:54:03 +00007753 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007754LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007755cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007756/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007757
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007758/* Override any GCC internal prototype to avoid an error.
7759 Use char because int might match the return type of a GCC
7760 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007761#ifdef __cplusplus
7762extern "C"
7763#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007764char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007765int
7766main ()
7767{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007768return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007769 ;
7770 return 0;
7771}
7772_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007773if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007774 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007775else
Matthias Kloseb9621712010-04-24 17:59:49 +00007776 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007777fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007778rm -f core conftest.err conftest.$ac_objext \
7779 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007780LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007781fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007782{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
7783$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
7784if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007785 cat >>confdefs.h <<_ACEOF
7786#define HAVE_LIBDL 1
7787_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007788
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007789 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00007790
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007791fi
7792 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00007793{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
7794$as_echo_n "checking for shl_load in -ldld... " >&6; }
7795if test "${ac_cv_lib_dld_shl_load+set}" = set; then :
7796 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007797else
Martin v. Löwis11437992002-04-12 09:54:03 +00007798 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007799LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007800cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007801/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007802
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007803/* Override any GCC internal prototype to avoid an error.
7804 Use char because int might match the return type of a GCC
7805 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007806#ifdef __cplusplus
7807extern "C"
7808#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007809char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007810int
7811main ()
7812{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007813return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007814 ;
7815 return 0;
7816}
7817_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007818if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007819 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007820else
Matthias Kloseb9621712010-04-24 17:59:49 +00007821 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007822fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007823rm -f core conftest.err conftest.$ac_objext \
7824 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007825LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007826fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007827{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
7828$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
7829if test "x$ac_cv_lib_dld_shl_load" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007830 cat >>confdefs.h <<_ACEOF
7831#define HAVE_LIBDLD 1
7832_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007833
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007834 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007835
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007836fi
7837 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00007838
Georg Brandlb1441c72009-01-03 22:33:39 +00007839# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00007840if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007841 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
7842$as_echo_n "checking for library containing sem_init... " >&6; }
7843if test "${ac_cv_search_sem_init+set}" = set; then :
7844 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007845else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00007846 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007847cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007848/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007849
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007850/* Override any GCC internal prototype to avoid an error.
7851 Use char because int might match the return type of a GCC
7852 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007853#ifdef __cplusplus
7854extern "C"
7855#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007856char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007857int
7858main ()
7859{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007860return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007861 ;
7862 return 0;
7863}
7864_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007865for ac_lib in '' pthread rt posix4; do
7866 if test -z "$ac_lib"; then
7867 ac_res="none required"
7868 else
7869 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007870 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007871 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007872 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007873 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007874fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007875rm -f core conftest.err conftest.$ac_objext \
7876 conftest$ac_exeext
7877 if test "${ac_cv_search_sem_init+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007878 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007879fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007880done
Matthias Kloseb9621712010-04-24 17:59:49 +00007881if test "${ac_cv_search_sem_init+set}" = set; then :
7882
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007883else
7884 ac_cv_search_sem_init=no
7885fi
7886rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00007887LIBS=$ac_func_search_save_LIBS
7888fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007889{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
7890$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007891ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00007892if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007893 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007894
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007895fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00007896 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00007897 # posix4 on Solaris 2.6
7898 # pthread (first!) on Linux
7899fi
7900
Martin v. Löwis19d17342003-06-14 21:03:05 +00007901# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00007902{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
7903$as_echo_n "checking for textdomain in -lintl... " >&6; }
7904if test "${ac_cv_lib_intl_textdomain+set}" = set; then :
7905 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00007906else
7907 ac_check_lib_save_LIBS=$LIBS
7908LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007909cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007910/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00007911
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007912/* Override any GCC internal prototype to avoid an error.
7913 Use char because int might match the return type of a GCC
7914 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00007915#ifdef __cplusplus
7916extern "C"
7917#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00007918char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00007919int
7920main ()
7921{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007922return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00007923 ;
7924 return 0;
7925}
7926_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007927if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00007928 ac_cv_lib_intl_textdomain=yes
7929else
Matthias Kloseb9621712010-04-24 17:59:49 +00007930 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00007931fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007932rm -f core conftest.err conftest.$ac_objext \
7933 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00007934LIBS=$ac_check_lib_save_LIBS
7935fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007936{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
7937$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
7938if test "x$ac_cv_lib_intl_textdomain" = x""yes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00007939
Matthias Kloseb9621712010-04-24 17:59:49 +00007940$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00007941
Brett Cannonc6d936e2009-06-07 20:09:53 +00007942 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00007943fi
7944
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007945
7946# checks for system dependent C++ extensions support
7947case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00007948 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
7949$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
7950 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007951/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007952
7953 #include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007954int
7955main ()
7956{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007957loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00007958 ;
7959 return 0;
7960}
Matthias Kloseb159a552010-04-25 21:00:44 +00007961
Martin v. Löwis11437992002-04-12 09:54:03 +00007962_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007963if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007964
Matthias Kloseb159a552010-04-25 21:00:44 +00007965
Matthias Kloseb9621712010-04-24 17:59:49 +00007966$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007967
Matthias Kloseb159a552010-04-25 21:00:44 +00007968 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007969$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00007970
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007971else
Matthias Kloseb159a552010-04-25 21:00:44 +00007972
7973 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007974$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00007975
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007976fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007977rm -f core conftest.err conftest.$ac_objext \
7978 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007979 *) ;;
7980esac
7981
Guido van Rossum70c7f481998-03-26 18:44:10 +00007982# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00007983{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
7984$as_echo_n "checking for t_open in -lnsl... " >&6; }
7985if test "${ac_cv_lib_nsl_t_open+set}" = set; then :
7986 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007987else
Martin v. Löwis11437992002-04-12 09:54:03 +00007988 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007989LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007990cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007991/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007992
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007993/* Override any GCC internal prototype to avoid an error.
7994 Use char because int might match the return type of a GCC
7995 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007996#ifdef __cplusplus
7997extern "C"
7998#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007999char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008000int
8001main ()
8002{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008003return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008004 ;
8005 return 0;
8006}
8007_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008008if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008009 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008010else
Matthias Kloseb9621712010-04-24 17:59:49 +00008011 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008012fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008013rm -f core conftest.err conftest.$ac_objext \
8014 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008015LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008016fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008017{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
8018$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
8019if test "x$ac_cv_lib_nsl_t_open" = x""yes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008020 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008021fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00008022 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00008023{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
8024$as_echo_n "checking for socket in -lsocket... " >&6; }
8025if test "${ac_cv_lib_socket_socket+set}" = set; then :
8026 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008027else
Martin v. Löwis11437992002-04-12 09:54:03 +00008028 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008029LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008030cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008031/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008032
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008033/* Override any GCC internal prototype to avoid an error.
8034 Use char because int might match the return type of a GCC
8035 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008036#ifdef __cplusplus
8037extern "C"
8038#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008039char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008040int
8041main ()
8042{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008043return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008044 ;
8045 return 0;
8046}
8047_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008048if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008049 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008050else
Matthias Kloseb9621712010-04-24 17:59:49 +00008051 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008052fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008053rm -f core conftest.err conftest.$ac_objext \
8054 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008055LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008056fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008057{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
8058$as_echo "$ac_cv_lib_socket_socket" >&6; }
8059if test "x$ac_cv_lib_socket_socket" = x""yes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00008060 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00008061fi
8062 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00008063
Matthias Kloseb9621712010-04-24 17:59:49 +00008064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
8065$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008066
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008067# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008068if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008069 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00008070{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8071$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00008072LIBS="$withval $LIBS"
8073
8074else
Matthias Kloseb9621712010-04-24 17:59:49 +00008075 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8076$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008077fi
8078
Guido van Rossum7f43da71994-08-01 12:15:30 +00008079
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008080if test -n "$ac_tool_prefix"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008081 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
8082set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008083{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8084$as_echo_n "checking for $ac_word... " >&6; }
8085if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
8086 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008087else
8088 case $PKG_CONFIG in
8089 [\\/]* | ?:[\\/]*)
8090 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8091 ;;
8092 *)
8093 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8094for as_dir in $PATH
8095do
8096 IFS=$as_save_IFS
8097 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008098 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Petersond78735d2010-01-01 16:04:23 +00008099 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8100 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008101 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008102 break 2
8103 fi
8104done
Matthias Kloseb9621712010-04-24 17:59:49 +00008105 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008106IFS=$as_save_IFS
8107
8108 ;;
8109esac
8110fi
8111PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8112if test -n "$PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008113 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8114$as_echo "$PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008115else
Matthias Kloseb9621712010-04-24 17:59:49 +00008116 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8117$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008118fi
8119
8120
8121fi
8122if test -z "$ac_cv_path_PKG_CONFIG"; then
8123 ac_pt_PKG_CONFIG=$PKG_CONFIG
8124 # Extract the first word of "pkg-config", so it can be a program name with args.
8125set dummy pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8127$as_echo_n "checking for $ac_word... " >&6; }
8128if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then :
8129 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008130else
8131 case $ac_pt_PKG_CONFIG in
8132 [\\/]* | ?:[\\/]*)
8133 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
8134 ;;
8135 *)
8136 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8137for as_dir in $PATH
8138do
8139 IFS=$as_save_IFS
8140 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008141 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Petersond78735d2010-01-01 16:04:23 +00008142 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8143 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008144 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008145 break 2
8146 fi
8147done
Matthias Kloseb9621712010-04-24 17:59:49 +00008148 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008149IFS=$as_save_IFS
8150
8151 ;;
8152esac
8153fi
8154ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
8155if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008156 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
8157$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008158else
Matthias Kloseb9621712010-04-24 17:59:49 +00008159 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8160$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008161fi
8162
8163 if test "x$ac_pt_PKG_CONFIG" = x; then
8164 PKG_CONFIG=""
8165 else
8166 case $cross_compiling:$ac_tool_warned in
8167yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00008168{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8169$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Petersond78735d2010-01-01 16:04:23 +00008170ac_tool_warned=yes ;;
8171esac
8172 PKG_CONFIG=$ac_pt_PKG_CONFIG
8173 fi
8174else
8175 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
8176fi
8177
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008178
8179# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00008180{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
8181$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008182
8183# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008184if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008185 withval=$with_system_expat;
8186fi
8187
8188
Matthias Kloseb9621712010-04-24 17:59:49 +00008189{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
8190$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008191
8192# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00008193{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
8194$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008195
8196# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008197if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008198 withval=$with_system_ffi;
8199fi
8200
8201
8202if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008203 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
8204else
8205 LIBFFI_INCLUDEDIR=""
8206fi
8207
8208
Matthias Kloseb9621712010-04-24 17:59:49 +00008209{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
8210$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008211
Matthias Klose55708cc2009-04-30 08:06:49 +00008212# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +00008213{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
8214$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008215
8216# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008217if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +00008218 withval=$with_dbmliborder;
8219if test x$with_dbmliborder = xyes
8220then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00008221as_fn_error "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008222else
8223 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
8224 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
8225 then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00008226 as_fn_error "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008227 fi
8228 done
8229fi
8230fi
8231
Matthias Kloseb9621712010-04-24 17:59:49 +00008232{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
8233$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008234
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00008235# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008236
8237
Matthias Kloseb9621712010-04-24 17:59:49 +00008238{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
8239$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008240
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008241# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008242if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008243 withval=$with_signal_module;
8244fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008245
8246
8247if test -z "$with_signal_module"
8248then with_signal_module="yes"
8249fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008250{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
8251$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008252
8253if test "${with_signal_module}" = "yes"; then
8254 USE_SIGNAL_MODULE=""
8255 SIGNAL_OBJS=""
8256else
8257 USE_SIGNAL_MODULE="#"
8258 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
8259fi
8260
Guido van Rossum3d15bd82001-01-10 18:53:48 +00008261# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00008262
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008263USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00008264
Matthias Kloseb9621712010-04-24 17:59:49 +00008265{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dec-threads" >&5
8266$as_echo_n "checking for --with-dec-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008267
Guido van Rossumec2f0731997-01-22 20:54:01 +00008268
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008269# Check whether --with-dec-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008270if test "${with_dec_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008271 withval=$with_dec_threads;
Matthias Kloseb9621712010-04-24 17:59:49 +00008272{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8273$as_echo "$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +00008274LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00008275if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00008276 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00008277fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008278else
Matthias Kloseb9621712010-04-24 17:59:49 +00008279 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8280$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008281fi
8282
Martin v. Löwis11437992002-04-12 09:54:03 +00008283
8284# Templates for things AC_DEFINEd more than once.
8285# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00008286
8287
Martin v. Löwis11437992002-04-12 09:54:03 +00008288
8289
Matthias Kloseb9621712010-04-24 17:59:49 +00008290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
8291$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008292
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008293# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008294if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008295 withval=$with_threads;
8296fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008297
8298
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008299# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00008300
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008301# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008302if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008303 withval=$with_thread; with_threads=$with_thread
8304fi
8305
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008306
8307if test -z "$with_threads"
8308then with_threads="yes"
8309fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008310{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
8311$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008312
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008313
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008314if test "$with_threads" = "no"
8315then
8316 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008317elif test "$ac_cv_pthread_is_default" = yes
8318then
Matthias Kloseb9621712010-04-24 17:59:49 +00008319 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008320
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008321 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +00008322 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008323
8324 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00008325 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008326elif test "$ac_cv_kpthread" = "yes"
8327then
8328 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008329 if test "$ac_cv_cxx_thread" = "yes"; then
8330 CXX="$CXX -Kpthread"
8331 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008332 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00008333
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008334 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008335 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008336elif test "$ac_cv_kthread" = "yes"
8337then
8338 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008339 if test "$ac_cv_cxx_thread" = "yes"; then
8340 CXX="$CXX -Kthread"
8341 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008342 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008343
8344 posix_threads=yes
8345 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008346elif test "$ac_cv_pthread" = "yes"
8347then
8348 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008349 if test "$ac_cv_cxx_thread" = "yes"; then
8350 CXX="$CXX -pthread"
8351 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008352 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008353
8354 posix_threads=yes
8355 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008356else
8357 if test ! -z "$with_threads" -a -d "$with_threads"
8358 then LDFLAGS="$LDFLAGS -L$with_threads"
8359 fi
8360 if test ! -z "$withval" -a -d "$withval"
8361 then LDFLAGS="$LDFLAGS -L$withval"
8362 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008363
8364 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00008365 # define _POSIX_THREADS in unistd.h. Some apparently don't
8366 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +00008367 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
8368$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
8369 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008370/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008371
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008372#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008373#ifdef _POSIX_THREADS
8374yes
8375#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008376
8377_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008378if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008379 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008380 unistd_defines_pthreads=yes
8381else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008382 unistd_defines_pthreads=no
8383fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008384rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008385
Matthias Kloseb9621712010-04-24 17:59:49 +00008386 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
8387$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008388
Matthias Kloseb9621712010-04-24 17:59:49 +00008389 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00008390
Matthias Kloseb9621712010-04-24 17:59:49 +00008391 ac_fn_c_check_header_mongrel "$LINENO" "cthreads.h" "ac_cv_header_cthreads_h" "$ac_includes_default"
8392if test "x$ac_cv_header_cthreads_h" = x""yes; then :
8393 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008394
Matthias Kloseb9621712010-04-24 17:59:49 +00008395 $as_echo "#define C_THREADS 1" >>confdefs.h
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008396
Martin v. Löwis11437992002-04-12 09:54:03 +00008397
Matthias Kloseb9621712010-04-24 17:59:49 +00008398$as_echo "#define HURD_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008399
8400 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008401 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008402else
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008403
Matthias Kloseb9621712010-04-24 17:59:49 +00008404 ac_fn_c_check_header_mongrel "$LINENO" "mach/cthreads.h" "ac_cv_header_mach_cthreads_h" "$ac_includes_default"
8405if test "x$ac_cv_header_mach_cthreads_h" = x""yes; then :
8406 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008407
Matthias Kloseb9621712010-04-24 17:59:49 +00008408 $as_echo "#define C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008409
Martin v. Löwis11437992002-04-12 09:54:03 +00008410
Matthias Kloseb9621712010-04-24 17:59:49 +00008411$as_echo "#define MACH_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008412
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008413 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008414else
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008415
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008416 # Just looking for pthread_create in libpthread is not enough:
8417 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
8418 # So we really have to include pthread.h, and then link.
8419 _libs=$LIBS
8420 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00008421 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
8422$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
8423 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008424/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008425#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00008426
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008427void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00008428int
8429main ()
8430{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008431
8432pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00008433 ;
8434 return 0;
8435}
8436_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008437if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008438
Matthias Kloseb9621712010-04-24 17:59:49 +00008439 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8440$as_echo "yes" >&6; }
8441 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00008442
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008443 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008444 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00008445else
Martin v. Löwis11437992002-04-12 09:54:03 +00008446
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008447 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +00008448 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
8449if test "x$ac_cv_func_pthread_detach" = x""yes; then :
8450 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00008451
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008452 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008453 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00008454else
Guido van Rossumad678af1998-10-02 14:42:15 +00008455
Matthias Kloseb9621712010-04-24 17:59:49 +00008456 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
8457$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
8458if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then :
8459 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008460else
Martin v. Löwis11437992002-04-12 09:54:03 +00008461 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008462LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008463cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008464/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008465
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008466/* Override any GCC internal prototype to avoid an error.
8467 Use char because int might match the return type of a GCC
8468 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008469#ifdef __cplusplus
8470extern "C"
8471#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008472char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008473int
8474main ()
8475{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008476return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008477 ;
8478 return 0;
8479}
8480_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008481if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008482 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00008483else
Matthias Kloseb9621712010-04-24 17:59:49 +00008484 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00008485fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008486rm -f core conftest.err conftest.$ac_objext \
8487 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008488LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008489fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008490{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
8491$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
8492if test "x$ac_cv_lib_pthreads_pthread_create" = x""yes; then :
8493 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00008494
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008495 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008496 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008497 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00008498else
Greg Steinadf63d62000-07-05 10:38:09 +00008499
Matthias Kloseb9621712010-04-24 17:59:49 +00008500 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
8501$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
8502if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then :
8503 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00008504else
Martin v. Löwis11437992002-04-12 09:54:03 +00008505 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008506LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008507cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008508/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008509
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008510/* Override any GCC internal prototype to avoid an error.
8511 Use char because int might match the return type of a GCC
8512 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008513#ifdef __cplusplus
8514extern "C"
8515#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008516char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008517int
8518main ()
8519{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008520return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008521 ;
8522 return 0;
8523}
8524_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008525if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008526 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00008527else
Matthias Kloseb9621712010-04-24 17:59:49 +00008528 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00008529fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008530rm -f core conftest.err conftest.$ac_objext \
8531 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008532LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00008533fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008534{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
8535$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
8536if test "x$ac_cv_lib_c_r_pthread_create" = x""yes; then :
8537 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00008538
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008539 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008540 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008541 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008542else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008543
Matthias Kloseb9621712010-04-24 17:59:49 +00008544 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
8545$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
8546if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then :
8547 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008548else
Martin v. Löwis11437992002-04-12 09:54:03 +00008549 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008550LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008551cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008552/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008553
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008554/* Override any GCC internal prototype to avoid an error.
8555 Use char because int might match the return type of a GCC
8556 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008557#ifdef __cplusplus
8558extern "C"
8559#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008560char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008561int
8562main ()
8563{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008564return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008565 ;
8566 return 0;
8567}
8568_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008569if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008570 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008571else
Matthias Kloseb9621712010-04-24 17:59:49 +00008572 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008573fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008574rm -f core conftest.err conftest.$ac_objext \
8575 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008576LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008577fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008578{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
8579$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
8580if test "x$ac_cv_lib_pthread___pthread_create_system" = x""yes; then :
8581 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008582
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008583 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008584 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008585 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008586else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008587
Matthias Kloseb9621712010-04-24 17:59:49 +00008588 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
8589$as_echo_n "checking for pthread_create in -lcma... " >&6; }
8590if test "${ac_cv_lib_cma_pthread_create+set}" = set; then :
8591 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00008592else
Martin v. Löwis11437992002-04-12 09:54:03 +00008593 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008594LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008595cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008596/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008597
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008598/* Override any GCC internal prototype to avoid an error.
8599 Use char because int might match the return type of a GCC
8600 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008601#ifdef __cplusplus
8602extern "C"
8603#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008604char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008605int
8606main ()
8607{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008608return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008609 ;
8610 return 0;
8611}
8612_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008613if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008614 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00008615else
Matthias Kloseb9621712010-04-24 17:59:49 +00008616 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00008617fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008618rm -f core conftest.err conftest.$ac_objext \
8619 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008620LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008621fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008622{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
8623$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
8624if test "x$ac_cv_lib_cma_pthread_create" = x""yes; then :
8625 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00008626
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008627 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008628 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008629 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00008630else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00008631
Martin v. Löwis130fb172001-07-19 11:00:41 +00008632 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00008633fi
8634
Guido van Rossum627b2d71993-12-24 10:39:16 +00008635
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008636fi
8637
Guido van Rossum0be3e491997-05-22 20:33:33 +00008638fi
8639
Guido van Rossum49545951997-12-02 19:28:29 +00008640fi
8641
Guido van Rossumb93a8621998-05-07 13:27:32 +00008642fi
8643
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008644fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008645rm -f core conftest.err conftest.$ac_objext \
8646 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008647fi
8648
Martin v. Löwis11437992002-04-12 09:54:03 +00008649
8650fi
8651
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008652
Michael W. Hudson54241132001-12-07 15:38:26 +00008653
Matthias Kloseb9621712010-04-24 17:59:49 +00008654 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
8655$as_echo_n "checking for usconfig in -lmpc... " >&6; }
8656if test "${ac_cv_lib_mpc_usconfig+set}" = set; then :
8657 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008658else
Martin v. Löwis11437992002-04-12 09:54:03 +00008659 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008660LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008661cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008662/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008663
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008664/* Override any GCC internal prototype to avoid an error.
8665 Use char because int might match the return type of a GCC
8666 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008667#ifdef __cplusplus
8668extern "C"
8669#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008670char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008671int
8672main ()
8673{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008674return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008675 ;
8676 return 0;
8677}
8678_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008679if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008680 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008681else
Matthias Kloseb9621712010-04-24 17:59:49 +00008682 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008683fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008684rm -f core conftest.err conftest.$ac_objext \
8685 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008686LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008687fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008688{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
8689$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
8690if test "x$ac_cv_lib_mpc_usconfig" = x""yes; then :
8691 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008692
Martin v. Löwis130fb172001-07-19 11:00:41 +00008693 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008694 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008695 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008696fi
8697
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008698
Neal Norwitza978ab02002-11-02 16:58:05 +00008699 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008700 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
8701$as_echo_n "checking for thr_create in -lthread... " >&6; }
8702if test "${ac_cv_lib_thread_thr_create+set}" = set; then :
8703 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008704else
Martin v. Löwis11437992002-04-12 09:54:03 +00008705 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008706LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008707cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008708/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008709
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008710/* Override any GCC internal prototype to avoid an error.
8711 Use char because int might match the return type of a GCC
8712 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008713#ifdef __cplusplus
8714extern "C"
8715#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008716char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008717int
8718main ()
8719{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008720return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008721 ;
8722 return 0;
8723}
8724_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008725if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008726 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008727else
Matthias Kloseb9621712010-04-24 17:59:49 +00008728 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008729fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008730rm -f core conftest.err conftest.$ac_objext \
8731 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008732LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008733fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008734{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
8735$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
8736if test "x$ac_cv_lib_thread_thr_create" = x""yes; then :
8737 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008738
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008739 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008740 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008741 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008742fi
8743
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008744 fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008745
Martin v. Löwis130fb172001-07-19 11:00:41 +00008746 if test "$USE_THREAD_MODULE" != "#"
8747 then
8748 # If the above checks didn't disable threads, (at least) OSF1
8749 # needs this '-threads' argument during linking.
8750 case $ac_sys_system in
8751 OSF1) LDLAST=-threads;;
8752 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +00008753 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008754fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008755
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008756if test "$posix_threads" = "yes"; then
8757 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008758
Matthias Kloseb9621712010-04-24 17:59:49 +00008759$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008760
8761 fi
8762
8763 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
8764 case $ac_sys_system/$ac_sys_release in
8765 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +00008766$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008767
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008768 ;;
8769 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +00008770$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008771
8772 ;;
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00008773 AIX/5)
Matthias Kloseb9621712010-04-24 17:59:49 +00008774$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00008775
8776 ;;
Antoine Pitrou33a29942010-08-30 14:52:00 +00008777 AIX/6)
8778$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
8779
8780 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008781 esac
8782
Matthias Kloseb9621712010-04-24 17:59:49 +00008783 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
8784$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
8785 if test "${ac_cv_pthread_system_supported+set}" = set; then :
8786 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008787else
Matthias Kloseb9621712010-04-24 17:59:49 +00008788 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008789 ac_cv_pthread_system_supported=no
8790else
Matthias Kloseb9621712010-04-24 17:59:49 +00008791 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008792/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008793#include <pthread.h>
8794 void *foo(void *parm) {
8795 return NULL;
8796 }
8797 main() {
8798 pthread_attr_t attr;
8799 pthread_t id;
8800 if (pthread_attr_init(&attr)) exit(-1);
8801 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
8802 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
8803 exit(0);
8804 }
8805_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008806if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008807 ac_cv_pthread_system_supported=yes
8808else
Matthias Kloseb9621712010-04-24 17:59:49 +00008809 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008810fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008811rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8812 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008813fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008814
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008815
Guido van Rossum627b2d71993-12-24 10:39:16 +00008816fi
8817
Matthias Kloseb9621712010-04-24 17:59:49 +00008818 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
8819$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008820 if test "$ac_cv_pthread_system_supported" = "yes"; then
8821
Matthias Kloseb9621712010-04-24 17:59:49 +00008822$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008823
8824 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008825 for ac_func in pthread_sigmask
8826do :
8827 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
8828if test "x$ac_cv_func_pthread_sigmask" = x""yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008829 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008830#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008831_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +00008832 case $ac_sys_system in
8833 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008834
Matthias Kloseb9621712010-04-24 17:59:49 +00008835$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +00008836
8837 ;;
8838 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008839fi
8840done
8841
8842fi
8843
8844
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008845# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +00008846
Matthias Kloseb9621712010-04-24 17:59:49 +00008847{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
8848$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008849# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008850if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008851 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008852 no)
Matthias Kloseb9621712010-04-24 17:59:49 +00008853 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8854$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008855 ipv6=no
8856 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00008857 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8858$as_echo "yes" >&6; }
8859 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008860
8861 ipv6=yes
8862 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008863 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008864else
Martin v. Löwis11437992002-04-12 09:54:03 +00008865
Matthias Kloseb9621712010-04-24 17:59:49 +00008866 if test "$cross_compiling" = yes; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008867
Matthias Kloseb9621712010-04-24 17:59:49 +00008868 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8869$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008870 ipv6=no
8871
8872else
Matthias Kloseb9621712010-04-24 17:59:49 +00008873 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008874/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008875 /* AF_INET6 available check */
8876#include <sys/types.h>
8877#include <sys/socket.h>
8878main()
8879{
8880 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
8881 exit(1);
8882 else
8883 exit(0);
8884}
8885
Martin v. Löwis11437992002-04-12 09:54:03 +00008886_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008887if ac_fn_c_try_run "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008888
Matthias Kloseb9621712010-04-24 17:59:49 +00008889 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8890$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008891 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +00008892
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008893else
Matthias Kloseb159a552010-04-25 21:00:44 +00008894
Matthias Kloseb9621712010-04-24 17:59:49 +00008895 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8896$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008897 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +00008898
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008899fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008900rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8901 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008902fi
8903
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008904
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008905if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008906 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
8907$as_echo_n "checking if RFC2553 API is available... " >&6; }
8908 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008909/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008910
8911 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008912#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008913int
8914main ()
8915{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008916struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +00008917 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +00008918 ;
8919 return 0;
8920}
Matthias Kloseb159a552010-04-25 21:00:44 +00008921
Martin v. Löwis11437992002-04-12 09:54:03 +00008922_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008923if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008924
8925 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008926$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008927 ipv6=yes
8928
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008929else
Matthias Kloseb159a552010-04-25 21:00:44 +00008930
8931 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008932$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008933 ipv6=no
8934
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008935fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008936rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008937fi
8938
8939if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008940 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008941
8942fi
8943
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008944fi
8945
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008946
8947ipv6type=unknown
8948ipv6lib=none
8949ipv6trylibc=no
8950
8951if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008952 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
8953$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +00008954 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
8955 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008956 case $i in
8957 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +00008958 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008959/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008960
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008961#include <netinet/in.h>
8962#ifdef IPV6_INRIA_VERSION
8963yes
8964#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008965_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008966if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008967 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00008968 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008969fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008970rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008971
8972 ;;
8973 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +00008974 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008975/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008976
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008977#include <netinet/in.h>
8978#ifdef __KAME__
8979yes
8980#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008981_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008982if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008983 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008984 ipv6type=$i;
8985 ipv6lib=inet6
8986 ipv6libdir=/usr/local/v6/lib
8987 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008988fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008989rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008990
8991 ;;
8992 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +00008993 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008994/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008995
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008996#include <features.h>
8997#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
8998yes
8999#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009000_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009001if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009002 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009003 ipv6type=$i;
9004 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009005fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009006rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009007
9008 ;;
9009 linux-inet6)
9010 if test -d /usr/inet6; then
9011 ipv6type=$i
9012 ipv6lib=inet6
9013 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +00009014 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009015 fi
9016 ;;
9017 solaris)
9018 if test -f /etc/netconfig; then
9019 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
9020 ipv6type=$i
9021 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009022 fi
9023 fi
9024 ;;
9025 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +00009026 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009027/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009028
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009029#include <sys/param.h>
9030#ifdef _TOSHIBA_INET6
9031yes
9032#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009033_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009034if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009035 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009036 ipv6type=$i;
9037 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009038 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009039fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009040rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009041
9042 ;;
9043 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +00009044 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009045/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009046
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009047#include </usr/local/v6/include/sys/v6config.h>
9048#ifdef __V6D__
9049yes
9050#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009051_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009052if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009053 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009054 ipv6type=$i;
9055 ipv6lib=v6;
9056 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +00009057 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009058fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009059rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009060
9061 ;;
9062 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +00009063 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009064/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009065
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009066#include <sys/param.h>
9067#ifdef _ZETA_MINAMI_INET6
9068yes
9069#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009070_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009071if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009072 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009073 ipv6type=$i;
9074 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009075 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009076fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009077rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009078
9079 ;;
9080 esac
9081 if test "$ipv6type" != "unknown"; then
9082 break
9083 fi
9084 done
Matthias Kloseb9621712010-04-24 17:59:49 +00009085 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
9086$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009087fi
9088
9089if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
9090 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
9091 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
9092 echo "using lib$ipv6lib"
9093 else
9094 if test $ipv6trylibc = "yes"; then
9095 echo "using libc"
9096 else
9097 echo 'Fatal: no $ipv6lib library found. cannot continue.'
9098 echo "You need to fetch lib$ipv6lib.a from appropriate"
9099 echo 'ipv6 kit and compile beforehand.'
9100 exit 1
9101 fi
9102 fi
9103fi
9104
Matthias Kloseb9621712010-04-24 17:59:49 +00009105{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
9106$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
9107cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009108/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009109
9110 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009111int
9112main ()
9113{
9114FSIORefNum fRef = 0
9115 ;
9116 return 0;
9117}
Matthias Kloseb159a552010-04-25 21:00:44 +00009118
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009119_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009120if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009121
Matthias Kloseb159a552010-04-25 21:00:44 +00009122
Matthias Kloseb9621712010-04-24 17:59:49 +00009123$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009124
Matthias Kloseb9621712010-04-24 17:59:49 +00009125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9126$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009127
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009128else
Matthias Kloseb159a552010-04-25 21:00:44 +00009129
Matthias Kloseb9621712010-04-24 17:59:49 +00009130 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9131$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009132
9133fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009134rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9135
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009136# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +00009137{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
9138$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009139
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009140# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009141if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009142 withval=$with_doc_strings;
9143fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009144
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009145
9146if test -z "$with_doc_strings"
9147then with_doc_strings="yes"
9148fi
9149if test "$with_doc_strings" != "no"
9150then
9151
Matthias Kloseb9621712010-04-24 17:59:49 +00009152$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009153
9154fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009155{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
9156$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009157
Antoine Pitrou042b1282010-08-13 21:15:58 +00009158# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +00009159{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
9160$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009161
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009162# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009163if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009164 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009165if test "$withval" != no
9166then
9167
Matthias Kloseb9621712010-04-24 17:59:49 +00009168$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009169
Matthias Kloseb9621712010-04-24 17:59:49 +00009170 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9171$as_echo "yes" >&6; }
9172else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9173$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009174fi
9175else
Matthias Kloseb9621712010-04-24 17:59:49 +00009176 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9177$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009178fi
9179
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009180
9181# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +00009182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
9183$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009184
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009185# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009186if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009187 withval=$with_pymalloc;
9188fi
Michael W. Hudson54241132001-12-07 15:38:26 +00009189
Neil Schemenauera35c6882001-02-27 04:45:05 +00009190
Neil Schemenauer16c22972002-03-22 15:34:49 +00009191if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00009192then
9193 with_pymalloc="yes"
9194 SOABI_QUALIFIERS="${SOABI_QUALIFIERS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +00009195fi
9196if test "$with_pymalloc" != "no"
9197then
Martin v. Löwis11437992002-04-12 09:54:03 +00009198
Matthias Kloseb9621712010-04-24 17:59:49 +00009199$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +00009200
9201fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009202{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
9203$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +00009204
Benjamin Peterson05159c42009-12-03 03:01:27 +00009205# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +00009206{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
9207$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009208
9209# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009210if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009211 withval=$with_valgrind;
9212else
9213 with_valgrind=no
9214fi
9215
Matthias Kloseb9621712010-04-24 17:59:49 +00009216{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
9217$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009218if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009219 ac_fn_c_check_header_mongrel "$LINENO" "valgrind/valgrind.h" "ac_cv_header_valgrind_valgrind_h" "$ac_includes_default"
9220if test "x$ac_cv_header_valgrind_valgrind_h" = x""yes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009221
Matthias Kloseb9621712010-04-24 17:59:49 +00009222$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +00009223
9224else
Benjamin Petersond7f73e92010-09-05 00:09:07 +00009225 as_fn_error "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +00009226
9227fi
9228
9229
Jeffrey Yasskin39370832010-05-03 19:29:34 +00009230 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +00009231fi
9232
Barry Warsawef82cd72000-06-30 16:21:01 +00009233
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009234# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00009235
Guido van Rossum98935bf2001-09-05 19:13:16 +00009236DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +00009237
Guido van Rossume97ee181999-12-20 21:27:22 +00009238# the dlopen() function means we might want to use dynload_shlib.o. some
9239# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +00009240for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +00009241do :
9242 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
9243if test "x$ac_cv_func_dlopen" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009244 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009245#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009246_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +00009247
Guido van Rossume97ee181999-12-20 21:27:22 +00009248fi
Thomas Wouters3a584202000-08-05 23:28:51 +00009249done
Guido van Rossume97ee181999-12-20 21:27:22 +00009250
Michael W. Hudson54241132001-12-07 15:38:26 +00009251
Guido van Rossume97ee181999-12-20 21:27:22 +00009252# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
9253# loading of modules.
9254
Matthias Kloseb9621712010-04-24 17:59:49 +00009255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
9256$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009257if test -z "$DYNLOADFILE"
9258then
9259 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00009260 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
9261 if test "$ac_cv_func_dlopen" = yes
9262 then DYNLOADFILE="dynload_shlib.o"
9263 else DYNLOADFILE="dynload_aix.o"
9264 fi
9265 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +00009266 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009267 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
9268 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +00009269 *)
9270 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
9271 # out any dynamic loading
9272 if test "$ac_cv_func_dlopen" = yes
9273 then DYNLOADFILE="dynload_shlib.o"
9274 else DYNLOADFILE="dynload_stub.o"
9275 fi
9276 ;;
9277 esac
9278fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009279{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
9280$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009281if test "$DYNLOADFILE" != "dynload_stub.o"
9282then
Martin v. Löwis11437992002-04-12 09:54:03 +00009283
Matthias Kloseb9621712010-04-24 17:59:49 +00009284$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +00009285
9286fi
9287
Neil Schemenauer4e425612001-06-19 15:44:15 +00009288# MACHDEP_OBJS can be set to platform-specific object files needed by Python
9289
Michael W. Hudson54241132001-12-07 15:38:26 +00009290
Matthias Kloseb9621712010-04-24 17:59:49 +00009291{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
9292$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009293if test -z "$MACHDEP_OBJS"
9294then
Jack Jansene578a632001-08-15 01:27:14 +00009295 MACHDEP_OBJS=$extra_machdep_objs
9296else
9297 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +00009298fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009299{ $as_echo "$as_me:${as_lineno-$LINENO}: result: MACHDEP_OBJS" >&5
9300$as_echo "MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009301
Guido van Rossum627b2d71993-12-24 10:39:16 +00009302# checks for library functions
Martin v. Löwis823725e2008-03-24 13:39:54 +00009303for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
9304 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +00009305 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +00009306 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Antoine Pitroub7572f02009-12-02 20:46:48 +00009307 initgroups kill killpg lchmod lchown lstat mbrtowc mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +00009308 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +00009309 putenv readlink realpath \
Benjamin Peterson965ce872009-04-05 21:24:58 +00009310 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
9311 setgid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +00009312 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setuid setvbuf \
Jean-Paul Calderone6ed7ac42010-06-19 19:58:37 +00009313 sigaction siginterrupt sigrelse snprintf strftime strlcpy \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +00009314 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Martin v. Löwis113a0852009-05-29 17:25:39 +00009315 truncate uname unsetenv utimes waitpid wait3 wait4 \
9316 wcscoll wcsftime wcsxfrm _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +00009317do :
9318 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9319ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Benjamin Petersond7f73e92010-09-05 00:09:07 +00009320eval as_val=\$$as_ac_var
9321 if test "x$as_val" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009322 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009323#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009324_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00009325
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009326fi
9327done
9328
Michael W. Hudson54241132001-12-07 15:38:26 +00009329
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009330# For some functions, having a definition is not sufficient, since
9331# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +00009332{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
9333$as_echo_n "checking for chroot... " >&6; }
9334cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009335/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009336#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009337int
9338main ()
9339{
9340void *x=chroot
9341 ;
9342 return 0;
9343}
9344_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009345if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009346
Matthias Kloseb9621712010-04-24 17:59:49 +00009347$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009348
Matthias Kloseb159a552010-04-25 21:00:44 +00009349 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009350$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009351else
Matthias Kloseb9621712010-04-24 17:59:49 +00009352 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9353$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009354
9355fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009356rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009357{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
9358$as_echo_n "checking for link... " >&6; }
9359cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009360/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009361#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009362int
9363main ()
9364{
9365void *x=link
9366 ;
9367 return 0;
9368}
9369_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009370if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009371
Matthias Kloseb9621712010-04-24 17:59:49 +00009372$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009373
Matthias Kloseb159a552010-04-25 21:00:44 +00009374 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009375$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009376else
Matthias Kloseb9621712010-04-24 17:59:49 +00009377 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9378$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009379
9380fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009381rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
9383$as_echo_n "checking for symlink... " >&6; }
9384cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009385/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009386#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009387int
9388main ()
9389{
9390void *x=symlink
9391 ;
9392 return 0;
9393}
9394_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009395if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009396
Matthias Kloseb9621712010-04-24 17:59:49 +00009397$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009398
Matthias Kloseb159a552010-04-25 21:00:44 +00009399 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009400$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009401else
Matthias Kloseb9621712010-04-24 17:59:49 +00009402 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9403$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009404
9405fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009406rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009407{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
9408$as_echo_n "checking for fchdir... " >&6; }
9409cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009410/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009411#include <unistd.h>
9412int
9413main ()
9414{
9415void *x=fchdir
9416 ;
9417 return 0;
9418}
9419_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009420if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009421
Matthias Kloseb9621712010-04-24 17:59:49 +00009422$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009423
Matthias Kloseb159a552010-04-25 21:00:44 +00009424 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009425$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009426else
Matthias Kloseb9621712010-04-24 17:59:49 +00009427 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9428$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009429
9430fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009431rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009432{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
9433$as_echo_n "checking for fsync... " >&6; }
9434cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009435/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009436#include <unistd.h>
9437int
9438main ()
9439{
9440void *x=fsync
9441 ;
9442 return 0;
9443}
9444_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009445if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009446
Matthias Kloseb9621712010-04-24 17:59:49 +00009447$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009448
Matthias Kloseb159a552010-04-25 21:00:44 +00009449 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009450$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009451else
Matthias Kloseb9621712010-04-24 17:59:49 +00009452 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9453$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009454
9455fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009456rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
9458$as_echo_n "checking for fdatasync... " >&6; }
9459cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009460/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009461#include <unistd.h>
9462int
9463main ()
9464{
9465void *x=fdatasync
9466 ;
9467 return 0;
9468}
9469_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009470if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009471
Matthias Kloseb9621712010-04-24 17:59:49 +00009472$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009473
Matthias Kloseb159a552010-04-25 21:00:44 +00009474 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009475$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009476else
Matthias Kloseb9621712010-04-24 17:59:49 +00009477 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9478$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009479
9480fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009481rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009482{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
9483$as_echo_n "checking for epoll... " >&6; }
9484cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009485/* end confdefs.h. */
9486#include <sys/epoll.h>
9487int
9488main ()
9489{
9490void *x=epoll_create
9491 ;
9492 return 0;
9493}
9494_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009495if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009496
Matthias Kloseb9621712010-04-24 17:59:49 +00009497$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009498
Matthias Kloseb159a552010-04-25 21:00:44 +00009499 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009500$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009501else
Matthias Kloseb9621712010-04-24 17:59:49 +00009502 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9503$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009504
9505fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009506rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009507{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
9508$as_echo_n "checking for kqueue... " >&6; }
9509cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009510/* end confdefs.h. */
9511
9512#include <sys/types.h>
9513#include <sys/event.h>
9514
9515int
9516main ()
9517{
9518int x=kqueue()
9519 ;
9520 return 0;
9521}
9522_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009523if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009524
Matthias Kloseb9621712010-04-24 17:59:49 +00009525$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009526
Matthias Kloseb159a552010-04-25 21:00:44 +00009527 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009528$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009529else
Matthias Kloseb9621712010-04-24 17:59:49 +00009530 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9531$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009532
9533fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009534rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +00009535# On some systems (eg. FreeBSD 5), we would find a definition of the
9536# functions ctermid_r, setgroups in the library, but no prototype
9537# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
9538# address to avoid compiler warnings and potential miscompilations
9539# because of the missing prototypes.
9540
Matthias Kloseb9621712010-04-24 17:59:49 +00009541{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
9542$as_echo_n "checking for ctermid_r... " >&6; }
9543cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009544/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +00009545
Martin v. Löwisd5843682002-11-21 20:41:28 +00009546#include <stdio.h>
9547
Martin v. Löwisd5843682002-11-21 20:41:28 +00009548int
9549main ()
9550{
9551void* p = ctermid_r
9552 ;
9553 return 0;
9554}
9555_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009556if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +00009557
Matthias Kloseb9621712010-04-24 17:59:49 +00009558$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +00009559
Matthias Kloseb159a552010-04-25 21:00:44 +00009560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009561$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009562else
Matthias Kloseb9621712010-04-24 17:59:49 +00009563 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9564$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009565
9566fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009567rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9568
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009569{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
9570$as_echo_n "checking for flock declaration... " >&6; }
9571if test "${ac_cv_flock_decl+set}" = set; then :
9572 $as_echo_n "(cached) " >&6
9573else
9574 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009575/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009576#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009577int
9578main ()
9579{
9580void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009581
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009582 ;
9583 return 0;
9584}
9585_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009586if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009587 ac_cv_flock_decl=yes
9588else
9589 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009590
9591fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009592rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +00009593
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009594fi
9595{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
9596$as_echo "$ac_cv_flock_decl" >&6; }
9597if test "x${ac_cv_flock_decl}" = xyes; then
9598 for ac_func in flock
9599do :
9600 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
9601if test "x$ac_cv_func_flock" = x""yes; then :
9602 cat >>confdefs.h <<_ACEOF
9603#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +00009604_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009605
Antoine Pitroua3000072010-09-07 14:52:42 +00009606else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009607 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +00009608$as_echo_n "checking for flock in -lbsd... " >&6; }
9609if test "${ac_cv_lib_bsd_flock+set}" = set; then :
9610 $as_echo_n "(cached) " >&6
9611else
9612 ac_check_lib_save_LIBS=$LIBS
9613LIBS="-lbsd $LIBS"
9614cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9615/* end confdefs.h. */
9616
9617/* Override any GCC internal prototype to avoid an error.
9618 Use char because int might match the return type of a GCC
9619 builtin and then its argument prototype would still apply. */
9620#ifdef __cplusplus
9621extern "C"
9622#endif
9623char flock ();
9624int
9625main ()
9626{
9627return flock ();
9628 ;
9629 return 0;
9630}
9631_ACEOF
9632if ac_fn_c_try_link "$LINENO"; then :
9633 ac_cv_lib_bsd_flock=yes
9634else
9635 ac_cv_lib_bsd_flock=no
9636fi
9637rm -f core conftest.err conftest.$ac_objext \
9638 conftest$ac_exeext conftest.$ac_ext
9639LIBS=$ac_check_lib_save_LIBS
9640fi
9641{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
9642$as_echo "$ac_cv_lib_bsd_flock" >&6; }
9643if test "x$ac_cv_lib_bsd_flock" = x""yes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009644 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +00009645
9646
9647$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
9648
9649
9650fi
9651
9652
9653fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009654done
9655
Antoine Pitroua3000072010-09-07 14:52:42 +00009656fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009657
Matthias Kloseb9621712010-04-24 17:59:49 +00009658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
9659$as_echo_n "checking for getpagesize... " >&6; }
9660cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009661/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009662
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009663#include <unistd.h>
9664
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009665int
9666main ()
9667{
9668void* p = getpagesize
9669 ;
9670 return 0;
9671}
9672_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009673if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009674
Matthias Kloseb9621712010-04-24 17:59:49 +00009675$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009676
Matthias Kloseb159a552010-04-25 21:00:44 +00009677 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009678$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009679else
Matthias Kloseb9621712010-04-24 17:59:49 +00009680 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9681$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009682
9683fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009684rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009685
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009686for ac_prog in true
9687do
9688 # Extract the first word of "$ac_prog", so it can be a program name with args.
9689set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00009690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9691$as_echo_n "checking for $ac_word... " >&6; }
9692if test "${ac_cv_prog_TRUE+set}" = set; then :
9693 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009694else
9695 if test -n "$TRUE"; then
9696 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
9697else
9698as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9699for as_dir in $PATH
9700do
9701 IFS=$as_save_IFS
9702 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009703 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009704 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 +00009705 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00009706 $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 +00009707 break 2
9708 fi
9709done
Matthias Kloseb9621712010-04-24 17:59:49 +00009710 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009711IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009712
9713fi
9714fi
9715TRUE=$ac_cv_prog_TRUE
9716if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009717 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
9718$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009719else
Matthias Kloseb9621712010-04-24 17:59:49 +00009720 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9721$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009722fi
9723
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009724
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009725 test -n "$TRUE" && break
9726done
9727test -n "$TRUE" || TRUE="/bin/true"
9728
9729
Matthias Kloseb9621712010-04-24 17:59:49 +00009730{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
9731$as_echo_n "checking for inet_aton in -lc... " >&6; }
9732if test "${ac_cv_lib_c_inet_aton+set}" = set; then :
9733 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009734else
9735 ac_check_lib_save_LIBS=$LIBS
9736LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009737cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009738/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009739
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009740/* Override any GCC internal prototype to avoid an error.
9741 Use char because int might match the return type of a GCC
9742 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009743#ifdef __cplusplus
9744extern "C"
9745#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009746char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009747int
9748main ()
9749{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009750return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009751 ;
9752 return 0;
9753}
9754_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009755if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009756 ac_cv_lib_c_inet_aton=yes
9757else
Matthias Kloseb9621712010-04-24 17:59:49 +00009758 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009759fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009760rm -f core conftest.err conftest.$ac_objext \
9761 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009762LIBS=$ac_check_lib_save_LIBS
9763fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009764{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
9765$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
9766if test "x$ac_cv_lib_c_inet_aton" = x""yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009767 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009768else
Matthias Kloseb9621712010-04-24 17:59:49 +00009769 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
9770$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
9771if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then :
9772 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009773else
9774 ac_check_lib_save_LIBS=$LIBS
9775LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009776cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009777/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009778
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009779/* Override any GCC internal prototype to avoid an error.
9780 Use char because int might match the return type of a GCC
9781 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009782#ifdef __cplusplus
9783extern "C"
9784#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009785char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009786int
9787main ()
9788{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009789return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009790 ;
9791 return 0;
9792}
9793_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009794if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009795 ac_cv_lib_resolv_inet_aton=yes
9796else
Matthias Kloseb9621712010-04-24 17:59:49 +00009797 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009798fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009799rm -f core conftest.err conftest.$ac_objext \
9800 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009801LIBS=$ac_check_lib_save_LIBS
9802fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009803{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
9804$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
9805if test "x$ac_cv_lib_resolv_inet_aton" = x""yes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009806 cat >>confdefs.h <<_ACEOF
9807#define HAVE_LIBRESOLV 1
9808_ACEOF
9809
9810 LIBS="-lresolv $LIBS"
9811
9812fi
9813
9814
9815fi
9816
9817
Christian Heimesd0764e22007-12-04 15:00:33 +00009818# On Tru64, chflags seems to be present, but calling it will
9819# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +00009820{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
9821$as_echo_n "checking for chflags... " >&6; }
9822if test "${ac_cv_have_chflags+set}" = set; then :
9823 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009824else
Matthias Kloseb9621712010-04-24 17:59:49 +00009825 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009826 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +00009827else
Matthias Kloseb9621712010-04-24 17:59:49 +00009828 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +00009829/* end confdefs.h. */
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009830[
Christian Heimesd0764e22007-12-04 15:00:33 +00009831#include <sys/stat.h>
9832#include <unistd.h>
9833int main(int argc, char*argv[])
9834{
9835 if(chflags(argv[0], 0) != 0)
9836 return 1;
9837 return 0;
9838}
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009839]
Christian Heimesd0764e22007-12-04 15:00:33 +00009840_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009841if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009842 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009843else
Matthias Kloseb9621712010-04-24 17:59:49 +00009844 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009845fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009846rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9847 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009848fi
9849
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009850
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009851fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009852{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
9853$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009854if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009855 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
9856if test "x$ac_cv_func_chflags" = x""yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009857 ac_cv_have_chflags="yes"
9858else
9859 ac_cv_have_chflags="no"
9860fi
9861
9862fi
9863if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009864
Matthias Kloseb9621712010-04-24 17:59:49 +00009865$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009866
9867fi
9868
Matthias Kloseb9621712010-04-24 17:59:49 +00009869{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
9870$as_echo_n "checking for lchflags... " >&6; }
9871if test "${ac_cv_have_lchflags+set}" = set; then :
9872 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009873else
Matthias Kloseb9621712010-04-24 17:59:49 +00009874 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009875 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +00009876else
Matthias Kloseb9621712010-04-24 17:59:49 +00009877 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +00009878/* end confdefs.h. */
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009879[
Christian Heimesd0764e22007-12-04 15:00:33 +00009880#include <sys/stat.h>
9881#include <unistd.h>
9882int main(int argc, char*argv[])
9883{
9884 if(lchflags(argv[0], 0) != 0)
9885 return 1;
9886 return 0;
9887}
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009888]
Christian Heimesd0764e22007-12-04 15:00:33 +00009889_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009890if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009891 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009892else
Matthias Kloseb9621712010-04-24 17:59:49 +00009893 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +00009894fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009895rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9896 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009897fi
9898
9899
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009900fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009901{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
9902$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009903if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009904 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
9905if test "x$ac_cv_func_lchflags" = x""yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009906 ac_cv_have_lchflags="yes"
9907else
9908 ac_cv_have_lchflags="no"
9909fi
9910
9911fi
9912if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009913
Matthias Kloseb9621712010-04-24 17:59:49 +00009914$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009915
9916fi
9917
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009918case $ac_sys_system/$ac_sys_release in
9919Darwin/*)
9920 _CUR_CFLAGS="${CFLAGS}"
9921 _CUR_LDFLAGS="${LDFLAGS}"
9922 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
9923 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
9924 ;;
9925esac
9926
Matthias Kloseb9621712010-04-24 17:59:49 +00009927{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
9928$as_echo_n "checking for inflateCopy in -lz... " >&6; }
9929if test "${ac_cv_lib_z_inflateCopy+set}" = set; then :
9930 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009931else
9932 ac_check_lib_save_LIBS=$LIBS
9933LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009934cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009935/* end confdefs.h. */
9936
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009937/* Override any GCC internal prototype to avoid an error.
9938 Use char because int might match the return type of a GCC
9939 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009940#ifdef __cplusplus
9941extern "C"
9942#endif
9943char inflateCopy ();
9944int
9945main ()
9946{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009947return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009948 ;
9949 return 0;
9950}
9951_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009952if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009953 ac_cv_lib_z_inflateCopy=yes
9954else
Matthias Kloseb9621712010-04-24 17:59:49 +00009955 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009956fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009957rm -f core conftest.err conftest.$ac_objext \
9958 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009959LIBS=$ac_check_lib_save_LIBS
9960fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009961{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
9962$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
9963if test "x$ac_cv_lib_z_inflateCopy" = x""yes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009964
Matthias Kloseb9621712010-04-24 17:59:49 +00009965$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009966
9967fi
9968
9969
9970case $ac_sys_system/$ac_sys_release in
9971Darwin/*)
9972 CFLAGS="${_CUR_CFLAGS}"
9973 LDFLAGS="${_CUR_LDFLAGS}"
9974 ;;
9975esac
9976
Matthias Kloseb9621712010-04-24 17:59:49 +00009977{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
9978$as_echo_n "checking for hstrerror... " >&6; }
9979cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009980/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +00009981
Martin v. Löwise9416172003-05-03 10:12:45 +00009982#include <netdb.h>
9983
Martin v. Löwise9416172003-05-03 10:12:45 +00009984int
9985main ()
9986{
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009987void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +00009988 ;
9989 return 0;
9990}
9991_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009992if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +00009993
Matthias Kloseb9621712010-04-24 17:59:49 +00009994$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +00009995
Matthias Kloseb159a552010-04-25 21:00:44 +00009996 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009997$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +00009998else
Matthias Kloseb9621712010-04-24 17:59:49 +00009999 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10000$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010001
10002fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010003rm -f core conftest.err conftest.$ac_objext \
10004 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010005
Matthias Kloseb9621712010-04-24 17:59:49 +000010006{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
10007$as_echo_n "checking for inet_aton... " >&6; }
10008cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010009/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010010
Martin v. Löwis86d66262006-02-17 08:40:11 +000010011#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010012#include <sys/socket.h>
10013#include <netinet/in.h>
10014#include <arpa/inet.h>
10015
Martin v. Löwise9416172003-05-03 10:12:45 +000010016int
10017main ()
10018{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010019void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010020 ;
10021 return 0;
10022}
10023_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010024if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010025
Matthias Kloseb9621712010-04-24 17:59:49 +000010026$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010027
Matthias Kloseb159a552010-04-25 21:00:44 +000010028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010029$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010030else
Matthias Kloseb9621712010-04-24 17:59:49 +000010031 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10032$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010033
10034fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010035rm -f core conftest.err conftest.$ac_objext \
10036 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010037
Matthias Kloseb9621712010-04-24 17:59:49 +000010038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
10039$as_echo_n "checking for inet_pton... " >&6; }
10040cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010041/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010042
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010043#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010044#include <sys/socket.h>
10045#include <netinet/in.h>
10046#include <arpa/inet.h>
10047
Martin v. Löwise9416172003-05-03 10:12:45 +000010048int
10049main ()
10050{
10051void* p = inet_pton
10052 ;
10053 return 0;
10054}
10055_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010056if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010057
Matthias Kloseb9621712010-04-24 17:59:49 +000010058$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010059
Matthias Kloseb159a552010-04-25 21:00:44 +000010060 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010061$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010062else
Matthias Kloseb9621712010-04-24 17:59:49 +000010063 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10064$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010065
10066fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010067rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000010068
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010069# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000010070{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
10071$as_echo_n "checking for setgroups... " >&6; }
10072cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010073/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010074
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010075#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010076#ifdef HAVE_GRP_H
10077#include <grp.h>
10078#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000010079
Martin v. Löwisd5843682002-11-21 20:41:28 +000010080int
10081main ()
10082{
10083void* p = setgroups
10084 ;
10085 return 0;
10086}
10087_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010088if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010089
Matthias Kloseb9621712010-04-24 17:59:49 +000010090$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010091
Matthias Kloseb159a552010-04-25 21:00:44 +000010092 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010093$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010094else
Matthias Kloseb9621712010-04-24 17:59:49 +000010095 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10096$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010097
10098fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010099rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010100
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010101# check for openpty and forkpty
10102
10103for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010104do :
10105 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
10106if test "x$ac_cv_func_openpty" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010107 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010108#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010109_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010110
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010111else
Matthias Kloseb9621712010-04-24 17:59:49 +000010112 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
10113$as_echo_n "checking for openpty in -lutil... " >&6; }
10114if test "${ac_cv_lib_util_openpty+set}" = set; then :
10115 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010116else
Martin v. Löwis11437992002-04-12 09:54:03 +000010117 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010118LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010119cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010120/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010121
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010122/* Override any GCC internal prototype to avoid an error.
10123 Use char because int might match the return type of a GCC
10124 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010125#ifdef __cplusplus
10126extern "C"
10127#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010128char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010129int
10130main ()
10131{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010132return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010133 ;
10134 return 0;
10135}
10136_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010137if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010138 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010139else
Matthias Kloseb9621712010-04-24 17:59:49 +000010140 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010141fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010142rm -f core conftest.err conftest.$ac_objext \
10143 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010144LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010145fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010146{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
10147$as_echo "$ac_cv_lib_util_openpty" >&6; }
10148if test "x$ac_cv_lib_util_openpty" = x""yes; then :
10149 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010150 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010151else
Matthias Kloseb9621712010-04-24 17:59:49 +000010152 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
10153$as_echo_n "checking for openpty in -lbsd... " >&6; }
10154if test "${ac_cv_lib_bsd_openpty+set}" = set; then :
10155 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010156else
10157 ac_check_lib_save_LIBS=$LIBS
10158LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010159cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010160/* end confdefs.h. */
10161
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010162/* Override any GCC internal prototype to avoid an error.
10163 Use char because int might match the return type of a GCC
10164 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010165#ifdef __cplusplus
10166extern "C"
10167#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010168char openpty ();
10169int
10170main ()
10171{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010172return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010173 ;
10174 return 0;
10175}
10176_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010177if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010178 ac_cv_lib_bsd_openpty=yes
10179else
Matthias Kloseb9621712010-04-24 17:59:49 +000010180 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010181fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010182rm -f core conftest.err conftest.$ac_objext \
10183 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010184LIBS=$ac_check_lib_save_LIBS
10185fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010186{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
10187$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
10188if test "x$ac_cv_lib_bsd_openpty" = x""yes; then :
10189 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010190 LIBS="$LIBS -lbsd"
10191fi
10192
10193
10194fi
10195
Fred Drake8cef4cf2000-06-28 16:40:38 +000010196
10197fi
10198done
10199
10200for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010201do :
10202 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
10203if test "x$ac_cv_func_forkpty" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010204 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010205#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010206_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010207
Fred Drake8cef4cf2000-06-28 16:40:38 +000010208else
Matthias Kloseb9621712010-04-24 17:59:49 +000010209 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
10210$as_echo_n "checking for forkpty in -lutil... " >&6; }
10211if test "${ac_cv_lib_util_forkpty+set}" = set; then :
10212 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010213else
Martin v. Löwis11437992002-04-12 09:54:03 +000010214 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010215LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010216cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010217/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010218
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010219/* Override any GCC internal prototype to avoid an error.
10220 Use char because int might match the return type of a GCC
10221 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010222#ifdef __cplusplus
10223extern "C"
10224#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010225char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010226int
10227main ()
10228{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010229return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010230 ;
10231 return 0;
10232}
10233_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010234if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010235 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010236else
Matthias Kloseb9621712010-04-24 17:59:49 +000010237 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010238fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010239rm -f core conftest.err conftest.$ac_objext \
10240 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010241LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010242fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010243{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
10244$as_echo "$ac_cv_lib_util_forkpty" >&6; }
10245if test "x$ac_cv_lib_util_forkpty" = x""yes; then :
10246 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010247 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010248else
Matthias Kloseb9621712010-04-24 17:59:49 +000010249 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
10250$as_echo_n "checking for forkpty in -lbsd... " >&6; }
10251if test "${ac_cv_lib_bsd_forkpty+set}" = set; then :
10252 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010253else
10254 ac_check_lib_save_LIBS=$LIBS
10255LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010256cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010257/* end confdefs.h. */
10258
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010259/* Override any GCC internal prototype to avoid an error.
10260 Use char because int might match the return type of a GCC
10261 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010262#ifdef __cplusplus
10263extern "C"
10264#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010265char forkpty ();
10266int
10267main ()
10268{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010269return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010270 ;
10271 return 0;
10272}
10273_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010274if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010275 ac_cv_lib_bsd_forkpty=yes
10276else
Matthias Kloseb9621712010-04-24 17:59:49 +000010277 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010278fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010279rm -f core conftest.err conftest.$ac_objext \
10280 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010281LIBS=$ac_check_lib_save_LIBS
10282fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010283{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
10284$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
10285if test "x$ac_cv_lib_bsd_forkpty" = x""yes; then :
10286 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010287 LIBS="$LIBS -lbsd"
10288fi
10289
10290
10291fi
10292
Fred Drake8cef4cf2000-06-28 16:40:38 +000010293
10294fi
10295done
10296
Jack Jansendd19cf82001-12-06 22:36:17 +000010297
Christian Heimesb186d002008-03-18 15:15:01 +000010298# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000010299for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000010300do :
10301 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
10302if test "x$ac_cv_func_memmove" = x""yes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000010303 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010304#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000010305_ACEOF
10306
10307fi
10308done
10309
10310
Michael W. Hudson54241132001-12-07 15:38:26 +000010311# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000010312for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000010313do :
10314 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10315ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Benjamin Petersond7f73e92010-09-05 00:09:07 +000010316eval as_val=\$$as_ac_var
10317 if test "x$as_val" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010318 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010319#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010320_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000010321
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010322fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000010323done
10324
Michael W. Hudson54241132001-12-07 15:38:26 +000010325
Benjamin Petersond7f73e92010-09-05 00:09:07 +000010326for ac_func in dup2 getcwd strdup
10327do :
10328 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10329ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10330eval as_val=\$$as_ac_var
10331 if test "x$as_val" = x""yes; then :
10332 cat >>confdefs.h <<_ACEOF
10333#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
10334_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000010335
Martin v. Löwis1142de32002-03-29 16:28:31 +000010336else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010337 case " $LIBOBJS " in
Benjamin Petersond7f73e92010-09-05 00:09:07 +000010338 *" $ac_func.$ac_objext "* ) ;;
10339 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010340 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010341esac
10342
Martin v. Löwis1142de32002-03-29 16:28:31 +000010343fi
Benjamin Petersond7f73e92010-09-05 00:09:07 +000010344done
Martin v. Löwis1142de32002-03-29 16:28:31 +000010345
10346
10347for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010348do :
10349 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
10350if test "x$ac_cv_func_getpgrp" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010351 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010352#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010353_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010354 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010355/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010356#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010357int
10358main ()
10359{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010360getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010361 ;
10362 return 0;
10363}
10364_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010365if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010366
Matthias Kloseb9621712010-04-24 17:59:49 +000010367$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010368
Guido van Rossum627b2d71993-12-24 10:39:16 +000010369fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010370rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010371
Guido van Rossum627b2d71993-12-24 10:39:16 +000010372fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010373done
Guido van Rossum627b2d71993-12-24 10:39:16 +000010374
Jack Jansen150753c2003-03-29 22:07:47 +000010375for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010376do :
10377 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
10378if test "x$ac_cv_func_setpgrp" = x""yes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000010379 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010380#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000010381_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010382 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010383/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000010384#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000010385int
10386main ()
10387{
10388setpgrp(0,0);
10389 ;
10390 return 0;
10391}
10392_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010393if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010394
Matthias Kloseb9621712010-04-24 17:59:49 +000010395$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010396
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010397fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010398rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000010399
10400fi
10401done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010402
Thomas Wouters3a584202000-08-05 23:28:51 +000010403for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000010404do :
10405 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
10406if test "x$ac_cv_func_gettimeofday" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010407 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010408#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010409_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010410 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010411/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010412#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010413int
10414main ()
10415{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010416gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010417 ;
10418 return 0;
10419}
10420_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010421if ac_fn_c_try_compile "$LINENO"; then :
10422
Guido van Rossum627b2d71993-12-24 10:39:16 +000010423else
Skip Montanaro6dead952003-09-25 14:50:04 +000010424
Matthias Kloseb9621712010-04-24 17:59:49 +000010425$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010426
Martin v. Löwis11437992002-04-12 09:54:03 +000010427
Guido van Rossum627b2d71993-12-24 10:39:16 +000010428fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010429rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010430
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010431fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010432done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010433
Michael W. Hudson54241132001-12-07 15:38:26 +000010434
Matthias Kloseb9621712010-04-24 17:59:49 +000010435{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
10436$as_echo_n "checking for major... " >&6; }
10437cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010438/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010439
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010440#if defined(MAJOR_IN_MKDEV)
10441#include <sys/mkdev.h>
10442#elif defined(MAJOR_IN_SYSMACROS)
10443#include <sys/sysmacros.h>
10444#else
10445#include <sys/types.h>
10446#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010447
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010448int
10449main ()
10450{
10451
10452 makedev(major(0),minor(0));
10453
10454 ;
10455 return 0;
10456}
10457_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010458if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010459
10460
Matthias Kloseb9621712010-04-24 17:59:49 +000010461$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010462
Matthias Kloseb9621712010-04-24 17:59:49 +000010463 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10464$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010465
10466else
Skip Montanaro6dead952003-09-25 14:50:04 +000010467
Matthias Kloseb9621712010-04-24 17:59:49 +000010468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10469$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010470
10471fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010472rm -f core conftest.err conftest.$ac_objext \
10473 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010474
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010475# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000010476# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000010477{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
10478$as_echo_n "checking for getaddrinfo... " >&6; }
10479cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010480/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010481
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010482#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010483#include <sys/socket.h>
10484#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010485#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010486
Martin v. Löwis11437992002-04-12 09:54:03 +000010487int
10488main ()
10489{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010490getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000010491 ;
10492 return 0;
10493}
10494_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010495if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010496 have_getaddrinfo=yes
10497else
Matthias Kloseb9621712010-04-24 17:59:49 +000010498 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010499fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010500rm -f core conftest.err conftest.$ac_objext \
10501 conftest$ac_exeext conftest.$ac_ext
10502{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
10503$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010504if test $have_getaddrinfo = yes
10505then
Matthias Kloseb9621712010-04-24 17:59:49 +000010506 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
10507$as_echo_n "checking getaddrinfo bug... " >&6; }
10508 if test "${ac_cv_buggy_getaddrinfo+set}" = set; then :
10509 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010510else
Matthias Kloseb9621712010-04-24 17:59:49 +000010511 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010512 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010513else
Matthias Kloseb9621712010-04-24 17:59:49 +000010514 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010515/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010516
10517#include <sys/types.h>
10518#include <netdb.h>
10519#include <string.h>
10520#include <sys/socket.h>
10521#include <netinet/in.h>
10522
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010523int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010524{
10525 int passive, gaierr, inet4 = 0, inet6 = 0;
10526 struct addrinfo hints, *ai, *aitop;
10527 char straddr[INET6_ADDRSTRLEN], strport[16];
10528
10529 for (passive = 0; passive <= 1; passive++) {
10530 memset(&hints, 0, sizeof(hints));
10531 hints.ai_family = AF_UNSPEC;
10532 hints.ai_flags = passive ? AI_PASSIVE : 0;
10533 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000010534 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010535 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
10536 (void)gai_strerror(gaierr);
10537 goto bad;
10538 }
10539 for (ai = aitop; ai; ai = ai->ai_next) {
10540 if (ai->ai_addr == NULL ||
10541 ai->ai_addrlen == 0 ||
10542 getnameinfo(ai->ai_addr, ai->ai_addrlen,
10543 straddr, sizeof(straddr), strport, sizeof(strport),
10544 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
10545 goto bad;
10546 }
10547 switch (ai->ai_family) {
10548 case AF_INET:
10549 if (strcmp(strport, "54321") != 0) {
10550 goto bad;
10551 }
10552 if (passive) {
10553 if (strcmp(straddr, "0.0.0.0") != 0) {
10554 goto bad;
10555 }
10556 } else {
10557 if (strcmp(straddr, "127.0.0.1") != 0) {
10558 goto bad;
10559 }
10560 }
10561 inet4++;
10562 break;
10563 case AF_INET6:
10564 if (strcmp(strport, "54321") != 0) {
10565 goto bad;
10566 }
10567 if (passive) {
10568 if (strcmp(straddr, "::") != 0) {
10569 goto bad;
10570 }
10571 } else {
10572 if (strcmp(straddr, "::1") != 0) {
10573 goto bad;
10574 }
10575 }
10576 inet6++;
10577 break;
10578 case AF_UNSPEC:
10579 goto bad;
10580 break;
10581 default:
10582 /* another family support? */
10583 break;
10584 }
10585 }
10586 }
10587
10588 if (!(inet4 == 0 || inet4 == 2))
10589 goto bad;
10590 if (!(inet6 == 0 || inet6 == 2))
10591 goto bad;
10592
10593 if (aitop)
10594 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010595 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010596
10597 bad:
10598 if (aitop)
10599 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010600 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010601}
10602
Martin v. Löwis11437992002-04-12 09:54:03 +000010603_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010604if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010605 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010606else
Matthias Kloseb9621712010-04-24 17:59:49 +000010607 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010608fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010609rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10610 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010611fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010612
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010613fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010614
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010615fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010616
Mark Dickinson2df5d282009-12-31 21:22:50 +000010617if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010618then
10619 if test $ipv6 = yes
10620 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010621 echo 'Fatal: You must get working getaddrinfo() function.'
10622 echo ' or you can specify "--disable-ipv6"'.
10623 exit 1
10624 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010625else
Martin v. Löwis11437992002-04-12 09:54:03 +000010626
Matthias Kloseb9621712010-04-24 17:59:49 +000010627$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010628
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010629fi
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010630for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000010631do :
10632 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
10633if test "x$ac_cv_func_getnameinfo" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010634 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010635#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010636_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010637
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010638fi
10639done
10640
Michael W. Hudson54241132001-12-07 15:38:26 +000010641
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010642# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000010643{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
10644$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
10645if test "${ac_cv_header_time+set}" = set; then :
10646 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010647else
Matthias Kloseb9621712010-04-24 17:59:49 +000010648 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010649/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010650#include <sys/types.h>
10651#include <sys/time.h>
10652#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010653
Martin v. Löwis11437992002-04-12 09:54:03 +000010654int
10655main ()
10656{
10657if ((struct tm *) 0)
10658return 0;
10659 ;
10660 return 0;
10661}
10662_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010663if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010664 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000010665else
Matthias Kloseb9621712010-04-24 17:59:49 +000010666 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010667fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010668rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010669fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010670{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
10671$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010672if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010673
Matthias Kloseb9621712010-04-24 17:59:49 +000010674$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010675
10676fi
10677
Matthias Kloseb9621712010-04-24 17:59:49 +000010678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
10679$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
10680if test "${ac_cv_struct_tm+set}" = set; then :
10681 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010682else
Matthias Kloseb9621712010-04-24 17:59:49 +000010683 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010684/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010685#include <sys/types.h>
10686#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010687
Martin v. Löwis11437992002-04-12 09:54:03 +000010688int
10689main ()
10690{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010691struct tm tm;
10692 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000010693 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000010694 ;
10695 return 0;
10696}
10697_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010698if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010699 ac_cv_struct_tm=time.h
10700else
Matthias Kloseb9621712010-04-24 17:59:49 +000010701 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010702fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010703rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010704fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010705{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
10706$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010707if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010708
Matthias Kloseb9621712010-04-24 17:59:49 +000010709$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010710
10711fi
10712
Matthias Kloseb9621712010-04-24 17:59:49 +000010713ac_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 +000010714#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000010715
Matthias Kloseb9621712010-04-24 17:59:49 +000010716"
10717if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010718
10719cat >>confdefs.h <<_ACEOF
10720#define HAVE_STRUCT_TM_TM_ZONE 1
10721_ACEOF
10722
10723
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010724fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010725
Martin v. Löwis11437992002-04-12 09:54:03 +000010726if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
10727
Matthias Kloseb9621712010-04-24 17:59:49 +000010728$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010729
10730else
Matthias Kloseb9621712010-04-24 17:59:49 +000010731 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
10732"
10733if test "x$ac_cv_have_decl_tzname" = x""yes; then :
10734 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010735else
Matthias Kloseb9621712010-04-24 17:59:49 +000010736 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010737fi
10738
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010739cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010740#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010741_ACEOF
10742
Matthias Kloseb9621712010-04-24 17:59:49 +000010743 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
10744$as_echo_n "checking for tzname... " >&6; }
10745if test "${ac_cv_var_tzname+set}" = set; then :
10746 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010747else
Matthias Kloseb9621712010-04-24 17:59:49 +000010748 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010749/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010750#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010751#if !HAVE_DECL_TZNAME
10752extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000010753#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010754
Martin v. Löwis11437992002-04-12 09:54:03 +000010755int
10756main ()
10757{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010758return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000010759 ;
10760 return 0;
10761}
10762_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010763if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010764 ac_cv_var_tzname=yes
10765else
Matthias Kloseb9621712010-04-24 17:59:49 +000010766 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010767fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010768rm -f core conftest.err conftest.$ac_objext \
10769 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000010770fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010771{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
10772$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010773 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010774
Matthias Kloseb9621712010-04-24 17:59:49 +000010775$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010776
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010777 fi
10778fi
10779
Matthias Kloseb9621712010-04-24 17:59:49 +000010780ac_fn_c_check_member "$LINENO" "struct stat" "st_rdev" "ac_cv_member_struct_stat_st_rdev" "$ac_includes_default"
10781if test "x$ac_cv_member_struct_stat_st_rdev" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010782
10783cat >>confdefs.h <<_ACEOF
10784#define HAVE_STRUCT_STAT_ST_RDEV 1
10785_ACEOF
10786
10787
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010788fi
10789
Matthias Kloseb9621712010-04-24 17:59:49 +000010790ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
10791if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000010792
Martin v. Löwis11437992002-04-12 09:54:03 +000010793cat >>confdefs.h <<_ACEOF
10794#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
10795_ACEOF
10796
10797
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010798fi
10799
Matthias Kloseb9621712010-04-24 17:59:49 +000010800ac_fn_c_check_member "$LINENO" "struct stat" "st_flags" "ac_cv_member_struct_stat_st_flags" "$ac_includes_default"
10801if test "x$ac_cv_member_struct_stat_st_flags" = x""yes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000010802
10803cat >>confdefs.h <<_ACEOF
10804#define HAVE_STRUCT_STAT_ST_FLAGS 1
10805_ACEOF
10806
10807
10808fi
10809
Matthias Kloseb9621712010-04-24 17:59:49 +000010810ac_fn_c_check_member "$LINENO" "struct stat" "st_gen" "ac_cv_member_struct_stat_st_gen" "$ac_includes_default"
10811if test "x$ac_cv_member_struct_stat_st_gen" = x""yes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000010812
10813cat >>confdefs.h <<_ACEOF
10814#define HAVE_STRUCT_STAT_ST_GEN 1
10815_ACEOF
10816
10817
10818fi
10819
Matthias Kloseb9621712010-04-24 17:59:49 +000010820ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtime" "ac_cv_member_struct_stat_st_birthtime" "$ac_includes_default"
10821if test "x$ac_cv_member_struct_stat_st_birthtime" = x""yes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000010822
10823cat >>confdefs.h <<_ACEOF
10824#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
10825_ACEOF
10826
10827
10828fi
10829
Matthias Kloseb9621712010-04-24 17:59:49 +000010830ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
10831if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000010832
Martin v. Löwis11437992002-04-12 09:54:03 +000010833cat >>confdefs.h <<_ACEOF
10834#define HAVE_STRUCT_STAT_ST_BLOCKS 1
10835_ACEOF
10836
10837
Matthias Kloseb9621712010-04-24 17:59:49 +000010838$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010839
10840else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010841 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000010842 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010843 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
10844 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010845esac
10846
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010847fi
10848
Michael W. Hudson54241132001-12-07 15:38:26 +000010849
Martin v. Löwis11437992002-04-12 09:54:03 +000010850
Matthias Kloseb9621712010-04-24 17:59:49 +000010851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
10852$as_echo_n "checking for time.h that defines altzone... " >&6; }
10853if test "${ac_cv_header_time_altzone+set}" = set; then :
10854 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010855else
Matthias Kloseb159a552010-04-25 21:00:44 +000010856
Matthias Kloseb9621712010-04-24 17:59:49 +000010857 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010858/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000010859#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010860int
10861main ()
10862{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010863return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000010864 ;
10865 return 0;
10866}
10867_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010868if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010869 ac_cv_header_time_altzone=yes
10870else
Matthias Kloseb9621712010-04-24 17:59:49 +000010871 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000010872fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010873rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000010874
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010875fi
10876
Matthias Kloseb9621712010-04-24 17:59:49 +000010877{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
10878$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010879if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010880
Matthias Kloseb9621712010-04-24 17:59:49 +000010881$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010882
10883fi
10884
Guido van Rossumda88dad1995-01-26 00:46:29 +000010885was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000010886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
10887$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
10888cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010889/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000010890
10891#include <sys/types.h>
10892#include <sys/select.h>
10893#include <sys/time.h>
10894
Martin v. Löwis11437992002-04-12 09:54:03 +000010895int
10896main ()
10897{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010898;
Martin v. Löwis11437992002-04-12 09:54:03 +000010899 ;
10900 return 0;
10901}
10902_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010903if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010904
10905
Matthias Kloseb9621712010-04-24 17:59:49 +000010906$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000010907
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010908 was_it_defined=yes
10909
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010910fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010911rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010912{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
10913$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010914
Matthias Kloseb9621712010-04-24 17:59:49 +000010915{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
10916$as_echo_n "checking for addrinfo... " >&6; }
10917if test "${ac_cv_struct_addrinfo+set}" = set; then :
10918 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010919else
Matthias Kloseb9621712010-04-24 17:59:49 +000010920 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010921/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010922#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010923int
10924main ()
10925{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010926struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000010927 ;
10928 return 0;
10929}
10930_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010931if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010932 ac_cv_struct_addrinfo=yes
10933else
Matthias Kloseb9621712010-04-24 17:59:49 +000010934 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010935fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010936rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10937fi
10938
Matthias Kloseb9621712010-04-24 17:59:49 +000010939{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
10940$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010941if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010942
Matthias Kloseb9621712010-04-24 17:59:49 +000010943$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010944
10945fi
10946
Matthias Kloseb9621712010-04-24 17:59:49 +000010947{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
10948$as_echo_n "checking for sockaddr_storage... " >&6; }
10949if test "${ac_cv_struct_sockaddr_storage+set}" = set; then :
10950 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010951else
Matthias Kloseb9621712010-04-24 17:59:49 +000010952 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010953/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010954
10955# include <sys/types.h>
10956# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010957int
10958main ()
10959{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010960struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000010961 ;
10962 return 0;
10963}
10964_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010965if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010966 ac_cv_struct_sockaddr_storage=yes
10967else
Matthias Kloseb9621712010-04-24 17:59:49 +000010968 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010969fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010970rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10971fi
10972
Matthias Kloseb9621712010-04-24 17:59:49 +000010973{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
10974$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010975if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010976
Matthias Kloseb9621712010-04-24 17:59:49 +000010977$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010978
10979fi
10980
Guido van Rossum627b2d71993-12-24 10:39:16 +000010981# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000010982
Matthias Kloseb9621712010-04-24 17:59:49 +000010983{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
10984$as_echo_n "checking whether char is unsigned... " >&6; }
10985if test "${ac_cv_c_char_unsigned+set}" = set; then :
10986 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000010987else
Matthias Kloseb9621712010-04-24 17:59:49 +000010988 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010989/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010990$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000010991int
10992main ()
10993{
10994static int test_array [1 - 2 * !(((char) -1) < 0)];
10995test_array [0] = 0
10996
10997 ;
10998 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000010999}
Martin v. Löwis11437992002-04-12 09:54:03 +000011000_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011001if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000011002 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011003else
Matthias Kloseb9621712010-04-24 17:59:49 +000011004 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011005fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011006rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011007fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011008{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
11009$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011010if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011011 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011012
11013fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000011014
Matthias Kloseb9621712010-04-24 17:59:49 +000011015{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
11016$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
11017if test "${ac_cv_c_const+set}" = set; then :
11018 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011019else
Matthias Kloseb9621712010-04-24 17:59:49 +000011020 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011021/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011022
Martin v. Löwis11437992002-04-12 09:54:03 +000011023int
11024main ()
11025{
11026/* FIXME: Include the comments suggested by Paul. */
11027#ifndef __cplusplus
11028 /* Ultrix mips cc rejects this. */
11029 typedef int charset[2];
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011030 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000011031 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011032 char const *const *pcpcc;
11033 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011034 /* NEC SVR4.0.2 mips cc rejects this. */
11035 struct point {int x, y;};
11036 static struct point const zero = {0,0};
11037 /* AIX XL C 1.02.0.0 rejects this.
11038 It does not let you subtract one const X* pointer from another in
11039 an arm of an if-expression whose if-part is not a constant
11040 expression */
11041 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011042 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011043 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011044 ++pcpcc;
11045 ppc = (char**) pcpcc;
11046 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011047 { /* SCO 3.2v4 cc rejects this. */
11048 char *t;
11049 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011050
Martin v. Löwis11437992002-04-12 09:54:03 +000011051 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011052 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011053 }
11054 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
11055 int x[] = {25, 17};
11056 const int *foo = &x[0];
11057 ++foo;
11058 }
11059 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11060 typedef const int *iptr;
11061 iptr p = 0;
11062 ++p;
11063 }
11064 { /* AIX XL C 1.02.0.0 rejects this saying
11065 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11066 struct s { int j; const int *ap[3]; };
11067 struct s *b; b->j = 5;
11068 }
11069 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11070 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011071 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011072 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011073 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000011074#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000011075
Martin v. Löwis11437992002-04-12 09:54:03 +000011076 ;
11077 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000011078}
Martin v. Löwis11437992002-04-12 09:54:03 +000011079_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011080if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011081 ac_cv_c_const=yes
11082else
Matthias Kloseb9621712010-04-24 17:59:49 +000011083 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011084fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011085rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011086fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011087{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
11088$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011089if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011090
Matthias Kloseb9621712010-04-24 17:59:49 +000011091$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011092
11093fi
11094
Michael W. Hudson54241132001-12-07 15:38:26 +000011095
Guido van Rossumda88dad1995-01-26 00:46:29 +000011096works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
11098$as_echo_n "checking for working volatile... " >&6; }
11099cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011100/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011101
Martin v. Löwis11437992002-04-12 09:54:03 +000011102int
11103main ()
11104{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011105volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011106 ;
11107 return 0;
11108}
11109_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011110if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011111 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011112else
Skip Montanaro6dead952003-09-25 14:50:04 +000011113
Matthias Kloseb9621712010-04-24 17:59:49 +000011114$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011115
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011116
Guido van Rossum627b2d71993-12-24 10:39:16 +000011117fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011118rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011119{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11120$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011121
Guido van Rossumda88dad1995-01-26 00:46:29 +000011122works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
11124$as_echo_n "checking for working signed char... " >&6; }
11125cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011126/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011127
Martin v. Löwis11437992002-04-12 09:54:03 +000011128int
11129main ()
11130{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011131signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000011132 ;
11133 return 0;
11134}
11135_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011136if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011137 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011138else
Skip Montanaro6dead952003-09-25 14:50:04 +000011139
Matthias Kloseb9621712010-04-24 17:59:49 +000011140$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000011141
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011142
Guido van Rossum7f43da71994-08-01 12:15:30 +000011143fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011144rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011145{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11146$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011147
Guido van Rossumda88dad1995-01-26 00:46:29 +000011148have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
11150$as_echo_n "checking for prototypes... " >&6; }
11151cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011152/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011153int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011154int
11155main ()
11156{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011157return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000011158 ;
11159 return 0;
11160}
11161_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011162if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011163
Matthias Kloseb9621712010-04-24 17:59:49 +000011164$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011165
Matthias Kloseb159a552010-04-25 21:00:44 +000011166 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011167fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011168rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011169{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
11170$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011171
Guido van Rossumda88dad1995-01-26 00:46:29 +000011172works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011173{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
11174$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
11175cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011176/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011177
11178#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000011179int foo(int x, ...) {
11180 va_list va;
11181 va_start(va, x);
11182 va_arg(va, int);
11183 va_arg(va, char *);
11184 va_arg(va, double);
11185 return 0;
11186}
Guido van Rossum7f43da71994-08-01 12:15:30 +000011187
Martin v. Löwis11437992002-04-12 09:54:03 +000011188int
11189main ()
11190{
Guido van Rossum90eea071996-08-30 20:58:57 +000011191return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000011192 ;
11193 return 0;
11194}
11195_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011196if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011197
11198
Matthias Kloseb9621712010-04-24 17:59:49 +000011199$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011200
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011201 works=yes
11202
Guido van Rossum627b2d71993-12-24 10:39:16 +000011203fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011204rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011205{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11206$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011207
Martin v. Löwisd6320502004-08-12 13:45:08 +000011208# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000011209{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
11210$as_echo_n "checking for socketpair... " >&6; }
11211cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011212/* end confdefs.h. */
11213
11214#include <sys/types.h>
11215#include <sys/socket.h>
11216
11217int
11218main ()
11219{
11220void *x=socketpair
11221 ;
11222 return 0;
11223}
11224_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011225if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000011226
Matthias Kloseb9621712010-04-24 17:59:49 +000011227$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000011228
Matthias Kloseb159a552010-04-25 21:00:44 +000011229 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011230$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011231else
Matthias Kloseb9621712010-04-24 17:59:49 +000011232 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11233$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011234
11235fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011236rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011237
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011238# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000011239{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
11240$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
11241cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011242/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011243#include <sys/types.h>
11244#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011245int
11246main ()
11247{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011248struct sockaddr x;
11249x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011250 ;
11251 return 0;
11252}
11253_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011254if ac_fn_c_try_compile "$LINENO"; then :
11255 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11256$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011257
Matthias Kloseb9621712010-04-24 17:59:49 +000011258$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011259
11260else
Matthias Kloseb9621712010-04-24 17:59:49 +000011261 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11262$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011263
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011264fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011265rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011266
Guido van Rossumda88dad1995-01-26 00:46:29 +000011267va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011268{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
11269$as_echo_n "checking whether va_list is an array... " >&6; }
11270cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011271/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011272
11273#ifdef HAVE_STDARG_PROTOTYPES
11274#include <stdarg.h>
11275#else
11276#include <varargs.h>
11277#endif
11278
Martin v. Löwis11437992002-04-12 09:54:03 +000011279int
11280main ()
11281{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011282va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000011283 ;
11284 return 0;
11285}
11286_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011287if ac_fn_c_try_compile "$LINENO"; then :
11288
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011289else
Skip Montanaro6dead952003-09-25 14:50:04 +000011290
Martin v. Löwis11437992002-04-12 09:54:03 +000011291
Matthias Kloseb9621712010-04-24 17:59:49 +000011292$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011293
Guido van Rossumda88dad1995-01-26 00:46:29 +000011294 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011295
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011296fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011297rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011298{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
11299$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011300
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011301# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000011302
11303
Matthias Kloseb9621712010-04-24 17:59:49 +000011304ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
11305if test "x$ac_cv_func_gethostbyname_r" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011306
Matthias Kloseb9621712010-04-24 17:59:49 +000011307 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000011308
Matthias Kloseb9621712010-04-24 17:59:49 +000011309 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
11310$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011311 OLD_CFLAGS=$CFLAGS
11312 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011313 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011314/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011315
11316# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011317
Martin v. Löwis11437992002-04-12 09:54:03 +000011318int
11319main ()
11320{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011321
11322 char *name;
11323 struct hostent *he, *res;
11324 char buffer[2048];
11325 int buflen = 2048;
11326 int h_errnop;
11327
11328 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011329
11330 ;
11331 return 0;
11332}
11333_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011334if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011335
Matthias Kloseb9621712010-04-24 17:59:49 +000011336 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011337
Martin v. Löwis11437992002-04-12 09:54:03 +000011338
Matthias Kloseb9621712010-04-24 17:59:49 +000011339$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011340
Matthias Kloseb9621712010-04-24 17:59:49 +000011341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11342$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011343
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011344else
Skip Montanaro6dead952003-09-25 14:50:04 +000011345
Matthias Kloseb9621712010-04-24 17:59:49 +000011346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11347$as_echo "no" >&6; }
11348 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
11349$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
11350 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011351/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011352
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011353# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011354
Martin v. Löwis11437992002-04-12 09:54:03 +000011355int
11356main ()
11357{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011358
11359 char *name;
11360 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000011361 char buffer[2048];
11362 int buflen = 2048;
11363 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011364
Matthias Kloseb159a552010-04-25 21:00:44 +000011365 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011366
11367 ;
11368 return 0;
11369}
11370_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011371if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011372
Matthias Kloseb9621712010-04-24 17:59:49 +000011373 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011374
Martin v. Löwis11437992002-04-12 09:54:03 +000011375
Matthias Kloseb159a552010-04-25 21:00:44 +000011376$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011377
Matthias Kloseb9621712010-04-24 17:59:49 +000011378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11379$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011380
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011381else
Skip Montanaro6dead952003-09-25 14:50:04 +000011382
Matthias Kloseb9621712010-04-24 17:59:49 +000011383 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11384$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011385 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
11386$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
11387 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11388/* end confdefs.h. */
11389
11390# include <netdb.h>
11391
11392int
11393main ()
11394{
11395
11396 char *name;
11397 struct hostent *he;
11398 struct hostent_data data;
11399
11400 (void) gethostbyname_r(name, he, &data);
11401
11402 ;
11403 return 0;
11404}
11405_ACEOF
11406if ac_fn_c_try_compile "$LINENO"; then :
11407
11408 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
11409
11410
11411$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
11412
11413 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11414$as_echo "yes" >&6; }
11415
11416else
11417
11418 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11419$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011420
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011421fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011422rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011423
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011424fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011425rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011426
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011427fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011428rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011429 CFLAGS=$OLD_CFLAGS
11430
11431else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011432
Matthias Kloseb9621712010-04-24 17:59:49 +000011433 for ac_func in gethostbyname
11434do :
11435 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
11436if test "x$ac_cv_func_gethostbyname" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011437 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011438#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011439_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011440
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011441fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011442done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011443
Michael W. Hudson54241132001-12-07 15:38:26 +000011444
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011445fi
11446
Michael W. Hudson54241132001-12-07 15:38:26 +000011447
11448
11449
11450
11451
11452
Guido van Rossum627b2d71993-12-24 10:39:16 +000011453# checks for system services
11454# (none yet)
11455
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011456# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000011457ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
11458if test "x$ac_cv_func___fpu_control" = x""yes; then :
11459
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011460else
Matthias Kloseb9621712010-04-24 17:59:49 +000011461 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
11462$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
11463if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then :
11464 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011465else
Martin v. Löwis11437992002-04-12 09:54:03 +000011466 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011467LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011468cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011469/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011470
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011471/* Override any GCC internal prototype to avoid an error.
11472 Use char because int might match the return type of a GCC
11473 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011474#ifdef __cplusplus
11475extern "C"
11476#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011477char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011478int
11479main ()
11480{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011481return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011482 ;
11483 return 0;
11484}
11485_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011486if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011487 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011488else
Matthias Kloseb9621712010-04-24 17:59:49 +000011489 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011490fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011491rm -f core conftest.err conftest.$ac_objext \
11492 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011493LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011494fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011495{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
11496$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
11497if test "x$ac_cv_lib_ieee___fpu_control" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011498 cat >>confdefs.h <<_ACEOF
11499#define HAVE_LIBIEEE 1
11500_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011501
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011502 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011503
Guido van Rossum627b2d71993-12-24 10:39:16 +000011504fi
11505
Michael W. Hudson54241132001-12-07 15:38:26 +000011506
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011507fi
11508
Michael W. Hudson54241132001-12-07 15:38:26 +000011509
Guido van Rossum7f253911997-05-09 02:42:48 +000011510# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000011511{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
11512$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011513
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011514# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011515if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011516 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000011517if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000011518then
11519
Matthias Kloseb9621712010-04-24 17:59:49 +000011520$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011521
Matthias Kloseb9621712010-04-24 17:59:49 +000011522 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11523$as_echo "yes" >&6; }
11524else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11525$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011526fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000011527else
Matthias Kloseb9621712010-04-24 17:59:49 +000011528 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11529$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011530fi
11531
Guido van Rossum7f253911997-05-09 02:42:48 +000011532
Guido van Rossum7f43da71994-08-01 12:15:30 +000011533# check for --with-libm=...
11534
Guido van Rossum563e7081996-09-10 18:20:48 +000011535case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000011536Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000011537*) LIBM=-lm
11538esac
Matthias Kloseb9621712010-04-24 17:59:49 +000011539{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
11540$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011541
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011542# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011543if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011544 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000011545if test "$withval" = no
11546then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000011547 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
11548$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011549elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011550then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000011551 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
11552$as_echo "set LIBM=\"$withval\"" >&6; }
Benjamin Petersond7f73e92010-09-05 00:09:07 +000011553else as_fn_error "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011554fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011555else
Matthias Kloseb9621712010-04-24 17:59:49 +000011556 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
11557$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011558fi
11559
Guido van Rossum7f43da71994-08-01 12:15:30 +000011560
11561# check for --with-libc=...
11562
Matthias Kloseb9621712010-04-24 17:59:49 +000011563{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
11564$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011565
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011566# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011567if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011568 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000011569if test "$withval" = no
11570then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000011571 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
11572$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011573elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011574then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000011575 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
11576$as_echo "set LIBC=\"$withval\"" >&6; }
Benjamin Petersond7f73e92010-09-05 00:09:07 +000011577else as_fn_error "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011578fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011579else
Matthias Kloseb9621712010-04-24 17:59:49 +000011580 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
11581$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011582fi
11583
Guido van Rossum7f43da71994-08-01 12:15:30 +000011584
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011585# **************************************************
11586# * Check for various properties of floating point *
11587# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011588
Matthias Kloseb9621712010-04-24 17:59:49 +000011589{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
11590$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
11591if test "${ac_cv_little_endian_double+set}" = set; then :
11592 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011593else
11594
Matthias Kloseb9621712010-04-24 17:59:49 +000011595if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011596 ac_cv_little_endian_double=no
11597else
Matthias Kloseb9621712010-04-24 17:59:49 +000011598 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011599/* end confdefs.h. */
11600
11601#include <string.h>
11602int main() {
11603 double x = 9006104071832581.0;
11604 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
11605 return 0;
11606 else
11607 return 1;
11608}
11609
11610_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011611if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011612 ac_cv_little_endian_double=yes
11613else
Matthias Kloseb9621712010-04-24 17:59:49 +000011614 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011615fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011616rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11617 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011618fi
11619
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011620fi
11621
Matthias Kloseb9621712010-04-24 17:59:49 +000011622{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
11623$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011624if test "$ac_cv_little_endian_double" = yes
11625then
11626
Matthias Kloseb9621712010-04-24 17:59:49 +000011627$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011628
11629fi
11630
Matthias Kloseb9621712010-04-24 17:59:49 +000011631{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
11632$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
11633if test "${ac_cv_big_endian_double+set}" = set; then :
11634 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011635else
11636
Matthias Kloseb9621712010-04-24 17:59:49 +000011637if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011638 ac_cv_big_endian_double=no
11639else
Matthias Kloseb9621712010-04-24 17:59:49 +000011640 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011641/* end confdefs.h. */
11642
11643#include <string.h>
11644int main() {
11645 double x = 9006104071832581.0;
11646 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
11647 return 0;
11648 else
11649 return 1;
11650}
11651
11652_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011653if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011654 ac_cv_big_endian_double=yes
11655else
Matthias Kloseb9621712010-04-24 17:59:49 +000011656 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011657fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011658rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11659 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011660fi
11661
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011662fi
11663
Matthias Kloseb9621712010-04-24 17:59:49 +000011664{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
11665$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011666if test "$ac_cv_big_endian_double" = yes
11667then
11668
Matthias Kloseb9621712010-04-24 17:59:49 +000011669$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011670
11671fi
11672
11673# Some ARM platforms use a mixed-endian representation for doubles.
11674# While Python doesn't currently have full support for these platforms
11675# (see e.g., issue 1762561), we can at least make sure that float <-> string
11676# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000011677{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
11678$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
11679if test "${ac_cv_mixed_endian_double+set}" = set; then :
11680 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011681else
11682
Matthias Kloseb9621712010-04-24 17:59:49 +000011683if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011684 ac_cv_mixed_endian_double=no
11685else
Matthias Kloseb9621712010-04-24 17:59:49 +000011686 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011687/* end confdefs.h. */
11688
11689#include <string.h>
11690int main() {
11691 double x = 9006104071832581.0;
11692 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
11693 return 0;
11694 else
11695 return 1;
11696}
11697
11698_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011699if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011700 ac_cv_mixed_endian_double=yes
11701else
Matthias Kloseb9621712010-04-24 17:59:49 +000011702 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011703fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011704rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11705 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011706fi
11707
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011708fi
11709
Matthias Kloseb9621712010-04-24 17:59:49 +000011710{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
11711$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011712if test "$ac_cv_mixed_endian_double" = yes
11713then
11714
Matthias Kloseb9621712010-04-24 17:59:49 +000011715$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011716
11717fi
11718
Mark Dickinson7abf8d42009-04-18 20:17:52 +000011719# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000011720# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000011721# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000011722# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011723# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000011724# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011725
11726# This inline assembler syntax may also work for suncc and icc,
11727# so we try it on all platforms.
11728
Matthias Kloseb9621712010-04-24 17:59:49 +000011729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
11730$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
11731cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011732/* end confdefs.h. */
11733
11734int
11735main ()
11736{
11737
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011738 unsigned short cw;
11739 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
11740 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011741
11742 ;
11743 return 0;
11744}
11745_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011746if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011747 have_gcc_asm_for_x87=yes
11748else
Matthias Kloseb9621712010-04-24 17:59:49 +000011749 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011750fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011751rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011752{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
11753$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011754if test "$have_gcc_asm_for_x87" = yes
11755then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011756
Matthias Kloseb9621712010-04-24 17:59:49 +000011757$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011758
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011759fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011760
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011761# Detect whether system arithmetic is subject to x87-style double
11762# rounding issues. The result of this test has little meaning on non
11763# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
11764# mode is round-to-nearest and double rounding issues are present, and
11765# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000011766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
11767$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011768# $BASECFLAGS may affect the result
11769ac_save_cc="$CC"
11770CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011771if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011772 ac_cv_x87_double_rounding=no
11773else
Matthias Kloseb9621712010-04-24 17:59:49 +000011774 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011775/* end confdefs.h. */
11776
11777#include <stdlib.h>
11778#include <math.h>
11779int main() {
11780 volatile double x, y, z;
11781 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
11782 x = 0.99999999999999989; /* 1-2**-53 */
11783 y = 1./x;
11784 if (y != 1.)
11785 exit(0);
11786 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
11787 x = 1e16;
11788 y = 2.99999;
11789 z = x + y;
11790 if (z != 1e16+4.)
11791 exit(0);
11792 /* both tests show evidence of double rounding */
11793 exit(1);
11794}
11795
11796_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011797if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011798 ac_cv_x87_double_rounding=no
11799else
Matthias Kloseb9621712010-04-24 17:59:49 +000011800 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011801fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011802rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11803 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011804fi
11805
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011806CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000011807{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
11808$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011809if test "$ac_cv_x87_double_rounding" = yes
11810then
11811
Matthias Kloseb9621712010-04-24 17:59:49 +000011812$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011813
11814fi
11815
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011816# ************************************
11817# * Check for mathematical functions *
11818# ************************************
11819
11820LIBS_SAVE=$LIBS
11821LIBS="$LIBS $LIBM"
11822
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011823# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
11824# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000011825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
11826$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
11827if test "${ac_cv_tanh_preserves_zero_sign+set}" = set; then :
11828 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011829else
11830
Matthias Kloseb9621712010-04-24 17:59:49 +000011831if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011832 ac_cv_tanh_preserves_zero_sign=no
11833else
Matthias Kloseb9621712010-04-24 17:59:49 +000011834 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011835/* end confdefs.h. */
11836
11837#include <math.h>
11838#include <stdlib.h>
11839int main() {
11840 /* return 0 if either negative zeros don't exist
11841 on this platform or if negative zeros exist
11842 and tanh(-0.) == -0. */
11843 if (atan2(0., -1.) == atan2(-0., -1.) ||
11844 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
11845 else exit(1);
11846}
11847
11848_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011849if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011850 ac_cv_tanh_preserves_zero_sign=yes
11851else
Matthias Kloseb9621712010-04-24 17:59:49 +000011852 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011853fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011854rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11855 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011856fi
11857
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011858fi
11859
Matthias Kloseb9621712010-04-24 17:59:49 +000011860{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
11861$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011862if test "$ac_cv_tanh_preserves_zero_sign" = yes
11863then
11864
Matthias Kloseb9621712010-04-24 17:59:49 +000011865$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011866
11867fi
11868
Mark Dickinson9c113362009-09-05 10:36:23 +000011869for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
Matthias Kloseb9621712010-04-24 17:59:49 +000011870do :
11871 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11872ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Benjamin Petersond7f73e92010-09-05 00:09:07 +000011873eval as_val=\$$as_ac_var
11874 if test "x$as_val" = x""yes; then :
Mark Dickinson9c113362009-09-05 10:36:23 +000011875 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011876#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Mark Dickinson9c113362009-09-05 10:36:23 +000011877_ACEOF
11878
11879fi
11880done
11881
Mark Dickinson9c113362009-09-05 10:36:23 +000011882for ac_func in hypot lgamma log1p round tgamma
Matthias Kloseb9621712010-04-24 17:59:49 +000011883do :
11884 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11885ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Benjamin Petersond7f73e92010-09-05 00:09:07 +000011886eval as_val=\$$as_ac_var
11887 if test "x$as_val" = x""yes; then :
Christian Heimes99170a52007-12-19 02:07:34 +000011888 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011889#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimes99170a52007-12-19 02:07:34 +000011890_ACEOF
11891
11892fi
11893done
11894
Matthias Kloseb9621712010-04-24 17:59:49 +000011895ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
11896"
11897if test "x$ac_cv_have_decl_isinf" = x""yes; then :
11898 ac_have_decl=1
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011899else
Matthias Kloseb9621712010-04-24 17:59:49 +000011900 ac_have_decl=0
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011901fi
11902
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011903cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011904#define HAVE_DECL_ISINF $ac_have_decl
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011905_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011906ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
11907"
11908if test "x$ac_cv_have_decl_isnan" = x""yes; then :
11909 ac_have_decl=1
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011910else
Matthias Kloseb9621712010-04-24 17:59:49 +000011911 ac_have_decl=0
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011912fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011913
11914cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011915#define HAVE_DECL_ISNAN $ac_have_decl
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011916_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011917ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
11918"
11919if test "x$ac_cv_have_decl_isfinite" = x""yes; then :
11920 ac_have_decl=1
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011921else
Matthias Kloseb9621712010-04-24 17:59:49 +000011922 ac_have_decl=0
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011923fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011924
11925cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011926#define HAVE_DECL_ISFINITE $ac_have_decl
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011927_ACEOF
11928
11929
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000011930LIBS=$LIBS_SAVE
11931
Mark Dickinsona614f042009-11-28 12:48:43 +000011932# For multiprocessing module, check that sem_open
11933# actually works. For FreeBSD versions <= 7.2,
11934# the kernel module that provides POSIX semaphores
11935# isn't loaded by default, so an attempt to call
11936# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000011937{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
11938$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
11939if test "${ac_cv_posix_semaphores_enabled+set}" = set; then :
11940 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000011941else
Matthias Kloseb9621712010-04-24 17:59:49 +000011942 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000011943 ac_cv_posix_semaphores_enabled=yes
11944else
Matthias Kloseb9621712010-04-24 17:59:49 +000011945 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000011946/* end confdefs.h. */
11947
11948#include <unistd.h>
11949#include <fcntl.h>
11950#include <stdio.h>
11951#include <semaphore.h>
11952#include <sys/stat.h>
11953
11954int main(void) {
11955 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
11956 if (a == SEM_FAILED) {
11957 perror("sem_open");
11958 return 1;
11959 }
11960 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000011961 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000011962 return 0;
11963}
11964
11965_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011966if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000011967 ac_cv_posix_semaphores_enabled=yes
11968else
Matthias Kloseb9621712010-04-24 17:59:49 +000011969 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000011970fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011971rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11972 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000011973fi
11974
11975
Mark Dickinsona614f042009-11-28 12:48:43 +000011976fi
11977
Matthias Kloseb9621712010-04-24 17:59:49 +000011978{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
11979$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000011980if test $ac_cv_posix_semaphores_enabled = no
11981then
11982
Matthias Kloseb9621712010-04-24 17:59:49 +000011983$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000011984
11985fi
11986
Mark Dickinson10683072009-04-18 21:18:19 +000011987# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000011988{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
11989$as_echo_n "checking for broken sem_getvalue... " >&6; }
11990if test "${ac_cv_broken_sem_getvalue+set}" = set; then :
11991 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011992else
Matthias Kloseb9621712010-04-24 17:59:49 +000011993 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011994 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000011995else
Matthias Kloseb9621712010-04-24 17:59:49 +000011996 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000011997/* end confdefs.h. */
11998
11999#include <unistd.h>
12000#include <fcntl.h>
12001#include <stdio.h>
12002#include <semaphore.h>
12003#include <sys/stat.h>
12004
12005int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000012006 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000012007 int count;
12008 int res;
12009 if(a==SEM_FAILED){
12010 perror("sem_open");
12011 return 1;
12012
12013 }
12014 res = sem_getvalue(a, &count);
12015 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000012016 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000012017 return res==-1 ? 1 : 0;
12018}
12019
Mark Dickinson10683072009-04-18 21:18:19 +000012020_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012021if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012022 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000012023else
Matthias Kloseb9621712010-04-24 17:59:49 +000012024 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012025fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012026rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12027 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012028fi
12029
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012030
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012031fi
12032
Matthias Kloseb9621712010-04-24 17:59:49 +000012033{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
12034$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012035if test $ac_cv_broken_sem_getvalue = yes
12036then
12037
Matthias Kloseb9621712010-04-24 17:59:49 +000012038$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012039
12040fi
12041
Mark Dickinsonbd792642009-03-18 20:06:12 +000012042# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000012043{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
12044$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012045# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012046if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000012047 enableval=$enable_big_digits; case $enable_big_digits in
12048yes)
12049 enable_big_digits=30 ;;
12050no)
12051 enable_big_digits=15 ;;
1205215|30)
12053 ;;
12054*)
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012055 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 +000012056esac
Matthias Kloseb9621712010-04-24 17:59:49 +000012057{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
12058$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012059
12060cat >>confdefs.h <<_ACEOF
12061#define PYLONG_BITS_IN_DIGIT $enable_big_digits
12062_ACEOF
12063
12064
12065else
Matthias Kloseb9621712010-04-24 17:59:49 +000012066 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
12067$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012068fi
12069
12070
Guido van Rossumef2255b2000-03-10 22:30:29 +000012071# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012072ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
12073if test "x$ac_cv_header_wchar_h" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012074
12075
Matthias Kloseb9621712010-04-24 17:59:49 +000012076$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012077
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012078 wchar_h="yes"
12079
Guido van Rossumef2255b2000-03-10 22:30:29 +000012080else
Martin v. Löwis11437992002-04-12 09:54:03 +000012081 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000012082
12083fi
12084
Michael W. Hudson54241132001-12-07 15:38:26 +000012085
Martin v. Löwis11437992002-04-12 09:54:03 +000012086
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012087# determine wchar_t size
12088if test "$wchar_h" = yes
12089then
Matthias Kloseb9621712010-04-24 17:59:49 +000012090 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012091# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12092# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12093# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000012094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
12095$as_echo_n "checking size of wchar_t... " >&6; }
12096if test "${ac_cv_sizeof_wchar_t+set}" = set; then :
12097 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012098else
Matthias Kloseb9621712010-04-24 17:59:49 +000012099 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
12100"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012101
Martin v. Löwis11437992002-04-12 09:54:03 +000012102else
Matthias Kloseb9621712010-04-24 17:59:49 +000012103 if test "$ac_cv_type_wchar_t" = yes; then
12104 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12105$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012106{ as_fn_set_status 77
12107as_fn_error "cannot compute sizeof (wchar_t)
12108See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012109 else
12110 ac_cv_sizeof_wchar_t=0
12111 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012112fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012113
Martin v. Löwis11437992002-04-12 09:54:03 +000012114fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012115{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
12116$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012117
12118
12119
Martin v. Löwis11437992002-04-12 09:54:03 +000012120cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012121#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012122_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012123
Michael W. Hudson54241132001-12-07 15:38:26 +000012124
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012125fi
12126
Matthias Kloseb9621712010-04-24 17:59:49 +000012127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
12128$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012129have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012130cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012131/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012132
12133#include <tcl.h>
12134#if TCL_UTF_MAX != 6
12135# error "NOT UCS4_TCL"
12136#endif
12137int
12138main ()
12139{
12140
12141 ;
12142 return 0;
12143}
12144_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012145if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012146
12147
Matthias Kloseb9621712010-04-24 17:59:49 +000012148$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012149
12150 have_ucs4_tcl=yes
12151
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012152fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012153rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012154{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
12155$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012156
Skip Montanaro6dead952003-09-25 14:50:04 +000012157# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012158if test "$wchar_h" = yes
12159then
12160 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000012161 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
12162$as_echo_n "checking whether wchar_t is signed... " >&6; }
12163 if test "${ac_cv_wchar_t_signed+set}" = set; then :
12164 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012165else
12166
Matthias Kloseb9621712010-04-24 17:59:49 +000012167 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012168 ac_cv_wchar_t_signed=yes
12169else
Matthias Kloseb9621712010-04-24 17:59:49 +000012170 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012171/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012172
12173 #include <wchar.h>
12174 int main()
12175 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000012176 /* Success: exit code 0 */
12177 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012178 }
12179
12180_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012181if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012182 ac_cv_wchar_t_signed=yes
12183else
Matthias Kloseb9621712010-04-24 17:59:49 +000012184 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012185fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012186rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12187 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012188fi
12189
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012190fi
12191
Matthias Kloseb9621712010-04-24 17:59:49 +000012192 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
12193$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012194fi
12195
Matthias Kloseb9621712010-04-24 17:59:49 +000012196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what type to use for str" >&5
12197$as_echo_n "checking what type to use for str... " >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000012198
12199# Check whether --with-wide-unicode was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012200if test "${with_wide_unicode+set}" = set; then :
Georg Brandl52d168a2008-01-07 18:10:24 +000012201 withval=$with_wide_unicode;
12202if test "$withval" != no
12203then unicode_size="4"
12204else unicode_size="2"
12205fi
12206
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012207else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012208
Georg Brandl52d168a2008-01-07 18:10:24 +000012209case "$have_ucs4_tcl" in
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012210 yes) unicode_size="4";;
Georg Brandl52d168a2008-01-07 18:10:24 +000012211 *) unicode_size="2" ;;
12212esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012213
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012214fi
12215
Martin v. Löwis0036cba2002-04-12 09:58:45 +000012216
12217
Georg Brandl52d168a2008-01-07 18:10:24 +000012218case "$unicode_size" in
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012219 4)
12220 $as_echo "#define Py_UNICODE_SIZE 4" >>confdefs.h
12221
12222 SOABI_QUALIFIERS="${SOABI_QUALIFIERS}u"
12223 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000012224 *) $as_echo "#define Py_UNICODE_SIZE 2" >>confdefs.h
Georg Brandl52d168a2008-01-07 18:10:24 +000012225 ;;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012226esac
12227
Michael W. Hudson54241132001-12-07 15:38:26 +000012228
Martin v. Löwis11437992002-04-12 09:54:03 +000012229
Georg Brandl52d168a2008-01-07 18:10:24 +000012230# wchar_t is only usable if it maps to an unsigned type
12231if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000012232 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000012233then
12234 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012235
Matthias Kloseb9621712010-04-24 17:59:49 +000012236$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012237
Matthias Kloseb9621712010-04-24 17:59:49 +000012238 $as_echo "#define PY_UNICODE_TYPE wchar_t" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012239
Georg Brandl52d168a2008-01-07 18:10:24 +000012240elif test "$ac_cv_sizeof_short" = "$unicode_size"
12241then
12242 PY_UNICODE_TYPE="unsigned short"
Matthias Kloseb9621712010-04-24 17:59:49 +000012243 $as_echo "#define PY_UNICODE_TYPE unsigned short" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012244
Georg Brandl52d168a2008-01-07 18:10:24 +000012245elif test "$ac_cv_sizeof_long" = "$unicode_size"
12246then
12247 PY_UNICODE_TYPE="unsigned long"
Matthias Kloseb9621712010-04-24 17:59:49 +000012248 $as_echo "#define PY_UNICODE_TYPE unsigned long" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012249
Georg Brandl52d168a2008-01-07 18:10:24 +000012250else
12251 PY_UNICODE_TYPE="no type found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012252fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012253{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PY_UNICODE_TYPE" >&5
12254$as_echo "$PY_UNICODE_TYPE" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000012255
12256# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000012257 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12258$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
12259if test "${ac_cv_c_bigendian+set}" = set; then :
12260 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000012261else
Matthias Kloseb9621712010-04-24 17:59:49 +000012262 ac_cv_c_bigendian=unknown
12263 # See if we're dealing with a universal compiler.
12264 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12265/* end confdefs.h. */
12266#ifndef __APPLE_CC__
12267 not a universal capable compiler
12268 #endif
12269 typedef int dummy;
12270
Skip Montanaro6dead952003-09-25 14:50:04 +000012271_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012272if ac_fn_c_try_compile "$LINENO"; then :
12273
12274 # Check for potential -arch flags. It is not universal unless
12275 # there are at least two -arch flags with different values.
12276 ac_arch=
12277 ac_prev=
12278 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12279 if test -n "$ac_prev"; then
12280 case $ac_word in
12281 i?86 | x86_64 | ppc | ppc64)
12282 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12283 ac_arch=$ac_word
12284 else
12285 ac_cv_c_bigendian=universal
12286 break
12287 fi
12288 ;;
12289 esac
12290 ac_prev=
12291 elif test "x$ac_word" = "x-arch"; then
12292 ac_prev=arch
12293 fi
12294 done
12295fi
12296rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12297 if test $ac_cv_c_bigendian = unknown; then
12298 # See if sys/param.h defines the BYTE_ORDER macro.
12299 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012300/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012301#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012302 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012303
Martin v. Löwis11437992002-04-12 09:54:03 +000012304int
12305main ()
12306{
Matthias Kloseb9621712010-04-24 17:59:49 +000012307#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12308 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12309 && LITTLE_ENDIAN)
12310 bogus endian macros
12311 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012312
12313 ;
12314 return 0;
12315}
12316_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012317if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012318 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000012319 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{
Guido van Rossumef2255b2000-03-10 22:30:29 +000012327#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000012328 not big endian
12329 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012330
12331 ;
12332 return 0;
12333}
12334_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012335if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012336 ac_cv_c_bigendian=yes
12337else
Matthias Kloseb9621712010-04-24 17:59:49 +000012338 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000012339fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012340rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012341fi
12342rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12343 fi
12344 if test $ac_cv_c_bigendian = unknown; then
12345 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12346 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012347/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000012348#include <limits.h>
12349
Martin v. Löwis11437992002-04-12 09:54:03 +000012350int
12351main ()
12352{
Matthias Kloseb9621712010-04-24 17:59:49 +000012353#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12354 bogus endian macros
12355 #endif
12356
Martin v. Löwis11437992002-04-12 09:54:03 +000012357 ;
12358 return 0;
12359}
12360_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012361if ac_fn_c_try_compile "$LINENO"; then :
12362 # It does; now see whether it defined to _BIG_ENDIAN or not.
12363 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12364/* end confdefs.h. */
12365#include <limits.h>
12366
12367int
12368main ()
12369{
12370#ifndef _BIG_ENDIAN
12371 not big endian
12372 #endif
12373
12374 ;
12375 return 0;
12376}
12377_ACEOF
12378if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012379 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012380else
Matthias Kloseb9621712010-04-24 17:59:49 +000012381 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012382fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012383rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12384fi
12385rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12386 fi
12387 if test $ac_cv_c_bigendian = unknown; then
12388 # Compile a test program.
12389 if test "$cross_compiling" = yes; then :
12390 # Try to guess by grepping values from an object file.
12391 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12392/* end confdefs.h. */
12393short int ascii_mm[] =
12394 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12395 short int ascii_ii[] =
12396 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12397 int use_ascii (int i) {
12398 return ascii_mm[i] + ascii_ii[i];
12399 }
12400 short int ebcdic_ii[] =
12401 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12402 short int ebcdic_mm[] =
12403 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12404 int use_ebcdic (int i) {
12405 return ebcdic_mm[i] + ebcdic_ii[i];
12406 }
12407 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012408
Matthias Kloseb9621712010-04-24 17:59:49 +000012409int
12410main ()
12411{
12412return use_ascii (foo) == use_ebcdic (foo);
12413 ;
12414 return 0;
12415}
12416_ACEOF
12417if ac_fn_c_try_compile "$LINENO"; then :
12418 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12419 ac_cv_c_bigendian=yes
12420 fi
12421 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12422 if test "$ac_cv_c_bigendian" = unknown; then
12423 ac_cv_c_bigendian=no
12424 else
12425 # finding both strings is unlikely to happen, but who knows?
12426 ac_cv_c_bigendian=unknown
12427 fi
12428 fi
12429fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012430rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012431else
Matthias Kloseb9621712010-04-24 17:59:49 +000012432 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012433/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012434$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012435int
12436main ()
12437{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012438
Matthias Kloseb9621712010-04-24 17:59:49 +000012439 /* Are we little or big endian? From Harbison&Steele. */
12440 union
12441 {
12442 long int l;
12443 char c[sizeof (long int)];
12444 } u;
12445 u.l = 1;
12446 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012447
12448 ;
12449 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000012450}
Martin v. Löwis11437992002-04-12 09:54:03 +000012451_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012452if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012453 ac_cv_c_bigendian=no
12454else
Matthias Kloseb9621712010-04-24 17:59:49 +000012455 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000012456fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012457rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12458 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000012459fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012460
Matthias Kloseb9621712010-04-24 17:59:49 +000012461 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012462fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012463{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12464$as_echo "$ac_cv_c_bigendian" >&6; }
12465 case $ac_cv_c_bigendian in #(
12466 yes)
12467 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12468;; #(
12469 no)
12470 ;; #(
12471 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012472
Matthias Kloseb9621712010-04-24 17:59:49 +000012473$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012474
Matthias Kloseb9621712010-04-24 17:59:49 +000012475 ;; #(
12476 *)
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012477 as_fn_error "unknown endianness
12478 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000012479 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000012480
Michael W. Hudson54241132001-12-07 15:38:26 +000012481
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012482# ABI version string for Python extension modules. This appears between the
12483# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
12484# from the following attributes which affect the ABI of this Python build (in
12485# this order):
12486#
12487# * The Python implementation (always 'cpython-' for us)
12488# * The major and minor version numbers
12489# * --with-pydebug (adds a 'd')
12490# * --with-pymalloc (adds a 'm')
12491# * --with-wide-unicode (adds a 'u')
12492#
12493# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012494# would get a shared library ABI version tag of 'cpython-32dmu' and shared
12495# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012496
12497{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
12498$as_echo_n "checking SOABI... " >&6; }
12499SOABI='cpython-'`echo $VERSION | tr -d .`${SOABI_QUALIFIERS}
12500{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
12501$as_echo "$SOABI" >&6; }
12502
12503# SO is the extension of shared libraries `(including the dot!)
12504# -- usually .so, .sl on HP-UX, .dll on Cygwin
12505{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SO" >&5
12506$as_echo_n "checking SO... " >&6; }
12507if test -z "$SO"
12508then
12509 case $ac_sys_system in
12510 hp*|HP*)
12511 case `uname -m` in
12512 ia64) SO=.so;;
12513 *) SO=.sl;;
12514 esac
12515 ;;
12516 CYGWIN*) SO=.dll;;
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012517 Linux*) SO=.${SOABI}.so;;
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012518 *) SO=.so;;
12519 esac
12520else
12521 # this might also be a termcap variable, see #610332
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012522 echo
12523 echo '====================================================================='
12524 echo '+ +'
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012525 echo '+ WARNING: You have set SO in your environment. +'
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012526 echo '+ Do you really mean to change the extension for shared libraries? +'
12527 echo '+ Continuing in 10 seconds to let you to ponder. +'
12528 echo '+ +'
12529 echo '====================================================================='
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012530 sleep 10
12531fi
12532{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SO" >&5
12533$as_echo "$SO" >&6; }
12534
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012535# Check whether right shifting a negative integer extends the sign bit
12536# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000012537{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
12538$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
12539if test "${ac_cv_rshift_extends_sign+set}" = set; then :
12540 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000012541else
Martin v. Löwis11437992002-04-12 09:54:03 +000012542
Matthias Kloseb9621712010-04-24 17:59:49 +000012543if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000012544 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012545else
Matthias Kloseb9621712010-04-24 17:59:49 +000012546 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012547/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012548
12549int main()
12550{
Vladimir Marangozova6180282000-07-12 05:05:06 +000012551 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012552}
12553
Martin v. Löwis11437992002-04-12 09:54:03 +000012554_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012555if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000012556 ac_cv_rshift_extends_sign=yes
12557else
Matthias Kloseb9621712010-04-24 17:59:49 +000012558 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000012559fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012560rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12561 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000012562fi
12563
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012564fi
12565
Matthias Kloseb9621712010-04-24 17:59:49 +000012566{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
12567$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000012568if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012569then
Martin v. Löwis11437992002-04-12 09:54:03 +000012570
Matthias Kloseb9621712010-04-24 17:59:49 +000012571$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012572
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012573fi
12574
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012575# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000012576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
12577$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
12578if test "${ac_cv_have_getc_unlocked+set}" = set; then :
12579 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012580else
Martin v. Löwis11437992002-04-12 09:54:03 +000012581
Matthias Kloseb9621712010-04-24 17:59:49 +000012582cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012583/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012584#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012585int
12586main ()
12587{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012588
12589 FILE *f = fopen("/dev/null", "r");
12590 flockfile(f);
12591 getc_unlocked(f);
12592 funlockfile(f);
12593
Martin v. Löwis11437992002-04-12 09:54:03 +000012594 ;
12595 return 0;
12596}
12597_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012598if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012599 ac_cv_have_getc_unlocked=yes
12600else
Matthias Kloseb9621712010-04-24 17:59:49 +000012601 ac_cv_have_getc_unlocked=no
12602fi
12603rm -f core conftest.err conftest.$ac_objext \
12604 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012605fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012606
Matthias Kloseb9621712010-04-24 17:59:49 +000012607{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
12608$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012609if test "$ac_cv_have_getc_unlocked" = yes
12610then
Martin v. Löwis11437992002-04-12 09:54:03 +000012611
Matthias Kloseb9621712010-04-24 17:59:49 +000012612$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012613
12614fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012615
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012616# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000012617# save the value of LIBS so we don't actually link Python with readline
12618LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012619
Gregory P. Smith18820942008-09-07 06:24:49 +000012620# On some systems we need to link readline to a termcap compatible
12621# library. NOTE: Keep the precedence of listed libraries synchronised
12622# with setup.py.
12623py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
12625$as_echo_n "checking how to link readline libs... " >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012626for py_libtermcap in "" ncursesw ncurses curses termcap; do
12627 if test -z "$py_libtermcap"; then
12628 READLINE_LIBS="-lreadline"
12629 else
12630 READLINE_LIBS="-lreadline -l$py_libtermcap"
12631 fi
12632 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000012633 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012634/* end confdefs.h. */
12635
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012636/* Override any GCC internal prototype to avoid an error.
12637 Use char because int might match the return type of a GCC
12638 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012639#ifdef __cplusplus
12640extern "C"
12641#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012642char readline ();
12643int
12644main ()
12645{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012646return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012647 ;
12648 return 0;
12649}
12650_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012651if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000012652 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012653fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012654rm -f core conftest.err conftest.$ac_objext \
12655 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000012656 if test $py_cv_lib_readline = yes; then
12657 break
12658 fi
12659done
12660# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
12661#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000012662if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012663 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
12664$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012665else
Matthias Kloseb9621712010-04-24 17:59:49 +000012666 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
12667$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012668
Matthias Kloseb9621712010-04-24 17:59:49 +000012669$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012670
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012671fi
12672
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012673# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000012674{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
12675$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
12676if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then :
12677 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012678else
12679 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012680LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012681cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012682/* end confdefs.h. */
12683
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012684/* Override any GCC internal prototype to avoid an error.
12685 Use char because int might match the return type of a GCC
12686 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012687#ifdef __cplusplus
12688extern "C"
12689#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012690char rl_callback_handler_install ();
12691int
12692main ()
12693{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012694return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012695 ;
12696 return 0;
12697}
12698_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012699if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012700 ac_cv_lib_readline_rl_callback_handler_install=yes
12701else
Matthias Kloseb9621712010-04-24 17:59:49 +000012702 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012703fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012704rm -f core conftest.err conftest.$ac_objext \
12705 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012706LIBS=$ac_check_lib_save_LIBS
12707fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012708{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
12709$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
12710if test "x$ac_cv_lib_readline_rl_callback_handler_install" = x""yes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012711
Matthias Kloseb9621712010-04-24 17:59:49 +000012712$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012713
12714fi
12715
12716
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012717# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000012718cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012719/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012720#include <readline/readline.h>
12721_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012722if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012723 have_readline=yes
12724else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012725 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000012726
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012727fi
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012728rm -f conftest.err conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012729if test $have_readline = yes
12730then
Matthias Kloseb9621712010-04-24 17:59:49 +000012731 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012732/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012733#include <readline/readline.h>
12734
12735_ACEOF
12736if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012737 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012738
Matthias Kloseb9621712010-04-24 17:59:49 +000012739$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012740
12741fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012742rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012743
Matthias Kloseb9621712010-04-24 17:59:49 +000012744 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000012745/* end confdefs.h. */
12746#include <readline/readline.h>
12747
12748_ACEOF
12749if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012750 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000012751
Matthias Kloseb9621712010-04-24 17:59:49 +000012752$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000012753
12754fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012755rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000012756
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012757fi
12758
Martin v. Löwis0daad592001-09-30 21:09:59 +000012759# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000012760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
12761$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
12762if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then :
12763 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000012764else
Martin v. Löwis11437992002-04-12 09:54:03 +000012765 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012766LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012767cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012768/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012769
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012770/* Override any GCC internal prototype to avoid an error.
12771 Use char because int might match the return type of a GCC
12772 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012773#ifdef __cplusplus
12774extern "C"
12775#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012776char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012777int
12778main ()
12779{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012780return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012781 ;
12782 return 0;
12783}
12784_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012785if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012786 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000012787else
Matthias Kloseb9621712010-04-24 17:59:49 +000012788 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000012789fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012790rm -f core conftest.err conftest.$ac_objext \
12791 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012792LIBS=$ac_check_lib_save_LIBS
12793fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012794{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
12795$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
12796if test "x$ac_cv_lib_readline_rl_pre_input_hook" = x""yes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012797
Matthias Kloseb9621712010-04-24 17:59:49 +000012798$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000012799
Martin v. Löwis0daad592001-09-30 21:09:59 +000012800fi
12801
Michael W. Hudson54241132001-12-07 15:38:26 +000012802
Thomas Wouters89d996e2007-09-08 17:39:28 +000012803# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000012804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
12805$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
12806if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then :
12807 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000012808else
12809 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012810LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012811cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000012812/* end confdefs.h. */
12813
12814/* Override any GCC internal prototype to avoid an error.
12815 Use char because int might match the return type of a GCC
12816 builtin and then its argument prototype would still apply. */
12817#ifdef __cplusplus
12818extern "C"
12819#endif
12820char rl_completion_display_matches_hook ();
12821int
12822main ()
12823{
12824return rl_completion_display_matches_hook ();
12825 ;
12826 return 0;
12827}
12828_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012829if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000012830 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
12831else
Matthias Kloseb9621712010-04-24 17:59:49 +000012832 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000012833fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012834rm -f core conftest.err conftest.$ac_objext \
12835 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000012836LIBS=$ac_check_lib_save_LIBS
12837fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012838{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
12839$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
12840if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = x""yes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000012841
Matthias Kloseb9621712010-04-24 17:59:49 +000012842$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000012843
12844fi
12845
12846
Martin v. Löwis0daad592001-09-30 21:09:59 +000012847# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000012848{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
12849$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
12850if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then :
12851 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000012852else
Martin v. Löwis11437992002-04-12 09:54:03 +000012853 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012854LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012855cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012856/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012857
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012858/* Override any GCC internal prototype to avoid an error.
12859 Use char because int might match the return type of a GCC
12860 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012861#ifdef __cplusplus
12862extern "C"
12863#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012864char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012865int
12866main ()
12867{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012868return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012869 ;
12870 return 0;
12871}
12872_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012873if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012874 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000012875else
Matthias Kloseb9621712010-04-24 17:59:49 +000012876 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000012877fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012878rm -f core conftest.err conftest.$ac_objext \
12879 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012880LIBS=$ac_check_lib_save_LIBS
12881fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012882{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
12883$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
12884if test "x$ac_cv_lib_readline_rl_completion_matches" = x""yes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012885
Matthias Kloseb9621712010-04-24 17:59:49 +000012886$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000012887
Guido van Rossum353ae582001-07-10 16:45:32 +000012888fi
12889
Jack Jansendd19cf82001-12-06 22:36:17 +000012890
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012891# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000012892cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012893/* end confdefs.h. */
12894#include <readline/readline.h>
12895_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012896if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012897 have_readline=yes
12898else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012899 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000012900
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012901fi
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012902rm -f conftest.err conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012903if test $have_readline = yes
12904then
Matthias Kloseb9621712010-04-24 17:59:49 +000012905 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012906/* end confdefs.h. */
12907#include <readline/readline.h>
12908
12909_ACEOF
12910if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012911 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012912
Matthias Kloseb9621712010-04-24 17:59:49 +000012913$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012914
12915fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012916rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012917
12918fi
12919
Martin v. Löwis82bca632006-02-10 20:49:30 +000012920# End of readline checks: restore LIBS
12921LIBS=$LIBS_no_readline
12922
Matthias Kloseb9621712010-04-24 17:59:49 +000012923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
12924$as_echo_n "checking for broken nice()... " >&6; }
12925if test "${ac_cv_broken_nice+set}" = set; then :
12926 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000012927else
Martin v. Löwis11437992002-04-12 09:54:03 +000012928
Matthias Kloseb9621712010-04-24 17:59:49 +000012929if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000012930 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012931else
Matthias Kloseb9621712010-04-24 17:59:49 +000012932 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012933/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012934
12935int main()
12936{
12937 int val1 = nice(1);
12938 if (val1 != -1 && val1 == nice(2))
12939 exit(0);
12940 exit(1);
12941}
12942
Martin v. Löwis11437992002-04-12 09:54:03 +000012943_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012944if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012945 ac_cv_broken_nice=yes
12946else
Matthias Kloseb9621712010-04-24 17:59:49 +000012947 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012948fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012949rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12950 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012951fi
12952
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012953fi
12954
Matthias Kloseb9621712010-04-24 17:59:49 +000012955{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
12956$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012957if test "$ac_cv_broken_nice" = yes
12958then
Martin v. Löwis11437992002-04-12 09:54:03 +000012959
Matthias Kloseb9621712010-04-24 17:59:49 +000012960$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012961
12962fi
12963
Matthias Kloseb9621712010-04-24 17:59:49 +000012964{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
12965$as_echo_n "checking for broken poll()... " >&6; }
12966if test "${ac_cv_broken_poll+set}" = set; then :
12967 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012968else
Matthias Kloseb9621712010-04-24 17:59:49 +000012969 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012970 ac_cv_broken_poll=no
12971else
Matthias Kloseb9621712010-04-24 17:59:49 +000012972 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012973/* end confdefs.h. */
12974
12975#include <poll.h>
12976
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012977int main()
12978{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012979 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012980 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012981
12982 close (42);
12983
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012984 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012985 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012986 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012987 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012988 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012989 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012990 return 1;
12991}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012992
12993_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012994if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012995 ac_cv_broken_poll=yes
12996else
Matthias Kloseb9621712010-04-24 17:59:49 +000012997 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012998fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012999rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13000 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013001fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013002
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013003fi
13004
Matthias Kloseb9621712010-04-24 17:59:49 +000013005{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
13006$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013007if test "$ac_cv_broken_poll" = yes
13008then
13009
Matthias Kloseb9621712010-04-24 17:59:49 +000013010$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013011
13012fi
13013
Brett Cannon43802422005-02-10 20:48:03 +000013014# 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 +000013015# (which is not required by ISO C or UNIX spec) and/or if we support
13016# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000013017ac_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 +000013018#include <$ac_cv_struct_tm>
13019
Matthias Kloseb9621712010-04-24 17:59:49 +000013020"
13021if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then :
Brett Cannon43802422005-02-10 20:48:03 +000013022
13023cat >>confdefs.h <<_ACEOF
13024#define HAVE_STRUCT_TM_TM_ZONE 1
13025_ACEOF
13026
13027
13028fi
13029
13030if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13031
Matthias Kloseb9621712010-04-24 17:59:49 +000013032$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013033
13034else
Matthias Kloseb9621712010-04-24 17:59:49 +000013035 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13036"
13037if test "x$ac_cv_have_decl_tzname" = x""yes; then :
13038 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013039else
Matthias Kloseb9621712010-04-24 17:59:49 +000013040 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013041fi
13042
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013043cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013044#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013045_ACEOF
13046
Matthias Kloseb9621712010-04-24 17:59:49 +000013047 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13048$as_echo_n "checking for tzname... " >&6; }
13049if test "${ac_cv_var_tzname+set}" = set; then :
13050 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013051else
Matthias Kloseb9621712010-04-24 17:59:49 +000013052 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013053/* end confdefs.h. */
13054#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013055#if !HAVE_DECL_TZNAME
13056extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000013057#endif
13058
13059int
13060main ()
13061{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013062return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000013063 ;
13064 return 0;
13065}
13066_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013067if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000013068 ac_cv_var_tzname=yes
13069else
Matthias Kloseb9621712010-04-24 17:59:49 +000013070 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000013071fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013072rm -f core conftest.err conftest.$ac_objext \
13073 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013074fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013075{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13076$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000013077 if test $ac_cv_var_tzname = yes; then
13078
Matthias Kloseb9621712010-04-24 17:59:49 +000013079$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013080
13081 fi
13082fi
13083
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013084
Martin v. Löwis1d459062005-03-14 21:23:33 +000013085# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000013086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
13087$as_echo_n "checking for working tzset()... " >&6; }
13088if test "${ac_cv_working_tzset+set}" = set; then :
13089 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013090else
13091
Matthias Kloseb9621712010-04-24 17:59:49 +000013092if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013093 ac_cv_working_tzset=no
13094else
Matthias Kloseb9621712010-04-24 17:59:49 +000013095 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013096/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013097
13098#include <stdlib.h>
13099#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000013100#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000013101
13102#if HAVE_TZNAME
13103extern char *tzname[];
13104#endif
13105
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013106int main()
13107{
Brett Cannon18367812003-09-19 00:59:16 +000013108 /* Note that we need to ensure that not only does tzset(3)
13109 do 'something' with localtime, but it works as documented
13110 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000013111 This includes making sure that tzname is set properly if
13112 tm->tm_zone does not exist since it is the alternative way
13113 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000013114
13115 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000013116 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000013117 */
13118
Martin v. Löwis1d459062005-03-14 21:23:33 +000013119 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000013120 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
13121
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013122 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013123 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013124 if (localtime(&groundhogday)->tm_hour != 0)
13125 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013126#if HAVE_TZNAME
13127 /* For UTC, tzname[1] is sometimes "", sometimes " " */
13128 if (strcmp(tzname[0], "UTC") ||
13129 (tzname[1][0] != 0 && tzname[1][0] != ' '))
13130 exit(1);
13131#endif
Brett Cannon18367812003-09-19 00:59:16 +000013132
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013133 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013134 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013135 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013136 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013137#if HAVE_TZNAME
13138 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
13139 exit(1);
13140#endif
Brett Cannon18367812003-09-19 00:59:16 +000013141
13142 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
13143 tzset();
13144 if (localtime(&groundhogday)->tm_hour != 11)
13145 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013146#if HAVE_TZNAME
13147 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
13148 exit(1);
13149#endif
13150
13151#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000013152 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
13153 exit(1);
13154 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
13155 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013156#endif
Brett Cannon18367812003-09-19 00:59:16 +000013157
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013158 exit(0);
13159}
13160
13161_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013162if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013163 ac_cv_working_tzset=yes
13164else
Matthias Kloseb9621712010-04-24 17:59:49 +000013165 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013166fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013167rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13168 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013169fi
13170
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013171fi
13172
Matthias Kloseb9621712010-04-24 17:59:49 +000013173{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
13174$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013175if test "$ac_cv_working_tzset" = yes
13176then
13177
Matthias Kloseb9621712010-04-24 17:59:49 +000013178$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013179
13180fi
13181
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013182# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013183{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
13184$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
13185if test "${ac_cv_stat_tv_nsec+set}" = set; then :
13186 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013187else
Matthias Kloseb9621712010-04-24 17:59:49 +000013188 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013189/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013190#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013191int
13192main ()
13193{
13194
13195struct stat st;
13196st.st_mtim.tv_nsec = 1;
13197
13198 ;
13199 return 0;
13200}
13201_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013202if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000013203 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013204else
Matthias Kloseb9621712010-04-24 17:59:49 +000013205 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013206fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013207rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13208fi
13209
Matthias Kloseb9621712010-04-24 17:59:49 +000013210{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
13211$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013212if test "$ac_cv_stat_tv_nsec" = yes
13213then
13214
Matthias Kloseb9621712010-04-24 17:59:49 +000013215$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013216
13217fi
13218
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013219# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013220{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
13221$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
13222if test "${ac_cv_stat_tv_nsec2+set}" = set; then :
13223 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013224else
Matthias Kloseb9621712010-04-24 17:59:49 +000013225 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013226/* end confdefs.h. */
13227#include <sys/stat.h>
13228int
13229main ()
13230{
13231
13232struct stat st;
13233st.st_mtimespec.tv_nsec = 1;
13234
13235 ;
13236 return 0;
13237}
13238_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013239if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013240 ac_cv_stat_tv_nsec2=yes
13241else
Matthias Kloseb9621712010-04-24 17:59:49 +000013242 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013243fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013244rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13245fi
13246
Matthias Kloseb9621712010-04-24 17:59:49 +000013247{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
13248$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013249if test "$ac_cv_stat_tv_nsec2" = yes
13250then
13251
Matthias Kloseb9621712010-04-24 17:59:49 +000013252$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013253
13254fi
13255
Jack Jansen666b1e72001-10-31 12:11:48 +000013256# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000013257{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
13258$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
13259if test "${ac_cv_mvwdelch_is_expression+set}" = set; then :
13260 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013261else
Matthias Kloseb9621712010-04-24 17:59:49 +000013262 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013263/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013264#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013265int
13266main ()
13267{
Jack Jansen666b1e72001-10-31 12:11:48 +000013268
13269 int rtn;
13270 rtn = mvwdelch(0,0,0);
13271
Martin v. Löwis11437992002-04-12 09:54:03 +000013272 ;
13273 return 0;
13274}
13275_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013276if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013277 ac_cv_mvwdelch_is_expression=yes
13278else
Matthias Kloseb9621712010-04-24 17:59:49 +000013279 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013280fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013281rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13282fi
13283
Matthias Kloseb9621712010-04-24 17:59:49 +000013284{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
13285$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000013286
13287if test "$ac_cv_mvwdelch_is_expression" = yes
13288then
Martin v. Löwis11437992002-04-12 09:54:03 +000013289
Matthias Kloseb9621712010-04-24 17:59:49 +000013290$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013291
13292fi
13293
Matthias Kloseb9621712010-04-24 17:59:49 +000013294{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
13295$as_echo_n "checking whether WINDOW has _flags... " >&6; }
13296if test "${ac_cv_window_has_flags+set}" = set; then :
13297 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013298else
Matthias Kloseb9621712010-04-24 17:59:49 +000013299 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013300/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013301#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013302int
13303main ()
13304{
Jack Jansen666b1e72001-10-31 12:11:48 +000013305
13306 WINDOW *w;
13307 w->_flags = 0;
13308
Martin v. Löwis11437992002-04-12 09:54:03 +000013309 ;
13310 return 0;
13311}
13312_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013313if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013314 ac_cv_window_has_flags=yes
13315else
Matthias Kloseb9621712010-04-24 17:59:49 +000013316 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013317fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013318rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13319fi
13320
Matthias Kloseb9621712010-04-24 17:59:49 +000013321{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
13322$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013323
Jack Jansen666b1e72001-10-31 12:11:48 +000013324
13325if test "$ac_cv_window_has_flags" = yes
13326then
Martin v. Löwis11437992002-04-12 09:54:03 +000013327
Matthias Kloseb9621712010-04-24 17:59:49 +000013328$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013329
13330fi
13331
Matthias Kloseb9621712010-04-24 17:59:49 +000013332{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
13333$as_echo_n "checking for is_term_resized... " >&6; }
13334cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013335/* end confdefs.h. */
13336#include <curses.h>
13337int
13338main ()
13339{
13340void *x=is_term_resized
13341 ;
13342 return 0;
13343}
13344_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013345if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013346
Matthias Kloseb9621712010-04-24 17:59:49 +000013347$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013348
Matthias Kloseb159a552010-04-25 21:00:44 +000013349 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013350$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013351else
Matthias Kloseb9621712010-04-24 17:59:49 +000013352 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13353$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013354
13355fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013356rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13357
Matthias Kloseb9621712010-04-24 17:59:49 +000013358{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
13359$as_echo_n "checking for resize_term... " >&6; }
13360cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013361/* end confdefs.h. */
13362#include <curses.h>
13363int
13364main ()
13365{
13366void *x=resize_term
13367 ;
13368 return 0;
13369}
13370_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013371if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013372
Matthias Kloseb9621712010-04-24 17:59:49 +000013373$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013374
Matthias Kloseb159a552010-04-25 21:00:44 +000013375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013376$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013377else
Matthias Kloseb9621712010-04-24 17:59:49 +000013378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13379$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013380
13381fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013382rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13383
Matthias Kloseb9621712010-04-24 17:59:49 +000013384{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
13385$as_echo_n "checking for resizeterm... " >&6; }
13386cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013387/* end confdefs.h. */
13388#include <curses.h>
13389int
13390main ()
13391{
13392void *x=resizeterm
13393 ;
13394 return 0;
13395}
13396_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013397if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013398
Matthias Kloseb9621712010-04-24 17:59:49 +000013399$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013400
Matthias Kloseb159a552010-04-25 21:00:44 +000013401 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013402$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013403else
Matthias Kloseb9621712010-04-24 17:59:49 +000013404 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13405$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013406
13407fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013408rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13409
Matthias Kloseb9621712010-04-24 17:59:49 +000013410{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
13411$as_echo_n "checking for /dev/ptmx... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013412
13413if test -r /dev/ptmx
13414then
Matthias Kloseb9621712010-04-24 17:59:49 +000013415 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13416$as_echo "yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013417
Matthias Kloseb9621712010-04-24 17:59:49 +000013418$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013419
Thomas Wouters89f507f2006-12-13 04:49:30 +000013420else
Matthias Kloseb9621712010-04-24 17:59:49 +000013421 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13422$as_echo "no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013423fi
13424
Matthias Kloseb9621712010-04-24 17:59:49 +000013425{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
13426$as_echo_n "checking for /dev/ptc... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013427
13428if test -r /dev/ptc
13429then
Matthias Kloseb9621712010-04-24 17:59:49 +000013430 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13431$as_echo "yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013432
Matthias Kloseb9621712010-04-24 17:59:49 +000013433$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000013434
Thomas Wouters89f507f2006-12-13 04:49:30 +000013435else
Matthias Kloseb9621712010-04-24 17:59:49 +000013436 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13437$as_echo "no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013438fi
13439
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013440if test "$have_long_long" = yes
13441then
Matthias Kloseb9621712010-04-24 17:59:49 +000013442 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
13443$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
13444 if test "${ac_cv_have_long_long_format+set}" = set; then :
13445 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013446else
Matthias Kloseb9621712010-04-24 17:59:49 +000013447 if test "$cross_compiling" = yes; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013448 ac_cv_have_long_long_format=no
13449else
Matthias Kloseb9621712010-04-24 17:59:49 +000013450 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013451/* end confdefs.h. */
13452
13453 #include <stdio.h>
13454 #include <stddef.h>
13455 #include <string.h>
13456
13457 #ifdef HAVE_SYS_TYPES_H
13458 #include <sys/types.h>
13459 #endif
13460
13461 int main()
13462 {
13463 char buffer[256];
13464
13465 if (sprintf(buffer, "%lld", (long long)123) < 0)
13466 return 1;
13467 if (strcmp(buffer, "123"))
13468 return 1;
13469
13470 if (sprintf(buffer, "%lld", (long long)-123) < 0)
13471 return 1;
13472 if (strcmp(buffer, "-123"))
13473 return 1;
13474
13475 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
13476 return 1;
13477 if (strcmp(buffer, "123"))
13478 return 1;
13479
13480 return 0;
13481 }
13482
13483_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013484if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013485 ac_cv_have_long_long_format=yes
13486else
Matthias Kloseb9621712010-04-24 17:59:49 +000013487 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013488fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013489rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13490 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013491fi
13492
13493
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013494fi
13495
Matthias Kloseb9621712010-04-24 17:59:49 +000013496 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
13497$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013498fi
13499
Mark Dickinson89d7d412009-12-31 20:50:59 +000013500if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013501then
13502
Matthias Kloseb9621712010-04-24 17:59:49 +000013503$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013504
13505fi
13506
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000013507if test $ac_sys_system = Darwin
13508then
13509 LIBS="$LIBS -framework CoreFoundation"
13510fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013511
Matthias Kloseb9621712010-04-24 17:59:49 +000013512{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
13513$as_echo_n "checking for %zd printf() format support... " >&6; }
13514if test "${ac_cv_have_size_t_format+set}" = set; then :
13515 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013516else
Matthias Kloseb9621712010-04-24 17:59:49 +000013517 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000013518 ac_cv_have_size_t_format="cross -- assuming yes"
13519
Thomas Wouters477c8d52006-05-27 19:21:47 +000013520else
Matthias Kloseb9621712010-04-24 17:59:49 +000013521 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000013522/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013523
Thomas Wouters477c8d52006-05-27 19:21:47 +000013524#include <stdio.h>
13525#include <stddef.h>
13526#include <string.h>
13527
Christian Heimes2c181612007-12-17 20:04:13 +000013528#ifdef HAVE_SYS_TYPES_H
13529#include <sys/types.h>
13530#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000013531
13532#ifdef HAVE_SSIZE_T
13533typedef ssize_t Py_ssize_t;
13534#elif SIZEOF_VOID_P == SIZEOF_LONG
13535typedef long Py_ssize_t;
13536#else
13537typedef int Py_ssize_t;
13538#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000013539
Christian Heimes2c181612007-12-17 20:04:13 +000013540int main()
13541{
13542 char buffer[256];
13543
Thomas Wouters477c8d52006-05-27 19:21:47 +000013544 if(sprintf(buffer, "%zd", (size_t)123) < 0)
13545 return 1;
13546
Thomas Wouters89f507f2006-12-13 04:49:30 +000013547 if (strcmp(buffer, "123"))
13548 return 1;
13549
13550 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
13551 return 1;
13552
13553 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000013554 return 1;
13555
13556 return 0;
13557}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013558
Thomas Wouters477c8d52006-05-27 19:21:47 +000013559_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013560if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013561 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013562else
Matthias Kloseb9621712010-04-24 17:59:49 +000013563 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013564fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013565rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13566 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013567fi
13568
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013569fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013570{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
13571$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000013572if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013573
Matthias Kloseb9621712010-04-24 17:59:49 +000013574$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013575
13576fi
13577
Matthias Kloseb9621712010-04-24 17:59:49 +000013578ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000013579#ifdef HAVE_SYS_TYPES_H
13580#include <sys/types.h>
13581#endif
13582#ifdef HAVE_SYS_SOCKET_H
13583#include <sys/socket.h>
13584#endif
13585
Matthias Kloseb9621712010-04-24 17:59:49 +000013586"
13587if test "x$ac_cv_type_socklen_t" = x""yes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000013588
Martin v. Löwis11437992002-04-12 09:54:03 +000013589else
Guido van Rossum95713eb2000-05-18 20:53:31 +000013590
Matthias Kloseb9621712010-04-24 17:59:49 +000013591$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000013592
13593fi
13594
Michael W. Hudson54241132001-12-07 15:38:26 +000013595
Matthias Kloseb9621712010-04-24 17:59:49 +000013596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
13597$as_echo_n "checking for broken mbstowcs... " >&6; }
13598if test "${ac_cv_broken_mbstowcs+set}" = set; then :
13599 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013600else
Matthias Kloseb9621712010-04-24 17:59:49 +000013601 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000013602 ac_cv_broken_mbstowcs=no
13603else
Matthias Kloseb9621712010-04-24 17:59:49 +000013604 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000013605/* end confdefs.h. */
13606
13607#include<stdlib.h>
13608int main() {
13609 size_t len = -1;
13610 const char *str = "text";
13611 len = mbstowcs(NULL, str, 0);
13612 return (len != 4);
13613}
13614
13615_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013616if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000013617 ac_cv_broken_mbstowcs=no
13618else
Matthias Kloseb9621712010-04-24 17:59:49 +000013619 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000013620fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013621rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13622 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000013623fi
13624
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013625fi
13626
Matthias Kloseb9621712010-04-24 17:59:49 +000013627{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
13628$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000013629if test "$ac_cv_broken_mbstowcs" = yes
13630then
13631
Matthias Kloseb9621712010-04-24 17:59:49 +000013632$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000013633
13634fi
13635
Antoine Pitrou042b1282010-08-13 21:15:58 +000013636{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
13637$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
13638if test "${ac_cv_computed_gotos+set}" = set; then :
13639 $as_echo_n "(cached) " >&6
13640else
13641 if test "$cross_compiling" = yes; then :
13642 ac_cv_computed_gotos=no
13643else
13644 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13645/* end confdefs.h. */
13646
13647int main(int argc, char **argv)
13648{
13649 static void *targets[1] = { &&LABEL1 };
13650 goto LABEL2;
13651LABEL1:
13652 return 0;
13653LABEL2:
13654 goto *targets[0];
13655 return 1;
13656}
13657
13658_ACEOF
13659if ac_fn_c_try_run "$LINENO"; then :
13660 ac_cv_computed_gotos=yes
13661else
13662 ac_cv_computed_gotos=no
13663fi
13664rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13665 conftest.$ac_objext conftest.beam conftest.$ac_ext
13666fi
13667
13668fi
13669
13670{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
13671$as_echo "$ac_cv_computed_gotos" >&6; }
13672if test "$ac_cv_computed_gotos" = yes
13673then
13674
13675$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
13676
13677fi
13678
Antoine Pitroub52ec782009-01-25 16:34:23 +000013679# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000013680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
13681$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013682
13683# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013684if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000013685 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000013686if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000013687then
13688
Matthias Kloseb9621712010-04-24 17:59:49 +000013689$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000013690
Matthias Kloseb9621712010-04-24 17:59:49 +000013691 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13692$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013693fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000013694if test "$withval" = no
13695then
13696
13697$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
13698
Matthias Kloseb9621712010-04-24 17:59:49 +000013699 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13700$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013701fi
13702
Antoine Pitrou042b1282010-08-13 21:15:58 +000013703else
13704 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
13705$as_echo "no value specified" >&6; }
13706fi
13707
Antoine Pitroub52ec782009-01-25 16:34:23 +000013708
13709
Michael W. Hudson54241132001-12-07 15:38:26 +000013710
Jesus Cea6a792292010-05-03 21:18:48 +000013711case $ac_sys_system in
Benjamin Petersond7f73e92010-09-05 00:09:07 +000013712 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 +000013713esac
13714
13715
13716
Mark Dickinsonb2153e92010-05-05 22:31:36 +000013717
13718
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000013719for h in `(cd $srcdir;echo Python/thread_*.h)`
13720do
13721 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
13722done
13723
Michael W. Hudson54241132001-12-07 15:38:26 +000013724
Neal Norwitzd24499d2005-12-18 21:36:39 +000013725SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Kloseb9621712010-04-24 17:59:49 +000013726{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
13727$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013728for dir in $SRCDIRS; do
13729 if test ! -d $dir; then
13730 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000013731 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013732done
Matthias Kloseb9621712010-04-24 17:59:49 +000013733{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
13734$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000013735
Guido van Rossum627b2d71993-12-24 10:39:16 +000013736# generate output files
Antoine Pitrou20327222009-05-24 20:39:11 +000013737ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000013738
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000013739ac_config_files="$ac_config_files Modules/ld_so_aix"
13740
Martin v. Löwis11437992002-04-12 09:54:03 +000013741cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013742# This file is a shell script that caches the results of configure
13743# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000013744# scripts and configure runs, see configure's option --config-cache.
13745# It is not useful on other systems. If it contains results you don't
13746# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013747#
Martin v. Löwis11437992002-04-12 09:54:03 +000013748# config.status only pays attention to the cache file if you give it
13749# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013750#
Skip Montanaro6dead952003-09-25 14:50:04 +000013751# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000013752# loading this file, other *unset* `ac_cv_foo' will be assigned the
13753# following values.
13754
13755_ACEOF
13756
Guido van Rossumf78abae1997-01-21 22:02:36 +000013757# The following way of writing the cache mishandles newlines in values,
13758# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013759# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013760# Ultrix sh set writes to stderr and can't be redirected directly,
13761# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013762(
13763 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
13764 eval ac_val=\$$ac_var
13765 case $ac_val in #(
13766 *${as_nl}*)
13767 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000013768 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
13769$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013770 esac
13771 case $ac_var in #(
13772 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000013773 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
13774 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013775 esac ;;
13776 esac
13777 done
13778
Martin v. Löwis11437992002-04-12 09:54:03 +000013779 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013780 case $as_nl`(ac_space=' '; set) 2>&1` in #(
13781 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000013782 # `set' does not quote correctly, so add quotes: double-quote
13783 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000013784 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013785 "s/'/'\\\\''/g;
13786 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013787 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000013788 *)
13789 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013790 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000013791 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013792 esac |
13793 sort
13794) |
Martin v. Löwis11437992002-04-12 09:54:03 +000013795 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013796 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000013797 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013798 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000013799 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
13800 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013801 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
13802 :end' >>confcache
13803if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
13804 if test -w "$cache_file"; then
13805 test "x$cache_file" != "x/dev/null" &&
Matthias Kloseb9621712010-04-24 17:59:49 +000013806 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
13807$as_echo "$as_me: updating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000013808 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013809 else
Matthias Kloseb9621712010-04-24 17:59:49 +000013810 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
13811$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013812 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013813fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013814rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000013815
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013816test "x$prefix" = xNONE && prefix=$ac_default_prefix
13817# Let make expand exec_prefix.
13818test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000013819
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013820DEFS=-DHAVE_CONFIG_H
13821
Skip Montanaro6dead952003-09-25 14:50:04 +000013822ac_libobjs=
13823ac_ltlibobjs=
13824for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
13825 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013826 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000013827 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013828 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
13829 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000013830 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
13831 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000013832done
13833LIBOBJS=$ac_libobjs
13834
13835LTLIBOBJS=$ac_ltlibobjs
13836
13837
Martin v. Löwis11437992002-04-12 09:54:03 +000013838
Matthias Kloseb9621712010-04-24 17:59:49 +000013839
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013840: ${CONFIG_STATUS=./config.status}
Matthias Kloseb9621712010-04-24 17:59:49 +000013841ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000013842ac_clean_files_save=$ac_clean_files
13843ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013844{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
13845$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
13846as_write_fail=0
13847cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000013848#! $SHELL
13849# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000013850# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013851# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000013852# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000013853
Martin v. Löwis11437992002-04-12 09:54:03 +000013854debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000013855ac_cs_recheck=false
13856ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000013857
Matthias Kloseb9621712010-04-24 17:59:49 +000013858SHELL=\${CONFIG_SHELL-$SHELL}
13859export SHELL
13860_ASEOF
13861cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
13862## -------------------- ##
13863## M4sh Initialization. ##
13864## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000013865
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013866# Be more Bourne compatible
13867DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000013868if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013869 emulate sh
13870 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000013871 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000013872 # is contrary to our usage. Disable this feature.
13873 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013874 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013875else
Matthias Kloseb9621712010-04-24 17:59:49 +000013876 case `(set -o) 2>/dev/null` in #(
13877 *posix*) :
13878 set -o posix ;; #(
13879 *) :
13880 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013881esac
Michael W. Hudson54241132001-12-07 15:38:26 +000013882fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000013883
13884
Matthias Kloseb9621712010-04-24 17:59:49 +000013885as_nl='
13886'
13887export as_nl
13888# Printing a long string crashes Solaris 7 /usr/bin/printf.
13889as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
13890as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
13891as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
13892# Prefer a ksh shell builtin over an external printf program on Solaris,
13893# but without wasting forks for bash or zsh.
13894if test -z "$BASH_VERSION$ZSH_VERSION" \
13895 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
13896 as_echo='print -r --'
13897 as_echo_n='print -rn --'
13898elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
13899 as_echo='printf %s\n'
13900 as_echo_n='printf %s'
13901else
13902 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
13903 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
13904 as_echo_n='/usr/ucb/echo -n'
13905 else
13906 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
13907 as_echo_n_body='eval
13908 arg=$1;
13909 case $arg in #(
13910 *"$as_nl"*)
13911 expr "X$arg" : "X\\(.*\\)$as_nl";
13912 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
13913 esac;
13914 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
13915 '
13916 export as_echo_n_body
13917 as_echo_n='sh -c $as_echo_n_body as_echo'
13918 fi
13919 export as_echo_body
13920 as_echo='sh -c $as_echo_body as_echo'
13921fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013922
13923# The user is always right.
13924if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013925 PATH_SEPARATOR=:
13926 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
13927 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
13928 PATH_SEPARATOR=';'
13929 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013930fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013931
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013932
13933# IFS
13934# We need space, tab and new line, in precisely that order. Quoting is
13935# there to prevent editors from complaining about space-tab.
13936# (If _AS_PATH_WALK were called with IFS unset, it would disable word
13937# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013938IFS=" "" $as_nl"
13939
13940# Find who we are. Look in the path if we contain no directory separator.
Matthias Kloseb9621712010-04-24 17:59:49 +000013941case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013942 *[\\/]* ) as_myself=$0 ;;
13943 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000013944for as_dir in $PATH
13945do
13946 IFS=$as_save_IFS
13947 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000013948 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
13949 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013950IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000013951
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013952 ;;
13953esac
13954# We did not find ourselves, most probably we were run as `sh COMMAND'
13955# in which case we are not to be found in the path.
13956if test "x$as_myself" = x; then
13957 as_myself=$0
13958fi
13959if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013960 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
13961 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013962fi
13963
Matthias Kloseb9621712010-04-24 17:59:49 +000013964# Unset variables that we do not need and which cause bugs (e.g. in
13965# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
13966# suppresses any "Segmentation fault" message there. '((' could
13967# trigger a bug in pdksh 5.2.14.
13968for as_var in BASH_ENV ENV MAIL MAILPATH
13969do eval test x\${$as_var+set} = xset \
13970 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013971done
13972PS1='$ '
13973PS2='> '
13974PS4='+ '
13975
13976# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000013977LC_ALL=C
13978export LC_ALL
13979LANGUAGE=C
13980export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013981
Matthias Kloseb9621712010-04-24 17:59:49 +000013982# CDPATH.
13983(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
13984
13985
Benjamin Petersond7f73e92010-09-05 00:09:07 +000013986# as_fn_error ERROR [LINENO LOG_FD]
13987# ---------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000013988# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
13989# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Benjamin Petersond7f73e92010-09-05 00:09:07 +000013990# script with status $?, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000013991as_fn_error ()
13992{
Benjamin Petersond7f73e92010-09-05 00:09:07 +000013993 as_status=$?; test $as_status -eq 0 && as_status=1
13994 if test "$3"; then
13995 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
13996 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
Matthias Kloseb9621712010-04-24 17:59:49 +000013997 fi
Benjamin Petersond7f73e92010-09-05 00:09:07 +000013998 $as_echo "$as_me: error: $1" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000013999 as_fn_exit $as_status
14000} # as_fn_error
14001
14002
14003# as_fn_set_status STATUS
14004# -----------------------
14005# Set $? to STATUS, without forking.
14006as_fn_set_status ()
14007{
14008 return $1
14009} # as_fn_set_status
14010
14011# as_fn_exit STATUS
14012# -----------------
14013# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
14014as_fn_exit ()
14015{
14016 set +e
14017 as_fn_set_status $1
14018 exit $1
14019} # as_fn_exit
14020
14021# as_fn_unset VAR
14022# ---------------
14023# Portably unset VAR.
14024as_fn_unset ()
14025{
14026 { eval $1=; unset $1;}
14027}
14028as_unset=as_fn_unset
14029# as_fn_append VAR VALUE
14030# ----------------------
14031# Append the text in VALUE to the end of the definition contained in VAR. Take
14032# advantage of any shell optimizations that allow amortized linear growth over
14033# repeated appends, instead of the typical quadratic growth present in naive
14034# implementations.
14035if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
14036 eval 'as_fn_append ()
14037 {
14038 eval $1+=\$2
14039 }'
14040else
14041 as_fn_append ()
14042 {
14043 eval $1=\$$1\$2
14044 }
14045fi # as_fn_append
14046
14047# as_fn_arith ARG...
14048# ------------------
14049# Perform arithmetic evaluation on the ARGs, and store the result in the
14050# global $as_val. Take advantage of shells that can avoid forks. The arguments
14051# must be portable across $(()) and expr.
14052if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
14053 eval 'as_fn_arith ()
14054 {
14055 as_val=$(( $* ))
14056 }'
14057else
14058 as_fn_arith ()
14059 {
14060 as_val=`expr "$@" || test $? -eq 1`
14061 }
14062fi # as_fn_arith
14063
14064
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014065if expr a : '\(a\)' >/dev/null 2>&1 &&
14066 test "X`expr 00001 : '.*\(...\)'`" = X001; then
14067 as_expr=expr
14068else
14069 as_expr=false
14070fi
14071
14072if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
14073 as_basename=basename
14074else
14075 as_basename=false
14076fi
14077
Matthias Kloseb9621712010-04-24 17:59:49 +000014078if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
14079 as_dirname=dirname
14080else
14081 as_dirname=false
14082fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014083
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014084as_me=`$as_basename -- "$0" ||
14085$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
14086 X"$0" : 'X\(//\)$' \| \
14087 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014088$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014089 sed '/^.*\/\([^/][^/]*\)\/*$/{
14090 s//\1/
14091 q
14092 }
14093 /^X\/\(\/\/\)$/{
14094 s//\1/
14095 q
14096 }
14097 /^X\/\(\/\).*/{
14098 s//\1/
14099 q
14100 }
14101 s/.*/./; q'`
14102
Matthias Kloseb9621712010-04-24 17:59:49 +000014103# Avoid depending upon Character Ranges.
14104as_cr_letters='abcdefghijklmnopqrstuvwxyz'
14105as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14106as_cr_Letters=$as_cr_letters$as_cr_LETTERS
14107as_cr_digits='0123456789'
14108as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014109
14110ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000014111case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014112-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014113 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014114 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000014115 xy) ECHO_C='\c';;
14116 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
14117 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014118 esac;;
14119*)
14120 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000014121esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014122
Martin v. Löwis11437992002-04-12 09:54:03 +000014123rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014124if test -d conf$$.dir; then
14125 rm -f conf$$.dir/conf$$.file
14126else
14127 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000014128 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014129fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014130if (echo >conf$$.file) 2>/dev/null; then
14131 if ln -s conf$$.file conf$$ 2>/dev/null; then
14132 as_ln_s='ln -s'
14133 # ... but there are two gotchas:
14134 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
14135 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
14136 # In both cases, we have to default to `cp -p'.
14137 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
14138 as_ln_s='cp -p'
14139 elif ln conf$$.file conf$$ 2>/dev/null; then
14140 as_ln_s=ln
14141 else
Martin v. Löwis11437992002-04-12 09:54:03 +000014142 as_ln_s='cp -p'
Matthias Kloseb9621712010-04-24 17:59:49 +000014143 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014144else
14145 as_ln_s='cp -p'
14146fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014147rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
14148rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000014149
Matthias Kloseb9621712010-04-24 17:59:49 +000014150
14151# as_fn_mkdir_p
14152# -------------
14153# Create "$as_dir" as a directory, including parents if necessary.
14154as_fn_mkdir_p ()
14155{
14156
14157 case $as_dir in #(
14158 -*) as_dir=./$as_dir;;
14159 esac
14160 test -d "$as_dir" || eval $as_mkdir_p || {
14161 as_dirs=
14162 while :; do
14163 case $as_dir in #(
14164 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
14165 *) as_qdir=$as_dir;;
14166 esac
14167 as_dirs="'$as_qdir' $as_dirs"
14168 as_dir=`$as_dirname -- "$as_dir" ||
14169$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
14170 X"$as_dir" : 'X\(//\)[^/]' \| \
14171 X"$as_dir" : 'X\(//\)$' \| \
14172 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
14173$as_echo X"$as_dir" |
14174 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14175 s//\1/
14176 q
14177 }
14178 /^X\(\/\/\)[^/].*/{
14179 s//\1/
14180 q
14181 }
14182 /^X\(\/\/\)$/{
14183 s//\1/
14184 q
14185 }
14186 /^X\(\/\).*/{
14187 s//\1/
14188 q
14189 }
14190 s/.*/./; q'`
14191 test -d "$as_dir" && break
14192 done
14193 test -z "$as_dirs" || eval "mkdir $as_dirs"
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014194 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000014195
14196
14197} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000014198if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014199 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000014200else
Skip Montanarof0d5f792004-08-15 14:08:23 +000014201 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000014202 as_mkdir_p=false
14203fi
14204
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014205if test -x / >/dev/null 2>&1; then
14206 as_test_x='test -x'
14207else
14208 if ls -dL / >/dev/null 2>&1; then
14209 as_ls_L_option=L
14210 else
14211 as_ls_L_option=
14212 fi
14213 as_test_x='
14214 eval sh -c '\''
14215 if test -d "$1"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014216 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014217 else
Matthias Kloseb9621712010-04-24 17:59:49 +000014218 case $1 in #(
14219 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014220 esac;
Matthias Kloseb9621712010-04-24 17:59:49 +000014221 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014222 ???[sx]*):;;*)false;;esac;fi
14223 '\'' sh
14224 '
14225fi
14226as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000014227
14228# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014229as_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 +000014230
14231# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014232as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014233
14234
Martin v. Löwis11437992002-04-12 09:54:03 +000014235exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000014236## ----------------------------------- ##
14237## Main body of $CONFIG_STATUS script. ##
14238## ----------------------------------- ##
14239_ASEOF
14240test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014241
Matthias Kloseb9621712010-04-24 17:59:49 +000014242cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14243# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000014244# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014245# values after options handling.
14246ac_log="
Benjamin Peterson46ea4f72009-06-27 21:40:27 +000014247This file was extended by python $as_me 3.2, which was
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014248generated by GNU Autoconf 2.65. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000014249
14250 CONFIG_FILES = $CONFIG_FILES
14251 CONFIG_HEADERS = $CONFIG_HEADERS
14252 CONFIG_LINKS = $CONFIG_LINKS
14253 CONFIG_COMMANDS = $CONFIG_COMMANDS
14254 $ $0 $@
14255
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014256on `(hostname || uname -n) 2>/dev/null | sed 1q`
14257"
14258
Martin v. Löwis11437992002-04-12 09:54:03 +000014259_ACEOF
14260
Matthias Kloseb9621712010-04-24 17:59:49 +000014261case $ac_config_files in *"
14262"*) set x $ac_config_files; shift; ac_config_files=$*;;
14263esac
14264
14265case $ac_config_headers in *"
14266"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
14267esac
14268
14269
14270cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014271# Files that config.status was made for.
Antoine Pitroua3000072010-09-07 14:52:42 +000014272config_files="`echo $ac_config_files`"
14273config_headers="`echo $ac_config_headers`"
Martin v. Löwis11437992002-04-12 09:54:03 +000014274
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014275_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014276
Matthias Kloseb9621712010-04-24 17:59:49 +000014277cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014278ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000014279\`$as_me' instantiates files and other configuration actions
14280from templates according to the current configuration. Unless the files
14281and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000014282
Matthias Kloseb9621712010-04-24 17:59:49 +000014283Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000014284
14285 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014286 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000014287 --config print configuration, then exit
14288 -q, --quiet, --silent
14289 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000014290 -d, --debug don't remove temporary files
14291 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000014292 --file=FILE[:TEMPLATE]
14293 instantiate the configuration file FILE
14294 --header=FILE[:TEMPLATE]
14295 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000014296
14297Configuration files:
14298$config_files
14299
14300Configuration headers:
14301$config_headers
14302
Matthias Kloseb9621712010-04-24 17:59:49 +000014303Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014304
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014305_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014306cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14307ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000014308ac_cs_version="\\
Benjamin Peterson46ea4f72009-06-27 21:40:27 +000014309python config.status 3.2
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014310configured by $0, generated by GNU Autoconf 2.65,
Matthias Kloseb9621712010-04-24 17:59:49 +000014311 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000014312
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014313Copyright (C) 2009 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000014314This config.status script is free software; the Free Software Foundation
14315gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014316
14317ac_pwd='$ac_pwd'
14318srcdir='$srcdir'
14319INSTALL='$INSTALL'
Matthias Kloseb9621712010-04-24 17:59:49 +000014320test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000014321_ACEOF
14322
Matthias Kloseb9621712010-04-24 17:59:49 +000014323cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14324# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000014325ac_need_defaults=:
14326while test $# != 0
14327do
14328 case $1 in
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014329 --*=*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014330 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14331 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000014332 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000014333 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014334 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000014335 ac_option=$1
14336 ac_optarg=$2
14337 ac_shift=shift
14338 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014339 esac
14340
Skip Montanaro6dead952003-09-25 14:50:04 +000014341 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000014342 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000014343 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14344 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014345 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000014346 $as_echo "$ac_cs_version"; exit ;;
14347 --config | --confi | --conf | --con | --co | --c )
14348 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014349 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000014350 debug=: ;;
14351 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000014352 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014353 case $ac_optarg in
14354 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14355 esac
14356 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014357 ac_need_defaults=false;;
14358 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000014359 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014360 case $ac_optarg in
14361 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14362 esac
14363 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014364 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014365 --he | --h)
14366 # Conflict between --help and --header
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014367 as_fn_error "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000014368Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014369 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000014370 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000014371 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
14372 | -silent | --silent | --silen | --sile | --sil | --si | --s)
14373 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014374
14375 # This is an error.
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014376 -*) as_fn_error "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000014377Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014378
Matthias Kloseb9621712010-04-24 17:59:49 +000014379 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014380 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014381
14382 esac
14383 shift
14384done
14385
Skip Montanaro6dead952003-09-25 14:50:04 +000014386ac_configure_extra_args=
14387
14388if $ac_cs_silent; then
14389 exec 6>/dev/null
14390 ac_configure_extra_args="$ac_configure_extra_args --silent"
14391fi
14392
14393_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014394cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000014395if \$ac_cs_recheck; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014396 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
14397 shift
14398 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
14399 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014400 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000014401 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000014402fi
14403
Martin v. Löwis11437992002-04-12 09:54:03 +000014404_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014405cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014406exec 5>>config.log
14407{
14408 echo
14409 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
14410## Running $as_me. ##
14411_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000014412 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014413} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014414
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014415_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014416cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014417_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014418
Matthias Kloseb9621712010-04-24 17:59:49 +000014419cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014420
14421# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000014422for ac_config_target in $ac_config_targets
14423do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014424 case $ac_config_target in
14425 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
14426 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
14427 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014428 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
14429 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014430 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
14431 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000014432 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000014433 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014434
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014435 *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014436 esac
14437done
14438
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014439
Martin v. Löwis11437992002-04-12 09:54:03 +000014440# If the user did not use the arguments to specify the items to instantiate,
14441# then the envvar interface is used. Set only those that are not.
14442# We use the long form for the default assignment because of an extremely
14443# bizarre bug on SunOS 4.1.3.
14444if $ac_need_defaults; then
14445 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
14446 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
14447fi
14448
Skip Montanaro6dead952003-09-25 14:50:04 +000014449# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014450# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000014451# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014452# Hook for its removal unless debugging.
14453# Note that there is a small window in which the directory will not be cleaned:
14454# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000014455$debug ||
14456{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014457 tmp=
14458 trap 'exit_status=$?
14459 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
14460' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000014461 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000014462}
Martin v. Löwis11437992002-04-12 09:54:03 +000014463# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000014464
Martin v. Löwis11437992002-04-12 09:54:03 +000014465{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014466 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000014467 test -n "$tmp" && test -d "$tmp"
14468} ||
14469{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014470 tmp=./conf$$-$RANDOM
14471 (umask 077 && mkdir "$tmp")
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014472} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000014473
Matthias Kloseb9621712010-04-24 17:59:49 +000014474# Set up the scripts for CONFIG_FILES section.
14475# No need to generate them if there are no CONFIG_FILES.
14476# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014477if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014478
Matthias Kloseb9621712010-04-24 17:59:49 +000014479
14480ac_cr=`echo X | tr X '\015'`
14481# On cygwin, bash can eat \r inside `` if the user requested igncr.
14482# But we know of no other shell where ac_cr would be empty at this
14483# point, so we can use a bashism as a fallback.
14484if test "x$ac_cr" = x; then
14485 eval ac_cr=\$\'\\r\'
14486fi
14487ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
14488if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014489 ac_cs_awk_cr='\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000014490else
14491 ac_cs_awk_cr=$ac_cr
14492fi
14493
14494echo 'BEGIN {' >"$tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000014495_ACEOF
14496
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014497
Matthias Kloseb9621712010-04-24 17:59:49 +000014498{
14499 echo "cat >conf$$subs.awk <<_ACEOF" &&
14500 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
14501 echo "_ACEOF"
14502} >conf$$subs.sh ||
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014503 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
14504ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014505ac_delim='%!_!# '
14506for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000014507 . ./conf$$subs.sh ||
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014508 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014509
Matthias Kloseb9621712010-04-24 17:59:49 +000014510 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
14511 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014512 break
14513 elif $ac_last_try; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014514 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014515 else
14516 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000014517 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014518done
Matthias Kloseb9621712010-04-24 17:59:49 +000014519rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014520
Matthias Kloseb9621712010-04-24 17:59:49 +000014521cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14522cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014523_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014524sed -n '
14525h
14526s/^/S["/; s/!.*/"]=/
14527p
14528g
14529s/^[^!]*!//
14530:repl
14531t repl
14532s/'"$ac_delim"'$//
14533t delim
14534:nl
14535h
14536s/\(.\{148\}\)..*/\1/
14537t more1
14538s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
14539p
14540n
14541b repl
14542:more1
14543s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14544p
14545g
14546s/.\{148\}//
14547t nl
14548:delim
14549h
14550s/\(.\{148\}\)..*/\1/
14551t more2
14552s/["\\]/\\&/g; s/^/"/; s/$/"/
14553p
14554b
14555:more2
14556s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14557p
14558g
14559s/.\{148\}//
14560t delim
14561' <conf$$subs.awk | sed '
14562/^[^""]/{
14563 N
14564 s/\n//
14565}
14566' >>$CONFIG_STATUS || ac_write_fail=1
14567rm -f conf$$subs.awk
14568cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14569_ACAWK
14570cat >>"\$tmp/subs1.awk" <<_ACAWK &&
14571 for (key in S) S_is_set[key] = 1
14572 FS = ""
14573
14574}
14575{
14576 line = $ 0
14577 nfields = split(line, field, "@")
14578 substed = 0
14579 len = length(field[1])
14580 for (i = 2; i < nfields; i++) {
14581 key = field[i]
14582 keylen = length(key)
14583 if (S_is_set[key]) {
14584 value = S[key]
14585 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
14586 len += length(value) + length(field[++i])
14587 substed = 1
14588 } else
14589 len += 1 + keylen
14590 }
14591
14592 print line
14593}
14594
14595_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014596_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014597cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14598if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
14599 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
14600else
14601 cat
14602fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014603 || as_fn_error "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014604_ACEOF
14605
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014606# VPATH may cause trouble with some makes, so we remove $(srcdir),
14607# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014608# trailing colons and then remove the whole line if VPATH becomes empty
14609# (actually we leave an empty line to preserve line numbers).
14610if test "x$srcdir" = x.; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014611 ac_vpsub='/^[ ]*VPATH[ ]*=/{
14612s/:*\$(srcdir):*/:/
14613s/:*\${srcdir}:*/:/
14614s/:*@srcdir@:*/:/
14615s/^\([^=]*=[ ]*\):*/\1/
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014616s/:*$//
14617s/^[^=]*=[ ]*$//
14618}'
14619fi
14620
Matthias Kloseb9621712010-04-24 17:59:49 +000014621cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014622fi # test -n "$CONFIG_FILES"
14623
Matthias Kloseb9621712010-04-24 17:59:49 +000014624# Set up the scripts for CONFIG_HEADERS section.
14625# No need to generate them if there are no CONFIG_HEADERS.
14626# This happens for instance with `./config.status Makefile'.
14627if test -n "$CONFIG_HEADERS"; then
14628cat >"$tmp/defines.awk" <<\_ACAWK ||
14629BEGIN {
14630_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014631
Matthias Kloseb9621712010-04-24 17:59:49 +000014632# Transform confdefs.h into an awk script `defines.awk', embedded as
14633# here-document in config.status, that substitutes the proper values into
14634# config.h.in to produce config.h.
14635
14636# Create a delimiter string that does not exist in confdefs.h, to ease
14637# handling of long lines.
14638ac_delim='%!_!# '
14639for ac_last_try in false false :; do
14640 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
14641 if test -z "$ac_t"; then
14642 break
14643 elif $ac_last_try; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014644 as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000014645 else
14646 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
14647 fi
14648done
14649
14650# For the awk script, D is an array of macro values keyed by name,
14651# likewise P contains macro parameters if any. Preserve backslash
14652# newline sequences.
14653
14654ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
14655sed -n '
14656s/.\{148\}/&'"$ac_delim"'/g
14657t rset
14658:rset
14659s/^[ ]*#[ ]*define[ ][ ]*/ /
14660t def
14661d
14662:def
14663s/\\$//
14664t bsnl
14665s/["\\]/\\&/g
14666s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14667D["\1"]=" \3"/p
14668s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
14669d
14670:bsnl
14671s/["\\]/\\&/g
14672s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14673D["\1"]=" \3\\\\\\n"\\/p
14674t cont
14675s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
14676t cont
14677d
14678:cont
14679n
14680s/.\{148\}/&'"$ac_delim"'/g
14681t clear
14682:clear
14683s/\\$//
14684t bsnlc
14685s/["\\]/\\&/g; s/^/"/; s/$/"/p
14686d
14687:bsnlc
14688s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
14689b cont
14690' <confdefs.h | sed '
14691s/'"$ac_delim"'/"\\\
14692"/g' >>$CONFIG_STATUS || ac_write_fail=1
14693
14694cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14695 for (key in D) D_is_set[key] = 1
14696 FS = ""
14697}
14698/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
14699 line = \$ 0
14700 split(line, arg, " ")
14701 if (arg[1] == "#") {
14702 defundef = arg[2]
14703 mac1 = arg[3]
14704 } else {
14705 defundef = substr(arg[1], 2)
14706 mac1 = arg[2]
14707 }
14708 split(mac1, mac2, "(") #)
14709 macro = mac2[1]
14710 prefix = substr(line, 1, index(line, defundef) - 1)
14711 if (D_is_set[macro]) {
14712 # Preserve the white space surrounding the "#".
14713 print prefix "define", macro P[macro] D[macro]
14714 next
14715 } else {
14716 # Replace #undef with comments. This is necessary, for example,
14717 # in the case of _POSIX_SOURCE, which is predefined and required
14718 # on some systems where configure will not decide to define it.
14719 if (defundef == "undef") {
14720 print "/*", prefix defundef, macro, "*/"
14721 next
14722 }
14723 }
14724}
14725{ print }
14726_ACAWK
14727_ACEOF
14728cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014729 as_fn_error "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000014730fi # test -n "$CONFIG_HEADERS"
14731
14732
14733eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
14734shift
14735for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014736do
14737 case $ac_tag in
14738 :[FHLC]) ac_mode=$ac_tag; continue;;
14739 esac
14740 case $ac_mode$ac_tag in
14741 :[FHL]*:*);;
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014742 :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014743 :[FH]-) ac_tag=-:-;;
14744 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
14745 esac
14746 ac_save_IFS=$IFS
14747 IFS=:
14748 set x $ac_tag
14749 IFS=$ac_save_IFS
14750 shift
14751 ac_file=$1
14752 shift
14753
14754 case $ac_mode in
14755 :L) ac_source=$1;;
14756 :[FH])
14757 ac_file_inputs=
14758 for ac_f
14759 do
14760 case $ac_f in
14761 -) ac_f="$tmp/stdin";;
14762 *) # Look for the file first in the build tree, then in the source tree
14763 # (if the path is not absolute). The absolute path cannot be DOS-style,
14764 # because $ac_f cannot contain `:'.
14765 test -f "$ac_f" ||
14766 case $ac_f in
14767 [\\/$]*) false;;
14768 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
14769 esac ||
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014770 as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014771 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014772 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
14773 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014774 done
14775
14776 # Let's still pretend it is `configure' which instantiates (i.e., don't
14777 # use $as_me), people would be surprised to read:
14778 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014779 configure_input='Generated from '`
14780 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
14781 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014782 if test x"$ac_file" != x-; then
14783 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000014784 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
14785$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014786 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014787 # Neutralize special characters interpreted by sed in replacement strings.
14788 case $configure_input in #(
14789 *\&* | *\|* | *\\* )
14790 ac_sed_conf_input=`$as_echo "$configure_input" |
14791 sed 's/[\\\\&|]/\\\\&/g'`;; #(
14792 *) ac_sed_conf_input=$configure_input;;
14793 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014794
14795 case $ac_tag in
Matthias Kloseb9621712010-04-24 17:59:49 +000014796 *:-:* | *:-) cat >"$tmp/stdin" \
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014797 || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014798 esac
14799 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014800 esac
14801
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014802 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000014803$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014804 X"$ac_file" : 'X\(//\)[^/]' \| \
14805 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014806 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014807$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014808 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14809 s//\1/
14810 q
14811 }
14812 /^X\(\/\/\)[^/].*/{
14813 s//\1/
14814 q
14815 }
14816 /^X\(\/\/\)$/{
14817 s//\1/
14818 q
14819 }
14820 /^X\(\/\).*/{
14821 s//\1/
14822 q
14823 }
14824 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000014825 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000014826 ac_builddir=.
14827
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014828case "$ac_dir" in
14829.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
14830*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014831 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014832 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000014833 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014834 case $ac_top_builddir_sub in
14835 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
14836 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
14837 esac ;;
14838esac
14839ac_abs_top_builddir=$ac_pwd
14840ac_abs_builddir=$ac_pwd$ac_dir_suffix
14841# for backward compatibility:
14842ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000014843
14844case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014845 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000014846 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014847 ac_top_srcdir=$ac_top_builddir_sub
14848 ac_abs_top_srcdir=$ac_pwd ;;
14849 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000014850 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014851 ac_top_srcdir=$srcdir
14852 ac_abs_top_srcdir=$srcdir ;;
14853 *) # Relative name.
14854 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
14855 ac_top_srcdir=$ac_top_build_prefix$srcdir
14856 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014857esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014858ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000014859
Martin v. Löwis11437992002-04-12 09:54:03 +000014860
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014861 case $ac_mode in
14862 :F)
14863 #
14864 # CONFIG_FILE
14865 #
Martin v. Löwis11437992002-04-12 09:54:03 +000014866
14867 case $INSTALL in
14868 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014869 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014870 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000014871_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014872
Matthias Kloseb9621712010-04-24 17:59:49 +000014873cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014874# If the template does not know about datarootdir, expand it.
14875# FIXME: This hack should be removed a few years after 2.60.
14876ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000014877ac_sed_dataroot='
14878/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014879 p
14880 q
14881}
14882/@datadir@/p
14883/@docdir@/p
14884/@infodir@/p
14885/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000014886/@mandir@/p'
14887case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014888*datarootdir*) ac_datarootdir_seen=yes;;
14889*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014890 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
14891$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014892_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014893cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014894 ac_datarootdir_hack='
14895 s&@datadir@&$datadir&g
14896 s&@docdir@&$docdir&g
14897 s&@infodir@&$infodir&g
14898 s&@localedir@&$localedir&g
14899 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000014900 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014901esac
14902_ACEOF
14903
14904# Neutralize VPATH when `$srcdir' = `.'.
14905# Shell code in configure.ac might set extrasub.
14906# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000014907cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14908ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000014909$extrasub
14910_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014911cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014912:t
14913/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000014914s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014915s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000014916s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014917s&@srcdir@&$ac_srcdir&;t t
14918s&@abs_srcdir@&$ac_abs_srcdir&;t t
14919s&@top_srcdir@&$ac_top_srcdir&;t t
14920s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
14921s&@builddir@&$ac_builddir&;t t
14922s&@abs_builddir@&$ac_abs_builddir&;t t
14923s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
14924s&@INSTALL@&$ac_INSTALL&;t t
14925$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000014926"
14927eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014928 || as_fn_error "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014929
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014930test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
14931 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
14932 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000014933 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014934which seems to be undefined. Please make sure it is defined." >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014935$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014936which seems to be undefined. Please make sure it is defined." >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014937
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014938 rm -f "$tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000014939 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +000014940 -) cat "$tmp/out" && rm -f "$tmp/out";;
14941 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
14942 esac \
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014943 || as_fn_error "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014944 ;;
14945 :H)
14946 #
14947 # CONFIG_HEADER
14948 #
Martin v. Löwis11437992002-04-12 09:54:03 +000014949 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014950 {
14951 $as_echo "/* $configure_input */" \
14952 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
14953 } >"$tmp/config.h" \
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014954 || as_fn_error "could not create $ac_file" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000014955 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
14956 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
14957$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000014958 else
Matthias Kloseb9621712010-04-24 17:59:49 +000014959 rm -f "$ac_file"
14960 mv "$tmp/config.h" "$ac_file" \
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014961 || as_fn_error "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000014962 fi
14963 else
Matthias Kloseb9621712010-04-24 17:59:49 +000014964 $as_echo "/* $configure_input */" \
14965 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014966 || as_fn_error "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000014967 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014968 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000014969
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014970
14971 esac
14972
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000014973
14974 case $ac_file$ac_mode in
14975 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
14976
14977 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014978done # for ac_tag
14979
Guido van Rossum627b2d71993-12-24 10:39:16 +000014980
Matthias Kloseb9621712010-04-24 17:59:49 +000014981as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000014982_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014983ac_clean_files=$ac_clean_files_save
14984
Matthias Kloseb9621712010-04-24 17:59:49 +000014985test $ac_write_fail = 0 ||
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014986 as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000014987
Martin v. Löwis11437992002-04-12 09:54:03 +000014988
14989# configure is writing to config.log, and then calls config.status.
14990# config.status does its own redirection, appending to config.log.
14991# Unfortunately, on DOS this fails, as config.log is still kept open
14992# by configure, so config.status won't be able to write to it; its
14993# output is simply discarded. So we exec the FD to /dev/null,
14994# effectively closing config.log, so it can be properly (re)opened and
14995# appended to by config.status. When coming back to configure, we
14996# need to make the FD available again.
14997if test "$no_create" != yes; then
14998 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000014999 ac_config_status_args=
15000 test "$silent" = yes &&
15001 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000015002 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000015003 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000015004 exec 5>>config.log
15005 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
15006 # would make configure fail if this is the last instruction.
Benjamin Petersond7f73e92010-09-05 00:09:07 +000015007 $ac_cs_success || as_fn_exit $?
Matthias Kloseb9621712010-04-24 17:59:49 +000015008fi
15009if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
15010 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
15011$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015012fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000015013
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015014
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015015echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015016if test ! -f Modules/Setup
15017then
15018 cp $srcdir/Modules/Setup.dist Modules/Setup
15019fi
15020
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015021echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015022if test ! -f Modules/Setup.local
15023then
15024 echo "# Edit this file for local setup changes" >Modules/Setup.local
15025fi
15026
15027echo "creating Makefile"
15028$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
15029 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000015030 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000015031mv config.c Modules