blob: 5d70137da52ce4d84a3092e9afdedbe9d2ee33d3 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Benjamin Petersond8d835b2010-10-15 23:14:46 +00002# From configure.in Revision: 85554 .
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004# Generated by GNU Autoconf 2.67 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,
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000010# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
11# Foundation, 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"
Barry Warsaw8cf4eae2010-10-16 01:04: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
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000363# as_fn_error STATUS 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
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000367# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +0000368as_fn_error ()
369{
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000370 as_status=$1; test $as_status -eq 0 && as_status=1
371 if test "$4"; then
372 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
373 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +0000374 fi
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000375 $as_echo "$as_me: error: $2" >&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.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000537# hostname on some systems (SVR3.2, old GNU/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
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000634ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000635LN
636INSTALL_DATA
637INSTALL_SCRIPT
638INSTALL_PROGRAM
639SVNVERSION
640ARFLAGS
641AR
642RANLIB
Daniel Stutzbacha606faa2010-08-31 19:51:07 +0000643USE_INLINE
Matthias Kloseb9621712010-04-24 17:59:49 +0000644GNULD
645LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000646LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000647RUNSHARED
648INSTSONAME
649LDLIBRARYDIR
650BLDLIBRARY
651DLLLIBRARY
652LDLIBRARY
653LIBRARY
654BUILDEXEEXT
655EGREP
656GREP
657CPP
658MAINCC
659CXX
660OBJEXT
661EXEEXT
662ac_ct_CC
663CPPFLAGS
664LDFLAGS
665CFLAGS
666CC
667EXPORT_MACOSX_DEPLOYMENT_TARGET
668CONFIGURE_MACOSX_DEPLOYMENT_TARGET
669SGI_ABI
670MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000671FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000672FRAMEWORKUNIXTOOLSPREFIX
673FRAMEWORKALTINSTALLLAST
674FRAMEWORKALTINSTALLFIRST
675FRAMEWORKINSTALLLAST
676FRAMEWORKINSTALLFIRST
677PYTHONFRAMEWORKINSTALLDIR
678PYTHONFRAMEWORKPREFIX
679PYTHONFRAMEWORKDIR
680PYTHONFRAMEWORKIDENTIFIER
681PYTHONFRAMEWORK
682LIPO_32BIT_FLAGS
683ARCH_RUN_32BIT
684UNIVERSALSDK
685CONFIG_ARGS
686SOVERSION
687VERSION
688target_alias
689host_alias
690build_alias
691LIBS
692ECHO_T
693ECHO_N
694ECHO_C
695DEFS
696mandir
697localedir
698libdir
699psdir
700pdfdir
701dvidir
702htmldir
703infodir
704docdir
705oldincludedir
706includedir
707localstatedir
708sharedstatedir
709sysconfdir
710datadir
711datarootdir
712libexecdir
713sbindir
714bindir
715program_transform_name
716prefix
717exec_prefix
718PACKAGE_URL
719PACKAGE_BUGREPORT
720PACKAGE_STRING
721PACKAGE_VERSION
722PACKAGE_TARNAME
723PACKAGE_NAME
724PATH_SEPARATOR
725SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000726ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000727ac_user_opts='
728enable_option_checking
729enable_universalsdk
730with_universal_archs
731with_framework_name
732enable_framework
733with_gcc
734with_cxx_main
735with_suffix
736enable_shared
737enable_profiling
738with_pydebug
739with_libs
740with_system_expat
741with_system_ffi
742with_dbmliborder
743with_signal_module
744with_dec_threads
745with_threads
746with_thread
747enable_ipv6
748with_doc_strings
749with_tsc
750with_pymalloc
751with_valgrind
Matthias Kloseb9621712010-04-24 17:59:49 +0000752with_fpectl
753with_libm
754with_libc
755enable_big_digits
756with_wide_unicode
757with_computed_gotos
758'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000759 ac_precious_vars='build_alias
760host_alias
761target_alias
762CC
763CFLAGS
764LDFLAGS
765LIBS
766CPPFLAGS
767CPP'
768
Guido van Rossum627b2d71993-12-24 10:39:16 +0000769
Guido van Rossum7f43da71994-08-01 12:15:30 +0000770# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000771ac_init_help=
772ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000773ac_unrecognized_opts=
774ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000775# The variables have the same names as the options, with
776# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000777cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000778exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000779no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000780no_recursion=
781prefix=NONE
782program_prefix=NONE
783program_suffix=NONE
784program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000785silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000786site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000787srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000788verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000789x_includes=NONE
790x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000791
792# Installation directory options.
793# These are left unexpanded so users can "make install exec_prefix=/foo"
794# and all the variables that are supposed to be based on exec_prefix
795# by default will actually change.
796# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000797# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000798bindir='${exec_prefix}/bin'
799sbindir='${exec_prefix}/sbin'
800libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000801datarootdir='${prefix}/share'
802datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000803sysconfdir='${prefix}/etc'
804sharedstatedir='${prefix}/com'
805localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000806includedir='${prefix}/include'
807oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000808docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
809infodir='${datarootdir}/info'
810htmldir='${docdir}'
811dvidir='${docdir}'
812pdfdir='${docdir}'
813psdir='${docdir}'
814libdir='${exec_prefix}/lib'
815localedir='${datarootdir}/locale'
816mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000817
Guido van Rossum7f43da71994-08-01 12:15:30 +0000818ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000819ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000820for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000821do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000822 # If the previous option needs an argument, assign it.
823 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000824 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000825 ac_prev=
826 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000827 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000828
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000829 case $ac_option in
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000830 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
831 *=) ac_optarg= ;;
832 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000833 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000834
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000835 # Accept the important Cygnus configure options, so we can diagnose typos.
836
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000837 case $ac_dashdash$ac_option in
838 --)
839 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000840
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000841 -bindir | --bindir | --bindi | --bind | --bin | --bi)
842 ac_prev=bindir ;;
843 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000844 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000845
846 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000847 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000848 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000849 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000850
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000851 -cache-file | --cache-file | --cache-fil | --cache-fi \
852 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
853 ac_prev=cache_file ;;
854 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
855 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000856 cache_file=$ac_optarg ;;
857
858 --config-cache | -C)
859 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000860
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000861 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000862 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000863 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000864 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000865
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000866 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
867 | --dataroo | --dataro | --datar)
868 ac_prev=datarootdir ;;
869 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
870 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
871 datarootdir=$ac_optarg ;;
872
Guido van Rossum7f43da71994-08-01 12:15:30 +0000873 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000874 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000875 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000876 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000877 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000878 ac_useropt_orig=$ac_useropt
879 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
880 case $ac_user_opts in
881 *"
882"enable_$ac_useropt"
883"*) ;;
884 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
885 ac_unrecognized_sep=', ';;
886 esac
887 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000888
889 -docdir | --docdir | --docdi | --doc | --do)
890 ac_prev=docdir ;;
891 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
892 docdir=$ac_optarg ;;
893
894 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
895 ac_prev=dvidir ;;
896 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
897 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000898
899 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000900 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000901 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000902 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000903 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000904 ac_useropt_orig=$ac_useropt
905 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
906 case $ac_user_opts in
907 *"
908"enable_$ac_useropt"
909"*) ;;
910 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
911 ac_unrecognized_sep=', ';;
912 esac
913 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000914
Guido van Rossum7f43da71994-08-01 12:15:30 +0000915 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
916 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
917 | --exec | --exe | --ex)
918 ac_prev=exec_prefix ;;
919 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
920 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
921 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000922 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000923
924 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000925 # Obsolete; use --with-gas.
926 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000927
Martin v. Löwis11437992002-04-12 09:54:03 +0000928 -help | --help | --hel | --he | -h)
929 ac_init_help=long ;;
930 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
931 ac_init_help=recursive ;;
932 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
933 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000934
935 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000936 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000937 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000938 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000939
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000940 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
941 ac_prev=htmldir ;;
942 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
943 | --ht=*)
944 htmldir=$ac_optarg ;;
945
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000946 -includedir | --includedir | --includedi | --included | --include \
947 | --includ | --inclu | --incl | --inc)
948 ac_prev=includedir ;;
949 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
950 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000951 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000952
953 -infodir | --infodir | --infodi | --infod | --info | --inf)
954 ac_prev=infodir ;;
955 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000956 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000957
958 -libdir | --libdir | --libdi | --libd)
959 ac_prev=libdir ;;
960 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000961 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000962
963 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
964 | --libexe | --libex | --libe)
965 ac_prev=libexecdir ;;
966 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
967 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000968 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000969
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000970 -localedir | --localedir | --localedi | --localed | --locale)
971 ac_prev=localedir ;;
972 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
973 localedir=$ac_optarg ;;
974
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000975 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000976 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000977 ac_prev=localstatedir ;;
978 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000979 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000980 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000981
982 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
983 ac_prev=mandir ;;
984 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000985 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000986
Guido van Rossum7f43da71994-08-01 12:15:30 +0000987 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000988 # Obsolete; use --without-fp.
989 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000990
991 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +0000992 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000993 no_create=yes ;;
994
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000995 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
996 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
997 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000998
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000999 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1000 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1001 | --oldin | --oldi | --old | --ol | --o)
1002 ac_prev=oldincludedir ;;
1003 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1004 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1005 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001006 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001007
Guido van Rossum7f43da71994-08-01 12:15:30 +00001008 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1009 ac_prev=prefix ;;
1010 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001011 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001012
1013 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1014 | --program-pre | --program-pr | --program-p)
1015 ac_prev=program_prefix ;;
1016 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1017 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001018 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001019
1020 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1021 | --program-suf | --program-su | --program-s)
1022 ac_prev=program_suffix ;;
1023 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1024 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001025 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001026
1027 -program-transform-name | --program-transform-name \
1028 | --program-transform-nam | --program-transform-na \
1029 | --program-transform-n | --program-transform- \
1030 | --program-transform | --program-transfor \
1031 | --program-transfo | --program-transf \
1032 | --program-trans | --program-tran \
1033 | --progr-tra | --program-tr | --program-t)
1034 ac_prev=program_transform_name ;;
1035 -program-transform-name=* | --program-transform-name=* \
1036 | --program-transform-nam=* | --program-transform-na=* \
1037 | --program-transform-n=* | --program-transform-=* \
1038 | --program-transform=* | --program-transfor=* \
1039 | --program-transfo=* | --program-transf=* \
1040 | --program-trans=* | --program-tran=* \
1041 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001042 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001043
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001044 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1045 ac_prev=pdfdir ;;
1046 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1047 pdfdir=$ac_optarg ;;
1048
1049 -psdir | --psdir | --psdi | --psd | --ps)
1050 ac_prev=psdir ;;
1051 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1052 psdir=$ac_optarg ;;
1053
Guido van Rossum7f43da71994-08-01 12:15:30 +00001054 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1055 | -silent | --silent | --silen | --sile | --sil)
1056 silent=yes ;;
1057
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001058 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1059 ac_prev=sbindir ;;
1060 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1061 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001062 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001063
1064 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1065 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1066 | --sharedst | --shareds | --shared | --share | --shar \
1067 | --sha | --sh)
1068 ac_prev=sharedstatedir ;;
1069 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1070 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1071 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1072 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001073 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001074
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001075 -site | --site | --sit)
1076 ac_prev=site ;;
1077 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001078 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001079
Guido van Rossum7f43da71994-08-01 12:15:30 +00001080 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1081 ac_prev=srcdir ;;
1082 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001083 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001084
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001085 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1086 | --syscon | --sysco | --sysc | --sys | --sy)
1087 ac_prev=sysconfdir ;;
1088 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1089 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001090 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001091
Guido van Rossum7f43da71994-08-01 12:15:30 +00001092 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001093 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001094 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001095 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001096
1097 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1098 verbose=yes ;;
1099
Martin v. Löwis11437992002-04-12 09:54:03 +00001100 -version | --version | --versio | --versi | --vers | -V)
1101 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001102
1103 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001104 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001105 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001106 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00001107 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001108 ac_useropt_orig=$ac_useropt
1109 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1110 case $ac_user_opts in
1111 *"
1112"with_$ac_useropt"
1113"*) ;;
1114 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1115 ac_unrecognized_sep=', ';;
1116 esac
1117 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001118
1119 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001120 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001121 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001122 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00001123 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001124 ac_useropt_orig=$ac_useropt
1125 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1126 case $ac_user_opts in
1127 *"
1128"with_$ac_useropt"
1129"*) ;;
1130 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1131 ac_unrecognized_sep=', ';;
1132 esac
1133 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001134
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001135 --x)
1136 # Obsolete; use --with-x.
1137 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001138
1139 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1140 | --x-incl | --x-inc | --x-in | --x-i)
1141 ac_prev=x_includes ;;
1142 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1143 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001144 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001145
1146 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1147 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1148 ac_prev=x_libraries ;;
1149 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1150 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001151 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001152
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00001153 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1154Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001155 ;;
1156
Martin v. Löwis11437992002-04-12 09:54:03 +00001157 *=*)
1158 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1159 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001160 case $ac_envvar in #(
1161 '' | [0-9]* | *[!_$as_cr_alnum]* )
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00001162 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001163 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001164 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001165 export $ac_envvar ;;
1166
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001167 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001168 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001169 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001170 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001171 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001172 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
Guido van Rossum7f43da71994-08-01 12:15:30 +00001173 ;;
1174
1175 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001176done
1177
Guido van Rossum7f43da71994-08-01 12:15:30 +00001178if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001179 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00001180 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001181fi
1182
Matthias Kloseb9621712010-04-24 17:59:49 +00001183if test -n "$ac_unrecognized_opts"; then
1184 case $enable_option_checking in
1185 no) ;;
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00001186 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001187 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1188 esac
1189fi
1190
1191# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001192for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1193 datadir sysconfdir sharedstatedir localstatedir includedir \
1194 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1195 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001196do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001197 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001198 # Remove trailing slashes.
1199 case $ac_val in
1200 */ )
1201 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1202 eval $ac_var=\$ac_val;;
1203 esac
1204 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001205 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001206 [\\/$]* | ?:[\\/]* ) continue;;
1207 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001208 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00001209 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001210done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001211
Martin v. Löwis11437992002-04-12 09:54:03 +00001212# There might be people who depend on the old broken behavior: `$host'
1213# used to hold the argument of --host etc.
1214# FIXME: To remove some day.
1215build=$build_alias
1216host=$host_alias
1217target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001218
Martin v. Löwis11437992002-04-12 09:54:03 +00001219# FIXME: To remove some day.
1220if test "x$host_alias" != x; then
1221 if test "x$build_alias" = x; then
1222 cross_compiling=maybe
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00001223 $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
1224 If a cross compiler is detected then cross compile mode will be used" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001225 elif test "x$build_alias" != "x$host_alias"; then
1226 cross_compiling=yes
1227 fi
1228fi
1229
1230ac_tool_prefix=
1231test -n "$host_alias" && ac_tool_prefix=$host_alias-
1232
1233test "$silent" = yes && exec 6>/dev/null
1234
Guido van Rossum627b2d71993-12-24 10:39:16 +00001235
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001236ac_pwd=`pwd` && test -n "$ac_pwd" &&
1237ac_ls_di=`ls -di .` &&
1238ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00001239 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001240test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00001241 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001242
1243
Guido van Rossum627b2d71993-12-24 10:39:16 +00001244# Find the source files, if location was not specified.
1245if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001246 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001247 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001248 ac_confdir=`$as_dirname -- "$as_myself" ||
1249$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1250 X"$as_myself" : 'X\(//\)[^/]' \| \
1251 X"$as_myself" : 'X\(//\)$' \| \
1252 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1253$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001254 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1255 s//\1/
1256 q
1257 }
1258 /^X\(\/\/\)[^/].*/{
1259 s//\1/
1260 q
1261 }
1262 /^X\(\/\/\)$/{
1263 s//\1/
1264 q
1265 }
1266 /^X\(\/\).*/{
1267 s//\1/
1268 q
1269 }
1270 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001271 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001272 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001273 srcdir=..
1274 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001275else
1276 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001277fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001278if test ! -r "$srcdir/$ac_unique_file"; then
1279 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00001280 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001281fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001282ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1283ac_abs_confdir=`(
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00001284 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001285 pwd)`
1286# When building in place, set srcdir=.
1287if test "$ac_abs_confdir" = "$ac_pwd"; then
1288 srcdir=.
1289fi
1290# Remove unnecessary trailing slashes from srcdir.
1291# Double slashes in file names in object file debugging info
1292# mess up M-x gdb in Emacs.
1293case $srcdir in
1294*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1295esac
1296for ac_var in $ac_precious_vars; do
1297 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1298 eval ac_env_${ac_var}_value=\$${ac_var}
1299 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1300 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1301done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001302
Martin v. Löwis11437992002-04-12 09:54:03 +00001303#
1304# Report the --help message.
1305#
1306if test "$ac_init_help" = "long"; then
1307 # Omit some internal or obsolete options to make the list less imposing.
1308 # This message is too long to be a string in the A/UX 3.1 sh.
1309 cat <<_ACEOF
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001310\`configure' configures python 3.2 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001311
1312Usage: $0 [OPTION]... [VAR=VALUE]...
1313
1314To assign environment variables (e.g., CC, CFLAGS...), specify them as
1315VAR=VALUE. See below for descriptions of some of the useful variables.
1316
1317Defaults for the options are specified in brackets.
1318
1319Configuration:
1320 -h, --help display this help and exit
1321 --help=short display options specific to this package
1322 --help=recursive display the short help of all the included packages
1323 -V, --version display version information and exit
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00001324 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001325 --cache-file=FILE cache test results in FILE [disabled]
1326 -C, --config-cache alias for \`--cache-file=config.cache'
1327 -n, --no-create do not create output files
1328 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1329
Martin v. Löwis11437992002-04-12 09:54:03 +00001330Installation directories:
1331 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001332 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001333 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001334 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001335
1336By default, \`make install' will install all the files in
1337\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1338an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1339for instance \`--prefix=\$HOME'.
1340
1341For better control, use the options below.
1342
1343Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001344 --bindir=DIR user executables [EPREFIX/bin]
1345 --sbindir=DIR system admin executables [EPREFIX/sbin]
1346 --libexecdir=DIR program executables [EPREFIX/libexec]
1347 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1348 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1349 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1350 --libdir=DIR object code libraries [EPREFIX/lib]
1351 --includedir=DIR C header files [PREFIX/include]
1352 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1353 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1354 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1355 --infodir=DIR info documentation [DATAROOTDIR/info]
1356 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1357 --mandir=DIR man documentation [DATAROOTDIR/man]
1358 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1359 --htmldir=DIR html documentation [DOCDIR]
1360 --dvidir=DIR dvi documentation [DOCDIR]
1361 --pdfdir=DIR pdf documentation [DOCDIR]
1362 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001363_ACEOF
1364
1365 cat <<\_ACEOF
1366_ACEOF
1367fi
1368
1369if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001370 case $ac_init_help in
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001371 short | recursive ) echo "Configuration of python 3.2:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001372 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001373 cat <<\_ACEOF
1374
1375Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001376 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001377 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1378 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001379 --enable-universalsdk[=SDKDIR]
Christian Heimes292d3512008-02-03 16:51:08 +00001380 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001381 --enable-framework[=INSTALLDIR]
1382 Build (MacOSX|Darwin) framework
1383 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001384 --enable-profiling enable C-level code profiling
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001385 --enable-ipv6 Enable ipv6 (with ipv4) support
1386 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001387 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001388 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001389
1390Optional Packages:
1391 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1392 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001393 --with-universal-archs=ARCH
1394 select architectures for universal build ("32-bit",
Ronald Oussoren3c064c12009-09-08 07:12:42 +00001395 "64-bit", "3-way", "intel" or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001396 --with-framework-name=FRAMEWORK
1397 specify an alternate name of the framework built
1398 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001399 --without-gcc never use gcc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001400 --with-cxx-main=<compiler>
1401 compile main() and link python executable with C++
1402 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001403 --with-suffix=.exe set executable suffix
1404 --with-pydebug build with Py_DEBUG defined
1405 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001406 --with-system-expat build pyexpat module using an installed expat
1407 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001408 --with-system-ffi build _ctypes module using an installed ffi library
Matthias Klose55708cc2009-04-30 08:06:49 +00001409 --with-dbmliborder=db1:db2:...
1410 order to check db backends for dbm. Valid value is a
1411 colon separated string with the backend names
1412 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001413 --with-signal-module disable/enable signal module
1414 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1415 --with(out)-threads[=DIRECTORY]
1416 disable/enable thread support
1417 --with(out)-thread[=DIRECTORY]
1418 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001419 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001420 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001421 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001422 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001423 --with-fpectl enable SIGFPE catching
1424 --with-libm=STRING math library
1425 --with-libc=STRING C library
Georg Brandl52d168a2008-01-07 18:10:24 +00001426 --with-wide-unicode Use 4-byte Unicode characters (default is 2 bytes)
Antoine Pitrou042b1282010-08-13 21:15:58 +00001427 --with(out)-computed-gotos
1428 Use computed gotos in evaluation loop (enabled by
1429 default on supported compilers)
Martin v. Löwis11437992002-04-12 09:54:03 +00001430
1431Some influential environment variables:
1432 CC C compiler command
1433 CFLAGS C compiler flags
1434 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1435 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001436 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001437 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001438 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001439 CPP C preprocessor
1440
1441Use these variables to override the choices made by `configure' or to help
1442it to find libraries and programs with nonstandard names/locations.
1443
Georg Brandle2e15612009-05-20 18:25:10 +00001444Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001445_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001446ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001447fi
1448
1449if test "$ac_init_help" = "recursive"; then
1450 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001451 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001452 test -d "$ac_dir" ||
1453 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1454 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001455 ac_builddir=.
1456
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001457case "$ac_dir" in
1458.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1459*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001460 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001461 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001462 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001463 case $ac_top_builddir_sub in
1464 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1465 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1466 esac ;;
1467esac
1468ac_abs_top_builddir=$ac_pwd
1469ac_abs_builddir=$ac_pwd$ac_dir_suffix
1470# for backward compatibility:
1471ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001472
1473case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001474 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001475 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001476 ac_top_srcdir=$ac_top_builddir_sub
1477 ac_abs_top_srcdir=$ac_pwd ;;
1478 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001479 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001480 ac_top_srcdir=$srcdir
1481 ac_abs_top_srcdir=$srcdir ;;
1482 *) # Relative name.
1483 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1484 ac_top_srcdir=$ac_top_build_prefix$srcdir
1485 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001486esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001487ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001488
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001489 cd "$ac_dir" || { ac_status=$?; continue; }
1490 # Check for guested configure.
1491 if test -f "$ac_srcdir/configure.gnu"; then
1492 echo &&
1493 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1494 elif test -f "$ac_srcdir/configure"; then
1495 echo &&
1496 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001497 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001498 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001499 fi || ac_status=$?
1500 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001501 done
1502fi
1503
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001504test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001505if $ac_init_version; then
1506 cat <<\_ACEOF
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001507python configure 3.2
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00001508generated by GNU Autoconf 2.67
Martin v. Löwis11437992002-04-12 09:54:03 +00001509
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00001510Copyright (C) 2010 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001511This configure script is free software; the Free Software Foundation
1512gives unlimited permission to copy, distribute and modify it.
1513_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001514 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001515fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001516
1517## ------------------------ ##
1518## Autoconf initialization. ##
1519## ------------------------ ##
1520
1521# ac_fn_c_try_compile LINENO
1522# --------------------------
1523# Try to compile conftest.$ac_ext, and return whether this succeeded.
1524ac_fn_c_try_compile ()
1525{
1526 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1527 rm -f conftest.$ac_objext
1528 if { { ac_try="$ac_compile"
1529case "(($ac_try" in
1530 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1531 *) ac_try_echo=$ac_try;;
1532esac
1533eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1534$as_echo "$ac_try_echo"; } >&5
1535 (eval "$ac_compile") 2>conftest.err
1536 ac_status=$?
1537 if test -s conftest.err; then
1538 grep -v '^ *+' conftest.err >conftest.er1
1539 cat conftest.er1 >&5
1540 mv -f conftest.er1 conftest.err
1541 fi
1542 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1543 test $ac_status = 0; } && {
1544 test -z "$ac_c_werror_flag" ||
1545 test ! -s conftest.err
1546 } && test -s conftest.$ac_objext; then :
1547 ac_retval=0
1548else
1549 $as_echo "$as_me: failed program was:" >&5
1550sed 's/^/| /' conftest.$ac_ext >&5
1551
1552 ac_retval=1
1553fi
1554 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1555 as_fn_set_status $ac_retval
1556
1557} # ac_fn_c_try_compile
1558
1559# ac_fn_c_try_cpp LINENO
1560# ----------------------
1561# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1562ac_fn_c_try_cpp ()
1563{
1564 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1565 if { { ac_try="$ac_cpp conftest.$ac_ext"
1566case "(($ac_try" in
1567 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1568 *) ac_try_echo=$ac_try;;
1569esac
1570eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1571$as_echo "$ac_try_echo"; } >&5
1572 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1573 ac_status=$?
1574 if test -s conftest.err; then
1575 grep -v '^ *+' conftest.err >conftest.er1
1576 cat conftest.er1 >&5
1577 mv -f conftest.er1 conftest.err
1578 fi
1579 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00001580 test $ac_status = 0; } > conftest.i && {
Matthias Kloseb9621712010-04-24 17:59:49 +00001581 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1582 test ! -s conftest.err
1583 }; then :
1584 ac_retval=0
1585else
1586 $as_echo "$as_me: failed program was:" >&5
1587sed 's/^/| /' conftest.$ac_ext >&5
1588
1589 ac_retval=1
1590fi
1591 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1592 as_fn_set_status $ac_retval
1593
1594} # ac_fn_c_try_cpp
1595
1596# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1597# -------------------------------------------------------
1598# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1599# the include files in INCLUDES and setting the cache variable VAR
1600# accordingly.
1601ac_fn_c_check_header_mongrel ()
1602{
1603 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00001604 if eval "test \"\${$3+set}\"" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001605 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1606$as_echo_n "checking for $2... " >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00001607if eval "test \"\${$3+set}\"" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001608 $as_echo_n "(cached) " >&6
1609fi
1610eval ac_res=\$$3
1611 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1612$as_echo "$ac_res" >&6; }
1613else
1614 # Is the header compilable?
1615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1616$as_echo_n "checking $2 usability... " >&6; }
1617cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1618/* end confdefs.h. */
1619$4
1620#include <$2>
1621_ACEOF
1622if ac_fn_c_try_compile "$LINENO"; then :
1623 ac_header_compiler=yes
1624else
1625 ac_header_compiler=no
1626fi
1627rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1628{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1629$as_echo "$ac_header_compiler" >&6; }
1630
1631# Is the header present?
1632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1633$as_echo_n "checking $2 presence... " >&6; }
1634cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1635/* end confdefs.h. */
1636#include <$2>
1637_ACEOF
1638if ac_fn_c_try_cpp "$LINENO"; then :
1639 ac_header_preproc=yes
1640else
1641 ac_header_preproc=no
1642fi
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00001643rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001644{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1645$as_echo "$ac_header_preproc" >&6; }
1646
1647# So? What about this header?
1648case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1649 yes:no: )
1650 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1651$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1652 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1653$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1654 ;;
1655 no:yes:* )
1656 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1657$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1658 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1659$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1660 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1661$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1662 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1663$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1664 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1665$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00001666( $as_echo "## -------------------------------------- ##
Matthias Kloseb9621712010-04-24 17:59:49 +00001667## Report this to http://bugs.python.org/ ##
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00001668## -------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001669 ) | sed "s/^/$as_me: WARNING: /" >&2
1670 ;;
1671esac
1672 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1673$as_echo_n "checking for $2... " >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00001674if eval "test \"\${$3+set}\"" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001675 $as_echo_n "(cached) " >&6
1676else
1677 eval "$3=\$ac_header_compiler"
1678fi
1679eval ac_res=\$$3
1680 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1681$as_echo "$ac_res" >&6; }
1682fi
1683 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1684
1685} # ac_fn_c_check_header_mongrel
1686
1687# ac_fn_c_try_run LINENO
1688# ----------------------
1689# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1690# that executables *can* be run.
1691ac_fn_c_try_run ()
1692{
1693 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1694 if { { ac_try="$ac_link"
1695case "(($ac_try" in
1696 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1697 *) ac_try_echo=$ac_try;;
1698esac
1699eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1700$as_echo "$ac_try_echo"; } >&5
1701 (eval "$ac_link") 2>&5
1702 ac_status=$?
1703 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1704 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1705 { { case "(($ac_try" in
1706 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1707 *) ac_try_echo=$ac_try;;
1708esac
1709eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1710$as_echo "$ac_try_echo"; } >&5
1711 (eval "$ac_try") 2>&5
1712 ac_status=$?
1713 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1714 test $ac_status = 0; }; }; then :
1715 ac_retval=0
1716else
1717 $as_echo "$as_me: program exited with status $ac_status" >&5
1718 $as_echo "$as_me: failed program was:" >&5
1719sed 's/^/| /' conftest.$ac_ext >&5
1720
1721 ac_retval=$ac_status
1722fi
1723 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1724 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1725 as_fn_set_status $ac_retval
1726
1727} # ac_fn_c_try_run
1728
1729# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1730# -------------------------------------------------------
1731# Tests whether HEADER exists and can be compiled using the include files in
1732# INCLUDES, setting the cache variable VAR accordingly.
1733ac_fn_c_check_header_compile ()
1734{
1735 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1736 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1737$as_echo_n "checking for $2... " >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00001738if eval "test \"\${$3+set}\"" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001739 $as_echo_n "(cached) " >&6
1740else
1741 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1742/* end confdefs.h. */
1743$4
1744#include <$2>
1745_ACEOF
1746if ac_fn_c_try_compile "$LINENO"; then :
1747 eval "$3=yes"
1748else
1749 eval "$3=no"
1750fi
1751rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1752fi
1753eval ac_res=\$$3
1754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1755$as_echo "$ac_res" >&6; }
1756 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1757
1758} # ac_fn_c_check_header_compile
1759
1760# ac_fn_c_try_link LINENO
1761# -----------------------
1762# Try to link conftest.$ac_ext, and return whether this succeeded.
1763ac_fn_c_try_link ()
1764{
1765 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1766 rm -f conftest.$ac_objext conftest$ac_exeext
1767 if { { ac_try="$ac_link"
1768case "(($ac_try" in
1769 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1770 *) ac_try_echo=$ac_try;;
1771esac
1772eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1773$as_echo "$ac_try_echo"; } >&5
1774 (eval "$ac_link") 2>conftest.err
1775 ac_status=$?
1776 if test -s conftest.err; then
1777 grep -v '^ *+' conftest.err >conftest.er1
1778 cat conftest.er1 >&5
1779 mv -f conftest.er1 conftest.err
1780 fi
1781 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1782 test $ac_status = 0; } && {
1783 test -z "$ac_c_werror_flag" ||
1784 test ! -s conftest.err
1785 } && test -s conftest$ac_exeext && {
1786 test "$cross_compiling" = yes ||
1787 $as_test_x conftest$ac_exeext
1788 }; then :
1789 ac_retval=0
1790else
1791 $as_echo "$as_me: failed program was:" >&5
1792sed 's/^/| /' conftest.$ac_ext >&5
1793
1794 ac_retval=1
1795fi
1796 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1797 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1798 # interfere with the next link command; also delete a directory that is
1799 # left behind by Apple's compiler. We do this before executing the actions.
1800 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1801 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1802 as_fn_set_status $ac_retval
1803
1804} # ac_fn_c_try_link
1805
1806# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1807# -------------------------------------------
1808# Tests whether TYPE exists after having included INCLUDES, setting cache
1809# variable VAR accordingly.
1810ac_fn_c_check_type ()
1811{
1812 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1813 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1814$as_echo_n "checking for $2... " >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00001815if eval "test \"\${$3+set}\"" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001816 $as_echo_n "(cached) " >&6
1817else
1818 eval "$3=no"
1819 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1820/* end confdefs.h. */
1821$4
1822int
1823main ()
1824{
1825if (sizeof ($2))
1826 return 0;
1827 ;
1828 return 0;
1829}
1830_ACEOF
1831if ac_fn_c_try_compile "$LINENO"; then :
1832 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1833/* end confdefs.h. */
1834$4
1835int
1836main ()
1837{
1838if (sizeof (($2)))
1839 return 0;
1840 ;
1841 return 0;
1842}
1843_ACEOF
1844if ac_fn_c_try_compile "$LINENO"; then :
1845
1846else
1847 eval "$3=yes"
1848fi
1849rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1850fi
1851rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1852fi
1853eval ac_res=\$$3
1854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1855$as_echo "$ac_res" >&6; }
1856 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1857
1858} # ac_fn_c_check_type
1859
1860# ac_fn_c_find_uintX_t LINENO BITS VAR
1861# ------------------------------------
1862# Finds an unsigned integer type with width BITS, setting cache variable VAR
1863# accordingly.
1864ac_fn_c_find_uintX_t ()
1865{
1866 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1867 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1868$as_echo_n "checking for uint$2_t... " >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00001869if eval "test \"\${$3+set}\"" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001870 $as_echo_n "(cached) " >&6
1871else
1872 eval "$3=no"
1873 # Order is important - never check a type that is potentially smaller
1874 # than half of the expected target width.
1875 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1876 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1877 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1878/* end confdefs.h. */
1879$ac_includes_default
1880int
1881main ()
1882{
1883static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
1884test_array [0] = 0
1885
1886 ;
1887 return 0;
1888}
1889_ACEOF
1890if ac_fn_c_try_compile "$LINENO"; then :
1891 case $ac_type in #(
1892 uint$2_t) :
1893 eval "$3=yes" ;; #(
1894 *) :
1895 eval "$3=\$ac_type" ;;
1896esac
1897fi
1898rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00001899 if eval test \"x\$"$3"\" = 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; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00001922if eval "test \"\${$3+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
Barry Warsaw278266f2010-10-14 17:38:46 +00001933 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00001934int
1935main ()
1936{
Barry Warsaw278266f2010-10-14 17:38:46 +00001937static int test_array [1 - 2 * !(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
Barry Warsaw278266f2010-10-14 17:38:46 +00001948 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00001949int
1950main ()
1951{
Barry Warsaw278266f2010-10-14 17:38:46 +00001952static int test_array [1 - 2 * !(($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
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00001973 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001974
1975else
1976 break
1977fi
1978 done
1979fi
1980eval ac_res=\$$3
1981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1982$as_echo "$ac_res" >&6; }
1983 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1984
1985} # ac_fn_c_find_intX_t
1986
1987# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1988# --------------------------------------------
1989# Tries to find the compile-time value of EXPR in a program that includes
1990# INCLUDES, setting VAR accordingly. Returns whether the value could be
1991# computed
1992ac_fn_c_compute_int ()
1993{
1994 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1995 if test "$cross_compiling" = yes; then
1996 # Depending upon the size, compute the lo and hi bounds.
1997cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1998/* end confdefs.h. */
1999$4
2000int
2001main ()
2002{
2003static int test_array [1 - 2 * !(($2) >= 0)];
2004test_array [0] = 0
2005
2006 ;
2007 return 0;
2008}
2009_ACEOF
2010if ac_fn_c_try_compile "$LINENO"; then :
2011 ac_lo=0 ac_mid=0
2012 while :; do
2013 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2014/* end confdefs.h. */
2015$4
2016int
2017main ()
2018{
2019static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2020test_array [0] = 0
2021
2022 ;
2023 return 0;
2024}
2025_ACEOF
2026if ac_fn_c_try_compile "$LINENO"; then :
2027 ac_hi=$ac_mid; break
2028else
2029 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2030 if test $ac_lo -le $ac_mid; then
2031 ac_lo= ac_hi=
2032 break
2033 fi
2034 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2035fi
2036rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2037 done
2038else
2039 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2040/* end confdefs.h. */
2041$4
2042int
2043main ()
2044{
2045static int test_array [1 - 2 * !(($2) < 0)];
2046test_array [0] = 0
2047
2048 ;
2049 return 0;
2050}
2051_ACEOF
2052if ac_fn_c_try_compile "$LINENO"; then :
2053 ac_hi=-1 ac_mid=-1
2054 while :; do
2055 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2056/* end confdefs.h. */
2057$4
2058int
2059main ()
2060{
2061static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2062test_array [0] = 0
2063
2064 ;
2065 return 0;
2066}
2067_ACEOF
2068if ac_fn_c_try_compile "$LINENO"; then :
2069 ac_lo=$ac_mid; break
2070else
2071 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2072 if test $ac_mid -le $ac_hi; then
2073 ac_lo= ac_hi=
2074 break
2075 fi
2076 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2077fi
2078rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2079 done
2080else
2081 ac_lo= ac_hi=
2082fi
2083rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2084fi
2085rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2086# Binary search between lo and hi bounds.
2087while test "x$ac_lo" != "x$ac_hi"; do
2088 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2089 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2090/* end confdefs.h. */
2091$4
2092int
2093main ()
2094{
2095static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2096test_array [0] = 0
2097
2098 ;
2099 return 0;
2100}
2101_ACEOF
2102if ac_fn_c_try_compile "$LINENO"; then :
2103 ac_hi=$ac_mid
2104else
2105 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2106fi
2107rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2108done
2109case $ac_lo in #((
2110?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2111'') ac_retval=1 ;;
2112esac
2113 else
2114 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2115/* end confdefs.h. */
2116$4
2117static long int longval () { return $2; }
2118static unsigned long int ulongval () { return $2; }
2119#include <stdio.h>
2120#include <stdlib.h>
2121int
2122main ()
2123{
2124
2125 FILE *f = fopen ("conftest.val", "w");
2126 if (! f)
2127 return 1;
2128 if (($2) < 0)
2129 {
2130 long int i = longval ();
2131 if (i != ($2))
2132 return 1;
2133 fprintf (f, "%ld", i);
2134 }
2135 else
2136 {
2137 unsigned long int i = ulongval ();
2138 if (i != ($2))
2139 return 1;
2140 fprintf (f, "%lu", i);
2141 }
2142 /* Do not output a trailing newline, as this causes \r\n confusion
2143 on some platforms. */
2144 return ferror (f) || fclose (f) != 0;
2145
2146 ;
2147 return 0;
2148}
2149_ACEOF
2150if ac_fn_c_try_run "$LINENO"; then :
2151 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2152else
2153 ac_retval=1
2154fi
2155rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2156 conftest.$ac_objext conftest.beam conftest.$ac_ext
2157rm -f conftest.val
2158
2159 fi
2160 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2161 as_fn_set_status $ac_retval
2162
2163} # ac_fn_c_compute_int
2164
2165# ac_fn_c_check_func LINENO FUNC VAR
2166# ----------------------------------
2167# Tests whether FUNC exists, setting the cache variable VAR accordingly
2168ac_fn_c_check_func ()
2169{
2170 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2171 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2172$as_echo_n "checking for $2... " >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00002173if eval "test \"\${$3+set}\"" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002174 $as_echo_n "(cached) " >&6
2175else
2176 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2177/* end confdefs.h. */
2178/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2179 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2180#define $2 innocuous_$2
2181
2182/* System header to define __stub macros and hopefully few prototypes,
2183 which can conflict with char $2 (); below.
2184 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2185 <limits.h> exists even on freestanding compilers. */
2186
2187#ifdef __STDC__
2188# include <limits.h>
2189#else
2190# include <assert.h>
2191#endif
2192
2193#undef $2
2194
2195/* Override any GCC internal prototype to avoid an error.
2196 Use char because int might match the return type of a GCC
2197 builtin and then its argument prototype would still apply. */
2198#ifdef __cplusplus
2199extern "C"
2200#endif
2201char $2 ();
2202/* The GNU C library defines this for functions which it implements
2203 to always fail with ENOSYS. Some functions are actually named
2204 something starting with __ and the normal name is an alias. */
2205#if defined __stub_$2 || defined __stub___$2
2206choke me
2207#endif
2208
2209int
2210main ()
2211{
2212return $2 ();
2213 ;
2214 return 0;
2215}
2216_ACEOF
2217if ac_fn_c_try_link "$LINENO"; then :
2218 eval "$3=yes"
2219else
2220 eval "$3=no"
2221fi
2222rm -f core conftest.err conftest.$ac_objext \
2223 conftest$ac_exeext conftest.$ac_ext
2224fi
2225eval ac_res=\$$3
2226 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2227$as_echo "$ac_res" >&6; }
2228 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2229
2230} # ac_fn_c_check_func
2231
2232# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2233# ----------------------------------------------------
2234# Tries to find if the field MEMBER exists in type AGGR, after including
2235# INCLUDES, setting cache variable VAR accordingly.
2236ac_fn_c_check_member ()
2237{
2238 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2239 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2240$as_echo_n "checking for $2.$3... " >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00002241if eval "test \"\${$4+set}\"" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002242 $as_echo_n "(cached) " >&6
2243else
2244 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2245/* end confdefs.h. */
2246$5
2247int
2248main ()
2249{
2250static $2 ac_aggr;
2251if (ac_aggr.$3)
2252return 0;
2253 ;
2254 return 0;
2255}
2256_ACEOF
2257if ac_fn_c_try_compile "$LINENO"; then :
2258 eval "$4=yes"
2259else
2260 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2261/* end confdefs.h. */
2262$5
2263int
2264main ()
2265{
2266static $2 ac_aggr;
2267if (sizeof ac_aggr.$3)
2268return 0;
2269 ;
2270 return 0;
2271}
2272_ACEOF
2273if ac_fn_c_try_compile "$LINENO"; then :
2274 eval "$4=yes"
2275else
2276 eval "$4=no"
2277fi
2278rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2279fi
2280rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2281fi
2282eval ac_res=\$$4
2283 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2284$as_echo "$ac_res" >&6; }
2285 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2286
2287} # ac_fn_c_check_member
2288
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00002289# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2290# ---------------------------------------------
2291# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2292# 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
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00002296 as_decl_name=`echo $2|sed 's/ *(.*//'`
2297 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2298 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2299$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2300if eval "test \"\${$3+set}\"" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002301 $as_echo_n "(cached) " >&6
2302else
2303 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2304/* end confdefs.h. */
2305$4
2306int
2307main ()
2308{
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00002309#ifndef $as_decl_name
2310#ifdef __cplusplus
2311 (void) $as_decl_use;
2312#else
2313 (void) $as_decl_name;
2314#endif
Matthias Kloseb9621712010-04-24 17:59:49 +00002315#endif
2316
2317 ;
2318 return 0;
2319}
2320_ACEOF
2321if ac_fn_c_try_compile "$LINENO"; then :
2322 eval "$3=yes"
2323else
2324 eval "$3=no"
2325fi
2326rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2327fi
2328eval ac_res=\$$3
2329 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2330$as_echo "$ac_res" >&6; }
2331 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2332
2333} # ac_fn_c_check_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002334cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002335This file contains any messages produced by compilers while
2336running configure, to aid debugging if configure makes a mistake.
2337
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00002338It was created by python $as_me 3.2, which was
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00002339generated by GNU Autoconf 2.67. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002340
2341 $ $0 $@
2342
2343_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002344exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002345{
2346cat <<_ASUNAME
2347## --------- ##
2348## Platform. ##
2349## --------- ##
2350
2351hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2352uname -m = `(uname -m) 2>/dev/null || echo unknown`
2353uname -r = `(uname -r) 2>/dev/null || echo unknown`
2354uname -s = `(uname -s) 2>/dev/null || echo unknown`
2355uname -v = `(uname -v) 2>/dev/null || echo unknown`
2356
2357/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2358/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2359
2360/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2361/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2362/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002363/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002364/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2365/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2366/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2367
2368_ASUNAME
2369
2370as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2371for as_dir in $PATH
2372do
2373 IFS=$as_save_IFS
2374 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002375 $as_echo "PATH: $as_dir"
2376 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002377IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002378
2379} >&5
2380
2381cat >&5 <<_ACEOF
2382
2383
2384## ----------- ##
2385## Core tests. ##
2386## ----------- ##
2387
2388_ACEOF
2389
2390
2391# Keep a trace of the command line.
2392# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002393# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002394# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002395# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002396ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002397ac_configure_args0=
2398ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002399ac_must_keep_next=false
2400for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002401do
Skip Montanaro6dead952003-09-25 14:50:04 +00002402 for ac_arg
2403 do
2404 case $ac_arg in
2405 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2406 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2407 | -silent | --silent | --silen | --sile | --sil)
2408 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002409 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002410 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002411 esac
2412 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002413 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002414 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002415 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002416 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002417 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002418 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002419 case $ac_arg in
2420 *=* | --config-cache | -C | -disable-* | --disable-* \
2421 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2422 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2423 | -with-* | --with-* | -without-* | --without-* | --x)
2424 case "$ac_configure_args0 " in
2425 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2426 esac
2427 ;;
2428 -* ) ac_must_keep_next=true ;;
2429 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002430 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002431 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002432 ;;
2433 esac
2434 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002435done
Matthias Kloseb9621712010-04-24 17:59:49 +00002436{ ac_configure_args0=; unset ac_configure_args0;}
2437{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002438
2439# When interrupted or exit'd, cleanup temporary files, and complete
2440# config.log. We remove comments because anyway the quotes in there
2441# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002442# WARNING: Use '\'' to represent an apostrophe within the trap.
2443# 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 +00002444trap 'exit_status=$?
2445 # Save into config.log some information that might help in debugging.
2446 {
2447 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002448
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00002449 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002450## Cache variables. ##
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00002451## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002452 echo
2453 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002454(
2455 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2456 eval ac_val=\$$ac_var
2457 case $ac_val in #(
2458 *${as_nl}*)
2459 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002460 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2461$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002462 esac
2463 case $ac_var in #(
2464 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002465 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2466 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002467 esac ;;
2468 esac
2469 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002470 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002471 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2472 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002473 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002474 "s/'\''/'\''\\\\'\'''\''/g;
2475 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2476 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002477 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002478 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002479 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002480 esac |
2481 sort
2482)
Martin v. Löwis11437992002-04-12 09:54:03 +00002483 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002484
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00002485 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002486## Output variables. ##
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00002487## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002488 echo
2489 for ac_var in $ac_subst_vars
2490 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002491 eval ac_val=\$$ac_var
2492 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002493 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002494 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002495 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002496 done | sort
2497 echo
2498
2499 if test -n "$ac_subst_files"; then
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00002500 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002501## File substitutions. ##
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00002502## ------------------- ##"
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
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00002516 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002517## confdefs.h. ##
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00002518## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002519 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002520 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002521 echo
2522 fi
2523 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002524 $as_echo "$as_me: caught signal $ac_signal"
2525 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002526 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002527 rm -f core *.core core.conftest.* &&
2528 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002529 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002530' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002531for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002532 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002533done
2534ac_signal=0
2535
2536# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002537rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002538
Matthias Kloseb9621712010-04-24 17:59:49 +00002539$as_echo "/* confdefs.h */" > confdefs.h
2540
Martin v. Löwis11437992002-04-12 09:54:03 +00002541# Predefined preprocessor variables.
2542
2543cat >>confdefs.h <<_ACEOF
2544#define PACKAGE_NAME "$PACKAGE_NAME"
2545_ACEOF
2546
Martin v. Löwis11437992002-04-12 09:54:03 +00002547cat >>confdefs.h <<_ACEOF
2548#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2549_ACEOF
2550
Martin v. Löwis11437992002-04-12 09:54:03 +00002551cat >>confdefs.h <<_ACEOF
2552#define PACKAGE_VERSION "$PACKAGE_VERSION"
2553_ACEOF
2554
Martin v. Löwis11437992002-04-12 09:54:03 +00002555cat >>confdefs.h <<_ACEOF
2556#define PACKAGE_STRING "$PACKAGE_STRING"
2557_ACEOF
2558
Martin v. Löwis11437992002-04-12 09:54:03 +00002559cat >>confdefs.h <<_ACEOF
2560#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2561_ACEOF
2562
Matthias Kloseb9621712010-04-24 17:59:49 +00002563cat >>confdefs.h <<_ACEOF
2564#define PACKAGE_URL "$PACKAGE_URL"
2565_ACEOF
2566
Martin v. Löwis11437992002-04-12 09:54:03 +00002567
2568# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002569# Prefer an explicitly selected file to automatically selected ones.
2570ac_site_file1=NONE
2571ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002572if test -n "$CONFIG_SITE"; then
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00002573 # We do not want a PATH search for config.site.
2574 case $CONFIG_SITE in #((
2575 -*) ac_site_file1=./$CONFIG_SITE;;
2576 */*) ac_site_file1=$CONFIG_SITE;;
2577 *) ac_site_file1=./$CONFIG_SITE;;
2578 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002579elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002580 ac_site_file1=$prefix/share/config.site
2581 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002582else
Matthias Kloseb9621712010-04-24 17:59:49 +00002583 ac_site_file1=$ac_default_prefix/share/config.site
2584 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002585fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002586for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002587do
Matthias Kloseb9621712010-04-24 17:59:49 +00002588 test "x$ac_site_file" = xNONE && continue
2589 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2590 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2591$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002592 sed 's/^/| /' "$ac_site_file" >&5
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00002593 . "$ac_site_file" \
2594 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2595$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2596as_fn_error $? "failed to load site script $ac_site_file
2597See \`config.log' for more details" "$LINENO" 5 ; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002598 fi
2599done
2600
2601if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002602 # Some versions of bash will fail to source /dev/null (special files
2603 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2604 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2605 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2606$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002607 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002608 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2609 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002610 esac
2611 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002612else
Matthias Kloseb9621712010-04-24 17:59:49 +00002613 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2614$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002615 >$cache_file
2616fi
2617
2618# Check that the precious variables saved in the cache have kept the same
2619# value.
2620ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002621for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002622 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2623 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002624 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2625 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002626 case $ac_old_set,$ac_new_set in
2627 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002628 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2629$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 +00002630 ac_cache_corrupted=: ;;
2631 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002632 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2633$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002634 ac_cache_corrupted=: ;;
2635 ,);;
2636 *)
2637 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002638 # differences in whitespace do not lead to failure.
2639 ac_old_val_w=`echo x $ac_old_val`
2640 ac_new_val_w=`echo x $ac_new_val`
2641 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2642 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2643$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2644 ac_cache_corrupted=:
2645 else
2646 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2647$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2648 eval $ac_var=\$ac_old_val
2649 fi
2650 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2651$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2652 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2653$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002654 fi;;
2655 esac
2656 # Pass precious variables to config.status.
2657 if test "$ac_new_set" = set; then
2658 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002659 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002660 *) ac_arg=$ac_var=$ac_new_val ;;
2661 esac
2662 case " $ac_configure_args " in
2663 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002664 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002665 esac
2666 fi
2667done
2668if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002669 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2670$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2671 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2672$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00002673 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002674fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002675## -------------------- ##
2676## Main body of script. ##
2677## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002678
Guido van Rossum7f43da71994-08-01 12:15:30 +00002679ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002680ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002681ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2682ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2683ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002684
Guido van Rossum627b2d71993-12-24 10:39:16 +00002685
Michael W. Hudson54241132001-12-07 15:38:26 +00002686
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002687ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002688
2689
Martin v. Löwis11437992002-04-12 09:54:03 +00002690
Benjamin Petersond23f8222009-04-05 19:13:16 +00002691if test "$prefix" != "/"; then
2692 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2693fi
2694
2695
Martin v. Löwis11437992002-04-12 09:54:03 +00002696
2697
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002698# We don't use PACKAGE_ variables, and they cause conflicts
2699# with other autoconf-based packages that include Python.h
2700grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2701rm confdefs.h
2702mv confdefs.h.new confdefs.h
2703
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002704
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00002705VERSION=3.2
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002706
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002707# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002708
2709SOVERSION=1.0
2710
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002711# The later defininition of _XOPEN_SOURCE disables certain features
2712# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2713
Matthias Kloseb9621712010-04-24 17:59:49 +00002714$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002715
2716
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002717# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2718# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2719# them.
2720
Matthias Kloseb9621712010-04-24 17:59:49 +00002721$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002722
2723
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002724# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2725# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2726# them.
2727
Matthias Kloseb9621712010-04-24 17:59:49 +00002728$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002729
2730
Martin v. Löwisd6320502004-08-12 13:45:08 +00002731# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2732# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
2733
Matthias Kloseb9621712010-04-24 17:59:49 +00002734$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00002735
2736
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002737# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2738# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2739# them.
2740
Matthias Kloseb9621712010-04-24 17:59:49 +00002741$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002742
2743
2744
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002745define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002746
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00002747# Arguments passed to configure.
2748
2749CONFIG_ARGS="$ac_configure_args"
2750
Matthias Kloseb9621712010-04-24 17:59:49 +00002751{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
2752$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002753# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002754if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002755 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00002756 case $enableval in
2757 yes)
2758 enableval=/Developer/SDKs/MacOSX10.4u.sdk
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002759 if test ! -d "${enableval}"
2760 then
2761 enableval=/
2762 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002763 ;;
2764 esac
2765 case $enableval in
2766 no)
2767 UNIVERSALSDK=
2768 enable_universalsdk=
2769 ;;
2770 *)
2771 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002772 if test ! -d "${UNIVERSALSDK}"
2773 then
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00002774 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002775 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002776 ;;
2777 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002778
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002779
Thomas Wouters477c8d52006-05-27 19:21:47 +00002780else
2781
2782 UNIVERSALSDK=
2783 enable_universalsdk=
2784
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002785fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002786
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002787if test -n "${UNIVERSALSDK}"
2788then
Matthias Kloseb9621712010-04-24 17:59:49 +00002789 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
2790$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002791else
Matthias Kloseb9621712010-04-24 17:59:49 +00002792 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2793$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002794fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002795
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002796
Benjamin Peterson6794aa32008-07-16 20:33:37 +00002797
2798
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002799UNIVERSAL_ARCHS="32-bit"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00002800
Matthias Kloseb9621712010-04-24 17:59:49 +00002801{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
2802$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002803
2804# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002805if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002806 withval=$with_universal_archs;
Matthias Kloseb9621712010-04-24 17:59:49 +00002807 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
2808$as_echo "$withval" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002809 UNIVERSAL_ARCHS="$withval"
2810
2811else
2812
Matthias Kloseb9621712010-04-24 17:59:49 +00002813 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 32-bit" >&5
2814$as_echo "32-bit" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002815
2816fi
2817
2818
2819
2820
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002821
2822# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002823if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002824 withval=$with_framework_name;
2825 PYTHONFRAMEWORK=${withval}
2826 PYTHONFRAMEWORKDIR=${withval}.framework
2827 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
2828
2829else
2830
2831 PYTHONFRAMEWORK=Python
2832 PYTHONFRAMEWORKDIR=Python.framework
2833 PYTHONFRAMEWORKIDENTIFIER=org.python.python
2834
2835fi
2836
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002837# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002838if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002839 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00002840 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00002841 yes)
Jack Jansene578a632001-08-15 01:27:14 +00002842 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00002843 esac
2844 case $enableval in
2845 no)
2846 PYTHONFRAMEWORK=
2847 PYTHONFRAMEWORKDIR=no-framework
2848 PYTHONFRAMEWORKPREFIX=
2849 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002850 FRAMEWORKINSTALLFIRST=
2851 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002852 FRAMEWORKALTINSTALLFIRST=
2853 FRAMEWORKALTINSTALLLAST=
2854 if test "x${prefix}" = "xNONE"; then
2855 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2856 else
2857 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2858 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00002859 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00002860 ;;
2861 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002862 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00002863 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00002864 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00002865 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00002866 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
2867 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002868 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002869
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002870 if test "x${prefix}" = "xNONE" ; then
2871 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002872
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002873 else
2874 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2875 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002876
2877 case "${enableval}" in
2878 /System*)
2879 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2880 if test "${prefix}" = "NONE" ; then
2881 # See below
2882 FRAMEWORKUNIXTOOLSPREFIX="/usr"
2883 fi
2884 ;;
2885
2886 /Library*)
2887 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2888 ;;
2889
2890 */Library/Frameworks)
2891 MDIR="`dirname "${enableval}"`"
2892 MDIR="`dirname "${MDIR}"`"
2893 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
2894
2895 if test "${prefix}" = "NONE"; then
2896 # User hasn't specified the
2897 # --prefix option, but wants to install
2898 # the framework in a non-default location,
2899 # ensure that the compatibility links get
2900 # installed relative to that prefix as well
2901 # instead of in /usr/local.
2902 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
2903 fi
2904 ;;
2905
2906 *)
2907 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2908 ;;
2909 esac
2910
Jack Jansen127e56e2001-09-11 14:41:54 +00002911 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00002912
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002913 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00002914 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002915 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002916
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002917 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002918
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002919 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
2920
2921 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
2922
Jack Jansene578a632001-08-15 01:27:14 +00002923 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002924
Guido van Rossum563e7081996-09-10 18:20:48 +00002925else
Martin v. Löwis11437992002-04-12 09:54:03 +00002926
Jack Jansene578a632001-08-15 01:27:14 +00002927 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00002928 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00002929 PYTHONFRAMEWORKPREFIX=
2930 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002931 FRAMEWORKINSTALLFIRST=
2932 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002933 FRAMEWORKALTINSTALLFIRST=
2934 FRAMEWORKALTINSTALLLAST=
2935 if test "x${prefix}" = "xNONE" ; then
2936 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2937 else
2938 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2939 fi
Jack Jansene578a632001-08-15 01:27:14 +00002940 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002941
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002942
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002943fi
2944
Thomas Wouters477c8d52006-05-27 19:21:47 +00002945
2946
Michael W. Hudson54241132001-12-07 15:38:26 +00002947
2948
2949
2950
Jack Jansene578a632001-08-15 01:27:14 +00002951
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002952
2953
2954
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002955
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002956
Jack Jansene578a632001-08-15 01:27:14 +00002957##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00002958## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00002959## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00002960##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002961# Set name for machine-dependent library files
2962
Matthias Kloseb9621712010-04-24 17:59:49 +00002963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
2964$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002965if test -z "$MACHDEP"
2966then
Guido van Rossum563e7081996-09-10 18:20:48 +00002967 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002968 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00002969 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00002970 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002971 else
Guido van Rossum563e7081996-09-10 18:20:48 +00002972 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002973 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00002974 ac_md_system=`echo $ac_sys_system |
2975 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
2976 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00002977 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00002978 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00002979
Guido van Rossum07397971997-04-29 21:49:50 +00002980 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002981 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002982 darwin*) MACHDEP="darwin";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00002983 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00002984 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002985 esac
2986fi
Guido van Rossum91922671997-10-09 20:24:13 +00002987
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002988# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
2989# disable features if it is defined, without any means to access these
2990# features as extensions. For these systems, we skip the definition of
2991# _XOPEN_SOURCE. Before adding a system to the list to gain access to
2992# some feature, make sure there is no alternative way to access this
2993# feature. Also, when using wildcards, make sure you have verified the
2994# need for not defining _XOPEN_SOURCE on all systems matching the
2995# wildcard, and that the wildcard does not include future systems
2996# (which may remove their limitations).
2997case $ac_sys_system/$ac_sys_release in
2998 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
2999 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003000 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003001 # In addition, Stefan Krah confirms that issue #1244610 exists through
3002 # OpenBSD 4.6, but is fixed in 4.7.
3003 OpenBSD/2.* | OpenBSD/3.[0123456789] | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003004 define_xopen_source=no
3005 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3006 # also defined. This can be overridden by defining _BSD_SOURCE
3007 # As this has a different meaning on Linux, only define it on OpenBSD
3008
Matthias Kloseb9621712010-04-24 17:59:49 +00003009$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003010
3011 ;;
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003012 OpenBSD/4.[789])
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003013 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3014 # also defined. This can be overridden by defining _BSD_SOURCE
3015 # As this has a different meaning on Linux, only define it on OpenBSD
3016
Matthias Kloseb9621712010-04-24 17:59:49 +00003017$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003018
3019 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003020 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3021 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3022 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003023 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 +00003024 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003025 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3026 # request to enable features supported by the standard as a request
3027 # to disable features not supported by the standard. The best way
3028 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3029 # entirely and define __EXTENSIONS__ instead.
3030 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003031 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003032 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3033 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003034 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003035 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003036 define_xopen_source=no;;
3037 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003038 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003039 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003040 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003041 # On FreeBSD 4, the math functions C89 does not cover are never defined
3042 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3043 FreeBSD/4.*)
3044 define_xopen_source=no;;
3045 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3046 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3047 # identifies itself as Darwin/7.*
3048 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3049 # disables platform specific features beyond repair.
3050 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3051 # has no effect, don't bother defining them
3052 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003053 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003054 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003055 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003056 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3057 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3058 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003059 AIX/4)
3060 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003061 AIX/5)
3062 if test `uname -r` -eq 1; then
3063 define_xopen_source=no
3064 fi
3065 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003066 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3067 # defining NI_NUMERICHOST.
3068 QNX/6.3.2)
3069 define_xopen_source=no
3070 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003071
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003072esac
3073
3074if test $define_xopen_source = yes
3075then
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003076
Matthias Kloseb9621712010-04-24 17:59:49 +00003077$as_echo "#define _XOPEN_SOURCE 600" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003078
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003079
3080 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3081 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3082 # several APIs are not declared. Since this is also needed in some
3083 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003084
Matthias Kloseb9621712010-04-24 17:59:49 +00003085$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003086
3087
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003088
Matthias Kloseb9621712010-04-24 17:59:49 +00003089$as_echo "#define _POSIX_C_SOURCE 200112L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003090
3091
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003092fi
3093
Guido van Rossum91922671997-10-09 20:24:13 +00003094#
3095# SGI compilers allow the specification of the both the ABI and the
3096# ISA on the command line. Depending on the values of these switches,
3097# different and often incompatable code will be generated.
3098#
3099# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3100# thus supply support for various ABI/ISA combinations. The MACHDEP
3101# variable is also adjusted.
3102#
3103
3104if test ! -z "$SGI_ABI"
3105then
3106 CC="cc $SGI_ABI"
3107 LDFLAGS="$SGI_ABI $LDFLAGS"
3108 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3109fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003110{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3111$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003112
Jack Jansen6b08a402004-06-03 12:41:45 +00003113# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3114# it may influence the way we can build extensions, so distutils
3115# needs to check it
3116
Thomas Wouters477c8d52006-05-27 19:21:47 +00003117
Jack Jansen6b08a402004-06-03 12:41:45 +00003118CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003119EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003120
Matthias Kloseb9621712010-04-24 17:59:49 +00003121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking machine type as reported by uname -m" >&5
3122$as_echo_n "checking machine type as reported by uname -m... " >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00003123ac_sys_machine=`uname -m`
Matthias Kloseb9621712010-04-24 17:59:49 +00003124{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_sys_machine" >&5
3125$as_echo "$ac_sys_machine" >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00003126
Guido van Rossum627b2d71993-12-24 10:39:16 +00003127# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003128
3129# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3130# for debug/optimization stuff. BASECFLAGS is for flags that are required
3131# just to get things to compile and link. Users are free to override OPT
3132# when running configure or make. The build should not break if they do.
3133# BASECFLAGS should generally not be messed with, however.
3134
3135# XXX shouldn't some/most/all of this code be merged with the stuff later
3136# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003137{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3138$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003139
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003140# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003141if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003142 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003143 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003144 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003145 without_gcc=yes;;
3146 yes) CC=gcc
3147 without_gcc=no;;
3148 *) CC=$withval
3149 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003150 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003151else
Martin v. Löwis11437992002-04-12 09:54:03 +00003152
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003153 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003154 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003155 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003156 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003157 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003158fi
3159
Matthias Kloseb9621712010-04-24 17:59:49 +00003160{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3161$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003162
Guido van Rossum8b131c51995-03-09 14:10:13 +00003163# If the user switches compilers, we can't believe the cache
3164if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3165then
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00003166 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003167(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003168fi
3169
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003170# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3171# when the compiler supports them, but we don't always want -O2, and
3172# we set -g later.
3173if test -z "$CFLAGS"; then
3174 CFLAGS=
3175fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003176ac_ext=c
3177ac_cpp='$CPP $CPPFLAGS'
3178ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3179ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3180ac_compiler_gnu=$ac_cv_c_compiler_gnu
3181if test -n "$ac_tool_prefix"; then
3182 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3183set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3185$as_echo_n "checking for $ac_word... " >&6; }
3186if test "${ac_cv_prog_CC+set}" = set; then :
3187 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003188else
3189 if test -n "$CC"; then
3190 ac_cv_prog_CC="$CC" # Let the user override the test.
3191else
Martin v. Löwis11437992002-04-12 09:54:03 +00003192as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3193for as_dir in $PATH
3194do
3195 IFS=$as_save_IFS
3196 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003197 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003198 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 +00003199 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003200 $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 +00003201 break 2
3202 fi
3203done
Matthias Kloseb9621712010-04-24 17:59:49 +00003204 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003205IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003206
Jack Jansendd19cf82001-12-06 22:36:17 +00003207fi
3208fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003209CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003210if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003211 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3212$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003213else
Matthias Kloseb9621712010-04-24 17:59:49 +00003214 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3215$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003216fi
3217
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003218
Martin v. Löwis11437992002-04-12 09:54:03 +00003219fi
3220if test -z "$ac_cv_prog_CC"; then
3221 ac_ct_CC=$CC
3222 # Extract the first word of "gcc", so it can be a program name with args.
3223set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003224{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3225$as_echo_n "checking for $ac_word... " >&6; }
3226if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
3227 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003228else
3229 if test -n "$ac_ct_CC"; then
3230 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3231else
3232as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3233for as_dir in $PATH
3234do
3235 IFS=$as_save_IFS
3236 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003237 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003238 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 +00003239 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003240 $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 +00003241 break 2
3242 fi
3243done
Matthias Kloseb9621712010-04-24 17:59:49 +00003244 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003245IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003246
3247fi
3248fi
3249ac_ct_CC=$ac_cv_prog_ac_ct_CC
3250if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003251 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3252$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003253else
Matthias Kloseb9621712010-04-24 17:59:49 +00003254 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3255$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003256fi
3257
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003258 if test "x$ac_ct_CC" = x; then
3259 CC=""
3260 else
3261 case $cross_compiling:$ac_tool_warned in
3262yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003263{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3264$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003265ac_tool_warned=yes ;;
3266esac
3267 CC=$ac_ct_CC
3268 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003269else
3270 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003271fi
3272
Jack Jansendd19cf82001-12-06 22:36:17 +00003273if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003274 if test -n "$ac_tool_prefix"; then
3275 # 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 +00003276set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3278$as_echo_n "checking for $ac_word... " >&6; }
3279if test "${ac_cv_prog_CC+set}" = set; then :
3280 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003281else
3282 if test -n "$CC"; then
3283 ac_cv_prog_CC="$CC" # Let the user override the test.
3284else
Martin v. Löwis11437992002-04-12 09:54:03 +00003285as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3286for as_dir in $PATH
3287do
3288 IFS=$as_save_IFS
3289 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003290 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003291 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 +00003292 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003293 $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 +00003294 break 2
3295 fi
3296done
Matthias Kloseb9621712010-04-24 17:59:49 +00003297 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003298IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003299
3300fi
3301fi
3302CC=$ac_cv_prog_CC
3303if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003304 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3305$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003306else
Matthias Kloseb9621712010-04-24 17:59:49 +00003307 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3308$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003309fi
3310
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003311
Martin v. Löwis11437992002-04-12 09:54:03 +00003312 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003313fi
3314if test -z "$CC"; then
3315 # Extract the first word of "cc", so it can be a program name with args.
3316set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3318$as_echo_n "checking for $ac_word... " >&6; }
3319if test "${ac_cv_prog_CC+set}" = set; then :
3320 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003321else
3322 if test -n "$CC"; then
3323 ac_cv_prog_CC="$CC" # Let the user override the test.
3324else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003325 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003326as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3327for as_dir in $PATH
3328do
3329 IFS=$as_save_IFS
3330 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003331 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003332 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 +00003333 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3334 ac_prog_rejected=yes
3335 continue
3336 fi
3337 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003338 $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 +00003339 break 2
3340 fi
3341done
Matthias Kloseb9621712010-04-24 17:59:49 +00003342 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003343IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003344
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003345if test $ac_prog_rejected = yes; then
3346 # We found a bogon in the path, so make sure we never use it.
3347 set dummy $ac_cv_prog_CC
3348 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003349 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003350 # We chose a different compiler from the bogus one.
3351 # However, it has the same basename, so the bogon will be chosen
3352 # first if we set CC to just the basename; use the full file name.
3353 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003354 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003355 fi
3356fi
3357fi
3358fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003359CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003360if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003361 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3362$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003363else
Matthias Kloseb9621712010-04-24 17:59:49 +00003364 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3365$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003366fi
3367
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003368
Martin v. Löwis11437992002-04-12 09:54:03 +00003369fi
3370if test -z "$CC"; then
3371 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003372 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003373 do
3374 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3375set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003376{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3377$as_echo_n "checking for $ac_word... " >&6; }
3378if test "${ac_cv_prog_CC+set}" = set; then :
3379 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003380else
3381 if test -n "$CC"; then
3382 ac_cv_prog_CC="$CC" # Let the user override the test.
3383else
Martin v. Löwis11437992002-04-12 09:54:03 +00003384as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3385for as_dir in $PATH
3386do
3387 IFS=$as_save_IFS
3388 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003389 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003390 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 +00003391 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003392 $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 +00003393 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003394 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003395done
Matthias Kloseb9621712010-04-24 17:59:49 +00003396 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003397IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003398
3399fi
3400fi
3401CC=$ac_cv_prog_CC
3402if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003403 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3404$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003405else
Matthias Kloseb9621712010-04-24 17:59:49 +00003406 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3407$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003408fi
3409
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003410
Martin v. Löwis11437992002-04-12 09:54:03 +00003411 test -n "$CC" && break
3412 done
3413fi
3414if test -z "$CC"; then
3415 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003416 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003417do
3418 # Extract the first word of "$ac_prog", so it can be a program name with args.
3419set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003420{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3421$as_echo_n "checking for $ac_word... " >&6; }
3422if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
3423 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003424else
3425 if test -n "$ac_ct_CC"; then
3426 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3427else
3428as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3429for as_dir in $PATH
3430do
3431 IFS=$as_save_IFS
3432 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003433 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003434 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 +00003435 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003436 $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 +00003437 break 2
3438 fi
3439done
Matthias Kloseb9621712010-04-24 17:59:49 +00003440 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003441IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003442
Martin v. Löwis11437992002-04-12 09:54:03 +00003443fi
3444fi
3445ac_ct_CC=$ac_cv_prog_ac_ct_CC
3446if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003447 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3448$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003449else
Matthias Kloseb9621712010-04-24 17:59:49 +00003450 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3451$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003452fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003453
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003454
Martin v. Löwis11437992002-04-12 09:54:03 +00003455 test -n "$ac_ct_CC" && break
3456done
Michael W. Hudson54241132001-12-07 15:38:26 +00003457
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003458 if test "x$ac_ct_CC" = x; then
3459 CC=""
3460 else
3461 case $cross_compiling:$ac_tool_warned in
3462yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003463{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3464$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003465ac_tool_warned=yes ;;
3466esac
3467 CC=$ac_ct_CC
3468 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003469fi
3470
3471fi
3472
3473
Matthias Kloseb9621712010-04-24 17:59:49 +00003474test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3475$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00003476as_fn_error $? "no acceptable C compiler found in \$PATH
3477See \`config.log' for more details" "$LINENO" 5 ; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003478
3479# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003480$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3481set X $ac_compile
3482ac_compiler=$2
3483for ac_option in --version -v -V -qversion; do
3484 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003485case "(($ac_try" in
3486 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3487 *) ac_try_echo=$ac_try;;
3488esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003489eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3490$as_echo "$ac_try_echo"; } >&5
3491 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003492 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003493 if test -s conftest.err; then
3494 sed '10a\
3495... rest of stderr output deleted ...
3496 10q' conftest.err >conftest.er1
3497 cat conftest.er1 >&5
3498 fi
3499 rm -f conftest.er1 conftest.err
3500 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3501 test $ac_status = 0; }
3502done
Martin v. Löwis11437992002-04-12 09:54:03 +00003503
Matthias Kloseb9621712010-04-24 17:59:49 +00003504cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003505/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003506
Martin v. Löwis11437992002-04-12 09:54:03 +00003507int
3508main ()
3509{
3510
3511 ;
3512 return 0;
3513}
3514_ACEOF
3515ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003516ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003517# Try to create an executable without -o first, disregard a.out.
3518# It will help us diagnose broken compilers, and finding out an intuition
3519# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003520{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3521$as_echo_n "checking whether the C compiler works... " >&6; }
3522ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3523
3524# The possible output files:
3525ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3526
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003527ac_rmfiles=
3528for ac_file in $ac_files
3529do
3530 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003531 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003532 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3533 esac
3534done
3535rm -f $ac_rmfiles
3536
Matthias Kloseb9621712010-04-24 17:59:49 +00003537if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003538case "(($ac_try" in
3539 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3540 *) ac_try_echo=$ac_try;;
3541esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003542eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3543$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003544 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003545 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003546 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3547 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003548 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3549# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3550# in a Makefile. We should not override ac_cv_exeext if it was cached,
3551# so that the user can short-circuit this test for compilers unknown to
3552# Autoconf.
3553for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003554do
3555 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003556 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003557 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003558 ;;
3559 [ab].out )
3560 # We found the default executable, but exeext='' is most
3561 # certainly right.
3562 break;;
3563 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003564 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003565 then :; else
3566 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3567 fi
3568 # We set ac_cv_exeext here because the later test for it is not
3569 # safe: cross compilers may not add the suffix if given an `-o'
3570 # argument, so we may need to know it at that point already.
3571 # Even if this section looks crufty: it has the advantage of
3572 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003573 break;;
3574 * )
3575 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003576 esac
3577done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003578test "$ac_cv_exeext" = no && ac_cv_exeext=
3579
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003580else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003581 ac_file=''
3582fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003583if test -z "$ac_file"; then :
3584 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3585$as_echo "no" >&6; }
3586$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003587sed 's/^/| /' conftest.$ac_ext >&5
3588
Matthias Kloseb9621712010-04-24 17:59:49 +00003589{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3590$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00003591as_fn_error 77 "C compiler cannot create executables
3592See \`config.log' for more details" "$LINENO" 5 ; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003593else
3594 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3595$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003596fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3598$as_echo_n "checking for C compiler default output file name... " >&6; }
3599{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3600$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003601ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003602
Matthias Kloseb9621712010-04-24 17:59:49 +00003603rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003604ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00003605{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3606$as_echo_n "checking for suffix of executables... " >&6; }
3607if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003608case "(($ac_try" in
3609 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3610 *) ac_try_echo=$ac_try;;
3611esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003612eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3613$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003614 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003615 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003616 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3617 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003618 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3619# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3620# work properly (i.e., refer to `conftest.exe'), while it won't with
3621# `rm'.
3622for ac_file in conftest.exe conftest conftest.*; do
3623 test -f "$ac_file" || continue
3624 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003625 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003626 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3627 break;;
3628 * ) break;;
3629 esac
3630done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003631else
Matthias Kloseb9621712010-04-24 17:59:49 +00003632 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3633$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00003634as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3635See \`config.log' for more details" "$LINENO" 5 ; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003636fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003637rm -f conftest conftest$ac_cv_exeext
3638{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3639$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003640
3641rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003642EXEEXT=$ac_cv_exeext
3643ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003644cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3645/* end confdefs.h. */
3646#include <stdio.h>
3647int
3648main ()
3649{
3650FILE *f = fopen ("conftest.out", "w");
3651 return ferror (f) || fclose (f) != 0;
3652
3653 ;
3654 return 0;
3655}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003656_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003657ac_clean_files="$ac_clean_files conftest.out"
3658# Check that the compiler produces executables we can run. If not, either
3659# the compiler is broken, or we cross compile.
3660{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3661$as_echo_n "checking whether we are cross compiling... " >&6; }
3662if test "$cross_compiling" != yes; then
3663 { { ac_try="$ac_link"
3664case "(($ac_try" in
3665 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3666 *) ac_try_echo=$ac_try;;
3667esac
3668eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3669$as_echo "$ac_try_echo"; } >&5
3670 (eval "$ac_link") 2>&5
3671 ac_status=$?
3672 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3673 test $ac_status = 0; }
3674 if { ac_try='./conftest$ac_cv_exeext'
3675 { { case "(($ac_try" in
3676 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3677 *) ac_try_echo=$ac_try;;
3678esac
3679eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3680$as_echo "$ac_try_echo"; } >&5
3681 (eval "$ac_try") 2>&5
3682 ac_status=$?
3683 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3684 test $ac_status = 0; }; }; then
3685 cross_compiling=no
3686 else
3687 if test "$cross_compiling" = maybe; then
3688 cross_compiling=yes
3689 else
3690 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3691$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00003692as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00003693If you meant to cross compile, use \`--host'.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00003694See \`config.log' for more details" "$LINENO" 5 ; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003695 fi
3696 fi
3697fi
3698{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3699$as_echo "$cross_compiling" >&6; }
3700
3701rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3702ac_clean_files=$ac_clean_files_save
3703{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3704$as_echo_n "checking for suffix of object files... " >&6; }
3705if test "${ac_cv_objext+set}" = set; then :
3706 $as_echo_n "(cached) " >&6
3707else
3708 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003709/* end confdefs.h. */
3710
3711int
3712main ()
3713{
3714
3715 ;
3716 return 0;
3717}
3718_ACEOF
3719rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00003720if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003721case "(($ac_try" in
3722 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3723 *) ac_try_echo=$ac_try;;
3724esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003725eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3726$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003727 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003728 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003729 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3730 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003731 for ac_file in conftest.o conftest.obj conftest.*; do
3732 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00003733 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003734 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003735 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3736 break;;
3737 esac
3738done
3739else
Matthias Kloseb9621712010-04-24 17:59:49 +00003740 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003741sed 's/^/| /' conftest.$ac_ext >&5
3742
Matthias Kloseb9621712010-04-24 17:59:49 +00003743{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3744$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00003745as_fn_error $? "cannot compute suffix of object files: cannot compile
3746See \`config.log' for more details" "$LINENO" 5 ; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003747fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003748rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003749fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003750{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3751$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003752OBJEXT=$ac_cv_objext
3753ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003754{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3755$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3756if test "${ac_cv_c_compiler_gnu+set}" = set; then :
3757 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003758else
Matthias Kloseb9621712010-04-24 17:59:49 +00003759 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003760/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003761
Martin v. Löwis11437992002-04-12 09:54:03 +00003762int
3763main ()
3764{
3765#ifndef __GNUC__
3766 choke me
3767#endif
3768
3769 ;
3770 return 0;
3771}
3772_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003773if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00003774 ac_compiler_gnu=yes
3775else
Matthias Kloseb9621712010-04-24 17:59:49 +00003776 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003777fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003778rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003779ac_cv_c_compiler_gnu=$ac_compiler_gnu
3780
3781fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003782{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3783$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3784if test $ac_compiler_gnu = yes; then
3785 GCC=yes
3786else
3787 GCC=
3788fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003789ac_test_CFLAGS=${CFLAGS+set}
3790ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00003791{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3792$as_echo_n "checking whether $CC accepts -g... " >&6; }
3793if test "${ac_cv_prog_cc_g+set}" = set; then :
3794 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003795else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003796 ac_save_c_werror_flag=$ac_c_werror_flag
3797 ac_c_werror_flag=yes
3798 ac_cv_prog_cc_g=no
3799 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00003800 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003801/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003802
Martin v. Löwis11437992002-04-12 09:54:03 +00003803int
3804main ()
3805{
3806
3807 ;
3808 return 0;
3809}
3810_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003811if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00003812 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003813else
Matthias Kloseb9621712010-04-24 17:59:49 +00003814 CFLAGS=""
3815 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003816/* end confdefs.h. */
3817
3818int
3819main ()
3820{
3821
3822 ;
3823 return 0;
3824}
3825_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003826if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003827
Matthias Kloseb9621712010-04-24 17:59:49 +00003828else
3829 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003830 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00003831 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003832/* end confdefs.h. */
3833
3834int
3835main ()
3836{
3837
3838 ;
3839 return 0;
3840}
3841_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003842if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003843 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00003844fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003845rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003846fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003847rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3848fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003849rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3850 ac_c_werror_flag=$ac_save_c_werror_flag
3851fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003852{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3853$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003854if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003855 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003856elif test $ac_cv_prog_cc_g = yes; then
3857 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003858 CFLAGS="-g -O2"
3859 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003860 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003861 fi
3862else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003863 if test "$GCC" = yes; then
3864 CFLAGS="-O2"
3865 else
3866 CFLAGS=
3867 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003868fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003869{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3870$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3871if test "${ac_cv_prog_cc_c89+set}" = set; then :
3872 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003873else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003874 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003875ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00003876cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003877/* end confdefs.h. */
3878#include <stdarg.h>
3879#include <stdio.h>
3880#include <sys/types.h>
3881#include <sys/stat.h>
3882/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3883struct buf { int x; };
3884FILE * (*rcsopen) (struct buf *, struct stat *, int);
3885static char *e (p, i)
3886 char **p;
3887 int i;
3888{
3889 return p[i];
3890}
3891static char *f (char * (*g) (char **, int), char **p, ...)
3892{
3893 char *s;
3894 va_list v;
3895 va_start (v,p);
3896 s = g (p, va_arg (v,int));
3897 va_end (v);
3898 return s;
3899}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003900
3901/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3902 function prototypes and stuff, but not '\xHH' hex character constants.
3903 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003904 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003905 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3906 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003907 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003908int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3909
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003910/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3911 inside strings and character constants. */
3912#define FOO(x) 'x'
3913int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3914
Skip Montanaro6dead952003-09-25 14:50:04 +00003915int test (int i, double x);
3916struct s1 {int (*f) (int a);};
3917struct s2 {int (*f) (double a);};
3918int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3919int argc;
3920char **argv;
3921int
3922main ()
3923{
3924return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3925 ;
3926 return 0;
3927}
3928_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003929for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3930 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003931do
3932 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00003933 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003934 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00003935fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003936rm -f core conftest.err conftest.$ac_objext
3937 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00003938done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003939rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003940CC=$ac_save_CC
3941
3942fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003943# AC_CACHE_VAL
3944case "x$ac_cv_prog_cc_c89" in
3945 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00003946 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3947$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003948 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00003949 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3950$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003951 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003952 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00003953 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3954$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003955esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003956if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00003957
Matthias Kloseb9621712010-04-24 17:59:49 +00003958fi
Skip Montanaro6dead952003-09-25 14:50:04 +00003959
Martin v. Löwis11437992002-04-12 09:54:03 +00003960ac_ext=c
3961ac_cpp='$CPP $CPPFLAGS'
3962ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3963ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3964ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003965
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003966
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003967
3968
Matthias Kloseb9621712010-04-24 17:59:49 +00003969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
3970$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003971
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003972# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003973if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003974 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003975
3976 case $withval in
3977 no) with_cxx_main=no
3978 MAINCC='$(CC)';;
3979 yes) with_cxx_main=yes
3980 MAINCC='$(CXX)';;
3981 *) with_cxx_main=yes
3982 MAINCC=$withval
3983 if test -z "$CXX"
3984 then
3985 CXX=$withval
3986 fi;;
3987 esac
3988else
3989
3990 with_cxx_main=no
3991 MAINCC='$(CC)'
3992
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003993fi
3994
Matthias Kloseb9621712010-04-24 17:59:49 +00003995{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
3996$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003997
3998preset_cxx="$CXX"
3999if test -z "$CXX"
4000then
4001 case "$CC" in
4002 gcc) # Extract the first word of "g++", so it can be a program name with args.
4003set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004004{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4005$as_echo_n "checking for $ac_word... " >&6; }
4006if test "${ac_cv_path_CXX+set}" = set; then :
4007 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004008else
4009 case $CXX in
4010 [\\/]* | ?:[\\/]*)
4011 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4012 ;;
4013 *)
4014 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4015for as_dir in notfound
4016do
4017 IFS=$as_save_IFS
4018 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004019 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004020 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 +00004021 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004022 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004023 break 2
4024 fi
4025done
Matthias Kloseb9621712010-04-24 17:59:49 +00004026 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004027IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004028
4029 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
4030 ;;
4031esac
4032fi
4033CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004034if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004035 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4036$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004037else
Matthias Kloseb9621712010-04-24 17:59:49 +00004038 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4039$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004040fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004041
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004042 ;;
4043 cc) # Extract the first word of "c++", so it can be a program name with args.
4044set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004045{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4046$as_echo_n "checking for $ac_word... " >&6; }
4047if test "${ac_cv_path_CXX+set}" = set; then :
4048 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004049else
4050 case $CXX in
4051 [\\/]* | ?:[\\/]*)
4052 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4053 ;;
4054 *)
4055 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4056for as_dir in notfound
4057do
4058 IFS=$as_save_IFS
4059 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004060 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004061 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 +00004062 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004063 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004064 break 2
4065 fi
4066done
Matthias Kloseb9621712010-04-24 17:59:49 +00004067 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004068IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004069
4070 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
4071 ;;
4072esac
4073fi
4074CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004075if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004076 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4077$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004078else
Matthias Kloseb9621712010-04-24 17:59:49 +00004079 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4080$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004081fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004082
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004083 ;;
4084 esac
4085 if test "$CXX" = "notfound"
4086 then
4087 CXX=""
4088 fi
4089fi
4090if test -z "$CXX"
4091then
4092 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4093do
4094 # Extract the first word of "$ac_prog", so it can be a program name with args.
4095set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4097$as_echo_n "checking for $ac_word... " >&6; }
4098if test "${ac_cv_prog_CXX+set}" = set; then :
4099 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004100else
4101 if test -n "$CXX"; then
4102 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4103else
4104as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4105for as_dir in $PATH
4106do
4107 IFS=$as_save_IFS
4108 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004109 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004110 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 +00004111 ac_cv_prog_CXX="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00004112 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004113 break 2
4114 fi
4115done
Matthias Kloseb9621712010-04-24 17:59:49 +00004116 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004117IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004118
4119fi
4120fi
4121CXX=$ac_cv_prog_CXX
4122if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004123 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4124$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004125else
Matthias Kloseb9621712010-04-24 17:59:49 +00004126 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4127$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004128fi
4129
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004130
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004131 test -n "$CXX" && break
4132done
4133test -n "$CXX" || CXX="notfound"
4134
4135 if test "$CXX" = "notfound"
4136 then
4137 CXX=""
4138 fi
4139fi
4140if test "$preset_cxx" != "$CXX"
4141then
Matthias Kloseb9621712010-04-24 17:59:49 +00004142 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004143
4144 By default, distutils will build C++ extension modules with \"$CXX\".
4145 If this is not intended, then set CXX on the configure command line.
4146 " >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00004147$as_echo "$as_me: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004148
4149 By default, distutils will build C++ extension modules with \"$CXX\".
4150 If this is not intended, then set CXX on the configure command line.
4151 " >&2;}
4152fi
4153
4154
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004155# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004156
4157ac_ext=c
4158ac_cpp='$CPP $CPPFLAGS'
4159ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4160ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4161ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Kloseb9621712010-04-24 17:59:49 +00004162{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4163$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004164# On Suns, sometimes $CPP names a directory.
4165if test -n "$CPP" && test -d "$CPP"; then
4166 CPP=
4167fi
4168if test -z "$CPP"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004169 if test "${ac_cv_prog_CPP+set}" = set; then :
4170 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004171else
Martin v. Löwis11437992002-04-12 09:54:03 +00004172 # Double quotes because CPP needs to be expanded
4173 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4174 do
4175 ac_preproc_ok=false
4176for ac_c_preproc_warn_flag in '' yes
4177do
4178 # Use a header file that comes with gcc, so configuring glibc
4179 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004180 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4181 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004182 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004183 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004184 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004185/* end confdefs.h. */
4186#ifdef __STDC__
4187# include <limits.h>
4188#else
4189# include <assert.h>
4190#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004191 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004192_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004193if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004194
Matthias Kloseb9621712010-04-24 17:59:49 +00004195else
Martin v. Löwis11437992002-04-12 09:54:03 +00004196 # Broken: fails on valid input.
4197continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004198fi
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004199rm -f conftest.err conftest.i conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004200
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004201 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004202 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004203 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004204/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004205#include <ac_nonexistent.h>
4206_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004207if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004208 # Broken: success on invalid input.
4209continue
4210else
Martin v. Löwis11437992002-04-12 09:54:03 +00004211 # Passes both tests.
4212ac_preproc_ok=:
4213break
4214fi
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004215rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004216
4217done
4218# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004219rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004220if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004221 break
4222fi
4223
4224 done
4225 ac_cv_prog_CPP=$CPP
4226
4227fi
4228 CPP=$ac_cv_prog_CPP
4229else
4230 ac_cv_prog_CPP=$CPP
4231fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004232{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4233$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004234ac_preproc_ok=false
4235for ac_c_preproc_warn_flag in '' yes
4236do
4237 # Use a header file that comes with gcc, so configuring glibc
4238 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004239 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4240 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004241 # On the NeXT, cc -E runs the code through the compiler's parser,
4242 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004243 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004244/* end confdefs.h. */
4245#ifdef __STDC__
4246# include <limits.h>
4247#else
4248# include <assert.h>
4249#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004250 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004251_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004252if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004253
Matthias Kloseb9621712010-04-24 17:59:49 +00004254else
Martin v. Löwis11437992002-04-12 09:54:03 +00004255 # Broken: fails on valid input.
4256continue
4257fi
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004258rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004259
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004260 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004261 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004262 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004263/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004264#include <ac_nonexistent.h>
4265_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004266if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004267 # Broken: success on invalid input.
4268continue
4269else
Martin v. Löwis11437992002-04-12 09:54:03 +00004270 # Passes both tests.
4271ac_preproc_ok=:
4272break
4273fi
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004274rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004275
4276done
4277# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004278rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004279if $ac_preproc_ok; then :
4280
Martin v. Löwis11437992002-04-12 09:54:03 +00004281else
Matthias Kloseb9621712010-04-24 17:59:49 +00004282 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4283$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004284as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4285See \`config.log' for more details" "$LINENO" 5 ; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004286fi
4287
4288ac_ext=c
4289ac_cpp='$CPP $CPPFLAGS'
4290ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4291ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4292ac_compiler_gnu=$ac_cv_c_compiler_gnu
4293
4294
Matthias Kloseb9621712010-04-24 17:59:49 +00004295{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4296$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4297if test "${ac_cv_path_GREP+set}" = set; then :
4298 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004299else
Matthias Kloseb9621712010-04-24 17:59:49 +00004300 if test -z "$GREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004301 ac_path_GREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004302 # Loop through the user's path and test for each of PROGNAME-LIST
4303 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004304for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4305do
4306 IFS=$as_save_IFS
4307 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004308 for ac_prog in grep ggrep; do
4309 for ac_exec_ext in '' $ac_executable_extensions; do
4310 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4311 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
4312# Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004313 # Check for GNU $ac_path_GREP
4314case `"$ac_path_GREP" --version 2>&1` in
4315*GNU*)
4316 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4317*)
4318 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004319 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004320 while :
4321 do
4322 cat "conftest.in" "conftest.in" >"conftest.tmp"
4323 mv "conftest.tmp" "conftest.in"
4324 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00004325 $as_echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004326 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4327 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00004328 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004329 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4330 # Best one so far, save it but keep looking for a better one
4331 ac_cv_path_GREP="$ac_path_GREP"
4332 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00004333 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004334 # 10*(2^10) chars as input seems more than enough
4335 test $ac_count -gt 10 && break
4336 done
4337 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4338esac
4339
Matthias Kloseb9621712010-04-24 17:59:49 +00004340 $ac_path_GREP_found && break 3
4341 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004342 done
Matthias Kloseb9621712010-04-24 17:59:49 +00004343 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004344IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00004345 if test -z "$ac_cv_path_GREP"; then
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004346 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 +00004347 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004348else
4349 ac_cv_path_GREP=$GREP
4350fi
4351
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004352fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004353{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4354$as_echo "$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004355 GREP="$ac_cv_path_GREP"
4356
4357
Matthias Kloseb9621712010-04-24 17:59:49 +00004358{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4359$as_echo_n "checking for egrep... " >&6; }
4360if test "${ac_cv_path_EGREP+set}" = set; then :
4361 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004362else
4363 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4364 then ac_cv_path_EGREP="$GREP -E"
4365 else
Matthias Kloseb9621712010-04-24 17:59:49 +00004366 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004367 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004368 # Loop through the user's path and test for each of PROGNAME-LIST
4369 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004370for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4371do
4372 IFS=$as_save_IFS
4373 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004374 for ac_prog in egrep; do
4375 for ac_exec_ext in '' $ac_executable_extensions; do
4376 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4377 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
4378# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004379 # Check for GNU $ac_path_EGREP
4380case `"$ac_path_EGREP" --version 2>&1` in
4381*GNU*)
4382 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4383*)
4384 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004385 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004386 while :
4387 do
4388 cat "conftest.in" "conftest.in" >"conftest.tmp"
4389 mv "conftest.tmp" "conftest.in"
4390 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00004391 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004392 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4393 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00004394 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004395 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4396 # Best one so far, save it but keep looking for a better one
4397 ac_cv_path_EGREP="$ac_path_EGREP"
4398 ac_path_EGREP_max=$ac_count
4399 fi
4400 # 10*(2^10) chars as input seems more than enough
4401 test $ac_count -gt 10 && break
4402 done
4403 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4404esac
4405
Matthias Kloseb9621712010-04-24 17:59:49 +00004406 $ac_path_EGREP_found && break 3
4407 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004408 done
Matthias Kloseb9621712010-04-24 17:59:49 +00004409 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004410IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00004411 if test -z "$ac_cv_path_EGREP"; then
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004412 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 +00004413 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004414else
4415 ac_cv_path_EGREP=$EGREP
4416fi
4417
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004418 fi
4419fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004420{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4421$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004422 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00004423
4424
Matthias Kloseb9621712010-04-24 17:59:49 +00004425{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4426$as_echo_n "checking for ANSI C header files... " >&6; }
4427if test "${ac_cv_header_stdc+set}" = set; then :
4428 $as_echo_n "(cached) " >&6
4429else
4430 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004431/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00004432#include <stdlib.h>
4433#include <stdarg.h>
4434#include <string.h>
4435#include <float.h>
4436
4437int
4438main ()
4439{
4440
4441 ;
4442 return 0;
4443}
4444_ACEOF
4445if ac_fn_c_try_compile "$LINENO"; then :
4446 ac_cv_header_stdc=yes
4447else
4448 ac_cv_header_stdc=no
4449fi
4450rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4451
4452if test $ac_cv_header_stdc = yes; then
4453 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4454 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4455/* end confdefs.h. */
4456#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004457
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004458_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004459if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00004460 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004461
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004462else
Matthias Kloseb9621712010-04-24 17:59:49 +00004463 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004464fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00004465rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004466
Matthias Kloseb9621712010-04-24 17:59:49 +00004467fi
4468
4469if test $ac_cv_header_stdc = yes; then
4470 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4471 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4472/* end confdefs.h. */
4473#include <stdlib.h>
4474
4475_ACEOF
4476if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4477 $EGREP "free" >/dev/null 2>&1; then :
4478
4479else
4480 ac_cv_header_stdc=no
4481fi
4482rm -f conftest*
4483
4484fi
4485
4486if test $ac_cv_header_stdc = yes; then
4487 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4488 if test "$cross_compiling" = yes; then :
4489 :
4490else
4491 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4492/* end confdefs.h. */
4493#include <ctype.h>
4494#include <stdlib.h>
4495#if ((' ' & 0x0FF) == 0x020)
4496# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4497# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4498#else
4499# define ISLOWER(c) \
4500 (('a' <= (c) && (c) <= 'i') \
4501 || ('j' <= (c) && (c) <= 'r') \
4502 || ('s' <= (c) && (c) <= 'z'))
4503# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4504#endif
4505
4506#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4507int
4508main ()
4509{
4510 int i;
4511 for (i = 0; i < 256; i++)
4512 if (XOR (islower (i), ISLOWER (i))
4513 || toupper (i) != TOUPPER (i))
4514 return 2;
4515 return 0;
4516}
4517_ACEOF
4518if ac_fn_c_try_run "$LINENO"; then :
4519
4520else
4521 ac_cv_header_stdc=no
4522fi
4523rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4524 conftest.$ac_objext conftest.beam conftest.$ac_ext
4525fi
4526
4527fi
4528fi
4529{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4530$as_echo "$ac_cv_header_stdc" >&6; }
4531if test $ac_cv_header_stdc = yes; then
4532
4533$as_echo "#define STDC_HEADERS 1" >>confdefs.h
4534
4535fi
4536
4537# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4538for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4539 inttypes.h stdint.h unistd.h
4540do :
4541 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4542ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4543"
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004544if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004545 cat >>confdefs.h <<_ACEOF
4546#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4547_ACEOF
4548
4549fi
4550
4551done
4552
4553
4554
4555 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
4556if test "x$ac_cv_header_minix_config_h" = x""yes; then :
4557 MINIX=yes
4558else
4559 MINIX=
4560fi
4561
4562
4563 if test "$MINIX" = yes; then
4564
4565$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4566
4567
4568$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4569
4570
4571$as_echo "#define _MINIX 1" >>confdefs.h
4572
4573 fi
4574
4575
4576 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4577$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
4578if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
4579 $as_echo_n "(cached) " >&6
4580else
4581 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4582/* end confdefs.h. */
4583
4584# define __EXTENSIONS__ 1
4585 $ac_includes_default
4586int
4587main ()
4588{
4589
4590 ;
4591 return 0;
4592}
4593_ACEOF
4594if ac_fn_c_try_compile "$LINENO"; then :
4595 ac_cv_safe_to_define___extensions__=yes
4596else
4597 ac_cv_safe_to_define___extensions__=no
4598fi
4599rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4600fi
4601{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4602$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4603 test $ac_cv_safe_to_define___extensions__ = yes &&
4604 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4605
4606 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4607
4608 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4609
4610 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4611
4612 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4613
4614
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004615
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004616# Check for unsupported systems
4617case $ac_sys_system/$ac_sys_release in
4618atheos*|Linux*/1*)
4619 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
4620 echo See README for details.
4621 exit 1;;
4622esac
4623
4624
Matthias Kloseb9621712010-04-24 17:59:49 +00004625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
4626$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004627
4628# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004629if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004630 withval=$with_suffix;
4631 case $withval in
4632 no) EXEEXT=;;
4633 yes) EXEEXT=.exe;;
4634 *) EXEEXT=$withval;;
4635 esac
4636fi
4637
Matthias Kloseb9621712010-04-24 17:59:49 +00004638{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
4639$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004640
4641# Test whether we're running on a non-case-sensitive system, in which
4642# case we give a warning if no ext is given
4643
Matthias Kloseb9621712010-04-24 17:59:49 +00004644{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
4645$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004646if test ! -d CaseSensitiveTestDir; then
4647mkdir CaseSensitiveTestDir
4648fi
4649
4650if test -d casesensitivetestdir
4651then
Matthias Kloseb9621712010-04-24 17:59:49 +00004652 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4653$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004654 BUILDEXEEXT=.exe
4655else
Matthias Kloseb9621712010-04-24 17:59:49 +00004656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4657$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004658 BUILDEXEEXT=$EXEEXT
4659fi
4660rmdir CaseSensitiveTestDir
4661
4662case $MACHDEP in
4663bsdos*)
4664 case $CC in
4665 gcc) CC="$CC -D_HAVE_BSDI";;
4666 esac;;
4667esac
4668
4669case $ac_sys_system in
4670hp*|HP*)
4671 case $CC in
4672 cc|*/cc) CC="$CC -Ae";;
4673 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004674esac
4675
4676
4677
Matthias Kloseb9621712010-04-24 17:59:49 +00004678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
4679$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004680if test -z "$LIBRARY"
4681then
4682 LIBRARY='libpython$(VERSION).a'
4683fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004684{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
4685$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004686
4687# LDLIBRARY is the name of the library to link against (as opposed to the
4688# name of the library into which to insert object files). BLDLIBRARY is also
4689# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
4690# is blank as the main program is not linked directly against LDLIBRARY.
4691# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
4692# systems without shared libraries, LDLIBRARY is the same as LIBRARY
4693# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
4694# DLLLIBRARY is the shared (i.e., DLL) library.
4695#
4696# RUNSHARED is used to run shared python without installed libraries
4697#
4698# INSTSONAME is the name of the shared library that will be use to install
4699# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004700#
4701# LDVERSION is the shared library version number, normally the Python version
4702# with the ABI build flags appended.
4703
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004704
4705
4706
4707
4708
4709
4710LDLIBRARY="$LIBRARY"
4711BLDLIBRARY='$(LDLIBRARY)'
4712INSTSONAME='$(LDLIBRARY)'
4713DLLLIBRARY=''
4714LDLIBRARYDIR=''
4715RUNSHARED=''
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004716LDVERSION="$(VERSION)"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004717
4718# LINKCC is the command that links the python executable -- default is $(CC).
4719# If CXX is set, and if it is needed to link a main function that was
4720# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
4721# python might then depend on the C++ runtime
4722# This is altered for AIX in order to build the export list before
4723# linking.
4724
Matthias Kloseb9621712010-04-24 17:59:49 +00004725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
4726$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004727if test -z "$LINKCC"
4728then
4729 LINKCC='$(PURIFY) $(MAINCC)'
4730 case $ac_sys_system in
4731 AIX*)
4732 exp_extra="\"\""
4733 if test $ac_sys_release -ge 5 -o \
4734 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
4735 exp_extra="."
4736 fi
4737 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004738 QNX*)
4739 # qcc must be used because the other compilers do not
4740 # support -N.
4741 LINKCC=qcc;;
4742 esac
4743fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004744{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
4745$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004746
4747# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
4748# make sure we default having it set to "no": this is used by
4749# distutils.unixccompiler to know if it should add --enable-new-dtags
4750# to linker command lines, and failing to detect GNU ld simply results
4751# in the same bahaviour as before.
4752
Matthias Kloseb9621712010-04-24 17:59:49 +00004753{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
4754$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004755ac_prog=ld
4756if test "$GCC" = yes; then
4757 ac_prog=`$CC -print-prog-name=ld`
4758fi
4759case `"$ac_prog" -V 2>&1 < /dev/null` in
4760 *GNU*)
4761 GNULD=yes;;
4762 *)
4763 GNULD=no;;
4764esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004765{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
4766$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004767
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
4769$as_echo_n "checking for inline... " >&6; }
4770if test "${ac_cv_c_inline+set}" = set; then :
4771 $as_echo_n "(cached) " >&6
4772else
4773 ac_cv_c_inline=no
4774for ac_kw in inline __inline__ __inline; do
4775 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4776/* end confdefs.h. */
4777#ifndef __cplusplus
4778typedef int foo_t;
4779static $ac_kw foo_t static_foo () {return 0; }
4780$ac_kw foo_t foo () {return 0; }
4781#endif
4782
4783_ACEOF
4784if ac_fn_c_try_compile "$LINENO"; then :
4785 ac_cv_c_inline=$ac_kw
4786fi
4787rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4788 test "$ac_cv_c_inline" != no && break
4789done
4790
4791fi
4792{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
4793$as_echo "$ac_cv_c_inline" >&6; }
4794
4795case $ac_cv_c_inline in
4796 inline | yes) ;;
4797 *)
4798 case $ac_cv_c_inline in
4799 no) ac_val=;;
4800 *) ac_val=$ac_cv_c_inline;;
4801 esac
4802 cat >>confdefs.h <<_ACEOF
4803#ifndef __cplusplus
4804#define inline $ac_val
4805#endif
4806_ACEOF
4807 ;;
4808esac
4809
4810if test "$ac_cv_c_inline" != no ; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00004811
4812$as_echo "#define USE_INLINE 1" >>confdefs.h
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004813
4814
4815fi
4816
4817
Matthias Kloseb9621712010-04-24 17:59:49 +00004818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
4819$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004820# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004821if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004822 enableval=$enable_shared;
4823fi
4824
4825
4826if test -z "$enable_shared"
4827then
4828 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00004829 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004830 enable_shared="yes";;
4831 *)
4832 enable_shared="no";;
4833 esac
4834fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004835{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
4836$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004837
Matthias Kloseb9621712010-04-24 17:59:49 +00004838{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
4839$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004840# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004841if test "${enable_profiling+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004842 enableval=$enable_profiling; ac_save_cc="$CC"
4843 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004844 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004845 ac_enable_profiling="no"
4846else
Matthias Kloseb9621712010-04-24 17:59:49 +00004847 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004848/* end confdefs.h. */
4849int main() { return 0; }
4850_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004851if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004852 ac_enable_profiling="yes"
4853else
Matthias Kloseb9621712010-04-24 17:59:49 +00004854 ac_enable_profiling="no"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004855fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004856rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4857 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004858fi
4859
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004860 CC="$ac_save_cc"
4861fi
4862
Matthias Kloseb9621712010-04-24 17:59:49 +00004863{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_profiling" >&5
4864$as_echo "$ac_enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004865
4866case "$ac_enable_profiling" in
4867 "yes")
4868 BASECFLAGS="-pg $BASECFLAGS"
4869 LDFLAGS="-pg $LDFLAGS"
4870 ;;
4871esac
4872
Matthias Kloseb9621712010-04-24 17:59:49 +00004873{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
4874$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004875
4876# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4877# library that we build, but we do not want to link against it (we
4878# will find it with a -framework option). For this reason there is an
4879# extra variable BLDLIBRARY against which Python and the extension
4880# modules are linked, BLDLIBRARY. This is normally the same as
4881# LDLIBRARY, but empty for MacOSX framework builds.
4882if test "$enable_framework"
4883then
4884 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
4885 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
4886 BLDLIBRARY=''
4887else
4888 BLDLIBRARY='$(LDLIBRARY)'
4889fi
4890
4891# Other platforms follow
4892if test $enable_shared = "yes"; then
4893
Matthias Kloseb9621712010-04-24 17:59:49 +00004894$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004895
4896 case $ac_sys_system in
4897 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004898 LDLIBRARY='libpython$(LDVERSION).dll.a'
4899 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004900 ;;
4901 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004902 LDLIBRARY='libpython$(LDVERSION).so'
4903 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004904 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4905 INSTSONAME="$LDLIBRARY".$SOVERSION
4906 ;;
4907 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004908 LDLIBRARY='libpython$(LDVERSION).so'
4909 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004910 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4911 case $ac_sys_system in
4912 FreeBSD*)
4913 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4914 ;;
4915 esac
4916 INSTSONAME="$LDLIBRARY".$SOVERSION
4917 ;;
4918 hp*|HP*)
4919 case `uname -m` in
4920 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004921 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004922 ;;
4923 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004924 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004925 ;;
4926 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004927 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004928 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
4929 ;;
4930 OSF*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004931 LDLIBRARY='libpython$(LDVERSION).so'
4932 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004933 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4934 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004935 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004936 LDLIBRARY='libpython$(LDVERSION).dylib'
4937 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004938 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
4939 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00004940 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004941 LDLIBRARY='libpython$(LDVERSION).so'
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00004942 RUNSHARED=LIBPATH=`pwd`:${LIBPATH}
4943 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004944
4945 esac
4946else # shared is disabled
4947 case $ac_sys_system in
4948 CYGWIN*)
4949 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004950 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004951 ;;
4952 esac
4953fi
4954
Matthias Kloseb9621712010-04-24 17:59:49 +00004955{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
4956$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004957
4958if test -n "$ac_tool_prefix"; then
4959 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4960set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004961{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4962$as_echo_n "checking for $ac_word... " >&6; }
4963if test "${ac_cv_prog_RANLIB+set}" = set; then :
4964 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004965else
4966 if test -n "$RANLIB"; then
4967 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4968else
4969as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4970for as_dir in $PATH
4971do
4972 IFS=$as_save_IFS
4973 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004974 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004975 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4976 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00004977 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004978 break 2
4979 fi
4980done
Matthias Kloseb9621712010-04-24 17:59:49 +00004981 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004982IFS=$as_save_IFS
4983
4984fi
4985fi
4986RANLIB=$ac_cv_prog_RANLIB
4987if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004988 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
4989$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004990else
Matthias Kloseb9621712010-04-24 17:59:49 +00004991 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4992$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004993fi
4994
4995
4996fi
4997if test -z "$ac_cv_prog_RANLIB"; then
4998 ac_ct_RANLIB=$RANLIB
4999 # Extract the first word of "ranlib", so it can be a program name with args.
5000set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005001{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5002$as_echo_n "checking for $ac_word... " >&6; }
5003if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
5004 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005005else
5006 if test -n "$ac_ct_RANLIB"; then
5007 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5008else
5009as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5010for as_dir in $PATH
5011do
5012 IFS=$as_save_IFS
5013 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005014 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005015 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5016 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005017 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005018 break 2
5019 fi
5020done
Matthias Kloseb9621712010-04-24 17:59:49 +00005021 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005022IFS=$as_save_IFS
5023
5024fi
5025fi
5026ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5027if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5029$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005030else
Matthias Kloseb9621712010-04-24 17:59:49 +00005031 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5032$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005033fi
5034
5035 if test "x$ac_ct_RANLIB" = x; then
5036 RANLIB=":"
5037 else
5038 case $cross_compiling:$ac_tool_warned in
5039yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00005040{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5041$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005042ac_tool_warned=yes ;;
5043esac
5044 RANLIB=$ac_ct_RANLIB
5045 fi
5046else
5047 RANLIB="$ac_cv_prog_RANLIB"
5048fi
5049
5050
5051for ac_prog in ar aal
5052do
5053 # Extract the first word of "$ac_prog", so it can be a program name with args.
5054set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005055{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5056$as_echo_n "checking for $ac_word... " >&6; }
5057if test "${ac_cv_prog_AR+set}" = set; then :
5058 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005059else
5060 if test -n "$AR"; then
5061 ac_cv_prog_AR="$AR" # Let the user override the test.
5062else
5063as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5064for as_dir in $PATH
5065do
5066 IFS=$as_save_IFS
5067 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005068 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005069 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5070 ac_cv_prog_AR="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005071 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005072 break 2
5073 fi
5074done
Matthias Kloseb9621712010-04-24 17:59:49 +00005075 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005076IFS=$as_save_IFS
5077
5078fi
5079fi
5080AR=$ac_cv_prog_AR
5081if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005082 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5083$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005084else
Matthias Kloseb9621712010-04-24 17:59:49 +00005085 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5086$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005087fi
5088
5089
5090 test -n "$AR" && break
5091done
5092test -n "$AR" || AR="ar"
5093
5094
5095# tweak ARFLAGS only if the user didn't set it on the command line
5096
5097if test -z "$ARFLAGS"
5098then
5099 ARFLAGS="rc"
5100fi
5101
5102
5103# Extract the first word of "svnversion", so it can be a program name with args.
5104set dummy svnversion; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005105{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5106$as_echo_n "checking for $ac_word... " >&6; }
5107if test "${ac_cv_prog_SVNVERSION+set}" = set; then :
5108 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005109else
5110 if test -n "$SVNVERSION"; then
5111 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
5112else
5113as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5114for as_dir in $PATH
5115do
5116 IFS=$as_save_IFS
5117 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005118 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005119 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5120 ac_cv_prog_SVNVERSION="found"
Matthias Kloseb9621712010-04-24 17:59:49 +00005121 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005122 break 2
5123 fi
5124done
Matthias Kloseb9621712010-04-24 17:59:49 +00005125 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005126IFS=$as_save_IFS
5127
5128 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
5129fi
5130fi
5131SVNVERSION=$ac_cv_prog_SVNVERSION
5132if test -n "$SVNVERSION"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005133 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SVNVERSION" >&5
5134$as_echo "$SVNVERSION" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005135else
Matthias Kloseb9621712010-04-24 17:59:49 +00005136 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5137$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005138fi
5139
5140
5141if test $SVNVERSION = found
5142then
5143 SVNVERSION="svnversion \$(srcdir)"
5144else
5145 SVNVERSION="echo Unversioned directory"
5146fi
5147
5148case $MACHDEP in
5149bsdos*|hp*|HP*)
5150 # install -d does not work on BSDI or HP-UX
5151 if test -z "$INSTALL"
5152 then
5153 INSTALL="${srcdir}/install-sh -c"
5154 fi
5155esac
5156ac_aux_dir=
5157for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005158 if test -f "$ac_dir/install-sh"; then
5159 ac_aux_dir=$ac_dir
5160 ac_install_sh="$ac_aux_dir/install-sh -c"
5161 break
5162 elif test -f "$ac_dir/install.sh"; then
5163 ac_aux_dir=$ac_dir
5164 ac_install_sh="$ac_aux_dir/install.sh -c"
5165 break
5166 elif test -f "$ac_dir/shtool"; then
5167 ac_aux_dir=$ac_dir
5168 ac_install_sh="$ac_aux_dir/shtool install -c"
5169 break
5170 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005171done
5172if test -z "$ac_aux_dir"; then
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005173 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005174fi
5175
5176# These three variables are undocumented and unsupported,
5177# and are intended to be withdrawn in a future Autoconf release.
5178# They can cause serious problems if a builder's source tree is in a directory
5179# whose full name contains unusual characters.
5180ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
5181ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
5182ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
5183
5184
5185# Find a good install program. We prefer a C program (faster),
5186# so one script is as good as another. But avoid the broken or
5187# incompatible versions:
5188# SysV /etc/install, /usr/sbin/install
5189# SunOS /usr/etc/install
5190# IRIX /sbin/install
5191# AIX /bin/install
5192# AmigaOS /C/install, which installs bootblocks on floppy discs
5193# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5194# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5195# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5196# OS/2's system install, which has a completely different semantic
5197# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00005198# Reject install programs that cannot install multiple files.
5199{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
5200$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005201if test -z "$INSTALL"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005202if test "${ac_cv_path_install+set}" = set; then :
5203 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005204else
5205 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5206for as_dir in $PATH
5207do
5208 IFS=$as_save_IFS
5209 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005210 # Account for people who put trailing slashes in PATH elements.
5211case $as_dir/ in #((
5212 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005213 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00005214 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005215 /usr/ucb/* ) ;;
5216 *)
5217 # OSF1 and SCO ODT 3.0 have their own names for install.
5218 # Don't use installbsd from OSF since it installs stuff as root
5219 # by default.
5220 for ac_prog in ginstall scoinst install; do
5221 for ac_exec_ext in '' $ac_executable_extensions; do
5222 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
5223 if test $ac_prog = install &&
5224 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5225 # AIX install. It has an incompatible calling convention.
5226 :
5227 elif test $ac_prog = install &&
5228 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5229 # program-specific install script used by HP pwplus--don't use.
5230 :
5231 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005232 rm -rf conftest.one conftest.two conftest.dir
5233 echo one > conftest.one
5234 echo two > conftest.two
5235 mkdir conftest.dir
5236 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5237 test -s conftest.one && test -s conftest.two &&
5238 test -s conftest.dir/conftest.one &&
5239 test -s conftest.dir/conftest.two
5240 then
5241 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5242 break 3
5243 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005244 fi
5245 fi
5246 done
5247 done
5248 ;;
5249esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005250
5251 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005252IFS=$as_save_IFS
5253
Matthias Kloseb9621712010-04-24 17:59:49 +00005254rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005255
5256fi
5257 if test "${ac_cv_path_install+set}" = set; then
5258 INSTALL=$ac_cv_path_install
5259 else
5260 # As a last resort, use the slow shell script. Don't cache a
5261 # value for INSTALL within a source directory, because that will
5262 # break other packages using the cache if that directory is
5263 # removed, or if the value is a relative name.
5264 INSTALL=$ac_install_sh
5265 fi
5266fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005267{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
5268$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005269
5270# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5271# It thinks the first close brace ends the variable substitution.
5272test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5273
5274test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
5275
5276test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5277
5278
5279# Not every filesystem supports hard links
5280
5281if test -z "$LN" ; then
5282 case $ac_sys_system in
5283 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005284 *) LN=ln;;
5285 esac
5286fi
5287
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00005288# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005289
5290ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00005291
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005292# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00005293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
5294$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005295
5296# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005297if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005298 withval=$with_pydebug;
5299if test "$withval" != no
5300then
5301
Matthias Kloseb9621712010-04-24 17:59:49 +00005302$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005303
Matthias Kloseb9621712010-04-24 17:59:49 +00005304 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5305$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005306 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005307 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00005308else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5309$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005310fi
5311else
Matthias Kloseb9621712010-04-24 17:59:49 +00005312 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5313$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005314fi
5315
5316
5317# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
5318# merged with this chunk of code?
5319
5320# Optimizer/debugger flags
5321# ------------------------
5322# (The following bit of code is complicated enough - please keep things
5323# indented properly. Just pretend you're editing Python code. ;-)
5324
5325# There are two parallel sets of case statements below, one that checks to
5326# see if OPT was set and one that does BASECFLAGS setting based upon
5327# compiler and platform. BASECFLAGS tweaks need to be made even if the
5328# user set OPT.
5329
5330# tweak OPT based on compiler and platform, only if the user didn't set
5331# it on the command line
5332
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00005333if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005334then
5335 case $GCC in
5336 yes)
5337 if test "$CC" != 'g++' ; then
5338 STRICT_PROTO="-Wstrict-prototypes"
5339 fi
5340 # For gcc 4.x we need to use -fwrapv so lets check if its supported
5341 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
5342 WRAP="-fwrapv"
5343 fi
5344 case $ac_cv_prog_cc_g in
5345 yes)
5346 if test "$Py_DEBUG" = 'true' ; then
5347 # Optimization messes up debuggers, so turn it off for
5348 # debug builds.
Mark Dickinsonb2153e92010-05-05 22:31:36 +00005349 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005350 else
5351 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
5352 fi
5353 ;;
5354 *)
5355 OPT="-O3 -Wall $STRICT_PROTO"
5356 ;;
5357 esac
5358 case $ac_sys_system in
5359 SCO_SV*) OPT="$OPT -m486 -DSCO5"
5360 ;;
5361 esac
5362 ;;
5363
5364 *)
5365 OPT="-O"
5366 ;;
5367 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005368fi
5369
5370
5371
5372# The -arch flags for universal builds on OSX
5373UNIVERSAL_ARCH_FLAGS=
5374
5375
5376# tweak BASECFLAGS based on compiler and platform
5377case $GCC in
5378yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005379 # Python doesn't violate C99 aliasing rules, but older versions of
5380 # GCC produce warnings for legal Python code. Enable
5381 # -fno-strict-aliasing on versions of GCC that support but produce
5382 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00005383 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
5384$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005385 ac_save_cc="$CC"
5386 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005387 save_CFLAGS="$CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +00005388 if test "${ac_cv_no_strict_aliasing+set}" = set; then :
5389 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00005390else
Matthias Kloseb9621712010-04-24 17:59:49 +00005391 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005392/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005393
Matthias Kloseb159a552010-04-25 21:00:44 +00005394
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005395int
5396main ()
5397{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005398
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005399 ;
5400 return 0;
5401}
Matthias Kloseb159a552010-04-25 21:00:44 +00005402
Alexandre Vassalotti302825b2009-07-17 07:49:53 +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 CC="$ac_save_cc -fstrict-aliasing"
5407 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
5408 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005409/* end confdefs.h. */
5410
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005411 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005412int
5413main ()
5414{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005415double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005416 ;
5417 return 0;
5418}
Matthias Kloseb159a552010-04-25 21:00:44 +00005419
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005420_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005421if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00005422
5423 ac_cv_no_strict_aliasing=no
5424
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005425else
Matthias Kloseb159a552010-04-25 21:00:44 +00005426
5427 ac_cv_no_strict_aliasing=yes
5428
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005429fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005430rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00005431
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005432else
Matthias Kloseb159a552010-04-25 21:00:44 +00005433
5434 ac_cv_no_strict_aliasing=no
5435
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005436fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005437rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00005438fi
5439
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005440 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005441 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00005442 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
5443$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005444 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005445 then
5446 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
5447 fi
5448
5449 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
5450 # support. Without this, treatment of subnormals doesn't follow
5451 # the standard.
5452 case $ac_sys_machine in
5453 alpha*)
5454 BASECFLAGS="$BASECFLAGS -mieee"
5455 ;;
5456 esac
5457
5458 case $ac_sys_system in
5459 SCO_SV*)
5460 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
5461 ;;
5462 # is there any other compiler on Darwin besides gcc?
5463 Darwin*)
5464 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
5465 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussoren666028b2010-04-18 19:07:43 +00005466 if test "${CC}" = gcc
5467 then
Matthias Kloseb9621712010-04-24 17:59:49 +00005468 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
5469$as_echo_n "checking which compiler should be used... " >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00005470 case "${UNIVERSALSDK}" in
5471 */MacOSX10.4u.sdk)
5472 # Build using 10.4 SDK, force usage of gcc when the
5473 # compiler is gcc, otherwise the user will get very
5474 # confusing error messages when building on OSX 10.6
5475 CC=gcc-4.0
5476 CPP=cpp-4.0
5477 ;;
5478 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005479 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5480$as_echo "$CC" >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00005481 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005482
5483
5484 if test "${enable_universalsdk}"; then
5485 UNIVERSAL_ARCH_FLAGS=""
5486 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
5487 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
5488 ARCH_RUN_32BIT=""
Benjamin Peterson99f03762010-04-11 22:15:28 +00005489 LIPO_32BIT_FLAGS=""
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005490 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
5491 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005492 LIPO_32BIT_FLAGS=""
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005493 ARCH_RUN_32BIT="true"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005494
5495 elif test "$UNIVERSAL_ARCHS" = "all" ; then
5496 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005497 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005498 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005499
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005500 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
5501 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005502 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005503 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005504
5505 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
5506 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005507 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005508 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005509
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005510 else
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005511 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 +00005512
5513 fi
5514
5515
Ronald Oussoren666028b2010-04-18 19:07:43 +00005516 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
5517 if test "${UNIVERSALSDK}" != "/"
5518 then
5519 CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
5520 LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren712979d2010-04-20 19:51:33 +00005521 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005522 fi
5523 fi
5524
5525 # Calculate the right deployment target for this build.
5526 #
5527 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
5528 if test ${cur_target} '>' 10.2; then
5529 cur_target=10.3
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005530 if test ${enable_universalsdk}; then
5531 if test "${UNIVERSAL_ARCHS}" = "all"; then
5532 # Ensure that the default platform for a
5533 # 4-way universal build is OSX 10.5,
5534 # that's the first OS release where
5535 # 4-way builds make sense.
5536 cur_target='10.5'
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005537
5538 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
5539 cur_target='10.5'
5540
5541 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
5542 cur_target='10.5'
5543
5544 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
5545 cur_target='10.5'
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005546 fi
5547 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00005548 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005549 # On Intel macs default to a deployment
5550 # target of 10.4, that's the first OSX
5551 # release with Intel support.
5552 cur_target="10.4"
5553 fi
5554 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005555 fi
5556 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
5557
5558 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
5559 # environment with a value that is the same as what we'll use
5560 # in the Makefile to ensure that we'll get the same compiler
5561 # environment during configure and build time.
5562 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
5563 export MACOSX_DEPLOYMENT_TARGET
5564 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
5565
5566 ;;
5567 OSF*)
5568 BASECFLAGS="$BASECFLAGS -mieee"
5569 ;;
5570 esac
5571 ;;
5572
5573*)
5574 case $ac_sys_system in
5575 OpenUNIX*|UnixWare*)
5576 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
5577 ;;
5578 OSF*)
5579 BASECFLAGS="$BASECFLAGS -ieee -std"
5580 ;;
5581 SCO_SV*)
5582 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
5583 ;;
5584 esac
5585 ;;
5586esac
5587
5588if test "$Py_DEBUG" = 'true'; then
5589 :
5590else
5591 OPT="-DNDEBUG $OPT"
5592fi
5593
5594if test "$ac_arch_flags"
5595then
5596 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
5597fi
5598
5599# disable check for icc since it seems to pass, but generates a warning
5600if test "$CC" = icc
5601then
5602 ac_cv_opt_olimit_ok=no
5603fi
5604
Matthias Kloseb9621712010-04-24 17:59:49 +00005605{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -OPT:Olimit=0" >&5
5606$as_echo_n "checking whether $CC accepts -OPT:Olimit=0... " >&6; }
5607if test "${ac_cv_opt_olimit_ok+set}" = set; then :
5608 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005609else
5610 ac_save_cc="$CC"
5611CC="$CC -OPT:Olimit=0"
Matthias Kloseb9621712010-04-24 17:59:49 +00005612cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005613/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005614
5615int
5616main ()
5617{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005618
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005619 ;
5620 return 0;
5621}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005622_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005623if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005624 ac_cv_opt_olimit_ok=yes
5625else
Matthias Kloseb9621712010-04-24 17:59:49 +00005626 ac_cv_opt_olimit_ok=no
Matthias Kloseb159a552010-04-25 21:00:44 +00005627
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005628fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005629rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005630CC="$ac_save_cc"
5631fi
5632
Matthias Kloseb9621712010-04-24 17:59:49 +00005633{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_opt_olimit_ok" >&5
5634$as_echo "$ac_cv_opt_olimit_ok" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005635if test $ac_cv_opt_olimit_ok = yes; then
5636 case $ac_sys_system in
5637 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
5638 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
5639 # environment?
5640 Darwin*)
5641 ;;
5642 *)
5643 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
5644 ;;
5645 esac
5646else
Matthias Kloseb9621712010-04-24 17:59:49 +00005647 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Olimit 1500" >&5
5648$as_echo_n "checking whether $CC accepts -Olimit 1500... " >&6; }
5649 if test "${ac_cv_olimit_ok+set}" = set; then :
5650 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005651else
5652 ac_save_cc="$CC"
5653 CC="$CC -Olimit 1500"
Matthias Kloseb9621712010-04-24 17:59:49 +00005654 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005655/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005656
5657int
5658main ()
5659{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005660
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005661 ;
5662 return 0;
5663}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005664_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005665if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005666 ac_cv_olimit_ok=yes
5667else
Matthias Kloseb9621712010-04-24 17:59:49 +00005668 ac_cv_olimit_ok=no
Matthias Kloseb159a552010-04-25 21:00:44 +00005669
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005670fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005671rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005672 CC="$ac_save_cc"
5673fi
5674
Matthias Kloseb9621712010-04-24 17:59:49 +00005675 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_olimit_ok" >&5
5676$as_echo "$ac_cv_olimit_ok" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005677 if test $ac_cv_olimit_ok = yes; then
5678 BASECFLAGS="$BASECFLAGS -Olimit 1500"
5679 fi
5680fi
5681
5682# Check whether GCC supports PyArg_ParseTuple format
5683if test "$GCC" = "yes"
5684then
Matthias Kloseb9621712010-04-24 17:59:49 +00005685 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5
5686$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005687 save_CFLAGS=$CFLAGS
5688 CFLAGS="$CFLAGS -Werror"
Matthias Kloseb9621712010-04-24 17:59:49 +00005689 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005690/* end confdefs.h. */
5691
5692 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005693int
5694main ()
5695{
5696
5697 ;
5698 return 0;
5699}
Matthias Kloseb159a552010-04-25 21:00:44 +00005700
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005701_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005702if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005703
Matthias Kloseb159a552010-04-25 21:00:44 +00005704
Matthias Kloseb9621712010-04-24 17:59:49 +00005705$as_echo "#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005706
Matthias Kloseb159a552010-04-25 21:00:44 +00005707 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00005708$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00005709
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005710else
Matthias Kloseb159a552010-04-25 21:00:44 +00005711
5712 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00005713$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005714
5715fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005716rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5717 CFLAGS=$save_CFLAGS
5718fi
5719
5720# On some compilers, pthreads are available without further options
5721# (e.g. MacOS X). On some of these systems, the compiler will not
5722# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
5723# So we have to see first whether pthreads are available without
5724# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00005725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
5726$as_echo_n "checking whether pthreads are available without options... " >&6; }
5727if test "${ac_cv_pthread_is_default+set}" = set; then :
5728 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005729else
Matthias Kloseb9621712010-04-24 17:59:49 +00005730 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005731 ac_cv_pthread_is_default=no
5732else
Matthias Kloseb9621712010-04-24 17:59:49 +00005733 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005734/* end confdefs.h. */
5735
5736#include <pthread.h>
5737
5738void* routine(void* p){return NULL;}
5739
5740int main(){
5741 pthread_t p;
5742 if(pthread_create(&p,NULL,routine,NULL)!=0)
5743 return 1;
5744 (void)pthread_detach(p);
5745 return 0;
5746}
5747
5748_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005749if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005750
5751 ac_cv_pthread_is_default=yes
5752 ac_cv_kthread=no
5753 ac_cv_pthread=no
5754
5755else
Matthias Kloseb9621712010-04-24 17:59:49 +00005756 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005757fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005758rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5759 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005760fi
5761
5762
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005763fi
5764
Matthias Kloseb9621712010-04-24 17:59:49 +00005765{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
5766$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005767
5768
5769if test $ac_cv_pthread_is_default = yes
5770then
5771 ac_cv_kpthread=no
5772else
5773# -Kpthread, if available, provides the right #defines
5774# and linker options to make pthread_create available
5775# Some compilers won't report that they do not support -Kpthread,
5776# so we need to run a program to see whether it really made the
5777# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005778{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
5779$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
5780if test "${ac_cv_kpthread+set}" = set; then :
5781 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005782else
5783 ac_save_cc="$CC"
5784CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005785if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005786 ac_cv_kpthread=no
5787else
Matthias Kloseb9621712010-04-24 17:59:49 +00005788 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005789/* end confdefs.h. */
5790
5791#include <pthread.h>
5792
5793void* routine(void* p){return NULL;}
5794
5795int main(){
5796 pthread_t p;
5797 if(pthread_create(&p,NULL,routine,NULL)!=0)
5798 return 1;
5799 (void)pthread_detach(p);
5800 return 0;
5801}
5802
5803_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005804if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005805 ac_cv_kpthread=yes
5806else
Matthias Kloseb9621712010-04-24 17:59:49 +00005807 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005808fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005809rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5810 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005811fi
5812
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005813CC="$ac_save_cc"
5814fi
5815
Matthias Kloseb9621712010-04-24 17:59:49 +00005816{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
5817$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005818fi
5819
5820if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
5821then
5822# -Kthread, if available, provides the right #defines
5823# and linker options to make pthread_create available
5824# Some compilers won't report that they do not support -Kthread,
5825# so we need to run a program to see whether it really made the
5826# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
5828$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
5829if test "${ac_cv_kthread+set}" = set; then :
5830 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005831else
5832 ac_save_cc="$CC"
5833CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005834if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005835 ac_cv_kthread=no
5836else
Matthias Kloseb9621712010-04-24 17:59:49 +00005837 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005838/* end confdefs.h. */
5839
5840#include <pthread.h>
5841
5842void* routine(void* p){return NULL;}
5843
5844int main(){
5845 pthread_t p;
5846 if(pthread_create(&p,NULL,routine,NULL)!=0)
5847 return 1;
5848 (void)pthread_detach(p);
5849 return 0;
5850}
5851
5852_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005853if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005854 ac_cv_kthread=yes
5855else
Matthias Kloseb9621712010-04-24 17:59:49 +00005856 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005857fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005858rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5859 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005860fi
5861
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005862CC="$ac_save_cc"
5863fi
5864
Matthias Kloseb9621712010-04-24 17:59:49 +00005865{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
5866$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005867fi
5868
5869if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
5870then
5871# -pthread, if available, provides the right #defines
5872# and linker options to make pthread_create available
5873# Some compilers won't report that they do not support -pthread,
5874# so we need to run a program to see whether it really made the
5875# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005876{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
5877$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
5878if test "${ac_cv_thread+set}" = set; then :
5879 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005880else
5881 ac_save_cc="$CC"
5882CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005883if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005884 ac_cv_pthread=no
5885else
Matthias Kloseb9621712010-04-24 17:59:49 +00005886 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005887/* end confdefs.h. */
5888
5889#include <pthread.h>
5890
5891void* routine(void* p){return NULL;}
5892
5893int main(){
5894 pthread_t p;
5895 if(pthread_create(&p,NULL,routine,NULL)!=0)
5896 return 1;
5897 (void)pthread_detach(p);
5898 return 0;
5899}
5900
5901_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005902if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005903 ac_cv_pthread=yes
5904else
Matthias Kloseb9621712010-04-24 17:59:49 +00005905 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005906fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005907rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5908 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005909fi
5910
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005911CC="$ac_save_cc"
5912fi
5913
Matthias Kloseb9621712010-04-24 17:59:49 +00005914{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
5915$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005916fi
5917
5918# If we have set a CC compiler flag for thread support then
5919# check if it works for CXX, too.
5920ac_cv_cxx_thread=no
5921if test ! -z "$CXX"
5922then
Matthias Kloseb9621712010-04-24 17:59:49 +00005923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
5924$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005925ac_save_cxx="$CXX"
5926
5927if test "$ac_cv_kpthread" = "yes"
5928then
5929 CXX="$CXX -Kpthread"
5930 ac_cv_cxx_thread=yes
5931elif test "$ac_cv_kthread" = "yes"
5932then
5933 CXX="$CXX -Kthread"
5934 ac_cv_cxx_thread=yes
5935elif test "$ac_cv_pthread" = "yes"
5936then
5937 CXX="$CXX -pthread"
5938 ac_cv_cxx_thread=yes
5939fi
5940
5941if test $ac_cv_cxx_thread = yes
5942then
5943 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5944 $CXX -c conftest.$ac_ext 2>&5
5945 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5946 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5947 then
5948 ac_cv_cxx_thread=yes
5949 else
5950 ac_cv_cxx_thread=no
5951 fi
5952 rm -fr conftest*
5953fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005954{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
5955$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005956fi
5957CXX="$ac_save_cxx"
5958
5959
5960# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00005961{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5962$as_echo_n "checking for ANSI C header files... " >&6; }
5963if test "${ac_cv_header_stdc+set}" = set; then :
5964 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005965else
Matthias Kloseb9621712010-04-24 17:59:49 +00005966 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005967/* end confdefs.h. */
5968#include <stdlib.h>
5969#include <stdarg.h>
5970#include <string.h>
5971#include <float.h>
5972
5973int
5974main ()
5975{
5976
5977 ;
5978 return 0;
5979}
5980_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005981if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005982 ac_cv_header_stdc=yes
5983else
Matthias Kloseb9621712010-04-24 17:59:49 +00005984 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005985fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005986rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5987
5988if test $ac_cv_header_stdc = yes; then
5989 # SunOS 4.x string.h does not declare mem*, 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 <string.h>
5993
5994_ACEOF
5995if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005996 $EGREP "memchr" >/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 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00006007 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006008/* end confdefs.h. */
6009#include <stdlib.h>
6010
6011_ACEOF
6012if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006013 $EGREP "free" >/dev/null 2>&1; then :
6014
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006015else
6016 ac_cv_header_stdc=no
6017fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006018rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006019
6020fi
6021
6022if test $ac_cv_header_stdc = yes; then
6023 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00006024 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006025 :
6026else
Matthias Kloseb9621712010-04-24 17:59:49 +00006027 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006028/* end confdefs.h. */
6029#include <ctype.h>
6030#include <stdlib.h>
6031#if ((' ' & 0x0FF) == 0x020)
6032# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6033# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6034#else
6035# define ISLOWER(c) \
6036 (('a' <= (c) && (c) <= 'i') \
6037 || ('j' <= (c) && (c) <= 'r') \
6038 || ('s' <= (c) && (c) <= 'z'))
6039# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6040#endif
6041
6042#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6043int
6044main ()
6045{
6046 int i;
6047 for (i = 0; i < 256; i++)
6048 if (XOR (islower (i), ISLOWER (i))
6049 || toupper (i) != TOUPPER (i))
6050 return 2;
6051 return 0;
6052}
6053_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006054if ac_fn_c_try_run "$LINENO"; then :
6055
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006056else
Matthias Kloseb9621712010-04-24 17:59:49 +00006057 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006058fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006059rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6060 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006061fi
6062
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006063fi
6064fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006065{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6066$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006067if test $ac_cv_header_stdc = yes; then
6068
Matthias Kloseb9621712010-04-24 17:59:49 +00006069$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006070
6071fi
6072
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006073for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
6074fcntl.h grp.h \
Christian Heimesbbe741d2008-03-28 10:53:29 +00006075ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Thomas Wouters89f507f2006-12-13 04:49:30 +00006076shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00006077unistd.h utime.h \
Christian Heimes4fbc72b2008-03-22 00:47:35 +00006078sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
6079sys/lock.h sys/mkdev.h sys/modem.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006080sys/param.h sys/poll.h sys/select.h sys/socket.h sys/statvfs.h sys/stat.h \
Benjamin Petersonde9c8692008-07-01 18:23:09 +00006081sys/termio.h sys/time.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006082sys/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 +00006083sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Ronald Oussoren755740f2010-02-07 19:56:39 +00006084bluetooth/bluetooth.h linux/tipc.h spawn.h util.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006085do :
6086 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6087ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006088if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006089 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006090#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006091_ACEOF
6092
6093fi
6094
Guido van Rossum627b2d71993-12-24 10:39:16 +00006095done
6096
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006097ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006098for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00006099 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6100{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
6101$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006102if eval "test \"\${$as_ac_Header+set}\"" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006103 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006104else
Matthias Kloseb9621712010-04-24 17:59:49 +00006105 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006106/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006107#include <sys/types.h>
6108#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00006109
Martin v. Löwis11437992002-04-12 09:54:03 +00006110int
6111main ()
6112{
6113if ((DIR *) 0)
6114return 0;
6115 ;
6116 return 0;
6117}
6118_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006119if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006120 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00006121else
Matthias Kloseb9621712010-04-24 17:59:49 +00006122 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006123fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006124rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006125fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006126eval ac_res=\$$as_ac_Header
6127 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6128$as_echo "$ac_res" >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006129if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006130 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006131#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006132_ACEOF
6133
6134ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00006135fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006136
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006137done
6138# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6139if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006140 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6141$as_echo_n "checking for library containing opendir... " >&6; }
6142if test "${ac_cv_search_opendir+set}" = set; then :
6143 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006144else
Martin v. Löwis11437992002-04-12 09:54:03 +00006145 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006146cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006147/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006148
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006149/* Override any GCC internal prototype to avoid an error.
6150 Use char because int might match the return type of a GCC
6151 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006152#ifdef __cplusplus
6153extern "C"
6154#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006155char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006156int
6157main ()
6158{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006159return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006160 ;
6161 return 0;
6162}
6163_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006164for ac_lib in '' dir; do
6165 if test -z "$ac_lib"; then
6166 ac_res="none required"
6167 else
6168 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006169 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006170 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006171 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006172 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006173fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006174rm -f core conftest.err conftest.$ac_objext \
6175 conftest$ac_exeext
6176 if test "${ac_cv_search_opendir+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006177 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006178fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006179done
Matthias Kloseb9621712010-04-24 17:59:49 +00006180if test "${ac_cv_search_opendir+set}" = set; then :
6181
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006182else
6183 ac_cv_search_opendir=no
6184fi
6185rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006186LIBS=$ac_func_search_save_LIBS
6187fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006188{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6189$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006190ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006191if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006192 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00006193
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006194fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006195
Michael W. Hudson54241132001-12-07 15:38:26 +00006196else
Matthias Kloseb9621712010-04-24 17:59:49 +00006197 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6198$as_echo_n "checking for library containing opendir... " >&6; }
6199if test "${ac_cv_search_opendir+set}" = set; then :
6200 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006201else
6202 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006203cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006204/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006205
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006206/* Override any GCC internal prototype to avoid an error.
6207 Use char because int might match the return type of a GCC
6208 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006209#ifdef __cplusplus
6210extern "C"
6211#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006212char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006213int
6214main ()
6215{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006216return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006217 ;
6218 return 0;
6219}
6220_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006221for ac_lib in '' x; do
6222 if test -z "$ac_lib"; then
6223 ac_res="none required"
6224 else
6225 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006226 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006227 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006228 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006229 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006230fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006231rm -f core conftest.err conftest.$ac_objext \
6232 conftest$ac_exeext
6233 if test "${ac_cv_search_opendir+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006234 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006235fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006236done
Matthias Kloseb9621712010-04-24 17:59:49 +00006237if test "${ac_cv_search_opendir+set}" = set; then :
6238
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006239else
6240 ac_cv_search_opendir=no
6241fi
6242rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006243LIBS=$ac_func_search_save_LIBS
6244fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006245{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6246$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006247ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006248if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006249 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006250
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006251fi
6252
6253fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006254
Matthias Kloseb9621712010-04-24 17:59:49 +00006255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
6256$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
6257if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then :
6258 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006259else
Matthias Kloseb9621712010-04-24 17:59:49 +00006260 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006261/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006262#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006263int
6264main ()
6265{
6266return makedev(0, 0);
6267 ;
6268 return 0;
6269}
6270_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006271if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006272 ac_cv_header_sys_types_h_makedev=yes
6273else
Matthias Kloseb9621712010-04-24 17:59:49 +00006274 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006275fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006276rm -f core conftest.err conftest.$ac_objext \
6277 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006278
6279fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006280{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
6281$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006282
6283if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006284ac_fn_c_check_header_mongrel "$LINENO" "sys/mkdev.h" "ac_cv_header_sys_mkdev_h" "$ac_includes_default"
6285if test "x$ac_cv_header_sys_mkdev_h" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006286
Matthias Kloseb9621712010-04-24 17:59:49 +00006287$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006288
6289fi
6290
6291
6292
6293 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006294 ac_fn_c_check_header_mongrel "$LINENO" "sys/sysmacros.h" "ac_cv_header_sys_sysmacros_h" "$ac_includes_default"
6295if test "x$ac_cv_header_sys_sysmacros_h" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006296
Matthias Kloseb9621712010-04-24 17:59:49 +00006297$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006298
6299fi
6300
6301
6302 fi
6303fi
6304
Michael W. Hudson54241132001-12-07 15:38:26 +00006305
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006306# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006307for ac_header in term.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006308do :
6309 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006310#ifdef HAVE_CURSES_H
6311#include <curses.h>
6312#endif
6313
Matthias Kloseb9621712010-04-24 17:59:49 +00006314"
6315if test "x$ac_cv_header_term_h" = x""yes; then :
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006316 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006317#define HAVE_TERM_H 1
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006318_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006319
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006320fi
6321
6322done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006323
6324
Martin v. Löwis11017b12006-01-14 18:12:57 +00006325# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00006326for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006327do :
6328 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 +00006329#ifdef HAVE_ASM_TYPES_H
6330#include <asm/types.h>
6331#endif
6332#ifdef HAVE_SYS_SOCKET_H
6333#include <sys/socket.h>
6334#endif
6335
Matthias Kloseb9621712010-04-24 17:59:49 +00006336"
6337if test "x$ac_cv_header_linux_netlink_h" = x""yes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00006338 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006339#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006340_ACEOF
6341
6342fi
6343
6344done
6345
6346
Guido van Rossum627b2d71993-12-24 10:39:16 +00006347# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006348was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006349{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
6350$as_echo_n "checking for clock_t in time.h... " >&6; }
6351cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006352/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006353#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006354
6355_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006356if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006357 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00006358 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006359else
Martin v. Löwis11437992002-04-12 09:54:03 +00006360
6361
Matthias Kloseb9621712010-04-24 17:59:49 +00006362$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00006363
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006364
Guido van Rossum627b2d71993-12-24 10:39:16 +00006365fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006366rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006367
Matthias Kloseb9621712010-04-24 17:59:49 +00006368{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
6369$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006370
Neal Norwitz11690112002-07-30 01:08:28 +00006371# Check whether using makedev requires defining _OSF_SOURCE
Matthias Kloseb9621712010-04-24 17:59:49 +00006372{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
6373$as_echo_n "checking for makedev... " >&6; }
6374cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006375/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00006376
Jesus Cea740f53a2010-04-28 11:35:30 +00006377#if defined(MAJOR_IN_MKDEV)
6378#include <sys/mkdev.h>
6379#elif defined(MAJOR_IN_SYSMACROS)
6380#include <sys/sysmacros.h>
6381#else
6382#include <sys/types.h>
6383#endif
6384
Neal Norwitz11690112002-07-30 01:08:28 +00006385int
6386main ()
6387{
Jesus Cea740f53a2010-04-28 11:35:30 +00006388
6389 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00006390 ;
6391 return 0;
6392}
Matthias Kloseb159a552010-04-25 21:00:44 +00006393
Neal Norwitz11690112002-07-30 01:08:28 +00006394_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006395if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006396 ac_cv_has_makedev=yes
6397else
Matthias Kloseb9621712010-04-24 17:59:49 +00006398 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006399fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006400rm -f core conftest.err conftest.$ac_objext \
6401 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006402if test "$ac_cv_has_makedev" = "no"; then
6403 # we didn't link, try if _OSF_SOURCE will allow us to link
Matthias Kloseb9621712010-04-24 17:59:49 +00006404 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006405/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006406
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006407#define _OSF_SOURCE 1
6408#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006409
Neal Norwitz11690112002-07-30 01:08:28 +00006410int
6411main ()
6412{
6413 makedev(0, 0)
6414 ;
6415 return 0;
6416}
6417_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006418if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006419 ac_cv_has_makedev=yes
6420else
Matthias Kloseb9621712010-04-24 17:59:49 +00006421 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006422fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006423rm -f core conftest.err conftest.$ac_objext \
6424 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006425 if test "$ac_cv_has_makedev" = "yes"; then
6426
Matthias Kloseb9621712010-04-24 17:59:49 +00006427$as_echo "#define _OSF_SOURCE 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006428
6429 fi
6430fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006431{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
6432$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006433if test "$ac_cv_has_makedev" = "yes"; then
6434
Matthias Kloseb9621712010-04-24 17:59:49 +00006435$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006436
6437fi
6438
Martin v. Löwis399a6892002-10-04 10:22:02 +00006439# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6440# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6441# defined, but the compiler does not support pragma redefine_extname,
6442# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6443# structures (such as rlimit64) without declaring them. As a
6444# work-around, disable LFS on such configurations
6445
6446use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00006447{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
6448$as_echo_n "checking Solaris LFS bug... " >&6; }
6449cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006450/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006451
6452#define _LARGEFILE_SOURCE 1
6453#define _FILE_OFFSET_BITS 64
6454#include <sys/resource.h>
6455
Martin v. Löwis399a6892002-10-04 10:22:02 +00006456int
6457main ()
6458{
6459struct rlimit foo;
6460 ;
6461 return 0;
6462}
6463_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006464if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00006465 sol_lfs_bug=no
6466else
Matthias Kloseb9621712010-04-24 17:59:49 +00006467 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006468fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006469rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006470{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
6471$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006472if test "$sol_lfs_bug" = "yes"; then
6473 use_lfs=no
6474fi
6475
6476if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006477# Two defines needed to enable largefile support on various platforms
6478# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00006479
Matthias Kloseb9621712010-04-24 17:59:49 +00006480$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006481
6482
Matthias Kloseb9621712010-04-24 17:59:49 +00006483$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00006484
Martin v. Löwis399a6892002-10-04 10:22:02 +00006485fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006486
Guido van Rossum84e7b241996-08-19 21:59:00 +00006487# Add some code to confdefs.h so that the test for off_t works on SCO
6488cat >> confdefs.h <<\EOF
6489#if defined(SCO_DS)
6490#undef _OFF_T
6491#endif
6492EOF
6493
Guido van Rossumef2255b2000-03-10 22:30:29 +00006494# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00006495ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
6496if test "x$ac_cv_type_mode_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006497
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006498else
Martin v. Löwis11437992002-04-12 09:54:03 +00006499
6500cat >>confdefs.h <<_ACEOF
6501#define mode_t int
6502_ACEOF
6503
6504fi
6505
Matthias Kloseb9621712010-04-24 17:59:49 +00006506ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
6507if test "x$ac_cv_type_off_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006508
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006509else
Martin v. Löwis11437992002-04-12 09:54:03 +00006510
6511cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006512#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006513_ACEOF
6514
6515fi
6516
Matthias Kloseb9621712010-04-24 17:59:49 +00006517ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
6518if test "x$ac_cv_type_pid_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006519
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006520else
Martin v. Löwis11437992002-04-12 09:54:03 +00006521
6522cat >>confdefs.h <<_ACEOF
6523#define pid_t int
6524_ACEOF
6525
6526fi
6527
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006528
Martin v. Löwis11437992002-04-12 09:54:03 +00006529cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00006530#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00006531_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006532
Matthias Kloseb9621712010-04-24 17:59:49 +00006533ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
6534if test "x$ac_cv_type_size_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006535
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006536else
Martin v. Löwis11437992002-04-12 09:54:03 +00006537
6538cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006539#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00006540_ACEOF
6541
6542fi
6543
Matthias Kloseb9621712010-04-24 17:59:49 +00006544{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
6545$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
6546if test "${ac_cv_type_uid_t+set}" = set; then :
6547 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006548else
Matthias Kloseb9621712010-04-24 17:59:49 +00006549 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006550/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006551#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006552
6553_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006554if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006555 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006556 ac_cv_type_uid_t=yes
6557else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006558 ac_cv_type_uid_t=no
6559fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006560rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006561
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006562fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006563{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
6564$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00006565if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006566
Matthias Kloseb9621712010-04-24 17:59:49 +00006567$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006568
6569
Matthias Kloseb9621712010-04-24 17:59:49 +00006570$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006571
6572fi
6573
Matthias Kloseb9621712010-04-24 17:59:49 +00006574ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
6575case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006576 no|yes) ;; #(
6577 *)
6578
Matthias Kloseb9621712010-04-24 17:59:49 +00006579$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006580
6581
6582cat >>confdefs.h <<_ACEOF
6583#define uint32_t $ac_cv_c_uint32_t
6584_ACEOF
6585;;
6586 esac
6587
Matthias Kloseb9621712010-04-24 17:59:49 +00006588ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
6589case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006590 no|yes) ;; #(
6591 *)
6592
Matthias Kloseb9621712010-04-24 17:59:49 +00006593$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006594
6595
6596cat >>confdefs.h <<_ACEOF
6597#define uint64_t $ac_cv_c_uint64_t
6598_ACEOF
6599;;
6600 esac
6601
Matthias Kloseb9621712010-04-24 17:59:49 +00006602ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
6603case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006604 no|yes) ;; #(
6605 *)
6606
6607cat >>confdefs.h <<_ACEOF
6608#define int32_t $ac_cv_c_int32_t
6609_ACEOF
6610;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00006611esac
6612
Matthias Kloseb9621712010-04-24 17:59:49 +00006613ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
6614case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006615 no|yes) ;; #(
6616 *)
6617
6618cat >>confdefs.h <<_ACEOF
6619#define int64_t $ac_cv_c_int64_t
6620_ACEOF
6621;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006622esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00006623
Matthias Kloseb9621712010-04-24 17:59:49 +00006624ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
6625if test "x$ac_cv_type_ssize_t" = x""yes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006626
Matthias Kloseb9621712010-04-24 17:59:49 +00006627$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00006628
6629fi
6630
Jack Jansendd19cf82001-12-06 22:36:17 +00006631
Michael W. Hudson54241132001-12-07 15:38:26 +00006632# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00006633# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006634# The cast to long int works around a bug in the HP C Compiler
6635# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6636# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6637# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006638{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
6639$as_echo_n "checking size of int... " >&6; }
6640if test "${ac_cv_sizeof_int+set}" = set; then :
6641 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006642else
Matthias Kloseb9621712010-04-24 17:59:49 +00006643 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 +00006644
Martin v. Löwis11437992002-04-12 09:54:03 +00006645else
Matthias Kloseb9621712010-04-24 17:59:49 +00006646 if test "$ac_cv_type_int" = yes; then
6647 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6648$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006649as_fn_error 77 "cannot compute sizeof (int)
6650See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006651 else
6652 ac_cv_sizeof_int=0
6653 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006654fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006655
Martin v. Löwis11437992002-04-12 09:54:03 +00006656fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006657{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
6658$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006659
6660
6661
Martin v. Löwis11437992002-04-12 09:54:03 +00006662cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006663#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00006664_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006665
6666
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006667# The cast to long int works around a bug in the HP C Compiler
6668# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6669# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6670# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006671{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
6672$as_echo_n "checking size of long... " >&6; }
6673if test "${ac_cv_sizeof_long+set}" = set; then :
6674 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006675else
Matthias Kloseb9621712010-04-24 17:59:49 +00006676 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 +00006677
Martin v. Löwis11437992002-04-12 09:54:03 +00006678else
Matthias Kloseb9621712010-04-24 17:59:49 +00006679 if test "$ac_cv_type_long" = yes; then
6680 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6681$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006682as_fn_error 77 "cannot compute sizeof (long)
6683See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006684 else
6685 ac_cv_sizeof_long=0
6686 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006687fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006688
Martin v. Löwis11437992002-04-12 09:54:03 +00006689fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006690{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
6691$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006692
6693
6694
Martin v. Löwis11437992002-04-12 09:54:03 +00006695cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006696#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006697_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006698
6699
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006700# The cast to long int works around a bug in the HP C Compiler
6701# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6702# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6703# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006704{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
6705$as_echo_n "checking size of void *... " >&6; }
6706if test "${ac_cv_sizeof_void_p+set}" = set; then :
6707 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006708else
Matthias Kloseb9621712010-04-24 17:59:49 +00006709 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 +00006710
Martin v. Löwis11437992002-04-12 09:54:03 +00006711else
Matthias Kloseb9621712010-04-24 17:59:49 +00006712 if test "$ac_cv_type_void_p" = yes; then
6713 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6714$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006715as_fn_error 77 "cannot compute sizeof (void *)
6716See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006717 else
6718 ac_cv_sizeof_void_p=0
6719 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006720fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006721
Martin v. Löwis11437992002-04-12 09:54:03 +00006722fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006723{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
6724$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006725
6726
6727
Martin v. Löwis11437992002-04-12 09:54:03 +00006728cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006729#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00006730_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006731
6732
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006733# The cast to long int works around a bug in the HP C Compiler
6734# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6735# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6736# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006737{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
6738$as_echo_n "checking size of short... " >&6; }
6739if test "${ac_cv_sizeof_short+set}" = set; then :
6740 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006741else
Matthias Kloseb9621712010-04-24 17:59:49 +00006742 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 +00006743
Martin v. Löwis11437992002-04-12 09:54:03 +00006744else
Matthias Kloseb9621712010-04-24 17:59:49 +00006745 if test "$ac_cv_type_short" = yes; then
6746 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6747$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006748as_fn_error 77 "cannot compute sizeof (short)
6749See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006750 else
6751 ac_cv_sizeof_short=0
6752 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006753fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006754
Martin v. Löwis11437992002-04-12 09:54:03 +00006755fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006756{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
6757$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006758
6759
6760
Martin v. Löwis11437992002-04-12 09:54:03 +00006761cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006762#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00006763_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006764
6765
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006766# The cast to long int works around a bug in the HP C Compiler
6767# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6768# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6769# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
6771$as_echo_n "checking size of float... " >&6; }
6772if test "${ac_cv_sizeof_float+set}" = set; then :
6773 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006774else
Matthias Kloseb9621712010-04-24 17:59:49 +00006775 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 +00006776
Martin v. Löwis11437992002-04-12 09:54:03 +00006777else
Matthias Kloseb9621712010-04-24 17:59:49 +00006778 if test "$ac_cv_type_float" = yes; then
6779 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6780$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006781as_fn_error 77 "cannot compute sizeof (float)
6782See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006783 else
6784 ac_cv_sizeof_float=0
6785 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006786fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006787
Martin v. Löwis11437992002-04-12 09:54:03 +00006788fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006789{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
6790$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006791
6792
6793
Martin v. Löwis11437992002-04-12 09:54:03 +00006794cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006795#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00006796_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006797
6798
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006799# The cast to long int works around a bug in the HP C Compiler
6800# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6801# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6802# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
6804$as_echo_n "checking size of double... " >&6; }
6805if test "${ac_cv_sizeof_double+set}" = set; then :
6806 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006807else
Matthias Kloseb9621712010-04-24 17:59:49 +00006808 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 +00006809
Martin v. Löwis11437992002-04-12 09:54:03 +00006810else
Matthias Kloseb9621712010-04-24 17:59:49 +00006811 if test "$ac_cv_type_double" = yes; then
6812 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6813$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006814as_fn_error 77 "cannot compute sizeof (double)
6815See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006816 else
6817 ac_cv_sizeof_double=0
6818 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006819fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006820
Martin v. Löwis11437992002-04-12 09:54:03 +00006821fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006822{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
6823$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006824
6825
6826
Martin v. Löwis11437992002-04-12 09:54:03 +00006827cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006828#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00006829_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006830
6831
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006832# The cast to long int works around a bug in the HP C Compiler
6833# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6834# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6835# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006836{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
6837$as_echo_n "checking size of fpos_t... " >&6; }
6838if test "${ac_cv_sizeof_fpos_t+set}" = set; then :
6839 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006840else
Matthias Kloseb9621712010-04-24 17:59:49 +00006841 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 +00006842
Martin v. Löwis11437992002-04-12 09:54:03 +00006843else
Matthias Kloseb9621712010-04-24 17:59:49 +00006844 if test "$ac_cv_type_fpos_t" = yes; then
6845 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6846$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006847as_fn_error 77 "cannot compute sizeof (fpos_t)
6848See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006849 else
6850 ac_cv_sizeof_fpos_t=0
6851 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006852fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006853
Martin v. Löwis11437992002-04-12 09:54:03 +00006854fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006855{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
6856$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006857
6858
6859
Martin v. Löwis11437992002-04-12 09:54:03 +00006860cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006861#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00006862_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006863
Michael W. Hudson54241132001-12-07 15:38:26 +00006864
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006865# The cast to long int works around a bug in the HP C Compiler
6866# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6867# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6868# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006869{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
6870$as_echo_n "checking size of size_t... " >&6; }
6871if test "${ac_cv_sizeof_size_t+set}" = set; then :
6872 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00006873else
Matthias Kloseb9621712010-04-24 17:59:49 +00006874 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 +00006875
Martin v. Löwis18e16552006-02-15 17:27:45 +00006876else
Matthias Kloseb9621712010-04-24 17:59:49 +00006877 if test "$ac_cv_type_size_t" = yes; then
6878 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6879$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006880as_fn_error 77 "cannot compute sizeof (size_t)
6881See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006882 else
6883 ac_cv_sizeof_size_t=0
6884 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00006885fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006886
Martin v. Löwis18e16552006-02-15 17:27:45 +00006887fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006888{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
6889$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006890
6891
6892
Martin v. Löwis18e16552006-02-15 17:27:45 +00006893cat >>confdefs.h <<_ACEOF
6894#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
6895_ACEOF
6896
6897
Christian Heimes400adb02008-02-01 08:12:03 +00006898# The cast to long int works around a bug in the HP C Compiler
6899# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6900# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6901# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006902{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
6903$as_echo_n "checking size of pid_t... " >&6; }
6904if test "${ac_cv_sizeof_pid_t+set}" = set; then :
6905 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00006906else
Matthias Kloseb9621712010-04-24 17:59:49 +00006907 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 +00006908
Christian Heimes400adb02008-02-01 08:12:03 +00006909else
Matthias Kloseb9621712010-04-24 17:59:49 +00006910 if test "$ac_cv_type_pid_t" = yes; then
6911 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6912$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006913as_fn_error 77 "cannot compute sizeof (pid_t)
6914See \`config.log' for more details" "$LINENO" 5 ; }
Christian Heimes400adb02008-02-01 08:12:03 +00006915 else
6916 ac_cv_sizeof_pid_t=0
6917 fi
6918fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006919
Christian Heimes400adb02008-02-01 08:12:03 +00006920fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006921{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
6922$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00006923
6924
6925
6926cat >>confdefs.h <<_ACEOF
6927#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
6928_ACEOF
6929
6930
Michael W. Hudson54241132001-12-07 15:38:26 +00006931
Matthias Kloseb9621712010-04-24 17:59:49 +00006932{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
6933$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006934have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006935cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006936/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006937
Martin v. Löwis11437992002-04-12 09:54:03 +00006938int
6939main ()
6940{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006941long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00006942 ;
6943 return 0;
6944}
6945_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006946if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006947
6948
Matthias Kloseb9621712010-04-24 17:59:49 +00006949$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006950
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006951 have_long_long=yes
6952
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006953fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006954rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006955{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
6956$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00006957if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006958# The cast to long int works around a bug in the HP C Compiler
6959# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6960# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6961# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006962{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
6963$as_echo_n "checking size of long long... " >&6; }
6964if test "${ac_cv_sizeof_long_long+set}" = set; then :
6965 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006966else
Matthias Kloseb9621712010-04-24 17:59:49 +00006967 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 +00006968
Martin v. Löwis11437992002-04-12 09:54:03 +00006969else
Matthias Kloseb9621712010-04-24 17:59:49 +00006970 if test "$ac_cv_type_long_long" = yes; then
6971 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6972$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006973as_fn_error 77 "cannot compute sizeof (long long)
6974See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006975 else
6976 ac_cv_sizeof_long_long=0
6977 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006978fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006979
Martin v. Löwis11437992002-04-12 09:54:03 +00006980fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006981{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
6982$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006983
6984
6985
Martin v. Löwis11437992002-04-12 09:54:03 +00006986cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006987#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006988_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006989
Michael W. Hudson54241132001-12-07 15:38:26 +00006990
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006991fi
6992
Matthias Kloseb9621712010-04-24 17:59:49 +00006993{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
6994$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006995have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006996cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006997/* end confdefs.h. */
6998
6999int
7000main ()
7001{
7002long double x; x = (long double)0;
7003 ;
7004 return 0;
7005}
7006_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007007if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007008
7009
Matthias Kloseb9621712010-04-24 17:59:49 +00007010$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007011
7012 have_long_double=yes
7013
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007014fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007015rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007016{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
7017$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007018if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007019# The cast to long int works around a bug in the HP C Compiler
7020# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7021# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7022# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007023{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
7024$as_echo_n "checking size of long double... " >&6; }
7025if test "${ac_cv_sizeof_long_double+set}" = set; then :
7026 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007027else
Matthias Kloseb9621712010-04-24 17:59:49 +00007028 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 +00007029
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007030else
Matthias Kloseb9621712010-04-24 17:59:49 +00007031 if test "$ac_cv_type_long_double" = yes; then
7032 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7033$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00007034as_fn_error 77 "cannot compute sizeof (long double)
7035See \`config.log' for more details" "$LINENO" 5 ; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007036 else
7037 ac_cv_sizeof_long_double=0
7038 fi
7039fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007040
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007041fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007042{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
7043$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007044
7045
7046
7047cat >>confdefs.h <<_ACEOF
7048#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
7049_ACEOF
7050
7051
7052fi
7053
7054
Matthias Kloseb9621712010-04-24 17:59:49 +00007055{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
7056$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007057have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007058cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00007059/* end confdefs.h. */
7060
7061int
7062main ()
7063{
7064_Bool x; x = (_Bool)0;
7065 ;
7066 return 0;
7067}
7068_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007069if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00007070
7071
Matthias Kloseb9621712010-04-24 17:59:49 +00007072$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00007073
7074 have_c99_bool=yes
7075
Thomas Woutersb2137042007-02-01 18:02:27 +00007076fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007077rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007078{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
7079$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007080if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007081# The cast to long int works around a bug in the HP C Compiler
7082# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7083# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7084# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
7086$as_echo_n "checking size of _Bool... " >&6; }
7087if test "${ac_cv_sizeof__Bool+set}" = set; then :
7088 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00007089else
Matthias Kloseb9621712010-04-24 17:59:49 +00007090 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 +00007091
Thomas Woutersb2137042007-02-01 18:02:27 +00007092else
Matthias Kloseb9621712010-04-24 17:59:49 +00007093 if test "$ac_cv_type__Bool" = yes; then
7094 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7095$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00007096as_fn_error 77 "cannot compute sizeof (_Bool)
7097See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007098 else
7099 ac_cv_sizeof__Bool=0
7100 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00007101fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007102
Thomas Woutersb2137042007-02-01 18:02:27 +00007103fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007104{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
7105$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007106
7107
7108
Thomas Woutersb2137042007-02-01 18:02:27 +00007109cat >>confdefs.h <<_ACEOF
7110#define SIZEOF__BOOL $ac_cv_sizeof__Bool
7111_ACEOF
7112
7113
7114fi
7115
Matthias Kloseb9621712010-04-24 17:59:49 +00007116ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00007117 #include <stdint.h>
7118 #endif
Antoine Pitrou1bf29b72010-10-10 08:10:16 +00007119 #ifdef HAVE_INTTYPES_H
7120 #include <inttypes.h>
7121 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00007122"
7123if test "x$ac_cv_type_uintptr_t" = x""yes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00007124
7125cat >>confdefs.h <<_ACEOF
7126#define HAVE_UINTPTR_T 1
7127_ACEOF
7128
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007129# The cast to long int works around a bug in the HP C Compiler
7130# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7131# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7132# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007133{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
7134$as_echo_n "checking size of uintptr_t... " >&6; }
7135if test "${ac_cv_sizeof_uintptr_t+set}" = set; then :
7136 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007137else
Matthias Kloseb9621712010-04-24 17:59:49 +00007138 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 +00007139
Martin v. Löwis11437992002-04-12 09:54:03 +00007140else
Matthias Kloseb9621712010-04-24 17:59:49 +00007141 if test "$ac_cv_type_uintptr_t" = yes; then
7142 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7143$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00007144as_fn_error 77 "cannot compute sizeof (uintptr_t)
7145See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007146 else
7147 ac_cv_sizeof_uintptr_t=0
7148 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007149fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007150
Martin v. Löwis11437992002-04-12 09:54:03 +00007151fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007152{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
7153$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007154
7155
7156
Martin v. Löwis11437992002-04-12 09:54:03 +00007157cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007158#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007159_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007160
Michael W. Hudson54241132001-12-07 15:38:26 +00007161
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007162fi
7163
Thomas Wouters89f507f2006-12-13 04:49:30 +00007164
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007165# The cast to long int works around a bug in the HP C Compiler
7166# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7167# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7168# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007169{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
7170$as_echo_n "checking size of off_t... " >&6; }
7171if test "${ac_cv_sizeof_off_t+set}" = set; then :
7172 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007173else
Matthias Kloseb9621712010-04-24 17:59:49 +00007174 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007175#ifdef HAVE_SYS_TYPES_H
7176#include <sys/types.h>
7177#endif
7178
Matthias Kloseb9621712010-04-24 17:59:49 +00007179"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007180
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007181else
Matthias Kloseb9621712010-04-24 17:59:49 +00007182 if test "$ac_cv_type_off_t" = yes; then
7183 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7184$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00007185as_fn_error 77 "cannot compute sizeof (off_t)
7186See \`config.log' for more details" "$LINENO" 5 ; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007187 else
7188 ac_cv_sizeof_off_t=0
7189 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007190fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007191
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007192fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007193{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
7194$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007195
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007196
7197
Martin v. Löwis11437992002-04-12 09:54:03 +00007198cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007199#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007200_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007201
Michael W. Hudson54241132001-12-07 15:38:26 +00007202
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007203
Matthias Kloseb9621712010-04-24 17:59:49 +00007204{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
7205$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007206if test "$have_long_long" = yes
7207then
7208if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007209 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007210
Matthias Kloseb9621712010-04-24 17:59:49 +00007211$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007212
Matthias Kloseb9621712010-04-24 17:59:49 +00007213 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7214$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007215else
Matthias Kloseb9621712010-04-24 17:59:49 +00007216 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7217$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007218fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00007219else
Matthias Kloseb9621712010-04-24 17:59:49 +00007220 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7221$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007222fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007223
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007224# The cast to long int works around a bug in the HP C Compiler
7225# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7226# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7227# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007228{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
7229$as_echo_n "checking size of time_t... " >&6; }
7230if test "${ac_cv_sizeof_time_t+set}" = set; then :
7231 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007232else
Matthias Kloseb9621712010-04-24 17:59:49 +00007233 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007234#ifdef HAVE_SYS_TYPES_H
7235#include <sys/types.h>
7236#endif
7237#ifdef HAVE_TIME_H
7238#include <time.h>
7239#endif
7240
Matthias Kloseb9621712010-04-24 17:59:49 +00007241"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007242
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007243else
Matthias Kloseb9621712010-04-24 17:59:49 +00007244 if test "$ac_cv_type_time_t" = yes; then
7245 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7246$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00007247as_fn_error 77 "cannot compute sizeof (time_t)
7248See \`config.log' for more details" "$LINENO" 5 ; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007249 else
7250 ac_cv_sizeof_time_t=0
7251 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007252fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007253
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007254fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007255{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
7256$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007257
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007258
7259
Martin v. Löwis11437992002-04-12 09:54:03 +00007260cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007261#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007262_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007263
Michael W. Hudson54241132001-12-07 15:38:26 +00007264
7265
Trent Mick635f6fb2000-08-23 21:33:05 +00007266# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007267ac_save_cc="$CC"
7268if test "$ac_cv_kpthread" = "yes"
7269then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00007270elif test "$ac_cv_kthread" = "yes"
7271then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00007272elif test "$ac_cv_pthread" = "yes"
7273then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007274fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007275
Matthias Kloseb9621712010-04-24 17:59:49 +00007276{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
7277$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007278have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007279cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007280/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007281
7282 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007283int
7284main ()
7285{
Guido van Rossum12580492000-09-24 16:47:19 +00007286pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007287 ;
7288 return 0;
7289}
Matthias Kloseb159a552010-04-25 21:00:44 +00007290
Martin v. Löwis11437992002-04-12 09:54:03 +00007291_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007292if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00007293 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00007294fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007295rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007296{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
7297$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007298if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007299 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007300# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7301# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7302# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007303{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
7304$as_echo_n "checking size of pthread_t... " >&6; }
7305if test "${ac_cv_sizeof_pthread_t+set}" = set; then :
7306 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007307else
Matthias Kloseb9621712010-04-24 17:59:49 +00007308 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007309#ifdef HAVE_PTHREAD_H
7310#include <pthread.h>
7311#endif
7312
Matthias Kloseb9621712010-04-24 17:59:49 +00007313"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007314
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007315else
Matthias Kloseb9621712010-04-24 17:59:49 +00007316 if test "$ac_cv_type_pthread_t" = yes; then
7317 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7318$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00007319as_fn_error 77 "cannot compute sizeof (pthread_t)
7320See \`config.log' for more details" "$LINENO" 5 ; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007321 else
7322 ac_cv_sizeof_pthread_t=0
7323 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00007324fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007325
Trent Mick635f6fb2000-08-23 21:33:05 +00007326fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007327{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
7328$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007329
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007330
7331
Martin v. Löwis11437992002-04-12 09:54:03 +00007332cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007333#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007334_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007335
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007336
Trent Mick635f6fb2000-08-23 21:33:05 +00007337fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007338CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00007339
Michael W. Hudson54241132001-12-07 15:38:26 +00007340
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007341case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007342 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007343 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
7344 ;;
7345 Darwin/*)
7346 OTHER_LIBTOOL_OPT=""
7347 ;;
7348esac
7349
7350
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007351ARCH_RUN_32BIT=""
7352
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007353case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007354 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00007355 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
7356 if test "${enable_universalsdk}"; then
7357 :
7358 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007359 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007360 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00007361 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007362 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00007363 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00007364 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007365 if test ${gcc_version} '<' 4.0
7366 then
7367 LIBTOOL_CRUFT="-lcc_dynamic"
7368 else
7369 LIBTOOL_CRUFT=""
7370 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007371 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007372 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007373else
Matthias Kloseb9621712010-04-24 17:59:49 +00007374 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007375/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007376
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007377 #include <unistd.h>
7378 int main(int argc, char*argv[])
7379 {
7380 if (sizeof(long) == 4) {
7381 return 0;
7382 } else {
7383 return 1;
7384 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007385 }
7386
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007387_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007388if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007389 ac_osx_32bit=yes
7390else
Matthias Kloseb9621712010-04-24 17:59:49 +00007391 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007392fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007393rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7394 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007395fi
7396
7397
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007398 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007399 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007400 i386)
7401 MACOSX_DEFAULT_ARCH="i386"
7402 ;;
7403 ppc)
7404 MACOSX_DEFAULT_ARCH="ppc"
7405 ;;
7406 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00007407 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007408 ;;
7409 esac
7410 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007411 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007412 i386)
7413 MACOSX_DEFAULT_ARCH="x86_64"
7414 ;;
7415 ppc)
7416 MACOSX_DEFAULT_ARCH="ppc64"
7417 ;;
7418 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00007419 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007420 ;;
7421 esac
7422
7423 #ARCH_RUN_32BIT="true"
7424 fi
7425
7426 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00007427 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007428 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007429esac
7430
Matthias Kloseb9621712010-04-24 17:59:49 +00007431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
7432$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007433if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007434then
Skip Montanarodecc6a42003-01-01 20:07:49 +00007435 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00007436 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00007437 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007438
Matthias Kloseb9621712010-04-24 17:59:49 +00007439$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007440
Matthias Kloseb9621712010-04-24 17:59:49 +00007441 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7442$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00007443 if test $enable_shared = "yes"
7444 then
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00007445 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 +00007446 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007447else
Matthias Kloseb9621712010-04-24 17:59:49 +00007448 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7449$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007450fi
7451
Matthias Kloseb9621712010-04-24 17:59:49 +00007452{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
7453$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007454case $ac_sys_system/$ac_sys_release in
7455 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007456
Matthias Kloseb9621712010-04-24 17:59:49 +00007457$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007458
Matthias Kloseb9621712010-04-24 17:59:49 +00007459 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
7460$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007461 ;;
7462 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00007463 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7464$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007465 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007466esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007467
Guido van Rossum0a516c91994-09-12 10:58:40 +00007468# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00007469
Michael W. Hudson54241132001-12-07 15:38:26 +00007470
7471
7472
7473
Benjamin Peterson99f03762010-04-11 22:15:28 +00007474
Thomas Wouters477c8d52006-05-27 19:21:47 +00007475
Georg Brandlb1441c72009-01-03 22:33:39 +00007476
Thomas Wouters477c8d52006-05-27 19:21:47 +00007477cat >>confdefs.h <<_ACEOF
7478#define SHLIB_EXT "$SO"
7479_ACEOF
7480
Guido van Rossum0a516c91994-09-12 10:58:40 +00007481# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00007482# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007483# (Shared libraries in this instance are shared modules to be loaded into
7484# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00007485{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
7486$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007487if test -z "$LDSHARED"
7488then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007489 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007490 AIX*)
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00007491 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp -L\$(srcdir)"
Guido van Rossumce608b02001-09-28 15:59:38 +00007492 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007493 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00007494 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00007495 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00007496 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007497 if test "$GCC" = "yes" ; then
7498 LDSHARED='$(CC) -shared'
7499 LDCXXSHARED='$(CXX) -shared'
7500 else
7501 LDSHARED='$(CC) -G'
7502 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00007503 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007504 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007505 if test "$GCC" = "yes" ; then
7506 LDSHARED='$(CC) -shared'
7507 LDCXXSHARED='$(CXX) -shared'
7508 else
7509 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007510 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +00007511 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +00007512 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007513 LDSHARED='$(CC) -bundle'
7514 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00007515 if test "$enable_framework" ; then
7516 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007517 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7518 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007519 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007520 else
7521 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00007522 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00007523 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00007524 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007525 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007526 LDSHARED='$(CC) -bundle'
7527 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00007528 if test "$enable_framework" ; then
7529 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007530 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7531 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007532 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007533 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00007534 # No framework, use the Python app as bundle-loader
7535 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00007536 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007537 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007538 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007539 Darwin/*)
7540 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
7541 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00007542
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007543 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +00007544 then
Thomas Wouters477c8d52006-05-27 19:21:47 +00007545 if test "${enable_universalsdk}"; then
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007546 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007547 fi
Antoine Pitroud4958c22010-10-13 17:01:10 +00007548 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
7549 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
Jack Jansen6b08a402004-06-03 12:41:45 +00007550 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00007551 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00007552 LDSHARED='$(CC) -bundle'
7553 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00007554 if test "$enable_framework" ; then
7555 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007556 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7557 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007558 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007559 else
7560 # No framework, use the Python app as bundle-loader
7561 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
7562 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007563 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007564 fi
7565 fi
7566 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007567 Linux*|GNU*|QNX*)
7568 LDSHARED='$(CC) -shared'
7569 LDCXXSHARED='$(CXX) -shared';;
7570 BSD/OS*/4*)
7571 LDSHARED="gcc -shared"
7572 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007573 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00007574 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00007575 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00007576 LDSHARED='$(CC) -shared'
7577 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00007578 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00007579 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00007580 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007581 OpenBSD*)
7582 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7583 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00007584 LDSHARED='$(CC) -shared $(CCSHARED)'
7585 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007586 else
7587 case `uname -r` in
7588 [01].* | 2.[0-7] | 2.[0-7].*)
7589 LDSHARED="ld -Bshareable ${LDFLAGS}"
7590 ;;
7591 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007592 LDSHARED='$(CC) -shared $(CCSHARED)'
7593 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007594 ;;
7595 esac
7596 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007597 NetBSD*|DragonFly*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007598 LDSHARED="cc -shared"
7599 LDCXXSHARED="c++ -shared";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007600 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007601 if test "$GCC" = "yes" ; then
7602 LDSHARED='$(CC) -shared'
7603 LDCXXSHARED='$(CXX) -shared'
7604 else
7605 LDSHARED='$(CC) -G'
7606 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00007607 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007608 SCO_SV*)
7609 LDSHARED='$(CC) -Wl,-G,-Bexport'
7610 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
7611 CYGWIN*)
7612 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
7613 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007614 *) LDSHARED="ld";;
7615 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007616fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007617{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
7618$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00007619LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007620BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00007621# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007622# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
7624$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007625if test -z "$CCSHARED"
7626then
Guido van Rossum07397971997-04-29 21:49:50 +00007627 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00007628 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007629 then CCSHARED="-fPIC";
7630 elif test `uname -p` = sparc;
7631 then CCSHARED="-xcode=pic32";
7632 else CCSHARED="-Kpic";
7633 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00007634 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00007635 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00007636 else CCSHARED="+z";
7637 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007638 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007639 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007640 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007641 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00007642 if test "$GCC" = "yes"
7643 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00007644 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00007645 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007646 SCO_SV*)
7647 if test "$GCC" = "yes"
7648 then CCSHARED="-fPIC"
7649 else CCSHARED="-Kpic -belf"
7650 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007651 IRIX*/6*) case $CC in
7652 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00007653 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007654 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007655 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007656fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007657{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
7658$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007659# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007660# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
7662$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007663if test -z "$LINKFORSHARED"
7664then
Guido van Rossum07397971997-04-29 21:49:50 +00007665 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007666 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007667 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00007668 LINKFORSHARED="-Wl,-E -Wl,+s";;
7669# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007670 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007671 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007672 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00007673 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00007674 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Jack Jansene578a632001-08-15 01:27:14 +00007675 if test "$enable_framework"
7676 then
Jack Jansenda49e192005-01-07 13:08:22 +00007677 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007678 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007679 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007680 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007681 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00007682 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007683 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00007684 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7685 then
7686 LINKFORSHARED="-Wl,--export-dynamic"
7687 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007688 SunOS/5*) case $CC in
7689 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00007690 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00007691 then
7692 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007693 fi;;
7694 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00007695 CYGWIN*)
7696 if test $enable_shared = "no"
7697 then
7698 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
7699 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00007700 QNX*)
7701 # -Wl,-E causes the symbols to be added to the dynamic
7702 # symbol table so that they can be found when a module
7703 # is loaded. -N 2048K causes the stack size to be set
7704 # to 2048 kilobytes so that the stack doesn't overflow
7705 # when running test_compile.py.
7706 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007707 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007708fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007709{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
7710$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007711
Michael W. Hudson54241132001-12-07 15:38:26 +00007712
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00007713
Matthias Kloseb9621712010-04-24 17:59:49 +00007714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
7715$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007716if test ! "$LIBRARY" = "$LDLIBRARY"
7717then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00007718 case $ac_sys_system in
7719 CYGWIN*)
7720 # Cygwin needs CCSHARED when building extension DLLs
7721 # but not when building the interpreter DLL.
7722 CFLAGSFORSHARED='';;
7723 *)
7724 CFLAGSFORSHARED='$(CCSHARED)'
7725 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007726fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007727{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
7728$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007729
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007730# SHLIBS are libraries (except -lc and -lm) to link to the python shared
7731# library (with --enable-shared).
7732# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007733# symbols, this must be set to $(LIBS) (expanded by make). We do this even
7734# if it is not required, since it creates a dependency of the shared library
7735# to LIBS. This, in turn, means that applications linking the shared libpython
7736# don't need to link LIBS explicitly. The default should be only changed
7737# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007738
Matthias Kloseb9621712010-04-24 17:59:49 +00007739{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
7740$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007741case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007742 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007743 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007744esac
Matthias Kloseb9621712010-04-24 17:59:49 +00007745{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
7746$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007747
7748
Guido van Rossum627b2d71993-12-24 10:39:16 +00007749# checks for libraries
Matthias Kloseb9621712010-04-24 17:59:49 +00007750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
7751$as_echo_n "checking for dlopen in -ldl... " >&6; }
7752if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
7753 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007754else
Martin v. Löwis11437992002-04-12 09:54:03 +00007755 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007756LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007757cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007758/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007759
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007760/* Override any GCC internal prototype to avoid an error.
7761 Use char because int might match the return type of a GCC
7762 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007763#ifdef __cplusplus
7764extern "C"
7765#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007766char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007767int
7768main ()
7769{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007770return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007771 ;
7772 return 0;
7773}
7774_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007775if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007776 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007777else
Matthias Kloseb9621712010-04-24 17:59:49 +00007778 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007779fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007780rm -f core conftest.err conftest.$ac_objext \
7781 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007782LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007783fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007784{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
7785$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
7786if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007787 cat >>confdefs.h <<_ACEOF
7788#define HAVE_LIBDL 1
7789_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007790
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007791 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00007792
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007793fi
7794 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00007795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
7796$as_echo_n "checking for shl_load in -ldld... " >&6; }
7797if test "${ac_cv_lib_dld_shl_load+set}" = set; then :
7798 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007799else
Martin v. Löwis11437992002-04-12 09:54:03 +00007800 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007801LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007802cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007803/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007804
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007805/* Override any GCC internal prototype to avoid an error.
7806 Use char because int might match the return type of a GCC
7807 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007808#ifdef __cplusplus
7809extern "C"
7810#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007811char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007812int
7813main ()
7814{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007815return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007816 ;
7817 return 0;
7818}
7819_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007820if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007821 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007822else
Matthias Kloseb9621712010-04-24 17:59:49 +00007823 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007824fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007825rm -f core conftest.err conftest.$ac_objext \
7826 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007827LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007828fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007829{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
7830$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
7831if test "x$ac_cv_lib_dld_shl_load" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007832 cat >>confdefs.h <<_ACEOF
7833#define HAVE_LIBDLD 1
7834_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007835
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007836 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007837
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007838fi
7839 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00007840
Georg Brandlb1441c72009-01-03 22:33:39 +00007841# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00007842if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007843 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
7844$as_echo_n "checking for library containing sem_init... " >&6; }
7845if test "${ac_cv_search_sem_init+set}" = set; then :
7846 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007847else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00007848 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007849cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007850/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007851
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007852/* Override any GCC internal prototype to avoid an error.
7853 Use char because int might match the return type of a GCC
7854 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007855#ifdef __cplusplus
7856extern "C"
7857#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007858char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007859int
7860main ()
7861{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007862return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007863 ;
7864 return 0;
7865}
7866_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007867for ac_lib in '' pthread rt posix4; do
7868 if test -z "$ac_lib"; then
7869 ac_res="none required"
7870 else
7871 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007872 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007873 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007874 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007875 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007876fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007877rm -f core conftest.err conftest.$ac_objext \
7878 conftest$ac_exeext
7879 if test "${ac_cv_search_sem_init+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007880 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007881fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007882done
Matthias Kloseb9621712010-04-24 17:59:49 +00007883if test "${ac_cv_search_sem_init+set}" = set; then :
7884
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007885else
7886 ac_cv_search_sem_init=no
7887fi
7888rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00007889LIBS=$ac_func_search_save_LIBS
7890fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007891{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
7892$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007893ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00007894if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007895 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007896
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007897fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00007898 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00007899 # posix4 on Solaris 2.6
7900 # pthread (first!) on Linux
7901fi
7902
Martin v. Löwis19d17342003-06-14 21:03:05 +00007903# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00007904{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
7905$as_echo_n "checking for textdomain in -lintl... " >&6; }
7906if test "${ac_cv_lib_intl_textdomain+set}" = set; then :
7907 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00007908else
7909 ac_check_lib_save_LIBS=$LIBS
7910LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007911cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007912/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00007913
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007914/* Override any GCC internal prototype to avoid an error.
7915 Use char because int might match the return type of a GCC
7916 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00007917#ifdef __cplusplus
7918extern "C"
7919#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00007920char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00007921int
7922main ()
7923{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007924return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00007925 ;
7926 return 0;
7927}
7928_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007929if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00007930 ac_cv_lib_intl_textdomain=yes
7931else
Matthias Kloseb9621712010-04-24 17:59:49 +00007932 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00007933fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007934rm -f core conftest.err conftest.$ac_objext \
7935 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00007936LIBS=$ac_check_lib_save_LIBS
7937fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007938{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
7939$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
7940if test "x$ac_cv_lib_intl_textdomain" = x""yes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00007941
Matthias Kloseb9621712010-04-24 17:59:49 +00007942$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00007943
Brett Cannonc6d936e2009-06-07 20:09:53 +00007944 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00007945fi
7946
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007947
7948# checks for system dependent C++ extensions support
7949case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00007950 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
7951$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
7952 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007953/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007954
7955 #include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007956int
7957main ()
7958{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007959loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00007960 ;
7961 return 0;
7962}
Matthias Kloseb159a552010-04-25 21:00:44 +00007963
Martin v. Löwis11437992002-04-12 09:54:03 +00007964_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007965if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007966
Matthias Kloseb159a552010-04-25 21:00:44 +00007967
Matthias Kloseb9621712010-04-24 17:59:49 +00007968$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007969
Matthias Kloseb159a552010-04-25 21:00:44 +00007970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007971$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00007972
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007973else
Matthias Kloseb159a552010-04-25 21:00:44 +00007974
7975 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007976$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00007977
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007978fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007979rm -f core conftest.err conftest.$ac_objext \
7980 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007981 *) ;;
7982esac
7983
Guido van Rossum70c7f481998-03-26 18:44:10 +00007984# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00007985{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
7986$as_echo_n "checking for t_open in -lnsl... " >&6; }
7987if test "${ac_cv_lib_nsl_t_open+set}" = set; then :
7988 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007989else
Martin v. Löwis11437992002-04-12 09:54:03 +00007990 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007991LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007992cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007993/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007994
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007995/* Override any GCC internal prototype to avoid an error.
7996 Use char because int might match the return type of a GCC
7997 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007998#ifdef __cplusplus
7999extern "C"
8000#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008001char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008002int
8003main ()
8004{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008005return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008006 ;
8007 return 0;
8008}
8009_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008010if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008011 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008012else
Matthias Kloseb9621712010-04-24 17:59:49 +00008013 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008014fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008015rm -f core conftest.err conftest.$ac_objext \
8016 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008017LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008018fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008019{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
8020$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
8021if test "x$ac_cv_lib_nsl_t_open" = x""yes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008022 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008023fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00008024 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00008025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
8026$as_echo_n "checking for socket in -lsocket... " >&6; }
8027if test "${ac_cv_lib_socket_socket+set}" = set; then :
8028 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008029else
Martin v. Löwis11437992002-04-12 09:54:03 +00008030 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008031LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008032cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008033/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008034
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008035/* Override any GCC internal prototype to avoid an error.
8036 Use char because int might match the return type of a GCC
8037 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008038#ifdef __cplusplus
8039extern "C"
8040#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008041char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008042int
8043main ()
8044{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008045return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008046 ;
8047 return 0;
8048}
8049_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008050if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008051 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008052else
Matthias Kloseb9621712010-04-24 17:59:49 +00008053 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008054fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008055rm -f core conftest.err conftest.$ac_objext \
8056 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008057LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008058fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008059{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
8060$as_echo "$ac_cv_lib_socket_socket" >&6; }
8061if test "x$ac_cv_lib_socket_socket" = x""yes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00008062 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00008063fi
8064 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00008065
Matthias Kloseb9621712010-04-24 17:59:49 +00008066{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
8067$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008068
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008069# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008070if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008071 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00008072{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8073$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00008074LIBS="$withval $LIBS"
8075
8076else
Matthias Kloseb9621712010-04-24 17:59:49 +00008077 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8078$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008079fi
8080
Guido van Rossum7f43da71994-08-01 12:15:30 +00008081
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008082if test -n "$ac_tool_prefix"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008083 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
8084set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8086$as_echo_n "checking for $ac_word... " >&6; }
8087if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
8088 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008089else
8090 case $PKG_CONFIG in
8091 [\\/]* | ?:[\\/]*)
8092 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8093 ;;
8094 *)
8095 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8096for as_dir in $PATH
8097do
8098 IFS=$as_save_IFS
8099 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008100 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Petersond78735d2010-01-01 16:04:23 +00008101 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8102 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008103 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008104 break 2
8105 fi
8106done
Matthias Kloseb9621712010-04-24 17:59:49 +00008107 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008108IFS=$as_save_IFS
8109
8110 ;;
8111esac
8112fi
8113PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8114if test -n "$PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008115 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8116$as_echo "$PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008117else
Matthias Kloseb9621712010-04-24 17:59:49 +00008118 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8119$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008120fi
8121
8122
8123fi
8124if test -z "$ac_cv_path_PKG_CONFIG"; then
8125 ac_pt_PKG_CONFIG=$PKG_CONFIG
8126 # Extract the first word of "pkg-config", so it can be a program name with args.
8127set dummy pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8129$as_echo_n "checking for $ac_word... " >&6; }
8130if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then :
8131 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008132else
8133 case $ac_pt_PKG_CONFIG in
8134 [\\/]* | ?:[\\/]*)
8135 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
8136 ;;
8137 *)
8138 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8139for as_dir in $PATH
8140do
8141 IFS=$as_save_IFS
8142 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008143 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Petersond78735d2010-01-01 16:04:23 +00008144 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8145 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008146 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008147 break 2
8148 fi
8149done
Matthias Kloseb9621712010-04-24 17:59:49 +00008150 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008151IFS=$as_save_IFS
8152
8153 ;;
8154esac
8155fi
8156ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
8157if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008158 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
8159$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008160else
Matthias Kloseb9621712010-04-24 17:59:49 +00008161 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8162$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008163fi
8164
8165 if test "x$ac_pt_PKG_CONFIG" = x; then
8166 PKG_CONFIG=""
8167 else
8168 case $cross_compiling:$ac_tool_warned in
8169yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00008170{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8171$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Petersond78735d2010-01-01 16:04:23 +00008172ac_tool_warned=yes ;;
8173esac
8174 PKG_CONFIG=$ac_pt_PKG_CONFIG
8175 fi
8176else
8177 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
8178fi
8179
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008180
8181# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00008182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
8183$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008184
8185# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008186if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008187 withval=$with_system_expat;
8188fi
8189
8190
Matthias Kloseb9621712010-04-24 17:59:49 +00008191{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
8192$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008193
8194# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00008195{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
8196$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008197
8198# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008199if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008200 withval=$with_system_ffi;
8201fi
8202
8203
8204if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008205 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
8206else
8207 LIBFFI_INCLUDEDIR=""
8208fi
8209
8210
Matthias Kloseb9621712010-04-24 17:59:49 +00008211{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
8212$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008213
Matthias Klose55708cc2009-04-30 08:06:49 +00008214# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +00008215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
8216$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008217
8218# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008219if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +00008220 withval=$with_dbmliborder;
8221if test x$with_dbmliborder = xyes
8222then
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00008223as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008224else
8225 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
8226 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
8227 then
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00008228 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008229 fi
8230 done
8231fi
8232fi
8233
Matthias Kloseb9621712010-04-24 17:59:49 +00008234{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
8235$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008236
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00008237# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008238
8239
Matthias Kloseb9621712010-04-24 17:59:49 +00008240{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
8241$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008242
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008243# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008244if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008245 withval=$with_signal_module;
8246fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008247
8248
8249if test -z "$with_signal_module"
8250then with_signal_module="yes"
8251fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008252{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
8253$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008254
8255if test "${with_signal_module}" = "yes"; then
8256 USE_SIGNAL_MODULE=""
8257 SIGNAL_OBJS=""
8258else
8259 USE_SIGNAL_MODULE="#"
8260 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
8261fi
8262
Guido van Rossum3d15bd82001-01-10 18:53:48 +00008263# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00008264
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008265USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00008266
Matthias Kloseb9621712010-04-24 17:59:49 +00008267{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dec-threads" >&5
8268$as_echo_n "checking for --with-dec-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008269
Guido van Rossumec2f0731997-01-22 20:54:01 +00008270
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008271# Check whether --with-dec-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008272if test "${with_dec_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008273 withval=$with_dec_threads;
Matthias Kloseb9621712010-04-24 17:59:49 +00008274{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8275$as_echo "$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +00008276LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00008277if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00008278 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00008279fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008280else
Matthias Kloseb9621712010-04-24 17:59:49 +00008281 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8282$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008283fi
8284
Martin v. Löwis11437992002-04-12 09:54:03 +00008285
8286# Templates for things AC_DEFINEd more than once.
8287# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00008288
8289
Martin v. Löwis11437992002-04-12 09:54:03 +00008290
8291
Matthias Kloseb9621712010-04-24 17:59:49 +00008292{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
8293$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008294
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008295# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008296if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008297 withval=$with_threads;
8298fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008299
8300
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008301# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00008302
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008303# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008304if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008305 withval=$with_thread; with_threads=$with_thread
8306fi
8307
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008308
8309if test -z "$with_threads"
8310then with_threads="yes"
8311fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008312{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
8313$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008314
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008315
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008316if test "$with_threads" = "no"
8317then
8318 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008319elif test "$ac_cv_pthread_is_default" = yes
8320then
Matthias Kloseb9621712010-04-24 17:59:49 +00008321 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008322
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008323 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +00008324 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008325
8326 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00008327 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008328elif test "$ac_cv_kpthread" = "yes"
8329then
8330 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008331 if test "$ac_cv_cxx_thread" = "yes"; then
8332 CXX="$CXX -Kpthread"
8333 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008334 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00008335
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008336 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008337 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008338elif test "$ac_cv_kthread" = "yes"
8339then
8340 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008341 if test "$ac_cv_cxx_thread" = "yes"; then
8342 CXX="$CXX -Kthread"
8343 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008344 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008345
8346 posix_threads=yes
8347 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008348elif test "$ac_cv_pthread" = "yes"
8349then
8350 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008351 if test "$ac_cv_cxx_thread" = "yes"; then
8352 CXX="$CXX -pthread"
8353 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008354 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008355
8356 posix_threads=yes
8357 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008358else
8359 if test ! -z "$with_threads" -a -d "$with_threads"
8360 then LDFLAGS="$LDFLAGS -L$with_threads"
8361 fi
8362 if test ! -z "$withval" -a -d "$withval"
8363 then LDFLAGS="$LDFLAGS -L$withval"
8364 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008365
8366 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00008367 # define _POSIX_THREADS in unistd.h. Some apparently don't
8368 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +00008369 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
8370$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
8371 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008372/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008373
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008374#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008375#ifdef _POSIX_THREADS
8376yes
8377#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008378
8379_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008380if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008381 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008382 unistd_defines_pthreads=yes
8383else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008384 unistd_defines_pthreads=no
8385fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008386rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008387
Matthias Kloseb9621712010-04-24 17:59:49 +00008388 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
8389$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008390
Matthias Kloseb9621712010-04-24 17:59:49 +00008391 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00008392
Matthias Kloseb9621712010-04-24 17:59:49 +00008393 ac_fn_c_check_header_mongrel "$LINENO" "cthreads.h" "ac_cv_header_cthreads_h" "$ac_includes_default"
8394if test "x$ac_cv_header_cthreads_h" = x""yes; then :
8395 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008396
Matthias Kloseb9621712010-04-24 17:59:49 +00008397 $as_echo "#define C_THREADS 1" >>confdefs.h
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008398
Martin v. Löwis11437992002-04-12 09:54:03 +00008399
Matthias Kloseb9621712010-04-24 17:59:49 +00008400$as_echo "#define HURD_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008401
8402 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008403 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008404else
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008405
Matthias Kloseb9621712010-04-24 17:59:49 +00008406 ac_fn_c_check_header_mongrel "$LINENO" "mach/cthreads.h" "ac_cv_header_mach_cthreads_h" "$ac_includes_default"
8407if test "x$ac_cv_header_mach_cthreads_h" = x""yes; then :
8408 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008409
Matthias Kloseb9621712010-04-24 17:59:49 +00008410 $as_echo "#define C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008411
Martin v. Löwis11437992002-04-12 09:54:03 +00008412
Matthias Kloseb9621712010-04-24 17:59:49 +00008413$as_echo "#define MACH_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008414
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008415 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008416else
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008417
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008418 # Just looking for pthread_create in libpthread is not enough:
8419 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
8420 # So we really have to include pthread.h, and then link.
8421 _libs=$LIBS
8422 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00008423 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
8424$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
8425 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008426/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008427#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00008428
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008429void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00008430int
8431main ()
8432{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008433
8434pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00008435 ;
8436 return 0;
8437}
8438_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008439if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008440
Matthias Kloseb9621712010-04-24 17:59:49 +00008441 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8442$as_echo "yes" >&6; }
8443 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00008444
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008445 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008446 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00008447else
Martin v. Löwis11437992002-04-12 09:54:03 +00008448
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008449 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +00008450 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
8451if test "x$ac_cv_func_pthread_detach" = x""yes; then :
8452 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00008453
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008454 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008455 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00008456else
Guido van Rossumad678af1998-10-02 14:42:15 +00008457
Matthias Kloseb9621712010-04-24 17:59:49 +00008458 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
8459$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
8460if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then :
8461 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008462else
Martin v. Löwis11437992002-04-12 09:54:03 +00008463 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008464LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008465cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008466/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008467
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008468/* Override any GCC internal prototype to avoid an error.
8469 Use char because int might match the return type of a GCC
8470 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008471#ifdef __cplusplus
8472extern "C"
8473#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008474char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008475int
8476main ()
8477{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008478return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008479 ;
8480 return 0;
8481}
8482_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008483if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008484 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00008485else
Matthias Kloseb9621712010-04-24 17:59:49 +00008486 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00008487fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008488rm -f core conftest.err conftest.$ac_objext \
8489 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008490LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008491fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008492{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
8493$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
8494if test "x$ac_cv_lib_pthreads_pthread_create" = x""yes; then :
8495 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00008496
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008497 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008498 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008499 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00008500else
Greg Steinadf63d62000-07-05 10:38:09 +00008501
Matthias Kloseb9621712010-04-24 17:59:49 +00008502 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
8503$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
8504if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then :
8505 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00008506else
Martin v. Löwis11437992002-04-12 09:54:03 +00008507 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008508LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008509cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008510/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008511
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008512/* Override any GCC internal prototype to avoid an error.
8513 Use char because int might match the return type of a GCC
8514 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008515#ifdef __cplusplus
8516extern "C"
8517#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008518char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008519int
8520main ()
8521{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008522return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008523 ;
8524 return 0;
8525}
8526_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008527if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008528 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00008529else
Matthias Kloseb9621712010-04-24 17:59:49 +00008530 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00008531fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008532rm -f core conftest.err conftest.$ac_objext \
8533 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008534LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00008535fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008536{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
8537$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
8538if test "x$ac_cv_lib_c_r_pthread_create" = x""yes; then :
8539 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00008540
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008541 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008542 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008543 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008544else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008545
Matthias Kloseb9621712010-04-24 17:59:49 +00008546 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
8547$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
8548if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then :
8549 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008550else
Martin v. Löwis11437992002-04-12 09:54:03 +00008551 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008552LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008553cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008554/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008555
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008556/* Override any GCC internal prototype to avoid an error.
8557 Use char because int might match the return type of a GCC
8558 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008559#ifdef __cplusplus
8560extern "C"
8561#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008562char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008563int
8564main ()
8565{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008566return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008567 ;
8568 return 0;
8569}
8570_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008571if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008572 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008573else
Matthias Kloseb9621712010-04-24 17:59:49 +00008574 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008575fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008576rm -f core conftest.err conftest.$ac_objext \
8577 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008578LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008579fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008580{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
8581$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
8582if test "x$ac_cv_lib_pthread___pthread_create_system" = x""yes; then :
8583 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008584
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008585 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008586 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008587 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008588else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008589
Matthias Kloseb9621712010-04-24 17:59:49 +00008590 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
8591$as_echo_n "checking for pthread_create in -lcma... " >&6; }
8592if test "${ac_cv_lib_cma_pthread_create+set}" = set; then :
8593 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00008594else
Martin v. Löwis11437992002-04-12 09:54:03 +00008595 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008596LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008597cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008598/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008599
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008600/* Override any GCC internal prototype to avoid an error.
8601 Use char because int might match the return type of a GCC
8602 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008603#ifdef __cplusplus
8604extern "C"
8605#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008606char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008607int
8608main ()
8609{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008610return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008611 ;
8612 return 0;
8613}
8614_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008615if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008616 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00008617else
Matthias Kloseb9621712010-04-24 17:59:49 +00008618 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00008619fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008620rm -f core conftest.err conftest.$ac_objext \
8621 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008622LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008623fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008624{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
8625$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
8626if test "x$ac_cv_lib_cma_pthread_create" = x""yes; then :
8627 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00008628
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008629 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008630 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008631 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00008632else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00008633
Martin v. Löwis130fb172001-07-19 11:00:41 +00008634 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00008635fi
8636
Guido van Rossum627b2d71993-12-24 10:39:16 +00008637
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008638fi
8639
Guido van Rossum0be3e491997-05-22 20:33:33 +00008640fi
8641
Guido van Rossum49545951997-12-02 19:28:29 +00008642fi
8643
Guido van Rossumb93a8621998-05-07 13:27:32 +00008644fi
8645
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008646fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008647rm -f core conftest.err conftest.$ac_objext \
8648 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008649fi
8650
Martin v. Löwis11437992002-04-12 09:54:03 +00008651
8652fi
8653
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008654
Michael W. Hudson54241132001-12-07 15:38:26 +00008655
Matthias Kloseb9621712010-04-24 17:59:49 +00008656 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
8657$as_echo_n "checking for usconfig in -lmpc... " >&6; }
8658if test "${ac_cv_lib_mpc_usconfig+set}" = set; then :
8659 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008660else
Martin v. Löwis11437992002-04-12 09:54:03 +00008661 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008662LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008663cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008664/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008665
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008666/* Override any GCC internal prototype to avoid an error.
8667 Use char because int might match the return type of a GCC
8668 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008669#ifdef __cplusplus
8670extern "C"
8671#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008672char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008673int
8674main ()
8675{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008676return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008677 ;
8678 return 0;
8679}
8680_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008681if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008682 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008683else
Matthias Kloseb9621712010-04-24 17:59:49 +00008684 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008685fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008686rm -f core conftest.err conftest.$ac_objext \
8687 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008688LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008689fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008690{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
8691$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
8692if test "x$ac_cv_lib_mpc_usconfig" = x""yes; then :
8693 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008694
Martin v. Löwis130fb172001-07-19 11:00:41 +00008695 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008696 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008697 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008698fi
8699
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008700
Neal Norwitza978ab02002-11-02 16:58:05 +00008701 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008702 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
8703$as_echo_n "checking for thr_create in -lthread... " >&6; }
8704if test "${ac_cv_lib_thread_thr_create+set}" = set; then :
8705 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008706else
Martin v. Löwis11437992002-04-12 09:54:03 +00008707 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008708LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008709cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008710/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008711
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008712/* Override any GCC internal prototype to avoid an error.
8713 Use char because int might match the return type of a GCC
8714 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008715#ifdef __cplusplus
8716extern "C"
8717#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008718char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008719int
8720main ()
8721{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008722return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008723 ;
8724 return 0;
8725}
8726_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008727if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008728 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008729else
Matthias Kloseb9621712010-04-24 17:59:49 +00008730 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008731fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008732rm -f core conftest.err conftest.$ac_objext \
8733 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008734LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008735fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008736{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
8737$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
8738if test "x$ac_cv_lib_thread_thr_create" = x""yes; then :
8739 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008740
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008741 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008742 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008743 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008744fi
8745
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008746 fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008747
Martin v. Löwis130fb172001-07-19 11:00:41 +00008748 if test "$USE_THREAD_MODULE" != "#"
8749 then
8750 # If the above checks didn't disable threads, (at least) OSF1
8751 # needs this '-threads' argument during linking.
8752 case $ac_sys_system in
8753 OSF1) LDLAST=-threads;;
8754 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +00008755 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008756fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008757
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008758if test "$posix_threads" = "yes"; then
8759 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008760
Matthias Kloseb9621712010-04-24 17:59:49 +00008761$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008762
8763 fi
8764
8765 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
8766 case $ac_sys_system/$ac_sys_release in
8767 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +00008768$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008769
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008770 ;;
8771 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +00008772$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008773
8774 ;;
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00008775 AIX/5)
Matthias Kloseb9621712010-04-24 17:59:49 +00008776$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00008777
8778 ;;
Antoine Pitrou33a29942010-08-30 14:52:00 +00008779 AIX/6)
8780$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
8781
8782 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008783 esac
8784
Matthias Kloseb9621712010-04-24 17:59:49 +00008785 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
8786$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
8787 if test "${ac_cv_pthread_system_supported+set}" = set; then :
8788 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008789else
Matthias Kloseb9621712010-04-24 17:59:49 +00008790 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008791 ac_cv_pthread_system_supported=no
8792else
Matthias Kloseb9621712010-04-24 17:59:49 +00008793 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008794/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008795#include <pthread.h>
8796 void *foo(void *parm) {
8797 return NULL;
8798 }
8799 main() {
8800 pthread_attr_t attr;
8801 pthread_t id;
8802 if (pthread_attr_init(&attr)) exit(-1);
8803 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
8804 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
8805 exit(0);
8806 }
8807_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008808if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008809 ac_cv_pthread_system_supported=yes
8810else
Matthias Kloseb9621712010-04-24 17:59:49 +00008811 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008812fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008813rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8814 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008815fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008816
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008817
Guido van Rossum627b2d71993-12-24 10:39:16 +00008818fi
8819
Matthias Kloseb9621712010-04-24 17:59:49 +00008820 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
8821$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008822 if test "$ac_cv_pthread_system_supported" = "yes"; then
8823
Matthias Kloseb9621712010-04-24 17:59:49 +00008824$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008825
8826 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008827 for ac_func in pthread_sigmask
8828do :
8829 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
8830if test "x$ac_cv_func_pthread_sigmask" = x""yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008831 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008832#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008833_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +00008834 case $ac_sys_system in
8835 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008836
Matthias Kloseb9621712010-04-24 17:59:49 +00008837$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +00008838
8839 ;;
8840 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008841fi
8842done
8843
8844fi
8845
8846
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008847# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +00008848
Matthias Kloseb9621712010-04-24 17:59:49 +00008849{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
8850$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008851# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008852if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008853 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008854 no)
Matthias Kloseb9621712010-04-24 17:59:49 +00008855 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8856$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008857 ipv6=no
8858 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00008859 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8860$as_echo "yes" >&6; }
8861 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008862
8863 ipv6=yes
8864 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008865 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008866else
Martin v. Löwis11437992002-04-12 09:54:03 +00008867
Matthias Kloseb9621712010-04-24 17:59:49 +00008868 if test "$cross_compiling" = yes; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008869
Matthias Kloseb9621712010-04-24 17:59:49 +00008870 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8871$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008872 ipv6=no
8873
8874else
Matthias Kloseb9621712010-04-24 17:59:49 +00008875 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008876/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008877 /* AF_INET6 available check */
8878#include <sys/types.h>
8879#include <sys/socket.h>
8880main()
8881{
8882 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
8883 exit(1);
8884 else
8885 exit(0);
8886}
8887
Martin v. Löwis11437992002-04-12 09:54:03 +00008888_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008889if ac_fn_c_try_run "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008890
Matthias Kloseb9621712010-04-24 17:59:49 +00008891 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8892$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008893 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +00008894
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008895else
Matthias Kloseb159a552010-04-25 21:00:44 +00008896
Matthias Kloseb9621712010-04-24 17:59:49 +00008897 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8898$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008899 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +00008900
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008901fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008902rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8903 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008904fi
8905
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008906
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008907if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008908 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
8909$as_echo_n "checking if RFC2553 API is available... " >&6; }
8910 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008911/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008912
8913 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008914#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008915int
8916main ()
8917{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008918struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +00008919 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +00008920 ;
8921 return 0;
8922}
Matthias Kloseb159a552010-04-25 21:00:44 +00008923
Martin v. Löwis11437992002-04-12 09:54:03 +00008924_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008925if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008926
8927 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008928$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008929 ipv6=yes
8930
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008931else
Matthias Kloseb159a552010-04-25 21:00:44 +00008932
8933 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008934$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008935 ipv6=no
8936
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008937fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008938rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008939fi
8940
8941if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008942 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008943
8944fi
8945
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008946fi
8947
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008948
8949ipv6type=unknown
8950ipv6lib=none
8951ipv6trylibc=no
8952
8953if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008954 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
8955$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +00008956 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
8957 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008958 case $i in
8959 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +00008960 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008961/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008962
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008963#include <netinet/in.h>
8964#ifdef IPV6_INRIA_VERSION
8965yes
8966#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008967_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008968if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008969 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00008970 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008971fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008972rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008973
8974 ;;
8975 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +00008976 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008977/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008978
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008979#include <netinet/in.h>
8980#ifdef __KAME__
8981yes
8982#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008983_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008984if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008985 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008986 ipv6type=$i;
8987 ipv6lib=inet6
8988 ipv6libdir=/usr/local/v6/lib
8989 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008990fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008991rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008992
8993 ;;
8994 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +00008995 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008996/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008997
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008998#include <features.h>
8999#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
9000yes
9001#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009002_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009003if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009004 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009005 ipv6type=$i;
9006 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009007fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009008rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009009
9010 ;;
9011 linux-inet6)
9012 if test -d /usr/inet6; then
9013 ipv6type=$i
9014 ipv6lib=inet6
9015 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +00009016 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009017 fi
9018 ;;
9019 solaris)
9020 if test -f /etc/netconfig; then
9021 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
9022 ipv6type=$i
9023 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009024 fi
9025 fi
9026 ;;
9027 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +00009028 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009029/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009030
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009031#include <sys/param.h>
9032#ifdef _TOSHIBA_INET6
9033yes
9034#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009035_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009036if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009037 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009038 ipv6type=$i;
9039 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009040 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009041fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009042rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009043
9044 ;;
9045 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +00009046 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009047/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009048
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009049#include </usr/local/v6/include/sys/v6config.h>
9050#ifdef __V6D__
9051yes
9052#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009053_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009054if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009055 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009056 ipv6type=$i;
9057 ipv6lib=v6;
9058 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +00009059 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009060fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009061rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009062
9063 ;;
9064 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +00009065 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009066/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009067
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009068#include <sys/param.h>
9069#ifdef _ZETA_MINAMI_INET6
9070yes
9071#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009072_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009073if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009074 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009075 ipv6type=$i;
9076 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009077 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009078fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009079rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009080
9081 ;;
9082 esac
9083 if test "$ipv6type" != "unknown"; then
9084 break
9085 fi
9086 done
Matthias Kloseb9621712010-04-24 17:59:49 +00009087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
9088$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009089fi
9090
9091if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
9092 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
9093 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
9094 echo "using lib$ipv6lib"
9095 else
9096 if test $ipv6trylibc = "yes"; then
9097 echo "using libc"
9098 else
9099 echo 'Fatal: no $ipv6lib library found. cannot continue.'
9100 echo "You need to fetch lib$ipv6lib.a from appropriate"
9101 echo 'ipv6 kit and compile beforehand.'
9102 exit 1
9103 fi
9104 fi
9105fi
9106
Matthias Kloseb9621712010-04-24 17:59:49 +00009107{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
9108$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
9109cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009110/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009111
9112 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009113int
9114main ()
9115{
9116FSIORefNum fRef = 0
9117 ;
9118 return 0;
9119}
Matthias Kloseb159a552010-04-25 21:00:44 +00009120
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009121_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009122if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009123
Matthias Kloseb159a552010-04-25 21:00:44 +00009124
Matthias Kloseb9621712010-04-24 17:59:49 +00009125$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009126
Matthias Kloseb9621712010-04-24 17:59:49 +00009127 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9128$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009129
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009130else
Matthias Kloseb159a552010-04-25 21:00:44 +00009131
Matthias Kloseb9621712010-04-24 17:59:49 +00009132 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9133$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009134
9135fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009136rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9137
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009138# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +00009139{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
9140$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009141
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009142# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009143if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009144 withval=$with_doc_strings;
9145fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009146
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009147
9148if test -z "$with_doc_strings"
9149then with_doc_strings="yes"
9150fi
9151if test "$with_doc_strings" != "no"
9152then
9153
Matthias Kloseb9621712010-04-24 17:59:49 +00009154$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009155
9156fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009157{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
9158$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009159
Antoine Pitrou042b1282010-08-13 21:15:58 +00009160# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +00009161{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
9162$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009163
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009164# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009165if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009166 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009167if test "$withval" != no
9168then
9169
Matthias Kloseb9621712010-04-24 17:59:49 +00009170$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009171
Matthias Kloseb9621712010-04-24 17:59:49 +00009172 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9173$as_echo "yes" >&6; }
9174else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9175$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009176fi
9177else
Matthias Kloseb9621712010-04-24 17:59:49 +00009178 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9179$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009180fi
9181
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009182
9183# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +00009184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
9185$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009186
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009187# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009188if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009189 withval=$with_pymalloc;
9190fi
Michael W. Hudson54241132001-12-07 15:38:26 +00009191
Neil Schemenauera35c6882001-02-27 04:45:05 +00009192
Neil Schemenauer16c22972002-03-22 15:34:49 +00009193if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00009194then
9195 with_pymalloc="yes"
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00009196 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +00009197fi
9198if test "$with_pymalloc" != "no"
9199then
Martin v. Löwis11437992002-04-12 09:54:03 +00009200
Matthias Kloseb9621712010-04-24 17:59:49 +00009201$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +00009202
9203fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009204{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
9205$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +00009206
Benjamin Peterson05159c42009-12-03 03:01:27 +00009207# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +00009208{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
9209$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009210
9211# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009212if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009213 withval=$with_valgrind;
9214else
9215 with_valgrind=no
9216fi
9217
Matthias Kloseb9621712010-04-24 17:59:49 +00009218{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
9219$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009220if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009221 ac_fn_c_check_header_mongrel "$LINENO" "valgrind/valgrind.h" "ac_cv_header_valgrind_valgrind_h" "$ac_includes_default"
9222if test "x$ac_cv_header_valgrind_valgrind_h" = x""yes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009223
Matthias Kloseb9621712010-04-24 17:59:49 +00009224$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +00009225
9226else
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00009227 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +00009228
9229fi
9230
9231
Jeffrey Yasskin39370832010-05-03 19:29:34 +00009232 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +00009233fi
9234
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009235# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00009236
Guido van Rossum98935bf2001-09-05 19:13:16 +00009237DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +00009238
Guido van Rossume97ee181999-12-20 21:27:22 +00009239# the dlopen() function means we might want to use dynload_shlib.o. some
9240# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +00009241for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +00009242do :
9243 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
9244if test "x$ac_cv_func_dlopen" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009245 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009246#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009247_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +00009248
Guido van Rossume97ee181999-12-20 21:27:22 +00009249fi
Thomas Wouters3a584202000-08-05 23:28:51 +00009250done
Guido van Rossume97ee181999-12-20 21:27:22 +00009251
Michael W. Hudson54241132001-12-07 15:38:26 +00009252
Guido van Rossume97ee181999-12-20 21:27:22 +00009253# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
9254# loading of modules.
9255
Matthias Kloseb9621712010-04-24 17:59:49 +00009256{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
9257$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009258if test -z "$DYNLOADFILE"
9259then
9260 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00009261 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
9262 if test "$ac_cv_func_dlopen" = yes
9263 then DYNLOADFILE="dynload_shlib.o"
9264 else DYNLOADFILE="dynload_aix.o"
9265 fi
9266 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +00009267 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009268 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
9269 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +00009270 *)
9271 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
9272 # out any dynamic loading
9273 if test "$ac_cv_func_dlopen" = yes
9274 then DYNLOADFILE="dynload_shlib.o"
9275 else DYNLOADFILE="dynload_stub.o"
9276 fi
9277 ;;
9278 esac
9279fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009280{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
9281$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009282if test "$DYNLOADFILE" != "dynload_stub.o"
9283then
Martin v. Löwis11437992002-04-12 09:54:03 +00009284
Matthias Kloseb9621712010-04-24 17:59:49 +00009285$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +00009286
9287fi
9288
Neil Schemenauer4e425612001-06-19 15:44:15 +00009289# MACHDEP_OBJS can be set to platform-specific object files needed by Python
9290
Michael W. Hudson54241132001-12-07 15:38:26 +00009291
Matthias Kloseb9621712010-04-24 17:59:49 +00009292{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
9293$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009294if test -z "$MACHDEP_OBJS"
9295then
Jack Jansene578a632001-08-15 01:27:14 +00009296 MACHDEP_OBJS=$extra_machdep_objs
9297else
9298 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +00009299fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009300{ $as_echo "$as_me:${as_lineno-$LINENO}: result: MACHDEP_OBJS" >&5
9301$as_echo "MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009302
Guido van Rossum627b2d71993-12-24 10:39:16 +00009303# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +00009304for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Martin v. Löwis823725e2008-03-24 13:39:54 +00009305 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +00009306 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +00009307 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Antoine Pitroub7572f02009-12-02 20:46:48 +00009308 initgroups kill killpg lchmod lchown lstat mbrtowc mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +00009309 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +00009310 putenv readlink realpath \
Benjamin Peterson965ce872009-04-05 21:24:58 +00009311 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
9312 setgid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +00009313 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setuid setvbuf \
Jean-Paul Calderone6ed7ac42010-06-19 19:58:37 +00009314 sigaction siginterrupt sigrelse snprintf strftime strlcpy \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +00009315 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Martin v. Löwis113a0852009-05-29 17:25:39 +00009316 truncate uname unsetenv utimes waitpid wait3 wait4 \
9317 wcscoll wcsftime wcsxfrm _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +00009318do :
9319 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9320ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00009321if eval test \"x\$"$as_ac_var"\" = 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"
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000010316if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010317 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010318#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010319_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000010320
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010321fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000010322done
10323
Michael W. Hudson54241132001-12-07 15:38:26 +000010324
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000010325ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
10326if test "x$ac_cv_func_dup2" = x""yes; then :
10327 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000010328
Martin v. Löwis1142de32002-03-29 16:28:31 +000010329else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010330 case " $LIBOBJS " in
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000010331 *" dup2.$ac_objext "* ) ;;
10332 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010333 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010334esac
10335
Martin v. Löwis1142de32002-03-29 16:28:31 +000010336fi
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000010337
10338ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
10339if test "x$ac_cv_func_getcwd" = x""yes; then :
10340 $as_echo "#define HAVE_GETCWD 1" >>confdefs.h
10341
10342else
10343 case " $LIBOBJS " in
10344 *" getcwd.$ac_objext "* ) ;;
10345 *) LIBOBJS="$LIBOBJS getcwd.$ac_objext"
10346 ;;
10347esac
10348
10349fi
10350
10351ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
10352if test "x$ac_cv_func_strdup" = x""yes; then :
10353 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
10354
10355else
10356 case " $LIBOBJS " in
10357 *" strdup.$ac_objext "* ) ;;
10358 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
10359 ;;
10360esac
10361
10362fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000010363
10364
10365for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010366do :
10367 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
10368if test "x$ac_cv_func_getpgrp" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010369 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010370#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010371_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010372 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010373/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010374#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010375int
10376main ()
10377{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010378getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010379 ;
10380 return 0;
10381}
10382_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010383if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010384
Matthias Kloseb9621712010-04-24 17:59:49 +000010385$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010386
Guido van Rossum627b2d71993-12-24 10:39:16 +000010387fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010388rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010389
Guido van Rossum627b2d71993-12-24 10:39:16 +000010390fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010391done
Guido van Rossum627b2d71993-12-24 10:39:16 +000010392
Jack Jansen150753c2003-03-29 22:07:47 +000010393for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010394do :
10395 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
10396if test "x$ac_cv_func_setpgrp" = x""yes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000010397 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010398#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000010399_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010400 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010401/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000010402#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000010403int
10404main ()
10405{
10406setpgrp(0,0);
10407 ;
10408 return 0;
10409}
10410_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010411if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010412
Matthias Kloseb9621712010-04-24 17:59:49 +000010413$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010414
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010415fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010416rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000010417
10418fi
10419done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010420
Thomas Wouters3a584202000-08-05 23:28:51 +000010421for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000010422do :
10423 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
10424if test "x$ac_cv_func_gettimeofday" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010425 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010426#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010427_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010428 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010429/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010430#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010431int
10432main ()
10433{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010434gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010435 ;
10436 return 0;
10437}
10438_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010439if ac_fn_c_try_compile "$LINENO"; then :
10440
Guido van Rossum627b2d71993-12-24 10:39:16 +000010441else
Skip Montanaro6dead952003-09-25 14:50:04 +000010442
Matthias Kloseb9621712010-04-24 17:59:49 +000010443$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010444
Martin v. Löwis11437992002-04-12 09:54:03 +000010445
Guido van Rossum627b2d71993-12-24 10:39:16 +000010446fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010447rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010448
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010449fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010450done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010451
Michael W. Hudson54241132001-12-07 15:38:26 +000010452
Matthias Kloseb9621712010-04-24 17:59:49 +000010453{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
10454$as_echo_n "checking for major... " >&6; }
10455cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010456/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010457
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010458#if defined(MAJOR_IN_MKDEV)
10459#include <sys/mkdev.h>
10460#elif defined(MAJOR_IN_SYSMACROS)
10461#include <sys/sysmacros.h>
10462#else
10463#include <sys/types.h>
10464#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010465
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010466int
10467main ()
10468{
10469
10470 makedev(major(0),minor(0));
10471
10472 ;
10473 return 0;
10474}
10475_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010476if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010477
10478
Matthias Kloseb9621712010-04-24 17:59:49 +000010479$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010480
Matthias Kloseb9621712010-04-24 17:59:49 +000010481 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10482$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010483
10484else
Skip Montanaro6dead952003-09-25 14:50:04 +000010485
Matthias Kloseb9621712010-04-24 17:59:49 +000010486 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10487$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010488
10489fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010490rm -f core conftest.err conftest.$ac_objext \
10491 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010492
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010493# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000010494# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000010495{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
10496$as_echo_n "checking for getaddrinfo... " >&6; }
10497cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010498/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010499
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010500#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010501#include <sys/socket.h>
10502#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010503#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010504
Martin v. Löwis11437992002-04-12 09:54:03 +000010505int
10506main ()
10507{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010508getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000010509 ;
10510 return 0;
10511}
10512_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010513if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010514 have_getaddrinfo=yes
10515else
Matthias Kloseb9621712010-04-24 17:59:49 +000010516 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010517fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010518rm -f core conftest.err conftest.$ac_objext \
10519 conftest$ac_exeext conftest.$ac_ext
10520{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
10521$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010522if test $have_getaddrinfo = yes
10523then
Matthias Kloseb9621712010-04-24 17:59:49 +000010524 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
10525$as_echo_n "checking getaddrinfo bug... " >&6; }
10526 if test "${ac_cv_buggy_getaddrinfo+set}" = set; then :
10527 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010528else
Matthias Kloseb9621712010-04-24 17:59:49 +000010529 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010530 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010531else
Matthias Kloseb9621712010-04-24 17:59:49 +000010532 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010533/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010534
10535#include <sys/types.h>
10536#include <netdb.h>
10537#include <string.h>
10538#include <sys/socket.h>
10539#include <netinet/in.h>
10540
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010541int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010542{
10543 int passive, gaierr, inet4 = 0, inet6 = 0;
10544 struct addrinfo hints, *ai, *aitop;
10545 char straddr[INET6_ADDRSTRLEN], strport[16];
10546
10547 for (passive = 0; passive <= 1; passive++) {
10548 memset(&hints, 0, sizeof(hints));
10549 hints.ai_family = AF_UNSPEC;
10550 hints.ai_flags = passive ? AI_PASSIVE : 0;
10551 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000010552 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010553 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
10554 (void)gai_strerror(gaierr);
10555 goto bad;
10556 }
10557 for (ai = aitop; ai; ai = ai->ai_next) {
10558 if (ai->ai_addr == NULL ||
10559 ai->ai_addrlen == 0 ||
10560 getnameinfo(ai->ai_addr, ai->ai_addrlen,
10561 straddr, sizeof(straddr), strport, sizeof(strport),
10562 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
10563 goto bad;
10564 }
10565 switch (ai->ai_family) {
10566 case AF_INET:
10567 if (strcmp(strport, "54321") != 0) {
10568 goto bad;
10569 }
10570 if (passive) {
10571 if (strcmp(straddr, "0.0.0.0") != 0) {
10572 goto bad;
10573 }
10574 } else {
10575 if (strcmp(straddr, "127.0.0.1") != 0) {
10576 goto bad;
10577 }
10578 }
10579 inet4++;
10580 break;
10581 case AF_INET6:
10582 if (strcmp(strport, "54321") != 0) {
10583 goto bad;
10584 }
10585 if (passive) {
10586 if (strcmp(straddr, "::") != 0) {
10587 goto bad;
10588 }
10589 } else {
10590 if (strcmp(straddr, "::1") != 0) {
10591 goto bad;
10592 }
10593 }
10594 inet6++;
10595 break;
10596 case AF_UNSPEC:
10597 goto bad;
10598 break;
10599 default:
10600 /* another family support? */
10601 break;
10602 }
10603 }
10604 }
10605
10606 if (!(inet4 == 0 || inet4 == 2))
10607 goto bad;
10608 if (!(inet6 == 0 || inet6 == 2))
10609 goto bad;
10610
10611 if (aitop)
10612 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010613 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010614
10615 bad:
10616 if (aitop)
10617 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010618 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010619}
10620
Martin v. Löwis11437992002-04-12 09:54:03 +000010621_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010622if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010623 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010624else
Matthias Kloseb9621712010-04-24 17:59:49 +000010625 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010626fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010627rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10628 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010629fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010630
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010631fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010632
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010633fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010634
Mark Dickinson2df5d282009-12-31 21:22:50 +000010635if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010636then
10637 if test $ipv6 = yes
10638 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010639 echo 'Fatal: You must get working getaddrinfo() function.'
10640 echo ' or you can specify "--disable-ipv6"'.
10641 exit 1
10642 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010643else
Martin v. Löwis11437992002-04-12 09:54:03 +000010644
Matthias Kloseb9621712010-04-24 17:59:49 +000010645$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010646
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010647fi
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010648for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000010649do :
10650 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
10651if test "x$ac_cv_func_getnameinfo" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010652 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010653#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010654_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010655
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010656fi
10657done
10658
Michael W. Hudson54241132001-12-07 15:38:26 +000010659
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010660# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000010661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
10662$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
10663if test "${ac_cv_header_time+set}" = set; then :
10664 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010665else
Matthias Kloseb9621712010-04-24 17:59:49 +000010666 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010667/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010668#include <sys/types.h>
10669#include <sys/time.h>
10670#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010671
Martin v. Löwis11437992002-04-12 09:54:03 +000010672int
10673main ()
10674{
10675if ((struct tm *) 0)
10676return 0;
10677 ;
10678 return 0;
10679}
10680_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010681if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010682 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000010683else
Matthias Kloseb9621712010-04-24 17:59:49 +000010684 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010685fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010686rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010687fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010688{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
10689$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010690if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010691
Matthias Kloseb9621712010-04-24 17:59:49 +000010692$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010693
10694fi
10695
Matthias Kloseb9621712010-04-24 17:59:49 +000010696{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
10697$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
10698if test "${ac_cv_struct_tm+set}" = set; then :
10699 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010700else
Matthias Kloseb9621712010-04-24 17:59:49 +000010701 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010702/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010703#include <sys/types.h>
10704#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010705
Martin v. Löwis11437992002-04-12 09:54:03 +000010706int
10707main ()
10708{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010709struct tm tm;
10710 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000010711 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000010712 ;
10713 return 0;
10714}
10715_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010716if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010717 ac_cv_struct_tm=time.h
10718else
Matthias Kloseb9621712010-04-24 17:59:49 +000010719 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010720fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010721rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010722fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010723{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
10724$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010725if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010726
Matthias Kloseb9621712010-04-24 17:59:49 +000010727$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010728
10729fi
10730
Matthias Kloseb9621712010-04-24 17:59:49 +000010731ac_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 +000010732#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000010733
Matthias Kloseb9621712010-04-24 17:59:49 +000010734"
10735if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010736
10737cat >>confdefs.h <<_ACEOF
10738#define HAVE_STRUCT_TM_TM_ZONE 1
10739_ACEOF
10740
10741
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010742fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010743
Martin v. Löwis11437992002-04-12 09:54:03 +000010744if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
10745
Matthias Kloseb9621712010-04-24 17:59:49 +000010746$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010747
10748else
Matthias Kloseb9621712010-04-24 17:59:49 +000010749 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
10750"
10751if test "x$ac_cv_have_decl_tzname" = x""yes; then :
10752 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010753else
Matthias Kloseb9621712010-04-24 17:59:49 +000010754 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010755fi
10756
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010757cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010758#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010759_ACEOF
10760
Matthias Kloseb9621712010-04-24 17:59:49 +000010761 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
10762$as_echo_n "checking for tzname... " >&6; }
10763if test "${ac_cv_var_tzname+set}" = set; then :
10764 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010765else
Matthias Kloseb9621712010-04-24 17:59:49 +000010766 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010767/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010768#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010769#if !HAVE_DECL_TZNAME
10770extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000010771#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010772
Martin v. Löwis11437992002-04-12 09:54:03 +000010773int
10774main ()
10775{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010776return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000010777 ;
10778 return 0;
10779}
10780_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010781if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010782 ac_cv_var_tzname=yes
10783else
Matthias Kloseb9621712010-04-24 17:59:49 +000010784 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010785fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010786rm -f core conftest.err conftest.$ac_objext \
10787 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000010788fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010789{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
10790$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010791 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010792
Matthias Kloseb9621712010-04-24 17:59:49 +000010793$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010794
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010795 fi
10796fi
10797
Matthias Kloseb9621712010-04-24 17:59:49 +000010798ac_fn_c_check_member "$LINENO" "struct stat" "st_rdev" "ac_cv_member_struct_stat_st_rdev" "$ac_includes_default"
10799if test "x$ac_cv_member_struct_stat_st_rdev" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010800
10801cat >>confdefs.h <<_ACEOF
10802#define HAVE_STRUCT_STAT_ST_RDEV 1
10803_ACEOF
10804
10805
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010806fi
10807
Matthias Kloseb9621712010-04-24 17:59:49 +000010808ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
10809if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000010810
Martin v. Löwis11437992002-04-12 09:54:03 +000010811cat >>confdefs.h <<_ACEOF
10812#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
10813_ACEOF
10814
10815
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010816fi
10817
Matthias Kloseb9621712010-04-24 17:59:49 +000010818ac_fn_c_check_member "$LINENO" "struct stat" "st_flags" "ac_cv_member_struct_stat_st_flags" "$ac_includes_default"
10819if test "x$ac_cv_member_struct_stat_st_flags" = x""yes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000010820
10821cat >>confdefs.h <<_ACEOF
10822#define HAVE_STRUCT_STAT_ST_FLAGS 1
10823_ACEOF
10824
10825
10826fi
10827
Matthias Kloseb9621712010-04-24 17:59:49 +000010828ac_fn_c_check_member "$LINENO" "struct stat" "st_gen" "ac_cv_member_struct_stat_st_gen" "$ac_includes_default"
10829if test "x$ac_cv_member_struct_stat_st_gen" = x""yes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000010830
10831cat >>confdefs.h <<_ACEOF
10832#define HAVE_STRUCT_STAT_ST_GEN 1
10833_ACEOF
10834
10835
10836fi
10837
Matthias Kloseb9621712010-04-24 17:59:49 +000010838ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtime" "ac_cv_member_struct_stat_st_birthtime" "$ac_includes_default"
10839if test "x$ac_cv_member_struct_stat_st_birthtime" = x""yes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000010840
10841cat >>confdefs.h <<_ACEOF
10842#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
10843_ACEOF
10844
10845
10846fi
10847
Matthias Kloseb9621712010-04-24 17:59:49 +000010848ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
10849if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000010850
Martin v. Löwis11437992002-04-12 09:54:03 +000010851cat >>confdefs.h <<_ACEOF
10852#define HAVE_STRUCT_STAT_ST_BLOCKS 1
10853_ACEOF
10854
10855
Matthias Kloseb9621712010-04-24 17:59:49 +000010856$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010857
10858else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010859 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000010860 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010861 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
10862 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010863esac
10864
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010865fi
10866
Michael W. Hudson54241132001-12-07 15:38:26 +000010867
Martin v. Löwis11437992002-04-12 09:54:03 +000010868
Matthias Kloseb9621712010-04-24 17:59:49 +000010869{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
10870$as_echo_n "checking for time.h that defines altzone... " >&6; }
10871if test "${ac_cv_header_time_altzone+set}" = set; then :
10872 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010873else
Matthias Kloseb159a552010-04-25 21:00:44 +000010874
Matthias Kloseb9621712010-04-24 17:59:49 +000010875 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010876/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000010877#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010878int
10879main ()
10880{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010881return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000010882 ;
10883 return 0;
10884}
10885_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010886if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010887 ac_cv_header_time_altzone=yes
10888else
Matthias Kloseb9621712010-04-24 17:59:49 +000010889 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000010890fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010891rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000010892
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010893fi
10894
Matthias Kloseb9621712010-04-24 17:59:49 +000010895{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
10896$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010897if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010898
Matthias Kloseb9621712010-04-24 17:59:49 +000010899$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010900
10901fi
10902
Guido van Rossumda88dad1995-01-26 00:46:29 +000010903was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000010904{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
10905$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
10906cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010907/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000010908
10909#include <sys/types.h>
10910#include <sys/select.h>
10911#include <sys/time.h>
10912
Martin v. Löwis11437992002-04-12 09:54:03 +000010913int
10914main ()
10915{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010916;
Martin v. Löwis11437992002-04-12 09:54:03 +000010917 ;
10918 return 0;
10919}
10920_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010921if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010922
10923
Matthias Kloseb9621712010-04-24 17:59:49 +000010924$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000010925
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010926 was_it_defined=yes
10927
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010928fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010929rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010930{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
10931$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010932
Matthias Kloseb9621712010-04-24 17:59:49 +000010933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
10934$as_echo_n "checking for addrinfo... " >&6; }
10935if test "${ac_cv_struct_addrinfo+set}" = set; then :
10936 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010937else
Matthias Kloseb9621712010-04-24 17:59:49 +000010938 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010939/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010940#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010941int
10942main ()
10943{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010944struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000010945 ;
10946 return 0;
10947}
10948_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010949if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010950 ac_cv_struct_addrinfo=yes
10951else
Matthias Kloseb9621712010-04-24 17:59:49 +000010952 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010953fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010954rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10955fi
10956
Matthias Kloseb9621712010-04-24 17:59:49 +000010957{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
10958$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010959if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010960
Matthias Kloseb9621712010-04-24 17:59:49 +000010961$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010962
10963fi
10964
Matthias Kloseb9621712010-04-24 17:59:49 +000010965{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
10966$as_echo_n "checking for sockaddr_storage... " >&6; }
10967if test "${ac_cv_struct_sockaddr_storage+set}" = set; then :
10968 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010969else
Matthias Kloseb9621712010-04-24 17:59:49 +000010970 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010971/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010972
10973# include <sys/types.h>
10974# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010975int
10976main ()
10977{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010978struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000010979 ;
10980 return 0;
10981}
10982_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010983if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010984 ac_cv_struct_sockaddr_storage=yes
10985else
Matthias Kloseb9621712010-04-24 17:59:49 +000010986 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010987fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010988rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10989fi
10990
Matthias Kloseb9621712010-04-24 17:59:49 +000010991{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
10992$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010993if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010994
Matthias Kloseb9621712010-04-24 17:59:49 +000010995$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010996
10997fi
10998
Guido van Rossum627b2d71993-12-24 10:39:16 +000010999# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000011000
Matthias Kloseb9621712010-04-24 17:59:49 +000011001{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
11002$as_echo_n "checking whether char is unsigned... " >&6; }
11003if test "${ac_cv_c_char_unsigned+set}" = set; then :
11004 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000011005else
Matthias Kloseb9621712010-04-24 17:59:49 +000011006 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011007/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011008$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000011009int
11010main ()
11011{
11012static int test_array [1 - 2 * !(((char) -1) < 0)];
11013test_array [0] = 0
11014
11015 ;
11016 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000011017}
Martin v. Löwis11437992002-04-12 09:54:03 +000011018_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011019if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000011020 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011021else
Matthias Kloseb9621712010-04-24 17:59:49 +000011022 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011023fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011024rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011025fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011026{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
11027$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011028if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011029 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011030
11031fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000011032
Matthias Kloseb9621712010-04-24 17:59:49 +000011033{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
11034$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
11035if test "${ac_cv_c_const+set}" = set; then :
11036 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011037else
Matthias Kloseb9621712010-04-24 17:59:49 +000011038 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011039/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011040
Martin v. Löwis11437992002-04-12 09:54:03 +000011041int
11042main ()
11043{
11044/* FIXME: Include the comments suggested by Paul. */
11045#ifndef __cplusplus
11046 /* Ultrix mips cc rejects this. */
11047 typedef int charset[2];
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011048 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000011049 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011050 char const *const *pcpcc;
11051 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011052 /* NEC SVR4.0.2 mips cc rejects this. */
11053 struct point {int x, y;};
11054 static struct point const zero = {0,0};
11055 /* AIX XL C 1.02.0.0 rejects this.
11056 It does not let you subtract one const X* pointer from another in
11057 an arm of an if-expression whose if-part is not a constant
11058 expression */
11059 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011060 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011061 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011062 ++pcpcc;
11063 ppc = (char**) pcpcc;
11064 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011065 { /* SCO 3.2v4 cc rejects this. */
11066 char *t;
11067 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011068
Martin v. Löwis11437992002-04-12 09:54:03 +000011069 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011070 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011071 }
11072 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
11073 int x[] = {25, 17};
11074 const int *foo = &x[0];
11075 ++foo;
11076 }
11077 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11078 typedef const int *iptr;
11079 iptr p = 0;
11080 ++p;
11081 }
11082 { /* AIX XL C 1.02.0.0 rejects this saying
11083 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11084 struct s { int j; const int *ap[3]; };
11085 struct s *b; b->j = 5;
11086 }
11087 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11088 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011089 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011090 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011091 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000011092#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000011093
Martin v. Löwis11437992002-04-12 09:54:03 +000011094 ;
11095 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000011096}
Martin v. Löwis11437992002-04-12 09:54:03 +000011097_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011098if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011099 ac_cv_c_const=yes
11100else
Matthias Kloseb9621712010-04-24 17:59:49 +000011101 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011102fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011103rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011104fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011105{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
11106$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011107if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011108
Matthias Kloseb9621712010-04-24 17:59:49 +000011109$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011110
11111fi
11112
Michael W. Hudson54241132001-12-07 15:38:26 +000011113
Guido van Rossumda88dad1995-01-26 00:46:29 +000011114works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011115{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
11116$as_echo_n "checking for working volatile... " >&6; }
11117cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011118/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011119
Martin v. Löwis11437992002-04-12 09:54:03 +000011120int
11121main ()
11122{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011123volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011124 ;
11125 return 0;
11126}
11127_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011128if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011129 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011130else
Skip Montanaro6dead952003-09-25 14:50:04 +000011131
Matthias Kloseb9621712010-04-24 17:59:49 +000011132$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011133
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011134
Guido van Rossum627b2d71993-12-24 10:39:16 +000011135fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011136rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011137{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11138$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011139
Guido van Rossumda88dad1995-01-26 00:46:29 +000011140works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
11142$as_echo_n "checking for working signed char... " >&6; }
11143cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011144/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011145
Martin v. Löwis11437992002-04-12 09:54:03 +000011146int
11147main ()
11148{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011149signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000011150 ;
11151 return 0;
11152}
11153_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011154if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011155 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011156else
Skip Montanaro6dead952003-09-25 14:50:04 +000011157
Matthias Kloseb9621712010-04-24 17:59:49 +000011158$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000011159
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011160
Guido van Rossum7f43da71994-08-01 12:15:30 +000011161fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011162rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011163{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11164$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011165
Guido van Rossumda88dad1995-01-26 00:46:29 +000011166have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011167{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
11168$as_echo_n "checking for prototypes... " >&6; }
11169cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011170/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011171int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011172int
11173main ()
11174{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011175return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000011176 ;
11177 return 0;
11178}
11179_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011180if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011181
Matthias Kloseb9621712010-04-24 17:59:49 +000011182$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011183
Matthias Kloseb159a552010-04-25 21:00:44 +000011184 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011185fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011186rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011187{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
11188$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011189
Guido van Rossumda88dad1995-01-26 00:46:29 +000011190works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011191{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
11192$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
11193cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011194/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011195
11196#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000011197int foo(int x, ...) {
11198 va_list va;
11199 va_start(va, x);
11200 va_arg(va, int);
11201 va_arg(va, char *);
11202 va_arg(va, double);
11203 return 0;
11204}
Guido van Rossum7f43da71994-08-01 12:15:30 +000011205
Martin v. Löwis11437992002-04-12 09:54:03 +000011206int
11207main ()
11208{
Guido van Rossum90eea071996-08-30 20:58:57 +000011209return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000011210 ;
11211 return 0;
11212}
11213_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011214if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011215
11216
Matthias Kloseb9621712010-04-24 17:59:49 +000011217$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011218
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011219 works=yes
11220
Guido van Rossum627b2d71993-12-24 10:39:16 +000011221fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011222rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011223{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11224$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011225
Martin v. Löwisd6320502004-08-12 13:45:08 +000011226# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000011227{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
11228$as_echo_n "checking for socketpair... " >&6; }
11229cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011230/* end confdefs.h. */
11231
11232#include <sys/types.h>
11233#include <sys/socket.h>
11234
11235int
11236main ()
11237{
11238void *x=socketpair
11239 ;
11240 return 0;
11241}
11242_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011243if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000011244
Matthias Kloseb9621712010-04-24 17:59:49 +000011245$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000011246
Matthias Kloseb159a552010-04-25 21:00:44 +000011247 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011248$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011249else
Matthias Kloseb9621712010-04-24 17:59:49 +000011250 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11251$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011252
11253fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011254rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011255
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011256# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000011257{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
11258$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
11259cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011260/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011261#include <sys/types.h>
11262#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011263int
11264main ()
11265{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011266struct sockaddr x;
11267x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011268 ;
11269 return 0;
11270}
11271_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011272if ac_fn_c_try_compile "$LINENO"; then :
11273 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11274$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011275
Matthias Kloseb9621712010-04-24 17:59:49 +000011276$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011277
11278else
Matthias Kloseb9621712010-04-24 17:59:49 +000011279 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11280$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011281
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011282fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011283rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011284
Guido van Rossumda88dad1995-01-26 00:46:29 +000011285va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011286{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
11287$as_echo_n "checking whether va_list is an array... " >&6; }
11288cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011289/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011290
11291#ifdef HAVE_STDARG_PROTOTYPES
11292#include <stdarg.h>
11293#else
11294#include <varargs.h>
11295#endif
11296
Martin v. Löwis11437992002-04-12 09:54:03 +000011297int
11298main ()
11299{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011300va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000011301 ;
11302 return 0;
11303}
11304_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011305if ac_fn_c_try_compile "$LINENO"; then :
11306
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011307else
Skip Montanaro6dead952003-09-25 14:50:04 +000011308
Martin v. Löwis11437992002-04-12 09:54:03 +000011309
Matthias Kloseb9621712010-04-24 17:59:49 +000011310$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011311
Guido van Rossumda88dad1995-01-26 00:46:29 +000011312 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011313
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011314fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011315rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011316{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
11317$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011318
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011319# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000011320
11321
Matthias Kloseb9621712010-04-24 17:59:49 +000011322ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
11323if test "x$ac_cv_func_gethostbyname_r" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011324
Matthias Kloseb9621712010-04-24 17:59:49 +000011325 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000011326
Matthias Kloseb9621712010-04-24 17:59:49 +000011327 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
11328$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011329 OLD_CFLAGS=$CFLAGS
11330 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011331 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011332/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011333
11334# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011335
Martin v. Löwis11437992002-04-12 09:54:03 +000011336int
11337main ()
11338{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011339
11340 char *name;
11341 struct hostent *he, *res;
11342 char buffer[2048];
11343 int buflen = 2048;
11344 int h_errnop;
11345
11346 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011347
11348 ;
11349 return 0;
11350}
11351_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011352if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011353
Matthias Kloseb9621712010-04-24 17:59:49 +000011354 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011355
Martin v. Löwis11437992002-04-12 09:54:03 +000011356
Matthias Kloseb9621712010-04-24 17:59:49 +000011357$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011358
Matthias Kloseb9621712010-04-24 17:59:49 +000011359 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11360$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011361
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011362else
Skip Montanaro6dead952003-09-25 14:50:04 +000011363
Matthias Kloseb9621712010-04-24 17:59:49 +000011364 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11365$as_echo "no" >&6; }
11366 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
11367$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
11368 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011369/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011370
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011371# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011372
Martin v. Löwis11437992002-04-12 09:54:03 +000011373int
11374main ()
11375{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011376
11377 char *name;
11378 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000011379 char buffer[2048];
11380 int buflen = 2048;
11381 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011382
Matthias Kloseb159a552010-04-25 21:00:44 +000011383 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011384
11385 ;
11386 return 0;
11387}
11388_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011389if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011390
Matthias Kloseb9621712010-04-24 17:59:49 +000011391 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011392
Martin v. Löwis11437992002-04-12 09:54:03 +000011393
Matthias Kloseb159a552010-04-25 21:00:44 +000011394$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011395
Matthias Kloseb9621712010-04-24 17:59:49 +000011396 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11397$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011398
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011399else
Skip Montanaro6dead952003-09-25 14:50:04 +000011400
Matthias Kloseb9621712010-04-24 17:59:49 +000011401 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11402$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011403 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
11404$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
11405 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11406/* end confdefs.h. */
11407
11408# include <netdb.h>
11409
11410int
11411main ()
11412{
11413
11414 char *name;
11415 struct hostent *he;
11416 struct hostent_data data;
11417
11418 (void) gethostbyname_r(name, he, &data);
11419
11420 ;
11421 return 0;
11422}
11423_ACEOF
11424if ac_fn_c_try_compile "$LINENO"; then :
11425
11426 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
11427
11428
11429$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
11430
11431 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11432$as_echo "yes" >&6; }
11433
11434else
11435
11436 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11437$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011438
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011439fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011440rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011441
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011442fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011443rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011444
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011445fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011446rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011447 CFLAGS=$OLD_CFLAGS
11448
11449else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011450
Matthias Kloseb9621712010-04-24 17:59:49 +000011451 for ac_func in gethostbyname
11452do :
11453 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
11454if test "x$ac_cv_func_gethostbyname" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011455 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011456#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011457_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011458
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011459fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011460done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011461
Michael W. Hudson54241132001-12-07 15:38:26 +000011462
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011463fi
11464
Michael W. Hudson54241132001-12-07 15:38:26 +000011465
11466
11467
11468
11469
11470
Guido van Rossum627b2d71993-12-24 10:39:16 +000011471# checks for system services
11472# (none yet)
11473
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011474# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000011475ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
11476if test "x$ac_cv_func___fpu_control" = x""yes; then :
11477
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011478else
Matthias Kloseb9621712010-04-24 17:59:49 +000011479 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
11480$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
11481if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then :
11482 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011483else
Martin v. Löwis11437992002-04-12 09:54:03 +000011484 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011485LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011486cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011487/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011488
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011489/* Override any GCC internal prototype to avoid an error.
11490 Use char because int might match the return type of a GCC
11491 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011492#ifdef __cplusplus
11493extern "C"
11494#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011495char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011496int
11497main ()
11498{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011499return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011500 ;
11501 return 0;
11502}
11503_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011504if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011505 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011506else
Matthias Kloseb9621712010-04-24 17:59:49 +000011507 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011508fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011509rm -f core conftest.err conftest.$ac_objext \
11510 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011511LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011512fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011513{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
11514$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
11515if test "x$ac_cv_lib_ieee___fpu_control" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011516 cat >>confdefs.h <<_ACEOF
11517#define HAVE_LIBIEEE 1
11518_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011519
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011520 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011521
Guido van Rossum627b2d71993-12-24 10:39:16 +000011522fi
11523
Michael W. Hudson54241132001-12-07 15:38:26 +000011524
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011525fi
11526
Michael W. Hudson54241132001-12-07 15:38:26 +000011527
Guido van Rossum7f253911997-05-09 02:42:48 +000011528# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000011529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
11530$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011531
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011532# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011533if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011534 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000011535if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000011536then
11537
Matthias Kloseb9621712010-04-24 17:59:49 +000011538$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011539
Matthias Kloseb9621712010-04-24 17:59:49 +000011540 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11541$as_echo "yes" >&6; }
11542else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11543$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011544fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000011545else
Matthias Kloseb9621712010-04-24 17:59:49 +000011546 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11547$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011548fi
11549
Guido van Rossum7f253911997-05-09 02:42:48 +000011550
Guido van Rossum7f43da71994-08-01 12:15:30 +000011551# check for --with-libm=...
11552
Guido van Rossum563e7081996-09-10 18:20:48 +000011553case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000011554Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000011555*) LIBM=-lm
11556esac
Matthias Kloseb9621712010-04-24 17:59:49 +000011557{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
11558$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011559
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011560# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011561if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011562 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000011563if test "$withval" = no
11564then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000011565 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
11566$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011567elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011568then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000011569 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
11570$as_echo "set LIBM=\"$withval\"" >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000011571else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011572fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011573else
Matthias Kloseb9621712010-04-24 17:59:49 +000011574 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
11575$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011576fi
11577
Guido van Rossum7f43da71994-08-01 12:15:30 +000011578
11579# check for --with-libc=...
11580
Matthias Kloseb9621712010-04-24 17:59:49 +000011581{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
11582$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011583
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011584# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011585if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011586 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000011587if test "$withval" = no
11588then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000011589 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
11590$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011591elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011592then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000011593 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
11594$as_echo "set LIBC=\"$withval\"" >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000011595else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011596fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011597else
Matthias Kloseb9621712010-04-24 17:59:49 +000011598 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
11599$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011600fi
11601
Guido van Rossum7f43da71994-08-01 12:15:30 +000011602
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011603# **************************************************
11604# * Check for various properties of floating point *
11605# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011606
Matthias Kloseb9621712010-04-24 17:59:49 +000011607{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
11608$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
11609if test "${ac_cv_little_endian_double+set}" = set; then :
11610 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011611else
11612
Matthias Kloseb9621712010-04-24 17:59:49 +000011613if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011614 ac_cv_little_endian_double=no
11615else
Matthias Kloseb9621712010-04-24 17:59:49 +000011616 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011617/* end confdefs.h. */
11618
11619#include <string.h>
11620int main() {
11621 double x = 9006104071832581.0;
11622 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
11623 return 0;
11624 else
11625 return 1;
11626}
11627
11628_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011629if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011630 ac_cv_little_endian_double=yes
11631else
Matthias Kloseb9621712010-04-24 17:59:49 +000011632 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011633fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011634rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11635 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011636fi
11637
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011638fi
11639
Matthias Kloseb9621712010-04-24 17:59:49 +000011640{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
11641$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011642if test "$ac_cv_little_endian_double" = yes
11643then
11644
Matthias Kloseb9621712010-04-24 17:59:49 +000011645$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011646
11647fi
11648
Matthias Kloseb9621712010-04-24 17:59:49 +000011649{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
11650$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
11651if test "${ac_cv_big_endian_double+set}" = set; then :
11652 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011653else
11654
Matthias Kloseb9621712010-04-24 17:59:49 +000011655if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011656 ac_cv_big_endian_double=no
11657else
Matthias Kloseb9621712010-04-24 17:59:49 +000011658 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011659/* end confdefs.h. */
11660
11661#include <string.h>
11662int main() {
11663 double x = 9006104071832581.0;
11664 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
11665 return 0;
11666 else
11667 return 1;
11668}
11669
11670_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011671if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011672 ac_cv_big_endian_double=yes
11673else
Matthias Kloseb9621712010-04-24 17:59:49 +000011674 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011675fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011676rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11677 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011678fi
11679
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011680fi
11681
Matthias Kloseb9621712010-04-24 17:59:49 +000011682{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
11683$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011684if test "$ac_cv_big_endian_double" = yes
11685then
11686
Matthias Kloseb9621712010-04-24 17:59:49 +000011687$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011688
11689fi
11690
11691# Some ARM platforms use a mixed-endian representation for doubles.
11692# While Python doesn't currently have full support for these platforms
11693# (see e.g., issue 1762561), we can at least make sure that float <-> string
11694# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000011695{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
11696$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
11697if test "${ac_cv_mixed_endian_double+set}" = set; then :
11698 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011699else
11700
Matthias Kloseb9621712010-04-24 17:59:49 +000011701if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011702 ac_cv_mixed_endian_double=no
11703else
Matthias Kloseb9621712010-04-24 17:59:49 +000011704 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011705/* end confdefs.h. */
11706
11707#include <string.h>
11708int main() {
11709 double x = 9006104071832581.0;
11710 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
11711 return 0;
11712 else
11713 return 1;
11714}
11715
11716_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011717if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011718 ac_cv_mixed_endian_double=yes
11719else
Matthias Kloseb9621712010-04-24 17:59:49 +000011720 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011721fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011722rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11723 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011724fi
11725
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011726fi
11727
Matthias Kloseb9621712010-04-24 17:59:49 +000011728{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
11729$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011730if test "$ac_cv_mixed_endian_double" = yes
11731then
11732
Matthias Kloseb9621712010-04-24 17:59:49 +000011733$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011734
11735fi
11736
Mark Dickinson7abf8d42009-04-18 20:17:52 +000011737# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000011738# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000011739# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000011740# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011741# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000011742# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011743
11744# This inline assembler syntax may also work for suncc and icc,
11745# so we try it on all platforms.
11746
Matthias Kloseb9621712010-04-24 17:59:49 +000011747{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
11748$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
11749cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011750/* end confdefs.h. */
11751
11752int
11753main ()
11754{
11755
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011756 unsigned short cw;
11757 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
11758 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011759
11760 ;
11761 return 0;
11762}
11763_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011764if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011765 have_gcc_asm_for_x87=yes
11766else
Matthias Kloseb9621712010-04-24 17:59:49 +000011767 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011768fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011769rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011770{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
11771$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011772if test "$have_gcc_asm_for_x87" = yes
11773then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011774
Matthias Kloseb9621712010-04-24 17:59:49 +000011775$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011776
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011777fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011778
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011779# Detect whether system arithmetic is subject to x87-style double
11780# rounding issues. The result of this test has little meaning on non
11781# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
11782# mode is round-to-nearest and double rounding issues are present, and
11783# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000011784{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
11785$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011786# $BASECFLAGS may affect the result
11787ac_save_cc="$CC"
11788CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011789if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011790 ac_cv_x87_double_rounding=no
11791else
Matthias Kloseb9621712010-04-24 17:59:49 +000011792 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011793/* end confdefs.h. */
11794
11795#include <stdlib.h>
11796#include <math.h>
11797int main() {
11798 volatile double x, y, z;
11799 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
11800 x = 0.99999999999999989; /* 1-2**-53 */
11801 y = 1./x;
11802 if (y != 1.)
11803 exit(0);
11804 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
11805 x = 1e16;
11806 y = 2.99999;
11807 z = x + y;
11808 if (z != 1e16+4.)
11809 exit(0);
11810 /* both tests show evidence of double rounding */
11811 exit(1);
11812}
11813
11814_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011815if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011816 ac_cv_x87_double_rounding=no
11817else
Matthias Kloseb9621712010-04-24 17:59:49 +000011818 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011819fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011820rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11821 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011822fi
11823
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011824CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000011825{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
11826$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011827if test "$ac_cv_x87_double_rounding" = yes
11828then
11829
Matthias Kloseb9621712010-04-24 17:59:49 +000011830$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011831
11832fi
11833
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011834# ************************************
11835# * Check for mathematical functions *
11836# ************************************
11837
11838LIBS_SAVE=$LIBS
11839LIBS="$LIBS $LIBM"
11840
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011841# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
11842# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000011843{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
11844$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
11845if test "${ac_cv_tanh_preserves_zero_sign+set}" = set; then :
11846 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011847else
11848
Matthias Kloseb9621712010-04-24 17:59:49 +000011849if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011850 ac_cv_tanh_preserves_zero_sign=no
11851else
Matthias Kloseb9621712010-04-24 17:59:49 +000011852 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011853/* end confdefs.h. */
11854
11855#include <math.h>
11856#include <stdlib.h>
11857int main() {
11858 /* return 0 if either negative zeros don't exist
11859 on this platform or if negative zeros exist
11860 and tanh(-0.) == -0. */
11861 if (atan2(0., -1.) == atan2(-0., -1.) ||
11862 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
11863 else exit(1);
11864}
11865
11866_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011867if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011868 ac_cv_tanh_preserves_zero_sign=yes
11869else
Matthias Kloseb9621712010-04-24 17:59:49 +000011870 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011871fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011872rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11873 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011874fi
11875
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011876fi
11877
Matthias Kloseb9621712010-04-24 17:59:49 +000011878{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
11879$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011880if test "$ac_cv_tanh_preserves_zero_sign" = yes
11881then
11882
Matthias Kloseb9621712010-04-24 17:59:49 +000011883$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011884
11885fi
11886
Mark Dickinson9c113362009-09-05 10:36:23 +000011887for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
Matthias Kloseb9621712010-04-24 17:59:49 +000011888do :
11889 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11890ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000011891if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinson9c113362009-09-05 10:36:23 +000011892 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011893#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Mark Dickinson9c113362009-09-05 10:36:23 +000011894_ACEOF
11895
11896fi
11897done
11898
Mark Dickinson9c113362009-09-05 10:36:23 +000011899for ac_func in hypot lgamma log1p round tgamma
Matthias Kloseb9621712010-04-24 17:59:49 +000011900do :
11901 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11902ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000011903if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Christian Heimes99170a52007-12-19 02:07:34 +000011904 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011905#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimes99170a52007-12-19 02:07:34 +000011906_ACEOF
11907
11908fi
11909done
11910
Matthias Kloseb9621712010-04-24 17:59:49 +000011911ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
11912"
11913if test "x$ac_cv_have_decl_isinf" = x""yes; then :
11914 ac_have_decl=1
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011915else
Matthias Kloseb9621712010-04-24 17:59:49 +000011916 ac_have_decl=0
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011917fi
11918
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011919cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011920#define HAVE_DECL_ISINF $ac_have_decl
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011921_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011922ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
11923"
11924if test "x$ac_cv_have_decl_isnan" = x""yes; then :
11925 ac_have_decl=1
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011926else
Matthias Kloseb9621712010-04-24 17:59:49 +000011927 ac_have_decl=0
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011928fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011929
11930cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011931#define HAVE_DECL_ISNAN $ac_have_decl
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011932_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011933ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
11934"
11935if test "x$ac_cv_have_decl_isfinite" = x""yes; then :
11936 ac_have_decl=1
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011937else
Matthias Kloseb9621712010-04-24 17:59:49 +000011938 ac_have_decl=0
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011939fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011940
11941cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011942#define HAVE_DECL_ISFINITE $ac_have_decl
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011943_ACEOF
11944
11945
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000011946LIBS=$LIBS_SAVE
11947
Mark Dickinsona614f042009-11-28 12:48:43 +000011948# For multiprocessing module, check that sem_open
11949# actually works. For FreeBSD versions <= 7.2,
11950# the kernel module that provides POSIX semaphores
11951# isn't loaded by default, so an attempt to call
11952# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000011953{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
11954$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
11955if test "${ac_cv_posix_semaphores_enabled+set}" = set; then :
11956 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000011957else
Matthias Kloseb9621712010-04-24 17:59:49 +000011958 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000011959 ac_cv_posix_semaphores_enabled=yes
11960else
Matthias Kloseb9621712010-04-24 17:59:49 +000011961 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000011962/* end confdefs.h. */
11963
11964#include <unistd.h>
11965#include <fcntl.h>
11966#include <stdio.h>
11967#include <semaphore.h>
11968#include <sys/stat.h>
11969
11970int main(void) {
11971 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
11972 if (a == SEM_FAILED) {
11973 perror("sem_open");
11974 return 1;
11975 }
11976 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000011977 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000011978 return 0;
11979}
11980
11981_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011982if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000011983 ac_cv_posix_semaphores_enabled=yes
11984else
Matthias Kloseb9621712010-04-24 17:59:49 +000011985 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000011986fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011987rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11988 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000011989fi
11990
11991
Mark Dickinsona614f042009-11-28 12:48:43 +000011992fi
11993
Matthias Kloseb9621712010-04-24 17:59:49 +000011994{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
11995$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000011996if test $ac_cv_posix_semaphores_enabled = no
11997then
11998
Matthias Kloseb9621712010-04-24 17:59:49 +000011999$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000012000
12001fi
12002
Mark Dickinson10683072009-04-18 21:18:19 +000012003# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000012004{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
12005$as_echo_n "checking for broken sem_getvalue... " >&6; }
12006if test "${ac_cv_broken_sem_getvalue+set}" = set; then :
12007 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012008else
Matthias Kloseb9621712010-04-24 17:59:49 +000012009 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012010 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000012011else
Matthias Kloseb9621712010-04-24 17:59:49 +000012012 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000012013/* end confdefs.h. */
12014
12015#include <unistd.h>
12016#include <fcntl.h>
12017#include <stdio.h>
12018#include <semaphore.h>
12019#include <sys/stat.h>
12020
12021int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000012022 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000012023 int count;
12024 int res;
12025 if(a==SEM_FAILED){
12026 perror("sem_open");
12027 return 1;
12028
12029 }
12030 res = sem_getvalue(a, &count);
12031 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000012032 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000012033 return res==-1 ? 1 : 0;
12034}
12035
Mark Dickinson10683072009-04-18 21:18:19 +000012036_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012037if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012038 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000012039else
Matthias Kloseb9621712010-04-24 17:59:49 +000012040 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012041fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012042rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12043 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012044fi
12045
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012046
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012047fi
12048
Matthias Kloseb9621712010-04-24 17:59:49 +000012049{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
12050$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012051if test $ac_cv_broken_sem_getvalue = yes
12052then
12053
Matthias Kloseb9621712010-04-24 17:59:49 +000012054$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012055
12056fi
12057
Mark Dickinsonbd792642009-03-18 20:06:12 +000012058# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000012059{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
12060$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012061# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012062if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000012063 enableval=$enable_big_digits; case $enable_big_digits in
12064yes)
12065 enable_big_digits=30 ;;
12066no)
12067 enable_big_digits=15 ;;
1206815|30)
12069 ;;
12070*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012071 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 +000012072esac
Matthias Kloseb9621712010-04-24 17:59:49 +000012073{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
12074$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012075
12076cat >>confdefs.h <<_ACEOF
12077#define PYLONG_BITS_IN_DIGIT $enable_big_digits
12078_ACEOF
12079
12080
12081else
Matthias Kloseb9621712010-04-24 17:59:49 +000012082 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
12083$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012084fi
12085
12086
Guido van Rossumef2255b2000-03-10 22:30:29 +000012087# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012088ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
12089if test "x$ac_cv_header_wchar_h" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012090
12091
Matthias Kloseb9621712010-04-24 17:59:49 +000012092$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012093
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012094 wchar_h="yes"
12095
Guido van Rossumef2255b2000-03-10 22:30:29 +000012096else
Martin v. Löwis11437992002-04-12 09:54:03 +000012097 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000012098
12099fi
12100
Michael W. Hudson54241132001-12-07 15:38:26 +000012101
Martin v. Löwis11437992002-04-12 09:54:03 +000012102
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012103# determine wchar_t size
12104if test "$wchar_h" = yes
12105then
Matthias Kloseb9621712010-04-24 17:59:49 +000012106 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012107# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12108# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12109# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000012110{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
12111$as_echo_n "checking size of wchar_t... " >&6; }
12112if test "${ac_cv_sizeof_wchar_t+set}" = set; then :
12113 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012114else
Matthias Kloseb9621712010-04-24 17:59:49 +000012115 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
12116"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012117
Martin v. Löwis11437992002-04-12 09:54:03 +000012118else
Matthias Kloseb9621712010-04-24 17:59:49 +000012119 if test "$ac_cv_type_wchar_t" = yes; then
12120 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12121$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012122as_fn_error 77 "cannot compute sizeof (wchar_t)
12123See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012124 else
12125 ac_cv_sizeof_wchar_t=0
12126 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012127fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012128
Martin v. Löwis11437992002-04-12 09:54:03 +000012129fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012130{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
12131$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012132
12133
12134
Martin v. Löwis11437992002-04-12 09:54:03 +000012135cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012136#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012137_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012138
Michael W. Hudson54241132001-12-07 15:38:26 +000012139
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012140fi
12141
Matthias Kloseb9621712010-04-24 17:59:49 +000012142{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
12143$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012144have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012145cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012146/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012147
12148#include <tcl.h>
12149#if TCL_UTF_MAX != 6
12150# error "NOT UCS4_TCL"
12151#endif
12152int
12153main ()
12154{
12155
12156 ;
12157 return 0;
12158}
12159_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012160if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012161
12162
Matthias Kloseb9621712010-04-24 17:59:49 +000012163$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012164
12165 have_ucs4_tcl=yes
12166
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012167fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012168rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012169{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
12170$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012171
Skip Montanaro6dead952003-09-25 14:50:04 +000012172# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012173if test "$wchar_h" = yes
12174then
12175 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000012176 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
12177$as_echo_n "checking whether wchar_t is signed... " >&6; }
12178 if test "${ac_cv_wchar_t_signed+set}" = set; then :
12179 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012180else
12181
Matthias Kloseb9621712010-04-24 17:59:49 +000012182 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012183 ac_cv_wchar_t_signed=yes
12184else
Matthias Kloseb9621712010-04-24 17:59:49 +000012185 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012186/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012187
12188 #include <wchar.h>
12189 int main()
12190 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000012191 /* Success: exit code 0 */
12192 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012193 }
12194
12195_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012196if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012197 ac_cv_wchar_t_signed=yes
12198else
Matthias Kloseb9621712010-04-24 17:59:49 +000012199 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012200fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012201rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12202 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012203fi
12204
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012205fi
12206
Matthias Kloseb9621712010-04-24 17:59:49 +000012207 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
12208$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012209fi
12210
Matthias Kloseb9621712010-04-24 17:59:49 +000012211{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what type to use for str" >&5
12212$as_echo_n "checking what type to use for str... " >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000012213
12214# Check whether --with-wide-unicode was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012215if test "${with_wide_unicode+set}" = set; then :
Georg Brandl52d168a2008-01-07 18:10:24 +000012216 withval=$with_wide_unicode;
12217if test "$withval" != no
12218then unicode_size="4"
12219else unicode_size="2"
12220fi
12221
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012222else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012223
Georg Brandl52d168a2008-01-07 18:10:24 +000012224case "$have_ucs4_tcl" in
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012225 yes) unicode_size="4";;
Georg Brandl52d168a2008-01-07 18:10:24 +000012226 *) unicode_size="2" ;;
12227esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012228
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012229fi
12230
Martin v. Löwis0036cba2002-04-12 09:58:45 +000012231
12232
Georg Brandl52d168a2008-01-07 18:10:24 +000012233case "$unicode_size" in
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012234 4)
12235 $as_echo "#define Py_UNICODE_SIZE 4" >>confdefs.h
12236
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012237 ABIFLAGS="${ABIFLAGS}u"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012238 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000012239 *) $as_echo "#define Py_UNICODE_SIZE 2" >>confdefs.h
Georg Brandl52d168a2008-01-07 18:10:24 +000012240 ;;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012241esac
12242
Michael W. Hudson54241132001-12-07 15:38:26 +000012243
Martin v. Löwis11437992002-04-12 09:54:03 +000012244
Georg Brandl52d168a2008-01-07 18:10:24 +000012245# wchar_t is only usable if it maps to an unsigned type
12246if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000012247 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000012248then
12249 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012250
Matthias Kloseb9621712010-04-24 17:59:49 +000012251$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012252
Matthias Kloseb9621712010-04-24 17:59:49 +000012253 $as_echo "#define PY_UNICODE_TYPE wchar_t" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012254
Georg Brandl52d168a2008-01-07 18:10:24 +000012255elif test "$ac_cv_sizeof_short" = "$unicode_size"
12256then
12257 PY_UNICODE_TYPE="unsigned short"
Matthias Kloseb9621712010-04-24 17:59:49 +000012258 $as_echo "#define PY_UNICODE_TYPE unsigned short" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012259
Georg Brandl52d168a2008-01-07 18:10:24 +000012260elif test "$ac_cv_sizeof_long" = "$unicode_size"
12261then
12262 PY_UNICODE_TYPE="unsigned long"
Matthias Kloseb9621712010-04-24 17:59:49 +000012263 $as_echo "#define PY_UNICODE_TYPE unsigned long" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012264
Georg Brandl52d168a2008-01-07 18:10:24 +000012265else
12266 PY_UNICODE_TYPE="no type found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012267fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012268{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PY_UNICODE_TYPE" >&5
12269$as_echo "$PY_UNICODE_TYPE" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000012270
12271# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000012272 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12273$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
12274if test "${ac_cv_c_bigendian+set}" = set; then :
12275 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000012276else
Matthias Kloseb9621712010-04-24 17:59:49 +000012277 ac_cv_c_bigendian=unknown
12278 # See if we're dealing with a universal compiler.
12279 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12280/* end confdefs.h. */
12281#ifndef __APPLE_CC__
12282 not a universal capable compiler
12283 #endif
12284 typedef int dummy;
12285
Skip Montanaro6dead952003-09-25 14:50:04 +000012286_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012287if ac_fn_c_try_compile "$LINENO"; then :
12288
12289 # Check for potential -arch flags. It is not universal unless
12290 # there are at least two -arch flags with different values.
12291 ac_arch=
12292 ac_prev=
12293 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12294 if test -n "$ac_prev"; then
12295 case $ac_word in
12296 i?86 | x86_64 | ppc | ppc64)
12297 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12298 ac_arch=$ac_word
12299 else
12300 ac_cv_c_bigendian=universal
12301 break
12302 fi
12303 ;;
12304 esac
12305 ac_prev=
12306 elif test "x$ac_word" = "x-arch"; then
12307 ac_prev=arch
12308 fi
12309 done
12310fi
12311rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12312 if test $ac_cv_c_bigendian = unknown; then
12313 # See if sys/param.h defines the BYTE_ORDER macro.
12314 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012315/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012316#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012317 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012318
Martin v. Löwis11437992002-04-12 09:54:03 +000012319int
12320main ()
12321{
Matthias Kloseb9621712010-04-24 17:59:49 +000012322#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12323 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12324 && LITTLE_ENDIAN)
12325 bogus endian macros
12326 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012327
12328 ;
12329 return 0;
12330}
12331_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012332if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012333 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000012334 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012335/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012336#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012337 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012338
Martin v. Löwis11437992002-04-12 09:54:03 +000012339int
12340main ()
12341{
Guido van Rossumef2255b2000-03-10 22:30:29 +000012342#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000012343 not big endian
12344 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012345
12346 ;
12347 return 0;
12348}
12349_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012350if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012351 ac_cv_c_bigendian=yes
12352else
Matthias Kloseb9621712010-04-24 17:59:49 +000012353 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000012354fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012355rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012356fi
12357rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12358 fi
12359 if test $ac_cv_c_bigendian = unknown; then
12360 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12361 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012362/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000012363#include <limits.h>
12364
Martin v. Löwis11437992002-04-12 09:54:03 +000012365int
12366main ()
12367{
Matthias Kloseb9621712010-04-24 17:59:49 +000012368#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12369 bogus endian macros
12370 #endif
12371
Martin v. Löwis11437992002-04-12 09:54:03 +000012372 ;
12373 return 0;
12374}
12375_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012376if ac_fn_c_try_compile "$LINENO"; then :
12377 # It does; now see whether it defined to _BIG_ENDIAN or not.
12378 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12379/* end confdefs.h. */
12380#include <limits.h>
12381
12382int
12383main ()
12384{
12385#ifndef _BIG_ENDIAN
12386 not big endian
12387 #endif
12388
12389 ;
12390 return 0;
12391}
12392_ACEOF
12393if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012394 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012395else
Matthias Kloseb9621712010-04-24 17:59:49 +000012396 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012397fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012398rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12399fi
12400rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12401 fi
12402 if test $ac_cv_c_bigendian = unknown; then
12403 # Compile a test program.
12404 if test "$cross_compiling" = yes; then :
12405 # Try to guess by grepping values from an object file.
12406 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12407/* end confdefs.h. */
12408short int ascii_mm[] =
12409 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12410 short int ascii_ii[] =
12411 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12412 int use_ascii (int i) {
12413 return ascii_mm[i] + ascii_ii[i];
12414 }
12415 short int ebcdic_ii[] =
12416 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12417 short int ebcdic_mm[] =
12418 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12419 int use_ebcdic (int i) {
12420 return ebcdic_mm[i] + ebcdic_ii[i];
12421 }
12422 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012423
Matthias Kloseb9621712010-04-24 17:59:49 +000012424int
12425main ()
12426{
12427return use_ascii (foo) == use_ebcdic (foo);
12428 ;
12429 return 0;
12430}
12431_ACEOF
12432if ac_fn_c_try_compile "$LINENO"; then :
12433 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12434 ac_cv_c_bigendian=yes
12435 fi
12436 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12437 if test "$ac_cv_c_bigendian" = unknown; then
12438 ac_cv_c_bigendian=no
12439 else
12440 # finding both strings is unlikely to happen, but who knows?
12441 ac_cv_c_bigendian=unknown
12442 fi
12443 fi
12444fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012445rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012446else
Matthias Kloseb9621712010-04-24 17:59:49 +000012447 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012448/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012449$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012450int
12451main ()
12452{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012453
Matthias Kloseb9621712010-04-24 17:59:49 +000012454 /* Are we little or big endian? From Harbison&Steele. */
12455 union
12456 {
12457 long int l;
12458 char c[sizeof (long int)];
12459 } u;
12460 u.l = 1;
12461 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012462
12463 ;
12464 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000012465}
Martin v. Löwis11437992002-04-12 09:54:03 +000012466_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012467if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012468 ac_cv_c_bigendian=no
12469else
Matthias Kloseb9621712010-04-24 17:59:49 +000012470 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000012471fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012472rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12473 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000012474fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012475
Matthias Kloseb9621712010-04-24 17:59:49 +000012476 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012477fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012478{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12479$as_echo "$ac_cv_c_bigendian" >&6; }
12480 case $ac_cv_c_bigendian in #(
12481 yes)
12482 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12483;; #(
12484 no)
12485 ;; #(
12486 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012487
Matthias Kloseb9621712010-04-24 17:59:49 +000012488$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012489
Matthias Kloseb9621712010-04-24 17:59:49 +000012490 ;; #(
12491 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012492 as_fn_error $? "unknown endianness
12493 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000012494 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000012495
Michael W. Hudson54241132001-12-07 15:38:26 +000012496
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012497# ABI version string for Python extension modules. This appears between the
12498# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
12499# from the following attributes which affect the ABI of this Python build (in
12500# this order):
12501#
12502# * The Python implementation (always 'cpython-' for us)
12503# * The major and minor version numbers
12504# * --with-pydebug (adds a 'd')
12505# * --with-pymalloc (adds a 'm')
12506# * --with-wide-unicode (adds a 'u')
12507#
12508# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012509# would get a shared library ABI version tag of 'cpython-32dmu' and shared
12510# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012511
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012512{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
12513$as_echo_n "checking ABIFLAGS... " >&6; }
12514{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
12515$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
12517$as_echo_n "checking SOABI... " >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012518SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012519{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
12520$as_echo "$SOABI" >&6; }
12521
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012522{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
12523$as_echo_n "checking LDVERSION... " >&6; }
12524LDVERSION='$(VERSION)$(ABIFLAGS)'
12525{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
12526$as_echo "$LDVERSION" >&6; }
12527
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012528# SO is the extension of shared libraries `(including the dot!)
12529# -- usually .so, .sl on HP-UX, .dll on Cygwin
12530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SO" >&5
12531$as_echo_n "checking SO... " >&6; }
12532if test -z "$SO"
12533then
12534 case $ac_sys_system in
12535 hp*|HP*)
12536 case `uname -m` in
12537 ia64) SO=.so;;
12538 *) SO=.sl;;
12539 esac
12540 ;;
12541 CYGWIN*) SO=.dll;;
Barry Warsaw278266f2010-10-14 17:38:46 +000012542 Linux*|GNU*)
12543 SO=.${SOABI}.so;;
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012544 *) SO=.so;;
12545 esac
12546else
12547 # this might also be a termcap variable, see #610332
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012548 echo
12549 echo '====================================================================='
12550 echo '+ +'
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012551 echo '+ WARNING: You have set SO in your environment. +'
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012552 echo '+ Do you really mean to change the extension for shared libraries? +'
12553 echo '+ Continuing in 10 seconds to let you to ponder. +'
12554 echo '+ +'
12555 echo '====================================================================='
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012556 sleep 10
12557fi
12558{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SO" >&5
12559$as_echo "$SO" >&6; }
12560
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012561# Check whether right shifting a negative integer extends the sign bit
12562# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000012563{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
12564$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
12565if test "${ac_cv_rshift_extends_sign+set}" = set; then :
12566 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000012567else
Martin v. Löwis11437992002-04-12 09:54:03 +000012568
Matthias Kloseb9621712010-04-24 17:59:49 +000012569if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000012570 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012571else
Matthias Kloseb9621712010-04-24 17:59:49 +000012572 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012573/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012574
12575int main()
12576{
Vladimir Marangozova6180282000-07-12 05:05:06 +000012577 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012578}
12579
Martin v. Löwis11437992002-04-12 09:54:03 +000012580_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012581if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000012582 ac_cv_rshift_extends_sign=yes
12583else
Matthias Kloseb9621712010-04-24 17:59:49 +000012584 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000012585fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012586rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12587 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000012588fi
12589
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012590fi
12591
Matthias Kloseb9621712010-04-24 17:59:49 +000012592{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
12593$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000012594if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012595then
Martin v. Löwis11437992002-04-12 09:54:03 +000012596
Matthias Kloseb9621712010-04-24 17:59:49 +000012597$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012598
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012599fi
12600
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012601# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000012602{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
12603$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
12604if test "${ac_cv_have_getc_unlocked+set}" = set; then :
12605 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012606else
Martin v. Löwis11437992002-04-12 09:54:03 +000012607
Matthias Kloseb9621712010-04-24 17:59:49 +000012608cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012609/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012610#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012611int
12612main ()
12613{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012614
12615 FILE *f = fopen("/dev/null", "r");
12616 flockfile(f);
12617 getc_unlocked(f);
12618 funlockfile(f);
12619
Martin v. Löwis11437992002-04-12 09:54:03 +000012620 ;
12621 return 0;
12622}
12623_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012624if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012625 ac_cv_have_getc_unlocked=yes
12626else
Matthias Kloseb9621712010-04-24 17:59:49 +000012627 ac_cv_have_getc_unlocked=no
12628fi
12629rm -f core conftest.err conftest.$ac_objext \
12630 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012631fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012632
Matthias Kloseb9621712010-04-24 17:59:49 +000012633{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
12634$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012635if test "$ac_cv_have_getc_unlocked" = yes
12636then
Martin v. Löwis11437992002-04-12 09:54:03 +000012637
Matthias Kloseb9621712010-04-24 17:59:49 +000012638$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012639
12640fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012641
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012642# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000012643# save the value of LIBS so we don't actually link Python with readline
12644LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012645
Gregory P. Smith18820942008-09-07 06:24:49 +000012646# On some systems we need to link readline to a termcap compatible
12647# library. NOTE: Keep the precedence of listed libraries synchronised
12648# with setup.py.
12649py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012650{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
12651$as_echo_n "checking how to link readline libs... " >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012652for py_libtermcap in "" ncursesw ncurses curses termcap; do
12653 if test -z "$py_libtermcap"; then
12654 READLINE_LIBS="-lreadline"
12655 else
12656 READLINE_LIBS="-lreadline -l$py_libtermcap"
12657 fi
12658 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000012659 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012660/* end confdefs.h. */
12661
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012662/* Override any GCC internal prototype to avoid an error.
12663 Use char because int might match the return type of a GCC
12664 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012665#ifdef __cplusplus
12666extern "C"
12667#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012668char readline ();
12669int
12670main ()
12671{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012672return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012673 ;
12674 return 0;
12675}
12676_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012677if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000012678 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012679fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012680rm -f core conftest.err conftest.$ac_objext \
12681 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000012682 if test $py_cv_lib_readline = yes; then
12683 break
12684 fi
12685done
12686# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
12687#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000012688if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012689 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
12690$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012691else
Matthias Kloseb9621712010-04-24 17:59:49 +000012692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
12693$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012694
Matthias Kloseb9621712010-04-24 17:59:49 +000012695$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012696
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012697fi
12698
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012699# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000012700{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
12701$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
12702if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then :
12703 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012704else
12705 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012706LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012707cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012708/* end confdefs.h. */
12709
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012710/* Override any GCC internal prototype to avoid an error.
12711 Use char because int might match the return type of a GCC
12712 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012713#ifdef __cplusplus
12714extern "C"
12715#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012716char rl_callback_handler_install ();
12717int
12718main ()
12719{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012720return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012721 ;
12722 return 0;
12723}
12724_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012725if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012726 ac_cv_lib_readline_rl_callback_handler_install=yes
12727else
Matthias Kloseb9621712010-04-24 17:59:49 +000012728 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012729fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012730rm -f core conftest.err conftest.$ac_objext \
12731 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012732LIBS=$ac_check_lib_save_LIBS
12733fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012734{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
12735$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
12736if test "x$ac_cv_lib_readline_rl_callback_handler_install" = x""yes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012737
Matthias Kloseb9621712010-04-24 17:59:49 +000012738$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012739
12740fi
12741
12742
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012743# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000012744cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012745/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012746#include <readline/readline.h>
12747_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012748if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012749 have_readline=yes
12750else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012751 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000012752
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012753fi
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012754rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012755if test $have_readline = yes
12756then
Matthias Kloseb9621712010-04-24 17:59:49 +000012757 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012758/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012759#include <readline/readline.h>
12760
12761_ACEOF
12762if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012763 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012764
Matthias Kloseb9621712010-04-24 17:59:49 +000012765$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012766
12767fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012768rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012769
Matthias Kloseb9621712010-04-24 17:59:49 +000012770 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000012771/* end confdefs.h. */
12772#include <readline/readline.h>
12773
12774_ACEOF
12775if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012776 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000012777
Matthias Kloseb9621712010-04-24 17:59:49 +000012778$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000012779
12780fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012781rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000012782
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012783fi
12784
Martin v. Löwis0daad592001-09-30 21:09:59 +000012785# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000012786{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
12787$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
12788if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then :
12789 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000012790else
Martin v. Löwis11437992002-04-12 09:54:03 +000012791 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012792LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012793cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012794/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012795
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012796/* Override any GCC internal prototype to avoid an error.
12797 Use char because int might match the return type of a GCC
12798 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012799#ifdef __cplusplus
12800extern "C"
12801#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012802char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012803int
12804main ()
12805{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012806return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012807 ;
12808 return 0;
12809}
12810_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012811if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012812 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000012813else
Matthias Kloseb9621712010-04-24 17:59:49 +000012814 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000012815fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012816rm -f core conftest.err conftest.$ac_objext \
12817 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012818LIBS=$ac_check_lib_save_LIBS
12819fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012820{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
12821$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
12822if test "x$ac_cv_lib_readline_rl_pre_input_hook" = x""yes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012823
Matthias Kloseb9621712010-04-24 17:59:49 +000012824$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000012825
Martin v. Löwis0daad592001-09-30 21:09:59 +000012826fi
12827
Michael W. Hudson54241132001-12-07 15:38:26 +000012828
Thomas Wouters89d996e2007-09-08 17:39:28 +000012829# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000012830{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
12831$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
12832if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then :
12833 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000012834else
12835 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012836LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012837cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000012838/* end confdefs.h. */
12839
12840/* Override any GCC internal prototype to avoid an error.
12841 Use char because int might match the return type of a GCC
12842 builtin and then its argument prototype would still apply. */
12843#ifdef __cplusplus
12844extern "C"
12845#endif
12846char rl_completion_display_matches_hook ();
12847int
12848main ()
12849{
12850return rl_completion_display_matches_hook ();
12851 ;
12852 return 0;
12853}
12854_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012855if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000012856 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
12857else
Matthias Kloseb9621712010-04-24 17:59:49 +000012858 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000012859fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012860rm -f core conftest.err conftest.$ac_objext \
12861 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000012862LIBS=$ac_check_lib_save_LIBS
12863fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012864{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
12865$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
12866if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = x""yes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000012867
Matthias Kloseb9621712010-04-24 17:59:49 +000012868$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000012869
12870fi
12871
12872
Martin v. Löwis0daad592001-09-30 21:09:59 +000012873# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000012874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
12875$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
12876if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then :
12877 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000012878else
Martin v. Löwis11437992002-04-12 09:54:03 +000012879 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012880LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012881cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012882/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012883
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012884/* Override any GCC internal prototype to avoid an error.
12885 Use char because int might match the return type of a GCC
12886 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012887#ifdef __cplusplus
12888extern "C"
12889#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012890char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012891int
12892main ()
12893{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012894return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012895 ;
12896 return 0;
12897}
12898_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012899if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012900 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000012901else
Matthias Kloseb9621712010-04-24 17:59:49 +000012902 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000012903fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012904rm -f core conftest.err conftest.$ac_objext \
12905 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012906LIBS=$ac_check_lib_save_LIBS
12907fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012908{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
12909$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
12910if test "x$ac_cv_lib_readline_rl_completion_matches" = x""yes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012911
Matthias Kloseb9621712010-04-24 17:59:49 +000012912$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000012913
Guido van Rossum353ae582001-07-10 16:45:32 +000012914fi
12915
Jack Jansendd19cf82001-12-06 22:36:17 +000012916
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012917# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000012918cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012919/* end confdefs.h. */
12920#include <readline/readline.h>
12921_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012922if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012923 have_readline=yes
12924else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012925 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000012926
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012927fi
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012928rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012929if test $have_readline = yes
12930then
Matthias Kloseb9621712010-04-24 17:59:49 +000012931 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012932/* end confdefs.h. */
12933#include <readline/readline.h>
12934
12935_ACEOF
12936if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012937 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012938
Matthias Kloseb9621712010-04-24 17:59:49 +000012939$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012940
12941fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012942rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012943
12944fi
12945
Martin v. Löwis82bca632006-02-10 20:49:30 +000012946# End of readline checks: restore LIBS
12947LIBS=$LIBS_no_readline
12948
Matthias Kloseb9621712010-04-24 17:59:49 +000012949{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
12950$as_echo_n "checking for broken nice()... " >&6; }
12951if test "${ac_cv_broken_nice+set}" = set; then :
12952 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000012953else
Martin v. Löwis11437992002-04-12 09:54:03 +000012954
Matthias Kloseb9621712010-04-24 17:59:49 +000012955if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000012956 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012957else
Matthias Kloseb9621712010-04-24 17:59:49 +000012958 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012959/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012960
12961int main()
12962{
12963 int val1 = nice(1);
12964 if (val1 != -1 && val1 == nice(2))
12965 exit(0);
12966 exit(1);
12967}
12968
Martin v. Löwis11437992002-04-12 09:54:03 +000012969_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012970if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012971 ac_cv_broken_nice=yes
12972else
Matthias Kloseb9621712010-04-24 17:59:49 +000012973 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012974fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012975rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12976 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012977fi
12978
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012979fi
12980
Matthias Kloseb9621712010-04-24 17:59:49 +000012981{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
12982$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012983if test "$ac_cv_broken_nice" = yes
12984then
Martin v. Löwis11437992002-04-12 09:54:03 +000012985
Matthias Kloseb9621712010-04-24 17:59:49 +000012986$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012987
12988fi
12989
Matthias Kloseb9621712010-04-24 17:59:49 +000012990{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
12991$as_echo_n "checking for broken poll()... " >&6; }
12992if test "${ac_cv_broken_poll+set}" = set; then :
12993 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012994else
Matthias Kloseb9621712010-04-24 17:59:49 +000012995 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012996 ac_cv_broken_poll=no
12997else
Matthias Kloseb9621712010-04-24 17:59:49 +000012998 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012999/* end confdefs.h. */
13000
13001#include <poll.h>
13002
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013003int main()
13004{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013005 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013006 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013007
13008 close (42);
13009
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013010 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013011 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013012 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013013 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013014 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013015 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013016 return 1;
13017}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013018
13019_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013020if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013021 ac_cv_broken_poll=yes
13022else
Matthias Kloseb9621712010-04-24 17:59:49 +000013023 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013024fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013025rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13026 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013027fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013028
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013029fi
13030
Matthias Kloseb9621712010-04-24 17:59:49 +000013031{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
13032$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013033if test "$ac_cv_broken_poll" = yes
13034then
13035
Matthias Kloseb9621712010-04-24 17:59:49 +000013036$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013037
13038fi
13039
Brett Cannon43802422005-02-10 20:48:03 +000013040# 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 +000013041# (which is not required by ISO C or UNIX spec) and/or if we support
13042# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000013043ac_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 +000013044#include <$ac_cv_struct_tm>
13045
Matthias Kloseb9621712010-04-24 17:59:49 +000013046"
13047if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then :
Brett Cannon43802422005-02-10 20:48:03 +000013048
13049cat >>confdefs.h <<_ACEOF
13050#define HAVE_STRUCT_TM_TM_ZONE 1
13051_ACEOF
13052
13053
13054fi
13055
13056if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13057
Matthias Kloseb9621712010-04-24 17:59:49 +000013058$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013059
13060else
Matthias Kloseb9621712010-04-24 17:59:49 +000013061 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13062"
13063if test "x$ac_cv_have_decl_tzname" = x""yes; then :
13064 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013065else
Matthias Kloseb9621712010-04-24 17:59:49 +000013066 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013067fi
13068
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013069cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013070#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013071_ACEOF
13072
Matthias Kloseb9621712010-04-24 17:59:49 +000013073 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13074$as_echo_n "checking for tzname... " >&6; }
13075if test "${ac_cv_var_tzname+set}" = set; then :
13076 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013077else
Matthias Kloseb9621712010-04-24 17:59:49 +000013078 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013079/* end confdefs.h. */
13080#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013081#if !HAVE_DECL_TZNAME
13082extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000013083#endif
13084
13085int
13086main ()
13087{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013088return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000013089 ;
13090 return 0;
13091}
13092_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013093if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000013094 ac_cv_var_tzname=yes
13095else
Matthias Kloseb9621712010-04-24 17:59:49 +000013096 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000013097fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013098rm -f core conftest.err conftest.$ac_objext \
13099 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013100fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013101{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13102$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000013103 if test $ac_cv_var_tzname = yes; then
13104
Matthias Kloseb9621712010-04-24 17:59:49 +000013105$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013106
13107 fi
13108fi
13109
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013110
Martin v. Löwis1d459062005-03-14 21:23:33 +000013111# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000013112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
13113$as_echo_n "checking for working tzset()... " >&6; }
13114if test "${ac_cv_working_tzset+set}" = set; then :
13115 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013116else
13117
Matthias Kloseb9621712010-04-24 17:59:49 +000013118if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013119 ac_cv_working_tzset=no
13120else
Matthias Kloseb9621712010-04-24 17:59:49 +000013121 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013122/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013123
13124#include <stdlib.h>
13125#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000013126#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000013127
13128#if HAVE_TZNAME
13129extern char *tzname[];
13130#endif
13131
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013132int main()
13133{
Brett Cannon18367812003-09-19 00:59:16 +000013134 /* Note that we need to ensure that not only does tzset(3)
13135 do 'something' with localtime, but it works as documented
13136 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000013137 This includes making sure that tzname is set properly if
13138 tm->tm_zone does not exist since it is the alternative way
13139 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000013140
13141 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000013142 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000013143 */
13144
Martin v. Löwis1d459062005-03-14 21:23:33 +000013145 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000013146 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
13147
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013148 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013149 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013150 if (localtime(&groundhogday)->tm_hour != 0)
13151 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013152#if HAVE_TZNAME
13153 /* For UTC, tzname[1] is sometimes "", sometimes " " */
13154 if (strcmp(tzname[0], "UTC") ||
13155 (tzname[1][0] != 0 && tzname[1][0] != ' '))
13156 exit(1);
13157#endif
Brett Cannon18367812003-09-19 00:59:16 +000013158
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013159 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013160 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013161 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013162 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013163#if HAVE_TZNAME
13164 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
13165 exit(1);
13166#endif
Brett Cannon18367812003-09-19 00:59:16 +000013167
13168 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
13169 tzset();
13170 if (localtime(&groundhogday)->tm_hour != 11)
13171 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013172#if HAVE_TZNAME
13173 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
13174 exit(1);
13175#endif
13176
13177#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000013178 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
13179 exit(1);
13180 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
13181 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013182#endif
Brett Cannon18367812003-09-19 00:59:16 +000013183
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013184 exit(0);
13185}
13186
13187_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013188if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013189 ac_cv_working_tzset=yes
13190else
Matthias Kloseb9621712010-04-24 17:59:49 +000013191 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013192fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013193rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13194 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013195fi
13196
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013197fi
13198
Matthias Kloseb9621712010-04-24 17:59:49 +000013199{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
13200$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013201if test "$ac_cv_working_tzset" = yes
13202then
13203
Matthias Kloseb9621712010-04-24 17:59:49 +000013204$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013205
13206fi
13207
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013208# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013209{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
13210$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
13211if test "${ac_cv_stat_tv_nsec+set}" = set; then :
13212 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013213else
Matthias Kloseb9621712010-04-24 17:59:49 +000013214 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013215/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013216#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013217int
13218main ()
13219{
13220
13221struct stat st;
13222st.st_mtim.tv_nsec = 1;
13223
13224 ;
13225 return 0;
13226}
13227_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013228if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000013229 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013230else
Matthias Kloseb9621712010-04-24 17:59:49 +000013231 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013232fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013233rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13234fi
13235
Matthias Kloseb9621712010-04-24 17:59:49 +000013236{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
13237$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013238if test "$ac_cv_stat_tv_nsec" = yes
13239then
13240
Matthias Kloseb9621712010-04-24 17:59:49 +000013241$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013242
13243fi
13244
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013245# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013246{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
13247$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
13248if test "${ac_cv_stat_tv_nsec2+set}" = set; then :
13249 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013250else
Matthias Kloseb9621712010-04-24 17:59:49 +000013251 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013252/* end confdefs.h. */
13253#include <sys/stat.h>
13254int
13255main ()
13256{
13257
13258struct stat st;
13259st.st_mtimespec.tv_nsec = 1;
13260
13261 ;
13262 return 0;
13263}
13264_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013265if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013266 ac_cv_stat_tv_nsec2=yes
13267else
Matthias Kloseb9621712010-04-24 17:59:49 +000013268 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013269fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013270rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13271fi
13272
Matthias Kloseb9621712010-04-24 17:59:49 +000013273{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
13274$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013275if test "$ac_cv_stat_tv_nsec2" = yes
13276then
13277
Matthias Kloseb9621712010-04-24 17:59:49 +000013278$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013279
13280fi
13281
Jack Jansen666b1e72001-10-31 12:11:48 +000013282# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000013283{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
13284$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
13285if test "${ac_cv_mvwdelch_is_expression+set}" = set; then :
13286 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013287else
Matthias Kloseb9621712010-04-24 17:59:49 +000013288 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013289/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013290#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013291int
13292main ()
13293{
Jack Jansen666b1e72001-10-31 12:11:48 +000013294
13295 int rtn;
13296 rtn = mvwdelch(0,0,0);
13297
Martin v. Löwis11437992002-04-12 09:54:03 +000013298 ;
13299 return 0;
13300}
13301_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013302if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013303 ac_cv_mvwdelch_is_expression=yes
13304else
Matthias Kloseb9621712010-04-24 17:59:49 +000013305 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013306fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013307rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13308fi
13309
Matthias Kloseb9621712010-04-24 17:59:49 +000013310{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
13311$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000013312
13313if test "$ac_cv_mvwdelch_is_expression" = yes
13314then
Martin v. Löwis11437992002-04-12 09:54:03 +000013315
Matthias Kloseb9621712010-04-24 17:59:49 +000013316$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013317
13318fi
13319
Matthias Kloseb9621712010-04-24 17:59:49 +000013320{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
13321$as_echo_n "checking whether WINDOW has _flags... " >&6; }
13322if test "${ac_cv_window_has_flags+set}" = set; then :
13323 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013324else
Matthias Kloseb9621712010-04-24 17:59:49 +000013325 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013326/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013327#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013328int
13329main ()
13330{
Jack Jansen666b1e72001-10-31 12:11:48 +000013331
13332 WINDOW *w;
13333 w->_flags = 0;
13334
Martin v. Löwis11437992002-04-12 09:54:03 +000013335 ;
13336 return 0;
13337}
13338_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013339if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013340 ac_cv_window_has_flags=yes
13341else
Matthias Kloseb9621712010-04-24 17:59:49 +000013342 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013343fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013344rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13345fi
13346
Matthias Kloseb9621712010-04-24 17:59:49 +000013347{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
13348$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013349
Jack Jansen666b1e72001-10-31 12:11:48 +000013350
13351if test "$ac_cv_window_has_flags" = yes
13352then
Martin v. Löwis11437992002-04-12 09:54:03 +000013353
Matthias Kloseb9621712010-04-24 17:59:49 +000013354$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013355
13356fi
13357
Matthias Kloseb9621712010-04-24 17:59:49 +000013358{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
13359$as_echo_n "checking for is_term_resized... " >&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=is_term_resized
13367 ;
13368 return 0;
13369}
13370_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013371if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013372
Matthias Kloseb9621712010-04-24 17:59:49 +000013373$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 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 resize_term" >&5
13385$as_echo_n "checking for resize_term... " >&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=resize_term
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_RESIZE_TERM 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 resizeterm" >&5
13411$as_echo_n "checking for resizeterm... " >&6; }
13412cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013413/* end confdefs.h. */
13414#include <curses.h>
13415int
13416main ()
13417{
13418void *x=resizeterm
13419 ;
13420 return 0;
13421}
13422_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013423if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013424
Matthias Kloseb9621712010-04-24 17:59:49 +000013425$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013426
Matthias Kloseb159a552010-04-25 21:00:44 +000013427 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013428$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013429else
Matthias Kloseb9621712010-04-24 17:59:49 +000013430 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13431$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013432
13433fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013434rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13435
Matthias Kloseb9621712010-04-24 17:59:49 +000013436{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
13437$as_echo_n "checking for /dev/ptmx... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013438
13439if test -r /dev/ptmx
13440then
Matthias Kloseb9621712010-04-24 17:59:49 +000013441 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13442$as_echo "yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013443
Matthias Kloseb9621712010-04-24 17:59:49 +000013444$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013445
Thomas Wouters89f507f2006-12-13 04:49:30 +000013446else
Matthias Kloseb9621712010-04-24 17:59:49 +000013447 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13448$as_echo "no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013449fi
13450
Matthias Kloseb9621712010-04-24 17:59:49 +000013451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
13452$as_echo_n "checking for /dev/ptc... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013453
13454if test -r /dev/ptc
13455then
Matthias Kloseb9621712010-04-24 17:59:49 +000013456 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13457$as_echo "yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013458
Matthias Kloseb9621712010-04-24 17:59:49 +000013459$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000013460
Thomas Wouters89f507f2006-12-13 04:49:30 +000013461else
Matthias Kloseb9621712010-04-24 17:59:49 +000013462 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13463$as_echo "no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013464fi
13465
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013466if test "$have_long_long" = yes
13467then
Matthias Kloseb9621712010-04-24 17:59:49 +000013468 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
13469$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
13470 if test "${ac_cv_have_long_long_format+set}" = set; then :
13471 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013472else
Matthias Kloseb9621712010-04-24 17:59:49 +000013473 if test "$cross_compiling" = yes; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013474 ac_cv_have_long_long_format=no
13475else
Matthias Kloseb9621712010-04-24 17:59:49 +000013476 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013477/* end confdefs.h. */
13478
13479 #include <stdio.h>
13480 #include <stddef.h>
13481 #include <string.h>
13482
13483 #ifdef HAVE_SYS_TYPES_H
13484 #include <sys/types.h>
13485 #endif
13486
13487 int main()
13488 {
13489 char buffer[256];
13490
13491 if (sprintf(buffer, "%lld", (long long)123) < 0)
13492 return 1;
13493 if (strcmp(buffer, "123"))
13494 return 1;
13495
13496 if (sprintf(buffer, "%lld", (long long)-123) < 0)
13497 return 1;
13498 if (strcmp(buffer, "-123"))
13499 return 1;
13500
13501 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
13502 return 1;
13503 if (strcmp(buffer, "123"))
13504 return 1;
13505
13506 return 0;
13507 }
13508
13509_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013510if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013511 ac_cv_have_long_long_format=yes
13512else
Matthias Kloseb9621712010-04-24 17:59:49 +000013513 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013514fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013515rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13516 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013517fi
13518
13519
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013520fi
13521
Matthias Kloseb9621712010-04-24 17:59:49 +000013522 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
13523$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013524fi
13525
Mark Dickinson89d7d412009-12-31 20:50:59 +000013526if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013527then
13528
Matthias Kloseb9621712010-04-24 17:59:49 +000013529$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013530
13531fi
13532
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000013533if test $ac_sys_system = Darwin
13534then
13535 LIBS="$LIBS -framework CoreFoundation"
13536fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013537
Matthias Kloseb9621712010-04-24 17:59:49 +000013538{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
13539$as_echo_n "checking for %zd printf() format support... " >&6; }
13540if test "${ac_cv_have_size_t_format+set}" = set; then :
13541 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013542else
Matthias Kloseb9621712010-04-24 17:59:49 +000013543 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000013544 ac_cv_have_size_t_format="cross -- assuming yes"
13545
Thomas Wouters477c8d52006-05-27 19:21:47 +000013546else
Matthias Kloseb9621712010-04-24 17:59:49 +000013547 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000013548/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013549
Thomas Wouters477c8d52006-05-27 19:21:47 +000013550#include <stdio.h>
13551#include <stddef.h>
13552#include <string.h>
13553
Christian Heimes2c181612007-12-17 20:04:13 +000013554#ifdef HAVE_SYS_TYPES_H
13555#include <sys/types.h>
13556#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000013557
13558#ifdef HAVE_SSIZE_T
13559typedef ssize_t Py_ssize_t;
13560#elif SIZEOF_VOID_P == SIZEOF_LONG
13561typedef long Py_ssize_t;
13562#else
13563typedef int Py_ssize_t;
13564#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000013565
Christian Heimes2c181612007-12-17 20:04:13 +000013566int main()
13567{
13568 char buffer[256];
13569
Thomas Wouters477c8d52006-05-27 19:21:47 +000013570 if(sprintf(buffer, "%zd", (size_t)123) < 0)
13571 return 1;
13572
Thomas Wouters89f507f2006-12-13 04:49:30 +000013573 if (strcmp(buffer, "123"))
13574 return 1;
13575
13576 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
13577 return 1;
13578
13579 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000013580 return 1;
13581
13582 return 0;
13583}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013584
Thomas Wouters477c8d52006-05-27 19:21:47 +000013585_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013586if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013587 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013588else
Matthias Kloseb9621712010-04-24 17:59:49 +000013589 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013590fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013591rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13592 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013593fi
13594
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013595fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013596{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
13597$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000013598if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013599
Matthias Kloseb9621712010-04-24 17:59:49 +000013600$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013601
13602fi
13603
Matthias Kloseb9621712010-04-24 17:59:49 +000013604ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000013605#ifdef HAVE_SYS_TYPES_H
13606#include <sys/types.h>
13607#endif
13608#ifdef HAVE_SYS_SOCKET_H
13609#include <sys/socket.h>
13610#endif
13611
Matthias Kloseb9621712010-04-24 17:59:49 +000013612"
13613if test "x$ac_cv_type_socklen_t" = x""yes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000013614
Martin v. Löwis11437992002-04-12 09:54:03 +000013615else
Guido van Rossum95713eb2000-05-18 20:53:31 +000013616
Matthias Kloseb9621712010-04-24 17:59:49 +000013617$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000013618
13619fi
13620
Michael W. Hudson54241132001-12-07 15:38:26 +000013621
Matthias Kloseb9621712010-04-24 17:59:49 +000013622{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
13623$as_echo_n "checking for broken mbstowcs... " >&6; }
13624if test "${ac_cv_broken_mbstowcs+set}" = set; then :
13625 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013626else
Matthias Kloseb9621712010-04-24 17:59:49 +000013627 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000013628 ac_cv_broken_mbstowcs=no
13629else
Matthias Kloseb9621712010-04-24 17:59:49 +000013630 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000013631/* end confdefs.h. */
13632
13633#include<stdlib.h>
13634int main() {
13635 size_t len = -1;
13636 const char *str = "text";
13637 len = mbstowcs(NULL, str, 0);
13638 return (len != 4);
13639}
13640
13641_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013642if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000013643 ac_cv_broken_mbstowcs=no
13644else
Matthias Kloseb9621712010-04-24 17:59:49 +000013645 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000013646fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013647rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13648 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000013649fi
13650
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013651fi
13652
Matthias Kloseb9621712010-04-24 17:59:49 +000013653{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
13654$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000013655if test "$ac_cv_broken_mbstowcs" = yes
13656then
13657
Matthias Kloseb9621712010-04-24 17:59:49 +000013658$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000013659
13660fi
13661
Antoine Pitrou042b1282010-08-13 21:15:58 +000013662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
13663$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
13664if test "${ac_cv_computed_gotos+set}" = set; then :
13665 $as_echo_n "(cached) " >&6
13666else
13667 if test "$cross_compiling" = yes; then :
13668 ac_cv_computed_gotos=no
13669else
13670 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13671/* end confdefs.h. */
13672
13673int main(int argc, char **argv)
13674{
13675 static void *targets[1] = { &&LABEL1 };
13676 goto LABEL2;
13677LABEL1:
13678 return 0;
13679LABEL2:
13680 goto *targets[0];
13681 return 1;
13682}
13683
13684_ACEOF
13685if ac_fn_c_try_run "$LINENO"; then :
13686 ac_cv_computed_gotos=yes
13687else
13688 ac_cv_computed_gotos=no
13689fi
13690rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13691 conftest.$ac_objext conftest.beam conftest.$ac_ext
13692fi
13693
13694fi
13695
13696{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
13697$as_echo "$ac_cv_computed_gotos" >&6; }
13698if test "$ac_cv_computed_gotos" = yes
13699then
13700
13701$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
13702
13703fi
13704
Antoine Pitroub52ec782009-01-25 16:34:23 +000013705# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000013706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
13707$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013708
13709# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013710if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000013711 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000013712if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000013713then
13714
Matthias Kloseb9621712010-04-24 17:59:49 +000013715$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000013716
Matthias Kloseb9621712010-04-24 17:59:49 +000013717 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13718$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013719fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000013720if test "$withval" = no
13721then
13722
13723$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
13724
Matthias Kloseb9621712010-04-24 17:59:49 +000013725 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13726$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013727fi
13728
Antoine Pitrou042b1282010-08-13 21:15:58 +000013729else
13730 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
13731$as_echo "no value specified" >&6; }
13732fi
13733
Antoine Pitroub52ec782009-01-25 16:34:23 +000013734
Benjamin Petersond8d835b2010-10-15 23:14:46 +000013735case $ac_sys_system in
13736AIX*)
13737
13738$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
13739 ;;
13740esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000013741
Michael W. Hudson54241132001-12-07 15:38:26 +000013742
Jesus Cea6a792292010-05-03 21:18:48 +000013743case $ac_sys_system in
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000013744 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 +000013745esac
13746
13747
13748
Mark Dickinsonb2153e92010-05-05 22:31:36 +000013749
13750
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000013751for h in `(cd $srcdir;echo Python/thread_*.h)`
13752do
13753 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
13754done
13755
Michael W. Hudson54241132001-12-07 15:38:26 +000013756
Neal Norwitzd24499d2005-12-18 21:36:39 +000013757SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Kloseb9621712010-04-24 17:59:49 +000013758{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
13759$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013760for dir in $SRCDIRS; do
13761 if test ! -d $dir; then
13762 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000013763 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013764done
Matthias Kloseb9621712010-04-24 17:59:49 +000013765{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
13766$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000013767
Guido van Rossum627b2d71993-12-24 10:39:16 +000013768# generate output files
Antoine Pitrou20327222009-05-24 20:39:11 +000013769ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000013770
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000013771ac_config_files="$ac_config_files Modules/ld_so_aix"
13772
Martin v. Löwis11437992002-04-12 09:54:03 +000013773cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013774# This file is a shell script that caches the results of configure
13775# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000013776# scripts and configure runs, see configure's option --config-cache.
13777# It is not useful on other systems. If it contains results you don't
13778# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013779#
Martin v. Löwis11437992002-04-12 09:54:03 +000013780# config.status only pays attention to the cache file if you give it
13781# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013782#
Skip Montanaro6dead952003-09-25 14:50:04 +000013783# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000013784# loading this file, other *unset* `ac_cv_foo' will be assigned the
13785# following values.
13786
13787_ACEOF
13788
Guido van Rossumf78abae1997-01-21 22:02:36 +000013789# The following way of writing the cache mishandles newlines in values,
13790# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013791# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013792# Ultrix sh set writes to stderr and can't be redirected directly,
13793# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013794(
13795 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
13796 eval ac_val=\$$ac_var
13797 case $ac_val in #(
13798 *${as_nl}*)
13799 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000013800 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
13801$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013802 esac
13803 case $ac_var in #(
13804 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000013805 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
13806 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013807 esac ;;
13808 esac
13809 done
13810
Martin v. Löwis11437992002-04-12 09:54:03 +000013811 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013812 case $as_nl`(ac_space=' '; set) 2>&1` in #(
13813 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000013814 # `set' does not quote correctly, so add quotes: double-quote
13815 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000013816 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013817 "s/'/'\\\\''/g;
13818 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013819 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000013820 *)
13821 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013822 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000013823 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013824 esac |
13825 sort
13826) |
Martin v. Löwis11437992002-04-12 09:54:03 +000013827 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013828 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000013829 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013830 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000013831 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
13832 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013833 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
13834 :end' >>confcache
13835if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
13836 if test -w "$cache_file"; then
13837 test "x$cache_file" != "x/dev/null" &&
Matthias Kloseb9621712010-04-24 17:59:49 +000013838 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
13839$as_echo "$as_me: updating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000013840 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013841 else
Matthias Kloseb9621712010-04-24 17:59:49 +000013842 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
13843$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013844 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013845fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013846rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000013847
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013848test "x$prefix" = xNONE && prefix=$ac_default_prefix
13849# Let make expand exec_prefix.
13850test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000013851
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013852DEFS=-DHAVE_CONFIG_H
13853
Skip Montanaro6dead952003-09-25 14:50:04 +000013854ac_libobjs=
13855ac_ltlibobjs=
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000013856U=
Skip Montanaro6dead952003-09-25 14:50:04 +000013857for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
13858 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013859 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000013860 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013861 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
13862 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000013863 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
13864 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000013865done
13866LIBOBJS=$ac_libobjs
13867
13868LTLIBOBJS=$ac_ltlibobjs
13869
13870
Martin v. Löwis11437992002-04-12 09:54:03 +000013871
Matthias Kloseb9621712010-04-24 17:59:49 +000013872
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013873: ${CONFIG_STATUS=./config.status}
Matthias Kloseb9621712010-04-24 17:59:49 +000013874ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000013875ac_clean_files_save=$ac_clean_files
13876ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013877{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
13878$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
13879as_write_fail=0
13880cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000013881#! $SHELL
13882# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000013883# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013884# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000013885# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000013886
Martin v. Löwis11437992002-04-12 09:54:03 +000013887debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000013888ac_cs_recheck=false
13889ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000013890
Matthias Kloseb9621712010-04-24 17:59:49 +000013891SHELL=\${CONFIG_SHELL-$SHELL}
13892export SHELL
13893_ASEOF
13894cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
13895## -------------------- ##
13896## M4sh Initialization. ##
13897## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000013898
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013899# Be more Bourne compatible
13900DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000013901if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013902 emulate sh
13903 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000013904 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000013905 # is contrary to our usage. Disable this feature.
13906 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013907 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013908else
Matthias Kloseb9621712010-04-24 17:59:49 +000013909 case `(set -o) 2>/dev/null` in #(
13910 *posix*) :
13911 set -o posix ;; #(
13912 *) :
13913 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013914esac
Michael W. Hudson54241132001-12-07 15:38:26 +000013915fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000013916
13917
Matthias Kloseb9621712010-04-24 17:59:49 +000013918as_nl='
13919'
13920export as_nl
13921# Printing a long string crashes Solaris 7 /usr/bin/printf.
13922as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
13923as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
13924as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
13925# Prefer a ksh shell builtin over an external printf program on Solaris,
13926# but without wasting forks for bash or zsh.
13927if test -z "$BASH_VERSION$ZSH_VERSION" \
13928 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
13929 as_echo='print -r --'
13930 as_echo_n='print -rn --'
13931elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
13932 as_echo='printf %s\n'
13933 as_echo_n='printf %s'
13934else
13935 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
13936 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
13937 as_echo_n='/usr/ucb/echo -n'
13938 else
13939 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
13940 as_echo_n_body='eval
13941 arg=$1;
13942 case $arg in #(
13943 *"$as_nl"*)
13944 expr "X$arg" : "X\\(.*\\)$as_nl";
13945 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
13946 esac;
13947 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
13948 '
13949 export as_echo_n_body
13950 as_echo_n='sh -c $as_echo_n_body as_echo'
13951 fi
13952 export as_echo_body
13953 as_echo='sh -c $as_echo_body as_echo'
13954fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013955
13956# The user is always right.
13957if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013958 PATH_SEPARATOR=:
13959 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
13960 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
13961 PATH_SEPARATOR=';'
13962 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013963fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013964
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013965
13966# IFS
13967# We need space, tab and new line, in precisely that order. Quoting is
13968# there to prevent editors from complaining about space-tab.
13969# (If _AS_PATH_WALK were called with IFS unset, it would disable word
13970# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013971IFS=" "" $as_nl"
13972
13973# Find who we are. Look in the path if we contain no directory separator.
Matthias Kloseb9621712010-04-24 17:59:49 +000013974case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013975 *[\\/]* ) as_myself=$0 ;;
13976 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000013977for as_dir in $PATH
13978do
13979 IFS=$as_save_IFS
13980 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000013981 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
13982 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013983IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000013984
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013985 ;;
13986esac
13987# We did not find ourselves, most probably we were run as `sh COMMAND'
13988# in which case we are not to be found in the path.
13989if test "x$as_myself" = x; then
13990 as_myself=$0
13991fi
13992if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013993 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
13994 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013995fi
13996
Matthias Kloseb9621712010-04-24 17:59:49 +000013997# Unset variables that we do not need and which cause bugs (e.g. in
13998# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
13999# suppresses any "Segmentation fault" message there. '((' could
14000# trigger a bug in pdksh 5.2.14.
14001for as_var in BASH_ENV ENV MAIL MAILPATH
14002do eval test x\${$as_var+set} = xset \
14003 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014004done
14005PS1='$ '
14006PS2='> '
14007PS4='+ '
14008
14009# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000014010LC_ALL=C
14011export LC_ALL
14012LANGUAGE=C
14013export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014014
Matthias Kloseb9621712010-04-24 17:59:49 +000014015# CDPATH.
14016(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
14017
14018
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014019# as_fn_error STATUS ERROR [LINENO LOG_FD]
14020# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000014021# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
14022# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014023# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000014024as_fn_error ()
14025{
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014026 as_status=$1; test $as_status -eq 0 && as_status=1
14027 if test "$4"; then
14028 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
14029 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000014030 fi
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014031 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000014032 as_fn_exit $as_status
14033} # as_fn_error
14034
14035
14036# as_fn_set_status STATUS
14037# -----------------------
14038# Set $? to STATUS, without forking.
14039as_fn_set_status ()
14040{
14041 return $1
14042} # as_fn_set_status
14043
14044# as_fn_exit STATUS
14045# -----------------
14046# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
14047as_fn_exit ()
14048{
14049 set +e
14050 as_fn_set_status $1
14051 exit $1
14052} # as_fn_exit
14053
14054# as_fn_unset VAR
14055# ---------------
14056# Portably unset VAR.
14057as_fn_unset ()
14058{
14059 { eval $1=; unset $1;}
14060}
14061as_unset=as_fn_unset
14062# as_fn_append VAR VALUE
14063# ----------------------
14064# Append the text in VALUE to the end of the definition contained in VAR. Take
14065# advantage of any shell optimizations that allow amortized linear growth over
14066# repeated appends, instead of the typical quadratic growth present in naive
14067# implementations.
14068if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
14069 eval 'as_fn_append ()
14070 {
14071 eval $1+=\$2
14072 }'
14073else
14074 as_fn_append ()
14075 {
14076 eval $1=\$$1\$2
14077 }
14078fi # as_fn_append
14079
14080# as_fn_arith ARG...
14081# ------------------
14082# Perform arithmetic evaluation on the ARGs, and store the result in the
14083# global $as_val. Take advantage of shells that can avoid forks. The arguments
14084# must be portable across $(()) and expr.
14085if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
14086 eval 'as_fn_arith ()
14087 {
14088 as_val=$(( $* ))
14089 }'
14090else
14091 as_fn_arith ()
14092 {
14093 as_val=`expr "$@" || test $? -eq 1`
14094 }
14095fi # as_fn_arith
14096
14097
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014098if expr a : '\(a\)' >/dev/null 2>&1 &&
14099 test "X`expr 00001 : '.*\(...\)'`" = X001; then
14100 as_expr=expr
14101else
14102 as_expr=false
14103fi
14104
14105if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
14106 as_basename=basename
14107else
14108 as_basename=false
14109fi
14110
Matthias Kloseb9621712010-04-24 17:59:49 +000014111if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
14112 as_dirname=dirname
14113else
14114 as_dirname=false
14115fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014116
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014117as_me=`$as_basename -- "$0" ||
14118$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
14119 X"$0" : 'X\(//\)$' \| \
14120 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014121$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014122 sed '/^.*\/\([^/][^/]*\)\/*$/{
14123 s//\1/
14124 q
14125 }
14126 /^X\/\(\/\/\)$/{
14127 s//\1/
14128 q
14129 }
14130 /^X\/\(\/\).*/{
14131 s//\1/
14132 q
14133 }
14134 s/.*/./; q'`
14135
Matthias Kloseb9621712010-04-24 17:59:49 +000014136# Avoid depending upon Character Ranges.
14137as_cr_letters='abcdefghijklmnopqrstuvwxyz'
14138as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14139as_cr_Letters=$as_cr_letters$as_cr_LETTERS
14140as_cr_digits='0123456789'
14141as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014142
14143ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000014144case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014145-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014146 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014147 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000014148 xy) ECHO_C='\c';;
14149 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
14150 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014151 esac;;
14152*)
14153 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000014154esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014155
Martin v. Löwis11437992002-04-12 09:54:03 +000014156rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014157if test -d conf$$.dir; then
14158 rm -f conf$$.dir/conf$$.file
14159else
14160 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000014161 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014162fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014163if (echo >conf$$.file) 2>/dev/null; then
14164 if ln -s conf$$.file conf$$ 2>/dev/null; then
14165 as_ln_s='ln -s'
14166 # ... but there are two gotchas:
14167 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
14168 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
14169 # In both cases, we have to default to `cp -p'.
14170 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
14171 as_ln_s='cp -p'
14172 elif ln conf$$.file conf$$ 2>/dev/null; then
14173 as_ln_s=ln
14174 else
Martin v. Löwis11437992002-04-12 09:54:03 +000014175 as_ln_s='cp -p'
Matthias Kloseb9621712010-04-24 17:59:49 +000014176 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014177else
14178 as_ln_s='cp -p'
14179fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014180rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
14181rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000014182
Matthias Kloseb9621712010-04-24 17:59:49 +000014183
14184# as_fn_mkdir_p
14185# -------------
14186# Create "$as_dir" as a directory, including parents if necessary.
14187as_fn_mkdir_p ()
14188{
14189
14190 case $as_dir in #(
14191 -*) as_dir=./$as_dir;;
14192 esac
14193 test -d "$as_dir" || eval $as_mkdir_p || {
14194 as_dirs=
14195 while :; do
14196 case $as_dir in #(
14197 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
14198 *) as_qdir=$as_dir;;
14199 esac
14200 as_dirs="'$as_qdir' $as_dirs"
14201 as_dir=`$as_dirname -- "$as_dir" ||
14202$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
14203 X"$as_dir" : 'X\(//\)[^/]' \| \
14204 X"$as_dir" : 'X\(//\)$' \| \
14205 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
14206$as_echo X"$as_dir" |
14207 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14208 s//\1/
14209 q
14210 }
14211 /^X\(\/\/\)[^/].*/{
14212 s//\1/
14213 q
14214 }
14215 /^X\(\/\/\)$/{
14216 s//\1/
14217 q
14218 }
14219 /^X\(\/\).*/{
14220 s//\1/
14221 q
14222 }
14223 s/.*/./; q'`
14224 test -d "$as_dir" && break
14225 done
14226 test -z "$as_dirs" || eval "mkdir $as_dirs"
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014227 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000014228
14229
14230} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000014231if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014232 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000014233else
Skip Montanarof0d5f792004-08-15 14:08:23 +000014234 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000014235 as_mkdir_p=false
14236fi
14237
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014238if test -x / >/dev/null 2>&1; then
14239 as_test_x='test -x'
14240else
14241 if ls -dL / >/dev/null 2>&1; then
14242 as_ls_L_option=L
14243 else
14244 as_ls_L_option=
14245 fi
14246 as_test_x='
14247 eval sh -c '\''
14248 if test -d "$1"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014249 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014250 else
Matthias Kloseb9621712010-04-24 17:59:49 +000014251 case $1 in #(
14252 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014253 esac;
Matthias Kloseb9621712010-04-24 17:59:49 +000014254 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014255 ???[sx]*):;;*)false;;esac;fi
14256 '\'' sh
14257 '
14258fi
14259as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000014260
14261# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014262as_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 +000014263
14264# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014265as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014266
14267
Martin v. Löwis11437992002-04-12 09:54:03 +000014268exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000014269## ----------------------------------- ##
14270## Main body of $CONFIG_STATUS script. ##
14271## ----------------------------------- ##
14272_ASEOF
14273test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014274
Matthias Kloseb9621712010-04-24 17:59:49 +000014275cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14276# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000014277# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014278# values after options handling.
14279ac_log="
Benjamin Peterson46ea4f72009-06-27 21:40:27 +000014280This file was extended by python $as_me 3.2, which was
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014281generated by GNU Autoconf 2.67. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000014282
14283 CONFIG_FILES = $CONFIG_FILES
14284 CONFIG_HEADERS = $CONFIG_HEADERS
14285 CONFIG_LINKS = $CONFIG_LINKS
14286 CONFIG_COMMANDS = $CONFIG_COMMANDS
14287 $ $0 $@
14288
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014289on `(hostname || uname -n) 2>/dev/null | sed 1q`
14290"
14291
Martin v. Löwis11437992002-04-12 09:54:03 +000014292_ACEOF
14293
Matthias Kloseb9621712010-04-24 17:59:49 +000014294case $ac_config_files in *"
14295"*) set x $ac_config_files; shift; ac_config_files=$*;;
14296esac
14297
14298case $ac_config_headers in *"
14299"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
14300esac
14301
14302
14303cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014304# Files that config.status was made for.
Barry Warsaw278266f2010-10-14 17:38:46 +000014305config_files="$ac_config_files"
14306config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000014307
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014308_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014309
Matthias Kloseb9621712010-04-24 17:59:49 +000014310cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014311ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000014312\`$as_me' instantiates files and other configuration actions
14313from templates according to the current configuration. Unless the files
14314and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000014315
Matthias Kloseb9621712010-04-24 17:59:49 +000014316Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000014317
14318 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014319 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000014320 --config print configuration, then exit
14321 -q, --quiet, --silent
14322 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000014323 -d, --debug don't remove temporary files
14324 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000014325 --file=FILE[:TEMPLATE]
14326 instantiate the configuration file FILE
14327 --header=FILE[:TEMPLATE]
14328 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000014329
14330Configuration files:
14331$config_files
14332
14333Configuration headers:
14334$config_headers
14335
Matthias Kloseb9621712010-04-24 17:59:49 +000014336Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014337
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014338_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014339cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14340ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000014341ac_cs_version="\\
Benjamin Peterson46ea4f72009-06-27 21:40:27 +000014342python config.status 3.2
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014343configured by $0, generated by GNU Autoconf 2.67,
Matthias Kloseb9621712010-04-24 17:59:49 +000014344 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000014345
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014346Copyright (C) 2010 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000014347This config.status script is free software; the Free Software Foundation
14348gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014349
14350ac_pwd='$ac_pwd'
14351srcdir='$srcdir'
14352INSTALL='$INSTALL'
Matthias Kloseb9621712010-04-24 17:59:49 +000014353test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000014354_ACEOF
14355
Matthias Kloseb9621712010-04-24 17:59:49 +000014356cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14357# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000014358ac_need_defaults=:
14359while test $# != 0
14360do
14361 case $1 in
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014362 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014363 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14364 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000014365 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000014366 ;;
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014367 --*=)
14368 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14369 ac_optarg=
14370 ac_shift=:
14371 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014372 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000014373 ac_option=$1
14374 ac_optarg=$2
14375 ac_shift=shift
14376 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014377 esac
14378
Skip Montanaro6dead952003-09-25 14:50:04 +000014379 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000014380 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000014381 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14382 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014383 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000014384 $as_echo "$ac_cs_version"; exit ;;
14385 --config | --confi | --conf | --con | --co | --c )
14386 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014387 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000014388 debug=: ;;
14389 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000014390 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014391 case $ac_optarg in
14392 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014393 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000014394 esac
14395 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014396 ac_need_defaults=false;;
14397 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000014398 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014399 case $ac_optarg in
14400 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14401 esac
14402 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014403 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014404 --he | --h)
14405 # Conflict between --help and --header
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014406 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000014407Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014408 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000014409 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000014410 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
14411 | -silent | --silent | --silen | --sile | --sil | --si | --s)
14412 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014413
14414 # This is an error.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014415 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000014416Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014417
Matthias Kloseb9621712010-04-24 17:59:49 +000014418 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014419 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014420
14421 esac
14422 shift
14423done
14424
Skip Montanaro6dead952003-09-25 14:50:04 +000014425ac_configure_extra_args=
14426
14427if $ac_cs_silent; then
14428 exec 6>/dev/null
14429 ac_configure_extra_args="$ac_configure_extra_args --silent"
14430fi
14431
14432_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014433cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000014434if \$ac_cs_recheck; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014435 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
14436 shift
14437 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
14438 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014439 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000014440 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000014441fi
14442
Martin v. Löwis11437992002-04-12 09:54:03 +000014443_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014444cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014445exec 5>>config.log
14446{
14447 echo
14448 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
14449## Running $as_me. ##
14450_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000014451 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014452} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014453
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014454_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014455cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014456_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014457
Matthias Kloseb9621712010-04-24 17:59:49 +000014458cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014459
14460# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000014461for ac_config_target in $ac_config_targets
14462do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014463 case $ac_config_target in
14464 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
14465 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
14466 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014467 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
14468 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014469 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
14470 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000014471 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000014472 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014473
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014474 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014475 esac
14476done
14477
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014478
Martin v. Löwis11437992002-04-12 09:54:03 +000014479# If the user did not use the arguments to specify the items to instantiate,
14480# then the envvar interface is used. Set only those that are not.
14481# We use the long form for the default assignment because of an extremely
14482# bizarre bug on SunOS 4.1.3.
14483if $ac_need_defaults; then
14484 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
14485 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
14486fi
14487
Skip Montanaro6dead952003-09-25 14:50:04 +000014488# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014489# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000014490# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014491# Hook for its removal unless debugging.
14492# Note that there is a small window in which the directory will not be cleaned:
14493# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000014494$debug ||
14495{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014496 tmp=
14497 trap 'exit_status=$?
14498 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
14499' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000014500 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000014501}
Martin v. Löwis11437992002-04-12 09:54:03 +000014502# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000014503
Martin v. Löwis11437992002-04-12 09:54:03 +000014504{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014505 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000014506 test -n "$tmp" && test -d "$tmp"
14507} ||
14508{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014509 tmp=./conf$$-$RANDOM
14510 (umask 077 && mkdir "$tmp")
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014511} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000014512
Matthias Kloseb9621712010-04-24 17:59:49 +000014513# Set up the scripts for CONFIG_FILES section.
14514# No need to generate them if there are no CONFIG_FILES.
14515# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014516if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014517
Matthias Kloseb9621712010-04-24 17:59:49 +000014518
14519ac_cr=`echo X | tr X '\015'`
14520# On cygwin, bash can eat \r inside `` if the user requested igncr.
14521# But we know of no other shell where ac_cr would be empty at this
14522# point, so we can use a bashism as a fallback.
14523if test "x$ac_cr" = x; then
14524 eval ac_cr=\$\'\\r\'
14525fi
14526ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
14527if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014528 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000014529else
14530 ac_cs_awk_cr=$ac_cr
14531fi
14532
14533echo 'BEGIN {' >"$tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000014534_ACEOF
14535
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014536
Matthias Kloseb9621712010-04-24 17:59:49 +000014537{
14538 echo "cat >conf$$subs.awk <<_ACEOF" &&
14539 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
14540 echo "_ACEOF"
14541} >conf$$subs.sh ||
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014542 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
14543ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014544ac_delim='%!_!# '
14545for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000014546 . ./conf$$subs.sh ||
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014547 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014548
Matthias Kloseb9621712010-04-24 17:59:49 +000014549 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
14550 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014551 break
14552 elif $ac_last_try; then
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014553 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014554 else
14555 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000014556 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014557done
Matthias Kloseb9621712010-04-24 17:59:49 +000014558rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014559
Matthias Kloseb9621712010-04-24 17:59:49 +000014560cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14561cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014562_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014563sed -n '
14564h
14565s/^/S["/; s/!.*/"]=/
14566p
14567g
14568s/^[^!]*!//
14569:repl
14570t repl
14571s/'"$ac_delim"'$//
14572t delim
14573:nl
14574h
14575s/\(.\{148\}\)..*/\1/
14576t more1
14577s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
14578p
14579n
14580b repl
14581:more1
14582s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14583p
14584g
14585s/.\{148\}//
14586t nl
14587:delim
14588h
14589s/\(.\{148\}\)..*/\1/
14590t more2
14591s/["\\]/\\&/g; s/^/"/; s/$/"/
14592p
14593b
14594:more2
14595s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14596p
14597g
14598s/.\{148\}//
14599t delim
14600' <conf$$subs.awk | sed '
14601/^[^""]/{
14602 N
14603 s/\n//
14604}
14605' >>$CONFIG_STATUS || ac_write_fail=1
14606rm -f conf$$subs.awk
14607cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14608_ACAWK
14609cat >>"\$tmp/subs1.awk" <<_ACAWK &&
14610 for (key in S) S_is_set[key] = 1
14611 FS = ""
14612
14613}
14614{
14615 line = $ 0
14616 nfields = split(line, field, "@")
14617 substed = 0
14618 len = length(field[1])
14619 for (i = 2; i < nfields; i++) {
14620 key = field[i]
14621 keylen = length(key)
14622 if (S_is_set[key]) {
14623 value = S[key]
14624 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
14625 len += length(value) + length(field[++i])
14626 substed = 1
14627 } else
14628 len += 1 + keylen
14629 }
14630
14631 print line
14632}
14633
14634_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014635_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014636cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14637if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
14638 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
14639else
14640 cat
14641fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014642 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014643_ACEOF
14644
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014645# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
14646# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014647# trailing colons and then remove the whole line if VPATH becomes empty
14648# (actually we leave an empty line to preserve line numbers).
14649if test "x$srcdir" = x.; then
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014650 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
14651h
14652s///
14653s/^/:/
14654s/[ ]*$/:/
14655s/:\$(srcdir):/:/g
14656s/:\${srcdir}:/:/g
14657s/:@srcdir@:/:/g
14658s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014659s/:*$//
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014660x
14661s/\(=[ ]*\).*/\1/
14662G
14663s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014664s/^[^=]*=[ ]*$//
14665}'
14666fi
14667
Matthias Kloseb9621712010-04-24 17:59:49 +000014668cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014669fi # test -n "$CONFIG_FILES"
14670
Matthias Kloseb9621712010-04-24 17:59:49 +000014671# Set up the scripts for CONFIG_HEADERS section.
14672# No need to generate them if there are no CONFIG_HEADERS.
14673# This happens for instance with `./config.status Makefile'.
14674if test -n "$CONFIG_HEADERS"; then
14675cat >"$tmp/defines.awk" <<\_ACAWK ||
14676BEGIN {
14677_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014678
Matthias Kloseb9621712010-04-24 17:59:49 +000014679# Transform confdefs.h into an awk script `defines.awk', embedded as
14680# here-document in config.status, that substitutes the proper values into
14681# config.h.in to produce config.h.
14682
14683# Create a delimiter string that does not exist in confdefs.h, to ease
14684# handling of long lines.
14685ac_delim='%!_!# '
14686for ac_last_try in false false :; do
14687 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
14688 if test -z "$ac_t"; then
14689 break
14690 elif $ac_last_try; then
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014691 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000014692 else
14693 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
14694 fi
14695done
14696
14697# For the awk script, D is an array of macro values keyed by name,
14698# likewise P contains macro parameters if any. Preserve backslash
14699# newline sequences.
14700
14701ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
14702sed -n '
14703s/.\{148\}/&'"$ac_delim"'/g
14704t rset
14705:rset
14706s/^[ ]*#[ ]*define[ ][ ]*/ /
14707t def
14708d
14709:def
14710s/\\$//
14711t bsnl
14712s/["\\]/\\&/g
14713s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14714D["\1"]=" \3"/p
14715s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
14716d
14717:bsnl
14718s/["\\]/\\&/g
14719s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14720D["\1"]=" \3\\\\\\n"\\/p
14721t cont
14722s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
14723t cont
14724d
14725:cont
14726n
14727s/.\{148\}/&'"$ac_delim"'/g
14728t clear
14729:clear
14730s/\\$//
14731t bsnlc
14732s/["\\]/\\&/g; s/^/"/; s/$/"/p
14733d
14734:bsnlc
14735s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
14736b cont
14737' <confdefs.h | sed '
14738s/'"$ac_delim"'/"\\\
14739"/g' >>$CONFIG_STATUS || ac_write_fail=1
14740
14741cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14742 for (key in D) D_is_set[key] = 1
14743 FS = ""
14744}
14745/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
14746 line = \$ 0
14747 split(line, arg, " ")
14748 if (arg[1] == "#") {
14749 defundef = arg[2]
14750 mac1 = arg[3]
14751 } else {
14752 defundef = substr(arg[1], 2)
14753 mac1 = arg[2]
14754 }
14755 split(mac1, mac2, "(") #)
14756 macro = mac2[1]
14757 prefix = substr(line, 1, index(line, defundef) - 1)
14758 if (D_is_set[macro]) {
14759 # Preserve the white space surrounding the "#".
14760 print prefix "define", macro P[macro] D[macro]
14761 next
14762 } else {
14763 # Replace #undef with comments. This is necessary, for example,
14764 # in the case of _POSIX_SOURCE, which is predefined and required
14765 # on some systems where configure will not decide to define it.
14766 if (defundef == "undef") {
14767 print "/*", prefix defundef, macro, "*/"
14768 next
14769 }
14770 }
14771}
14772{ print }
14773_ACAWK
14774_ACEOF
14775cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014776 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000014777fi # test -n "$CONFIG_HEADERS"
14778
14779
14780eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
14781shift
14782for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014783do
14784 case $ac_tag in
14785 :[FHLC]) ac_mode=$ac_tag; continue;;
14786 esac
14787 case $ac_mode$ac_tag in
14788 :[FHL]*:*);;
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014789 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014790 :[FH]-) ac_tag=-:-;;
14791 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
14792 esac
14793 ac_save_IFS=$IFS
14794 IFS=:
14795 set x $ac_tag
14796 IFS=$ac_save_IFS
14797 shift
14798 ac_file=$1
14799 shift
14800
14801 case $ac_mode in
14802 :L) ac_source=$1;;
14803 :[FH])
14804 ac_file_inputs=
14805 for ac_f
14806 do
14807 case $ac_f in
14808 -) ac_f="$tmp/stdin";;
14809 *) # Look for the file first in the build tree, then in the source tree
14810 # (if the path is not absolute). The absolute path cannot be DOS-style,
14811 # because $ac_f cannot contain `:'.
14812 test -f "$ac_f" ||
14813 case $ac_f in
14814 [\\/$]*) false;;
14815 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
14816 esac ||
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014817 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014818 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014819 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
14820 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014821 done
14822
14823 # Let's still pretend it is `configure' which instantiates (i.e., don't
14824 # use $as_me), people would be surprised to read:
14825 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014826 configure_input='Generated from '`
14827 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
14828 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014829 if test x"$ac_file" != x-; then
14830 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000014831 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
14832$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014833 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014834 # Neutralize special characters interpreted by sed in replacement strings.
14835 case $configure_input in #(
14836 *\&* | *\|* | *\\* )
14837 ac_sed_conf_input=`$as_echo "$configure_input" |
14838 sed 's/[\\\\&|]/\\\\&/g'`;; #(
14839 *) ac_sed_conf_input=$configure_input;;
14840 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014841
14842 case $ac_tag in
Matthias Kloseb9621712010-04-24 17:59:49 +000014843 *:-:* | *:-) cat >"$tmp/stdin" \
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014844 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014845 esac
14846 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014847 esac
14848
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014849 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000014850$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014851 X"$ac_file" : 'X\(//\)[^/]' \| \
14852 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014853 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014854$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014855 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14856 s//\1/
14857 q
14858 }
14859 /^X\(\/\/\)[^/].*/{
14860 s//\1/
14861 q
14862 }
14863 /^X\(\/\/\)$/{
14864 s//\1/
14865 q
14866 }
14867 /^X\(\/\).*/{
14868 s//\1/
14869 q
14870 }
14871 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000014872 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000014873 ac_builddir=.
14874
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014875case "$ac_dir" in
14876.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
14877*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014878 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014879 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000014880 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014881 case $ac_top_builddir_sub in
14882 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
14883 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
14884 esac ;;
14885esac
14886ac_abs_top_builddir=$ac_pwd
14887ac_abs_builddir=$ac_pwd$ac_dir_suffix
14888# for backward compatibility:
14889ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000014890
14891case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014892 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000014893 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014894 ac_top_srcdir=$ac_top_builddir_sub
14895 ac_abs_top_srcdir=$ac_pwd ;;
14896 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000014897 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014898 ac_top_srcdir=$srcdir
14899 ac_abs_top_srcdir=$srcdir ;;
14900 *) # Relative name.
14901 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
14902 ac_top_srcdir=$ac_top_build_prefix$srcdir
14903 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014904esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014905ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000014906
Martin v. Löwis11437992002-04-12 09:54:03 +000014907
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014908 case $ac_mode in
14909 :F)
14910 #
14911 # CONFIG_FILE
14912 #
Martin v. Löwis11437992002-04-12 09:54:03 +000014913
14914 case $INSTALL in
14915 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014916 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014917 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000014918_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014919
Matthias Kloseb9621712010-04-24 17:59:49 +000014920cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014921# If the template does not know about datarootdir, expand it.
14922# FIXME: This hack should be removed a few years after 2.60.
14923ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000014924ac_sed_dataroot='
14925/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014926 p
14927 q
14928}
14929/@datadir@/p
14930/@docdir@/p
14931/@infodir@/p
14932/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000014933/@mandir@/p'
14934case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014935*datarootdir*) ac_datarootdir_seen=yes;;
14936*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014937 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
14938$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014939_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014940cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014941 ac_datarootdir_hack='
14942 s&@datadir@&$datadir&g
14943 s&@docdir@&$docdir&g
14944 s&@infodir@&$infodir&g
14945 s&@localedir@&$localedir&g
14946 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000014947 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014948esac
14949_ACEOF
14950
14951# Neutralize VPATH when `$srcdir' = `.'.
14952# Shell code in configure.ac might set extrasub.
14953# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000014954cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14955ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000014956$extrasub
14957_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014958cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014959:t
14960/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000014961s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014962s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000014963s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014964s&@srcdir@&$ac_srcdir&;t t
14965s&@abs_srcdir@&$ac_abs_srcdir&;t t
14966s&@top_srcdir@&$ac_top_srcdir&;t t
14967s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
14968s&@builddir@&$ac_builddir&;t t
14969s&@abs_builddir@&$ac_abs_builddir&;t t
14970s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
14971s&@INSTALL@&$ac_INSTALL&;t t
14972$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000014973"
14974eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014975 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014976
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014977test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
14978 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
14979 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000014980 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014981which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014982$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014983which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014984
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014985 rm -f "$tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000014986 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +000014987 -) cat "$tmp/out" && rm -f "$tmp/out";;
14988 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
14989 esac \
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014990 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014991 ;;
14992 :H)
14993 #
14994 # CONFIG_HEADER
14995 #
Martin v. Löwis11437992002-04-12 09:54:03 +000014996 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014997 {
14998 $as_echo "/* $configure_input */" \
14999 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
15000 } >"$tmp/config.h" \
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000015001 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000015002 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
15003 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
15004$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015005 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015006 rm -f "$ac_file"
15007 mv "$tmp/config.h" "$ac_file" \
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000015008 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015009 fi
15010 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015011 $as_echo "/* $configure_input */" \
15012 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000015013 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015014 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015015 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000015016
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015017
15018 esac
15019
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000015020
15021 case $ac_file$ac_mode in
15022 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
15023
15024 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015025done # for ac_tag
15026
Guido van Rossum627b2d71993-12-24 10:39:16 +000015027
Matthias Kloseb9621712010-04-24 17:59:49 +000015028as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000015029_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015030ac_clean_files=$ac_clean_files_save
15031
Matthias Kloseb9621712010-04-24 17:59:49 +000015032test $ac_write_fail = 0 ||
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000015033 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000015034
Martin v. Löwis11437992002-04-12 09:54:03 +000015035
15036# configure is writing to config.log, and then calls config.status.
15037# config.status does its own redirection, appending to config.log.
15038# Unfortunately, on DOS this fails, as config.log is still kept open
15039# by configure, so config.status won't be able to write to it; its
15040# output is simply discarded. So we exec the FD to /dev/null,
15041# effectively closing config.log, so it can be properly (re)opened and
15042# appended to by config.status. When coming back to configure, we
15043# need to make the FD available again.
15044if test "$no_create" != yes; then
15045 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000015046 ac_config_status_args=
15047 test "$silent" = yes &&
15048 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000015049 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000015050 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000015051 exec 5>>config.log
15052 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
15053 # would make configure fail if this is the last instruction.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000015054 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000015055fi
15056if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
15057 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
15058$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015059fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000015060
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015061
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015062echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015063if test ! -f Modules/Setup
15064then
15065 cp $srcdir/Modules/Setup.dist Modules/Setup
15066fi
15067
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015068echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015069if test ! -f Modules/Setup.local
15070then
15071 echo "# Edit this file for local setup changes" >Modules/Setup.local
15072fi
15073
15074echo "creating Makefile"
15075$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
15076 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000015077 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000015078mv config.c Modules