blob: 74d1ed41d2a9aa175440d1e0b485bee932e6a7c6 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Antoine Pitrou8250e232011-02-25 23:41:16 +00002# From configure.in Revision: 88624 .
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Antoine Pitrouf65132d2011-02-25 23:25:17 +00004# Generated by GNU Autoconf 2.65 for python 3.3.
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,
Antoine Pitrouf65132d2011-02-25 23:25:17 +000010# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
11# Inc.
Matthias Kloseb9621712010-04-24 17:59:49 +000012#
13#
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014# This configure script is free software; the Free Software Foundation
15# gives unlimited permission to copy, distribute and modify it.
Matthias Kloseb9621712010-04-24 17:59:49 +000016## -------------------- ##
17## M4sh Initialization. ##
18## -------------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +000019
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020# Be more Bourne compatible
21DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000022if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000023 emulate sh
24 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000025 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000026 # is contrary to our usage. Disable this feature.
27 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000029else
Matthias Kloseb9621712010-04-24 17:59:49 +000030 case `(set -o) 2>/dev/null` in #(
31 *posix*) :
32 set -o posix ;; #(
33 *) :
34 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000035esac
Martin v. Löwis11437992002-04-12 09:54:03 +000036fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000037
38
Matthias Kloseb9621712010-04-24 17:59:49 +000039as_nl='
40'
41export as_nl
42# Printing a long string crashes Solaris 7 /usr/bin/printf.
43as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
44as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
45as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
46# Prefer a ksh shell builtin over an external printf program on Solaris,
47# but without wasting forks for bash or zsh.
48if test -z "$BASH_VERSION$ZSH_VERSION" \
49 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
50 as_echo='print -r --'
51 as_echo_n='print -rn --'
52elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
53 as_echo='printf %s\n'
54 as_echo_n='printf %s'
55else
56 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
57 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
58 as_echo_n='/usr/ucb/echo -n'
59 else
60 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
61 as_echo_n_body='eval
62 arg=$1;
63 case $arg in #(
64 *"$as_nl"*)
65 expr "X$arg" : "X\\(.*\\)$as_nl";
66 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
67 esac;
68 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
69 '
70 export as_echo_n_body
71 as_echo_n='sh -c $as_echo_n_body as_echo'
72 fi
73 export as_echo_body
74 as_echo='sh -c $as_echo_body as_echo'
75fi
Martin v. Löwis11437992002-04-12 09:54:03 +000076
77# The user is always right.
78if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000079 PATH_SEPARATOR=:
80 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
81 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
82 PATH_SEPARATOR=';'
83 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000084fi
Martin v. Löwis11437992002-04-12 09:54:03 +000085
Thomas Wouters47b49bf2007-08-30 22:15:33 +000086
87# IFS
88# We need space, tab and new line, in precisely that order. Quoting is
89# there to prevent editors from complaining about space-tab.
90# (If _AS_PATH_WALK were called with IFS unset, it would disable word
91# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000092IFS=" "" $as_nl"
93
94# Find who we are. Look in the path if we contain no directory separator.
Matthias Kloseb9621712010-04-24 17:59:49 +000095case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000096 *[\\/]* ) as_myself=$0 ;;
97 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000098for as_dir in $PATH
99do
100 IFS=$as_save_IFS
101 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +0000102 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
103 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000104IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +0000105
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000106 ;;
107esac
108# We did not find ourselves, most probably we were run as `sh COMMAND'
109# in which case we are not to be found in the path.
110if test "x$as_myself" = x; then
111 as_myself=$0
112fi
113if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000114 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
115 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000116fi
117
Matthias Kloseb9621712010-04-24 17:59:49 +0000118# Unset variables that we do not need and which cause bugs (e.g. in
119# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
120# suppresses any "Segmentation fault" message there. '((' could
121# trigger a bug in pdksh 5.2.14.
122for as_var in BASH_ENV ENV MAIL MAILPATH
123do eval test x\${$as_var+set} = xset \
124 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000125done
126PS1='$ '
127PS2='> '
128PS4='+ '
129
130# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +0000131LC_ALL=C
132export LC_ALL
133LANGUAGE=C
134export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000135
Matthias Kloseb9621712010-04-24 17:59:49 +0000136# CDPATH.
137(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
138
139if test "x$CONFIG_SHELL" = x; then
140 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
141 emulate sh
142 NULLCMD=:
143 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
144 # is contrary to our usage. Disable this feature.
145 alias -g '\${1+\"\$@\"}'='\"\$@\"'
146 setopt NO_GLOB_SUBST
147else
148 case \`(set -o) 2>/dev/null\` in #(
149 *posix*) :
150 set -o posix ;; #(
151 *) :
152 ;;
153esac
154fi
155"
156 as_required="as_fn_return () { (exit \$1); }
157as_fn_success () { as_fn_return 0; }
158as_fn_failure () { as_fn_return 1; }
159as_fn_ret_success () { return 0; }
160as_fn_ret_failure () { return 1; }
161
162exitcode=0
163as_fn_success || { exitcode=1; echo as_fn_success failed.; }
164as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
165as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
166as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
167if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
168
169else
170 exitcode=1; echo positional parameters were not saved.
171fi
172test x\$exitcode = x0 || exit 1"
173 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
174 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
175 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
176 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
177test \$(( 1 + 1 )) = 2 || exit 1"
178 if (eval "$as_required") 2>/dev/null; then :
179 as_have_required=yes
180else
181 as_have_required=no
182fi
183 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
184
185else
186 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
187as_found=false
188for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
189do
190 IFS=$as_save_IFS
191 test -z "$as_dir" && as_dir=.
192 as_found=:
193 case $as_dir in #(
194 /*)
195 for as_base in sh bash ksh sh5; do
196 # Try only shells that exist, to save several forks.
197 as_shell=$as_dir/$as_base
198 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
199 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
200 CONFIG_SHELL=$as_shell as_have_required=yes
201 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
202 break 2
203fi
204fi
205 done;;
206 esac
207 as_found=false
208done
209$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
210 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
211 CONFIG_SHELL=$SHELL as_have_required=yes
212fi; }
213IFS=$as_save_IFS
214
215
216 if test "x$CONFIG_SHELL" != x; then :
217 # We cannot yet assume a decent shell, so we have to provide a
218 # neutralization value for shells without unset; and this also
219 # works around shells that cannot unset nonexistent variables.
220 BASH_ENV=/dev/null
221 ENV=/dev/null
222 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
223 export CONFIG_SHELL
Antoine Pitrouf65132d2011-02-25 23:25:17 +0000224 exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
Matthias Kloseb9621712010-04-24 17:59:49 +0000225fi
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"
Antoine Pitrouf65132d2011-02-25 23:25:17 +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
Antoine Pitrouf65132d2011-02-25 23:25:17 +0000363# as_fn_error ERROR [LINENO LOG_FD]
364# ---------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +0000365# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
366# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Antoine Pitrouf65132d2011-02-25 23:25:17 +0000367# script with status $?, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +0000368as_fn_error ()
369{
Antoine Pitrouf65132d2011-02-25 23:25:17 +0000370 as_status=$?; test $as_status -eq 0 && as_status=1
371 if test "$3"; then
372 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
373 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
Matthias Kloseb9621712010-04-24 17:59:49 +0000374 fi
Antoine Pitrouf65132d2011-02-25 23:25:17 +0000375 $as_echo "$as_me: error: $1" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +0000376 as_fn_exit $as_status
377} # as_fn_error
378
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000379if expr a : '\(a\)' >/dev/null 2>&1 &&
380 test "X`expr 00001 : '.*\(...\)'`" = X001; then
381 as_expr=expr
382else
383 as_expr=false
384fi
385
386if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
387 as_basename=basename
388else
389 as_basename=false
390fi
391
Matthias Kloseb9621712010-04-24 17:59:49 +0000392if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
393 as_dirname=dirname
394else
395 as_dirname=false
396fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000397
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000398as_me=`$as_basename -- "$0" ||
399$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
400 X"$0" : 'X\(//\)$' \| \
401 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000402$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000403 sed '/^.*\/\([^/][^/]*\)\/*$/{
404 s//\1/
405 q
406 }
407 /^X\/\(\/\/\)$/{
408 s//\1/
409 q
410 }
411 /^X\/\(\/\).*/{
412 s//\1/
413 q
414 }
415 s/.*/./; q'`
416
Matthias Kloseb9621712010-04-24 17:59:49 +0000417# Avoid depending upon Character Ranges.
418as_cr_letters='abcdefghijklmnopqrstuvwxyz'
419as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
420as_cr_Letters=$as_cr_letters$as_cr_LETTERS
421as_cr_digits='0123456789'
422as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000423
424
Matthias Kloseb9621712010-04-24 17:59:49 +0000425 as_lineno_1=$LINENO as_lineno_1a=$LINENO
426 as_lineno_2=$LINENO as_lineno_2a=$LINENO
427 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
428 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
429 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000430 sed -n '
431 p
432 /[$]LINENO/=
433 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +0000434 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000435 s/[$]LINENO.*/&-/
436 t lineno
437 b
438 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +0000439 N
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000440 :loop
441 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +0000442 t loop
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000443 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +0000444 ' >$as_me.lineno &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000445 chmod +x "$as_me.lineno" ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000446 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
Martin v. Löwis11437992002-04-12 09:54:03 +0000447
448 # Don't try to exec as it changes $[0], causing all sort of problems
449 # (the dirname of $[0] is not the place where we might find the
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000450 # original and so on. Autoconf is especially sensitive to this).
451 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +0000452 # Exit status is that of the last command.
453 exit
454}
455
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000456ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +0000457case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000458-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000459 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000460 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +0000461 xy) ECHO_C='\c';;
462 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
463 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000464 esac;;
465*)
466 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +0000467esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000468
Martin v. Löwis11437992002-04-12 09:54:03 +0000469rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000470if test -d conf$$.dir; then
471 rm -f conf$$.dir/conf$$.file
472else
473 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +0000474 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000475fi
Matthias Kloseb9621712010-04-24 17:59:49 +0000476if (echo >conf$$.file) 2>/dev/null; then
477 if ln -s conf$$.file conf$$ 2>/dev/null; then
478 as_ln_s='ln -s'
479 # ... but there are two gotchas:
480 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
481 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
482 # In both cases, we have to default to `cp -p'.
483 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
484 as_ln_s='cp -p'
485 elif ln conf$$.file conf$$ 2>/dev/null; then
486 as_ln_s=ln
487 else
Martin v. Löwis11437992002-04-12 09:54:03 +0000488 as_ln_s='cp -p'
Matthias Kloseb9621712010-04-24 17:59:49 +0000489 fi
Martin v. Löwis11437992002-04-12 09:54:03 +0000490else
491 as_ln_s='cp -p'
492fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000493rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
494rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +0000495
Skip Montanaro6dead952003-09-25 14:50:04 +0000496if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000497 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +0000498else
Skip Montanarof0d5f792004-08-15 14:08:23 +0000499 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +0000500 as_mkdir_p=false
501fi
502
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000503if test -x / >/dev/null 2>&1; then
504 as_test_x='test -x'
505else
506 if ls -dL / >/dev/null 2>&1; then
507 as_ls_L_option=L
508 else
509 as_ls_L_option=
510 fi
511 as_test_x='
512 eval sh -c '\''
513 if test -d "$1"; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000514 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000515 else
Matthias Kloseb9621712010-04-24 17:59:49 +0000516 case $1 in #(
517 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000518 esac;
Matthias Kloseb9621712010-04-24 17:59:49 +0000519 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000520 ???[sx]*):;;*)false;;esac;fi
521 '\'' sh
522 '
523fi
524as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +0000525
526# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000527as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000528
529# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000530as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000531
532
Matthias Kloseb9621712010-04-24 17:59:49 +0000533test -n "$DJDIR" || exec 7<&0 </dev/null
534exec 6>&1
Martin v. Löwis11437992002-04-12 09:54:03 +0000535
536# Name of the host.
Antoine Pitrouf65132d2011-02-25 23:25:17 +0000537# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
Martin v. Löwis11437992002-04-12 09:54:03 +0000538# so uname gets run too.
539ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
540
Martin v. Löwis11437992002-04-12 09:54:03 +0000541#
542# Initializations.
543#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000544ac_default_prefix=/usr/local
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000545ac_clean_files=
Skip Montanaro6dead952003-09-25 14:50:04 +0000546ac_config_libobj_dir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000547LIBOBJS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000548cross_compiling=no
549subdirs=
550MFLAGS=
551MAKEFLAGS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000552
Martin v. Löwis11437992002-04-12 09:54:03 +0000553# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000554PACKAGE_NAME='python'
555PACKAGE_TARNAME='python'
Georg Brandl3ebb6b32011-02-20 10:37:07 +0000556PACKAGE_VERSION='3.3'
557PACKAGE_STRING='python 3.3'
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
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000650PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000651BLDLIBRARY
652DLLLIBRARY
653LDLIBRARY
654LIBRARY
655BUILDEXEEXT
656EGREP
657GREP
658CPP
659MAINCC
660CXX
661OBJEXT
662EXEEXT
663ac_ct_CC
664CPPFLAGS
665LDFLAGS
666CFLAGS
667CC
668EXPORT_MACOSX_DEPLOYMENT_TARGET
669CONFIGURE_MACOSX_DEPLOYMENT_TARGET
670SGI_ABI
671MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000672FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000673FRAMEWORKUNIXTOOLSPREFIX
674FRAMEWORKALTINSTALLLAST
675FRAMEWORKALTINSTALLFIRST
676FRAMEWORKINSTALLLAST
677FRAMEWORKINSTALLFIRST
678PYTHONFRAMEWORKINSTALLDIR
679PYTHONFRAMEWORKPREFIX
680PYTHONFRAMEWORKDIR
681PYTHONFRAMEWORKIDENTIFIER
682PYTHONFRAMEWORK
683LIPO_32BIT_FLAGS
684ARCH_RUN_32BIT
685UNIVERSALSDK
686CONFIG_ARGS
687SOVERSION
688VERSION
689target_alias
690host_alias
691build_alias
692LIBS
693ECHO_T
694ECHO_N
695ECHO_C
696DEFS
697mandir
698localedir
699libdir
700psdir
701pdfdir
702dvidir
703htmldir
704infodir
705docdir
706oldincludedir
707includedir
708localstatedir
709sharedstatedir
710sysconfdir
711datadir
712datarootdir
713libexecdir
714sbindir
715bindir
716program_transform_name
717prefix
718exec_prefix
719PACKAGE_URL
720PACKAGE_BUGREPORT
721PACKAGE_STRING
722PACKAGE_VERSION
723PACKAGE_TARNAME
724PACKAGE_NAME
725PATH_SEPARATOR
726SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000727ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000728ac_user_opts='
729enable_option_checking
730enable_universalsdk
731with_universal_archs
732with_framework_name
733enable_framework
734with_gcc
735with_cxx_main
736with_suffix
737enable_shared
738enable_profiling
739with_pydebug
740with_libs
741with_system_expat
742with_system_ffi
Benjamin Peterson076ed002010-10-31 17:11:02 +0000743enable_loadable_sqlite_extensions
Matthias Kloseb9621712010-04-24 17:59:49 +0000744with_dbmliborder
745with_signal_module
746with_dec_threads
747with_threads
748with_thread
749enable_ipv6
750with_doc_strings
751with_tsc
752with_pymalloc
753with_valgrind
Matthias Kloseb9621712010-04-24 17:59:49 +0000754with_fpectl
755with_libm
756with_libc
757enable_big_digits
758with_wide_unicode
759with_computed_gotos
760'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000761 ac_precious_vars='build_alias
762host_alias
763target_alias
764CC
765CFLAGS
766LDFLAGS
767LIBS
768CPPFLAGS
Barry Warsaw14d98ac2010-11-24 19:43:47 +0000769CPP'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000770
Guido van Rossum627b2d71993-12-24 10:39:16 +0000771
Guido van Rossum7f43da71994-08-01 12:15:30 +0000772# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000773ac_init_help=
774ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000775ac_unrecognized_opts=
776ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000777# The variables have the same names as the options, with
778# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000779cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000780exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000781no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000782no_recursion=
783prefix=NONE
784program_prefix=NONE
785program_suffix=NONE
786program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000787silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000788site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000789srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000790verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000791x_includes=NONE
792x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000793
794# Installation directory options.
795# These are left unexpanded so users can "make install exec_prefix=/foo"
796# and all the variables that are supposed to be based on exec_prefix
797# by default will actually change.
798# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000799# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000800bindir='${exec_prefix}/bin'
801sbindir='${exec_prefix}/sbin'
802libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000803datarootdir='${prefix}/share'
804datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000805sysconfdir='${prefix}/etc'
806sharedstatedir='${prefix}/com'
807localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000808includedir='${prefix}/include'
809oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000810docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
811infodir='${datarootdir}/info'
812htmldir='${docdir}'
813dvidir='${docdir}'
814pdfdir='${docdir}'
815psdir='${docdir}'
816libdir='${exec_prefix}/lib'
817localedir='${datarootdir}/locale'
818mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000819
Guido van Rossum7f43da71994-08-01 12:15:30 +0000820ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000821ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000822for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000823do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000824 # If the previous option needs an argument, assign it.
825 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000826 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000827 ac_prev=
828 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000829 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000830
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000831 case $ac_option in
Antoine Pitrouf65132d2011-02-25 23:25:17 +0000832 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
833 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000834 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000835
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000836 # Accept the important Cygnus configure options, so we can diagnose typos.
837
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000838 case $ac_dashdash$ac_option in
839 --)
840 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000841
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000842 -bindir | --bindir | --bindi | --bind | --bin | --bi)
843 ac_prev=bindir ;;
844 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000845 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000846
847 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000848 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000849 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000850 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000851
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000852 -cache-file | --cache-file | --cache-fil | --cache-fi \
853 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
854 ac_prev=cache_file ;;
855 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
856 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000857 cache_file=$ac_optarg ;;
858
859 --config-cache | -C)
860 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000861
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000862 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000863 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000864 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000865 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000866
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000867 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
868 | --dataroo | --dataro | --datar)
869 ac_prev=datarootdir ;;
870 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
871 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
872 datarootdir=$ac_optarg ;;
873
Guido van Rossum7f43da71994-08-01 12:15:30 +0000874 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000875 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000876 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000877 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Antoine Pitrouf65132d2011-02-25 23:25:17 +0000878 as_fn_error "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000879 ac_useropt_orig=$ac_useropt
880 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
881 case $ac_user_opts in
882 *"
883"enable_$ac_useropt"
884"*) ;;
885 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
886 ac_unrecognized_sep=', ';;
887 esac
888 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000889
890 -docdir | --docdir | --docdi | --doc | --do)
891 ac_prev=docdir ;;
892 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
893 docdir=$ac_optarg ;;
894
895 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
896 ac_prev=dvidir ;;
897 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
898 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000899
900 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000901 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000902 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000903 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Antoine Pitrouf65132d2011-02-25 23:25:17 +0000904 as_fn_error "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000905 ac_useropt_orig=$ac_useropt
906 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
907 case $ac_user_opts in
908 *"
909"enable_$ac_useropt"
910"*) ;;
911 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
912 ac_unrecognized_sep=', ';;
913 esac
914 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000915
Guido van Rossum7f43da71994-08-01 12:15:30 +0000916 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
917 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
918 | --exec | --exe | --ex)
919 ac_prev=exec_prefix ;;
920 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
921 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
922 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000923 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000924
925 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000926 # Obsolete; use --with-gas.
927 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000928
Martin v. Löwis11437992002-04-12 09:54:03 +0000929 -help | --help | --hel | --he | -h)
930 ac_init_help=long ;;
931 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
932 ac_init_help=recursive ;;
933 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
934 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000935
936 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000937 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000938 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000939 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000940
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000941 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
942 ac_prev=htmldir ;;
943 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
944 | --ht=*)
945 htmldir=$ac_optarg ;;
946
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000947 -includedir | --includedir | --includedi | --included | --include \
948 | --includ | --inclu | --incl | --inc)
949 ac_prev=includedir ;;
950 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
951 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000952 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000953
954 -infodir | --infodir | --infodi | --infod | --info | --inf)
955 ac_prev=infodir ;;
956 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000957 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000958
959 -libdir | --libdir | --libdi | --libd)
960 ac_prev=libdir ;;
961 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000962 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000963
964 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
965 | --libexe | --libex | --libe)
966 ac_prev=libexecdir ;;
967 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
968 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000969 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000970
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000971 -localedir | --localedir | --localedi | --localed | --locale)
972 ac_prev=localedir ;;
973 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
974 localedir=$ac_optarg ;;
975
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000976 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000977 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000978 ac_prev=localstatedir ;;
979 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000980 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000981 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000982
983 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
984 ac_prev=mandir ;;
985 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000986 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000987
Guido van Rossum7f43da71994-08-01 12:15:30 +0000988 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000989 # Obsolete; use --without-fp.
990 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000991
992 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +0000993 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000994 no_create=yes ;;
995
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000996 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
997 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
998 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000999
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001000 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1001 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1002 | --oldin | --oldi | --old | --ol | --o)
1003 ac_prev=oldincludedir ;;
1004 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1005 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1006 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001007 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001008
Guido van Rossum7f43da71994-08-01 12:15:30 +00001009 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1010 ac_prev=prefix ;;
1011 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001012 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001013
1014 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1015 | --program-pre | --program-pr | --program-p)
1016 ac_prev=program_prefix ;;
1017 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1018 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001019 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001020
1021 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1022 | --program-suf | --program-su | --program-s)
1023 ac_prev=program_suffix ;;
1024 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1025 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001026 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001027
1028 -program-transform-name | --program-transform-name \
1029 | --program-transform-nam | --program-transform-na \
1030 | --program-transform-n | --program-transform- \
1031 | --program-transform | --program-transfor \
1032 | --program-transfo | --program-transf \
1033 | --program-trans | --program-tran \
1034 | --progr-tra | --program-tr | --program-t)
1035 ac_prev=program_transform_name ;;
1036 -program-transform-name=* | --program-transform-name=* \
1037 | --program-transform-nam=* | --program-transform-na=* \
1038 | --program-transform-n=* | --program-transform-=* \
1039 | --program-transform=* | --program-transfor=* \
1040 | --program-transfo=* | --program-transf=* \
1041 | --program-trans=* | --program-tran=* \
1042 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001043 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001044
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001045 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1046 ac_prev=pdfdir ;;
1047 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1048 pdfdir=$ac_optarg ;;
1049
1050 -psdir | --psdir | --psdi | --psd | --ps)
1051 ac_prev=psdir ;;
1052 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1053 psdir=$ac_optarg ;;
1054
Guido van Rossum7f43da71994-08-01 12:15:30 +00001055 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1056 | -silent | --silent | --silen | --sile | --sil)
1057 silent=yes ;;
1058
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001059 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1060 ac_prev=sbindir ;;
1061 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1062 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001063 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001064
1065 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1066 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1067 | --sharedst | --shareds | --shared | --share | --shar \
1068 | --sha | --sh)
1069 ac_prev=sharedstatedir ;;
1070 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1071 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1072 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1073 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001074 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001075
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001076 -site | --site | --sit)
1077 ac_prev=site ;;
1078 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001079 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001080
Guido van Rossum7f43da71994-08-01 12:15:30 +00001081 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1082 ac_prev=srcdir ;;
1083 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001084 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001085
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001086 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1087 | --syscon | --sysco | --sysc | --sys | --sy)
1088 ac_prev=sysconfdir ;;
1089 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1090 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001091 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001092
Guido van Rossum7f43da71994-08-01 12:15:30 +00001093 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001094 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001095 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001096 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001097
1098 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1099 verbose=yes ;;
1100
Martin v. Löwis11437992002-04-12 09:54:03 +00001101 -version | --version | --versio | --versi | --vers | -V)
1102 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001103
1104 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001105 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001106 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001107 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Antoine Pitrouf65132d2011-02-25 23:25:17 +00001108 as_fn_error "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001109 ac_useropt_orig=$ac_useropt
1110 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1111 case $ac_user_opts in
1112 *"
1113"with_$ac_useropt"
1114"*) ;;
1115 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1116 ac_unrecognized_sep=', ';;
1117 esac
1118 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001119
1120 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001121 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001122 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001123 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Antoine Pitrouf65132d2011-02-25 23:25:17 +00001124 as_fn_error "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001125 ac_useropt_orig=$ac_useropt
1126 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1127 case $ac_user_opts in
1128 *"
1129"with_$ac_useropt"
1130"*) ;;
1131 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1132 ac_unrecognized_sep=', ';;
1133 esac
1134 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001135
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001136 --x)
1137 # Obsolete; use --with-x.
1138 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001139
1140 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1141 | --x-incl | --x-inc | --x-in | --x-i)
1142 ac_prev=x_includes ;;
1143 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1144 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001145 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001146
1147 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1148 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1149 ac_prev=x_libraries ;;
1150 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1151 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001152 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001153
Antoine Pitrouf65132d2011-02-25 23:25:17 +00001154 -*) as_fn_error "unrecognized option: \`$ac_option'
1155Try \`$0 --help' for more information."
Guido van Rossum7f43da71994-08-01 12:15:30 +00001156 ;;
1157
Martin v. Löwis11437992002-04-12 09:54:03 +00001158 *=*)
1159 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1160 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001161 case $ac_envvar in #(
1162 '' | [0-9]* | *[!_$as_cr_alnum]* )
Antoine Pitrouf65132d2011-02-25 23:25:17 +00001163 as_fn_error "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001164 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001165 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001166 export $ac_envvar ;;
1167
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001168 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001169 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001170 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001171 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001172 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Antoine Pitrouf65132d2011-02-25 23:25:17 +00001173 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
Guido van Rossum7f43da71994-08-01 12:15:30 +00001174 ;;
1175
1176 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001177done
1178
Guido van Rossum7f43da71994-08-01 12:15:30 +00001179if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001180 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Antoine Pitrouf65132d2011-02-25 23:25:17 +00001181 as_fn_error "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001182fi
1183
Matthias Kloseb9621712010-04-24 17:59:49 +00001184if test -n "$ac_unrecognized_opts"; then
1185 case $enable_option_checking in
1186 no) ;;
Antoine Pitrouf65132d2011-02-25 23:25:17 +00001187 fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001188 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1189 esac
1190fi
1191
1192# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001193for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1194 datadir sysconfdir sharedstatedir localstatedir includedir \
1195 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1196 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001197do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001198 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001199 # Remove trailing slashes.
1200 case $ac_val in
1201 */ )
1202 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1203 eval $ac_var=\$ac_val;;
1204 esac
1205 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001206 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001207 [\\/$]* | ?:[\\/]* ) continue;;
1208 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001209 esac
Antoine Pitrouf65132d2011-02-25 23:25:17 +00001210 as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001211done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001212
Martin v. Löwis11437992002-04-12 09:54:03 +00001213# There might be people who depend on the old broken behavior: `$host'
1214# used to hold the argument of --host etc.
1215# FIXME: To remove some day.
1216build=$build_alias
1217host=$host_alias
1218target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001219
Martin v. Löwis11437992002-04-12 09:54:03 +00001220# FIXME: To remove some day.
1221if test "x$host_alias" != x; then
1222 if test "x$build_alias" = x; then
1223 cross_compiling=maybe
Antoine Pitrouf65132d2011-02-25 23:25:17 +00001224 $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
1225 If a cross compiler is detected then cross compile mode will be used." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001226 elif test "x$build_alias" != "x$host_alias"; then
1227 cross_compiling=yes
1228 fi
1229fi
1230
1231ac_tool_prefix=
1232test -n "$host_alias" && ac_tool_prefix=$host_alias-
1233
1234test "$silent" = yes && exec 6>/dev/null
1235
Guido van Rossum627b2d71993-12-24 10:39:16 +00001236
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001237ac_pwd=`pwd` && test -n "$ac_pwd" &&
1238ac_ls_di=`ls -di .` &&
1239ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Antoine Pitrouf65132d2011-02-25 23:25:17 +00001240 as_fn_error "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001241test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Antoine Pitrouf65132d2011-02-25 23:25:17 +00001242 as_fn_error "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001243
1244
Guido van Rossum627b2d71993-12-24 10:39:16 +00001245# Find the source files, if location was not specified.
1246if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001247 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001248 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001249 ac_confdir=`$as_dirname -- "$as_myself" ||
1250$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1251 X"$as_myself" : 'X\(//\)[^/]' \| \
1252 X"$as_myself" : 'X\(//\)$' \| \
1253 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1254$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001255 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1256 s//\1/
1257 q
1258 }
1259 /^X\(\/\/\)[^/].*/{
1260 s//\1/
1261 q
1262 }
1263 /^X\(\/\/\)$/{
1264 s//\1/
1265 q
1266 }
1267 /^X\(\/\).*/{
1268 s//\1/
1269 q
1270 }
1271 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001272 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001273 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001274 srcdir=..
1275 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001276else
1277 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001278fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001279if test ! -r "$srcdir/$ac_unique_file"; then
1280 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Antoine Pitrouf65132d2011-02-25 23:25:17 +00001281 as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001282fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001283ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1284ac_abs_confdir=`(
Antoine Pitrouf65132d2011-02-25 23:25:17 +00001285 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001286 pwd)`
1287# When building in place, set srcdir=.
1288if test "$ac_abs_confdir" = "$ac_pwd"; then
1289 srcdir=.
1290fi
1291# Remove unnecessary trailing slashes from srcdir.
1292# Double slashes in file names in object file debugging info
1293# mess up M-x gdb in Emacs.
1294case $srcdir in
1295*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1296esac
1297for ac_var in $ac_precious_vars; do
1298 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1299 eval ac_env_${ac_var}_value=\$${ac_var}
1300 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1301 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1302done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001303
Martin v. Löwis11437992002-04-12 09:54:03 +00001304#
1305# Report the --help message.
1306#
1307if test "$ac_init_help" = "long"; then
1308 # Omit some internal or obsolete options to make the list less imposing.
1309 # This message is too long to be a string in the A/UX 3.1 sh.
1310 cat <<_ACEOF
Georg Brandl3ebb6b32011-02-20 10:37:07 +00001311\`configure' configures python 3.3 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001312
1313Usage: $0 [OPTION]... [VAR=VALUE]...
1314
1315To assign environment variables (e.g., CC, CFLAGS...), specify them as
1316VAR=VALUE. See below for descriptions of some of the useful variables.
1317
1318Defaults for the options are specified in brackets.
1319
1320Configuration:
1321 -h, --help display this help and exit
1322 --help=short display options specific to this package
1323 --help=recursive display the short help of all the included packages
1324 -V, --version display version information and exit
Antoine Pitrouf65132d2011-02-25 23:25:17 +00001325 -q, --quiet, --silent do not print \`checking...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001326 --cache-file=FILE cache test results in FILE [disabled]
1327 -C, --config-cache alias for \`--cache-file=config.cache'
1328 -n, --no-create do not create output files
1329 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1330
Martin v. Löwis11437992002-04-12 09:54:03 +00001331Installation directories:
1332 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001333 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001334 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001335 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001336
1337By default, \`make install' will install all the files in
1338\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1339an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1340for instance \`--prefix=\$HOME'.
1341
1342For better control, use the options below.
1343
1344Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001345 --bindir=DIR user executables [EPREFIX/bin]
1346 --sbindir=DIR system admin executables [EPREFIX/sbin]
1347 --libexecdir=DIR program executables [EPREFIX/libexec]
1348 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1349 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1350 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1351 --libdir=DIR object code libraries [EPREFIX/lib]
1352 --includedir=DIR C header files [PREFIX/include]
1353 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1354 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1355 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1356 --infodir=DIR info documentation [DATAROOTDIR/info]
1357 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1358 --mandir=DIR man documentation [DATAROOTDIR/man]
1359 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1360 --htmldir=DIR html documentation [DOCDIR]
1361 --dvidir=DIR dvi documentation [DOCDIR]
1362 --pdfdir=DIR pdf documentation [DOCDIR]
1363 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001364_ACEOF
1365
1366 cat <<\_ACEOF
1367_ACEOF
1368fi
1369
1370if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001371 case $ac_init_help in
Georg Brandl3ebb6b32011-02-20 10:37:07 +00001372 short | recursive ) echo "Configuration of python 3.3:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001373 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001374 cat <<\_ACEOF
1375
1376Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001377 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001378 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1379 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001380 --enable-universalsdk[=SDKDIR]
Christian Heimes292d3512008-02-03 16:51:08 +00001381 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001382 --enable-framework[=INSTALLDIR]
1383 Build (MacOSX|Darwin) framework
1384 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001385 --enable-profiling enable C-level code profiling
Benjamin Peterson076ed002010-10-31 17:11:02 +00001386 --enable-loadable-sqlite-extensions
1387 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001388 --enable-ipv6 Enable ipv6 (with ipv4) support
1389 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001390 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001391 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001392
1393Optional Packages:
1394 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1395 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001396 --with-universal-archs=ARCH
1397 select architectures for universal build ("32-bit",
Ronald Oussoren3c064c12009-09-08 07:12:42 +00001398 "64-bit", "3-way", "intel" or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001399 --with-framework-name=FRAMEWORK
1400 specify an alternate name of the framework built
1401 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001402 --without-gcc never use gcc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001403 --with-cxx-main=<compiler>
1404 compile main() and link python executable with C++
1405 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001406 --with-suffix=.exe set executable suffix
1407 --with-pydebug build with Py_DEBUG defined
1408 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001409 --with-system-expat build pyexpat module using an installed expat
1410 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001411 --with-system-ffi build _ctypes module using an installed ffi library
Matthias Klose55708cc2009-04-30 08:06:49 +00001412 --with-dbmliborder=db1:db2:...
1413 order to check db backends for dbm. Valid value is a
1414 colon separated string with the backend names
1415 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001416 --with-signal-module disable/enable signal module
1417 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1418 --with(out)-threads[=DIRECTORY]
1419 disable/enable thread support
1420 --with(out)-thread[=DIRECTORY]
1421 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001422 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001423 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001424 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001425 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001426 --with-fpectl enable SIGFPE catching
1427 --with-libm=STRING math library
1428 --with-libc=STRING C library
Georg Brandl52d168a2008-01-07 18:10:24 +00001429 --with-wide-unicode Use 4-byte Unicode characters (default is 2 bytes)
Antoine Pitrou042b1282010-08-13 21:15:58 +00001430 --with(out)-computed-gotos
1431 Use computed gotos in evaluation loop (enabled by
1432 default on supported compilers)
Martin v. Löwis11437992002-04-12 09:54:03 +00001433
1434Some influential environment variables:
1435 CC C compiler command
1436 CFLAGS C compiler flags
1437 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1438 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001439 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001440 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001441 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001442 CPP C preprocessor
1443
1444Use these variables to override the choices made by `configure' or to help
1445it to find libraries and programs with nonstandard names/locations.
1446
Georg Brandle2e15612009-05-20 18:25:10 +00001447Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001448_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001449ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001450fi
1451
1452if test "$ac_init_help" = "recursive"; then
1453 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001454 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001455 test -d "$ac_dir" ||
1456 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1457 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001458 ac_builddir=.
1459
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001460case "$ac_dir" in
1461.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1462*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001463 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001464 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001465 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001466 case $ac_top_builddir_sub in
1467 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1468 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1469 esac ;;
1470esac
1471ac_abs_top_builddir=$ac_pwd
1472ac_abs_builddir=$ac_pwd$ac_dir_suffix
1473# for backward compatibility:
1474ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001475
1476case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001477 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001478 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001479 ac_top_srcdir=$ac_top_builddir_sub
1480 ac_abs_top_srcdir=$ac_pwd ;;
1481 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001482 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001483 ac_top_srcdir=$srcdir
1484 ac_abs_top_srcdir=$srcdir ;;
1485 *) # Relative name.
1486 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1487 ac_top_srcdir=$ac_top_build_prefix$srcdir
1488 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001489esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001490ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001491
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001492 cd "$ac_dir" || { ac_status=$?; continue; }
1493 # Check for guested configure.
1494 if test -f "$ac_srcdir/configure.gnu"; then
1495 echo &&
1496 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1497 elif test -f "$ac_srcdir/configure"; then
1498 echo &&
1499 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001500 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001501 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001502 fi || ac_status=$?
1503 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001504 done
1505fi
1506
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001507test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001508if $ac_init_version; then
1509 cat <<\_ACEOF
Georg Brandl3ebb6b32011-02-20 10:37:07 +00001510python configure 3.3
Antoine Pitrouf65132d2011-02-25 23:25:17 +00001511generated by GNU Autoconf 2.65
Martin v. Löwis11437992002-04-12 09:54:03 +00001512
Antoine Pitrouf65132d2011-02-25 23:25:17 +00001513Copyright (C) 2009 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001514This configure script is free software; the Free Software Foundation
1515gives unlimited permission to copy, distribute and modify it.
1516_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001517 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001518fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001519
1520## ------------------------ ##
1521## Autoconf initialization. ##
1522## ------------------------ ##
1523
1524# ac_fn_c_try_compile LINENO
1525# --------------------------
1526# Try to compile conftest.$ac_ext, and return whether this succeeded.
1527ac_fn_c_try_compile ()
1528{
1529 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1530 rm -f conftest.$ac_objext
1531 if { { ac_try="$ac_compile"
1532case "(($ac_try" in
1533 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1534 *) ac_try_echo=$ac_try;;
1535esac
1536eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1537$as_echo "$ac_try_echo"; } >&5
1538 (eval "$ac_compile") 2>conftest.err
1539 ac_status=$?
1540 if test -s conftest.err; then
1541 grep -v '^ *+' conftest.err >conftest.er1
1542 cat conftest.er1 >&5
1543 mv -f conftest.er1 conftest.err
1544 fi
1545 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1546 test $ac_status = 0; } && {
1547 test -z "$ac_c_werror_flag" ||
1548 test ! -s conftest.err
1549 } && test -s conftest.$ac_objext; then :
1550 ac_retval=0
1551else
1552 $as_echo "$as_me: failed program was:" >&5
1553sed 's/^/| /' conftest.$ac_ext >&5
1554
1555 ac_retval=1
1556fi
Antoine Pitrouf65132d2011-02-25 23:25:17 +00001557 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00001558 as_fn_set_status $ac_retval
1559
1560} # ac_fn_c_try_compile
1561
1562# ac_fn_c_try_cpp LINENO
1563# ----------------------
1564# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1565ac_fn_c_try_cpp ()
1566{
1567 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1568 if { { ac_try="$ac_cpp conftest.$ac_ext"
1569case "(($ac_try" in
1570 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1571 *) ac_try_echo=$ac_try;;
1572esac
1573eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1574$as_echo "$ac_try_echo"; } >&5
1575 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1576 ac_status=$?
1577 if test -s conftest.err; then
1578 grep -v '^ *+' conftest.err >conftest.er1
1579 cat conftest.er1 >&5
1580 mv -f conftest.er1 conftest.err
1581 fi
1582 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Antoine Pitrouf65132d2011-02-25 23:25:17 +00001583 test $ac_status = 0; } >/dev/null && {
Matthias Kloseb9621712010-04-24 17:59:49 +00001584 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1585 test ! -s conftest.err
1586 }; then :
1587 ac_retval=0
1588else
1589 $as_echo "$as_me: failed program was:" >&5
1590sed 's/^/| /' conftest.$ac_ext >&5
1591
1592 ac_retval=1
1593fi
Antoine Pitrouf65132d2011-02-25 23:25:17 +00001594 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00001595 as_fn_set_status $ac_retval
1596
1597} # ac_fn_c_try_cpp
1598
1599# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1600# -------------------------------------------------------
1601# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1602# the include files in INCLUDES and setting the cache variable VAR
1603# accordingly.
1604ac_fn_c_check_header_mongrel ()
1605{
1606 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Antoine Pitrouf65132d2011-02-25 23:25:17 +00001607 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001608 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1609$as_echo_n "checking for $2... " >&6; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +00001610if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001611 $as_echo_n "(cached) " >&6
1612fi
1613eval ac_res=\$$3
1614 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1615$as_echo "$ac_res" >&6; }
1616else
1617 # Is the header compilable?
1618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1619$as_echo_n "checking $2 usability... " >&6; }
1620cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1621/* end confdefs.h. */
1622$4
1623#include <$2>
1624_ACEOF
1625if ac_fn_c_try_compile "$LINENO"; then :
1626 ac_header_compiler=yes
1627else
1628 ac_header_compiler=no
1629fi
1630rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1631{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1632$as_echo "$ac_header_compiler" >&6; }
1633
1634# Is the header present?
1635{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1636$as_echo_n "checking $2 presence... " >&6; }
1637cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1638/* end confdefs.h. */
1639#include <$2>
1640_ACEOF
1641if ac_fn_c_try_cpp "$LINENO"; then :
1642 ac_header_preproc=yes
1643else
1644 ac_header_preproc=no
1645fi
Antoine Pitrouf65132d2011-02-25 23:25:17 +00001646rm -f conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001647{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1648$as_echo "$ac_header_preproc" >&6; }
1649
1650# So? What about this header?
1651case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1652 yes:no: )
1653 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1654$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1655 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1656$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1657 ;;
1658 no:yes:* )
1659 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1660$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1661 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1662$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1663 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1664$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1665 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1666$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1667 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1668$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Antoine Pitrouf65132d2011-02-25 23:25:17 +00001669( cat <<\_ASBOX
1670## -------------------------------------- ##
Matthias Kloseb9621712010-04-24 17:59:49 +00001671## Report this to http://bugs.python.org/ ##
Antoine Pitrouf65132d2011-02-25 23:25:17 +00001672## -------------------------------------- ##
1673_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +00001674 ) | sed "s/^/$as_me: WARNING: /" >&2
1675 ;;
1676esac
1677 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1678$as_echo_n "checking for $2... " >&6; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +00001679if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001680 $as_echo_n "(cached) " >&6
1681else
1682 eval "$3=\$ac_header_compiler"
1683fi
1684eval ac_res=\$$3
1685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1686$as_echo "$ac_res" >&6; }
1687fi
Antoine Pitrouf65132d2011-02-25 23:25:17 +00001688 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00001689
1690} # ac_fn_c_check_header_mongrel
1691
1692# ac_fn_c_try_run LINENO
1693# ----------------------
1694# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1695# that executables *can* be run.
1696ac_fn_c_try_run ()
1697{
1698 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1699 if { { ac_try="$ac_link"
1700case "(($ac_try" in
1701 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1702 *) ac_try_echo=$ac_try;;
1703esac
1704eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1705$as_echo "$ac_try_echo"; } >&5
1706 (eval "$ac_link") 2>&5
1707 ac_status=$?
1708 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1709 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1710 { { case "(($ac_try" in
1711 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1712 *) ac_try_echo=$ac_try;;
1713esac
1714eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1715$as_echo "$ac_try_echo"; } >&5
1716 (eval "$ac_try") 2>&5
1717 ac_status=$?
1718 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1719 test $ac_status = 0; }; }; then :
1720 ac_retval=0
1721else
1722 $as_echo "$as_me: program exited with status $ac_status" >&5
1723 $as_echo "$as_me: failed program was:" >&5
1724sed 's/^/| /' conftest.$ac_ext >&5
1725
1726 ac_retval=$ac_status
1727fi
1728 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Antoine Pitrouf65132d2011-02-25 23:25:17 +00001729 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00001730 as_fn_set_status $ac_retval
1731
1732} # ac_fn_c_try_run
1733
1734# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1735# -------------------------------------------------------
1736# Tests whether HEADER exists and can be compiled using the include files in
1737# INCLUDES, setting the cache variable VAR accordingly.
1738ac_fn_c_check_header_compile ()
1739{
1740 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1741 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1742$as_echo_n "checking for $2... " >&6; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +00001743if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001744 $as_echo_n "(cached) " >&6
1745else
1746 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1747/* end confdefs.h. */
1748$4
1749#include <$2>
1750_ACEOF
1751if ac_fn_c_try_compile "$LINENO"; then :
1752 eval "$3=yes"
1753else
1754 eval "$3=no"
1755fi
1756rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1757fi
1758eval ac_res=\$$3
1759 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1760$as_echo "$ac_res" >&6; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +00001761 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00001762
1763} # ac_fn_c_check_header_compile
1764
1765# ac_fn_c_try_link LINENO
1766# -----------------------
1767# Try to link conftest.$ac_ext, and return whether this succeeded.
1768ac_fn_c_try_link ()
1769{
1770 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1771 rm -f conftest.$ac_objext conftest$ac_exeext
1772 if { { ac_try="$ac_link"
1773case "(($ac_try" in
1774 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1775 *) ac_try_echo=$ac_try;;
1776esac
1777eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1778$as_echo "$ac_try_echo"; } >&5
1779 (eval "$ac_link") 2>conftest.err
1780 ac_status=$?
1781 if test -s conftest.err; then
1782 grep -v '^ *+' conftest.err >conftest.er1
1783 cat conftest.er1 >&5
1784 mv -f conftest.er1 conftest.err
1785 fi
1786 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1787 test $ac_status = 0; } && {
1788 test -z "$ac_c_werror_flag" ||
1789 test ! -s conftest.err
1790 } && test -s conftest$ac_exeext && {
1791 test "$cross_compiling" = yes ||
1792 $as_test_x conftest$ac_exeext
1793 }; then :
1794 ac_retval=0
1795else
1796 $as_echo "$as_me: failed program was:" >&5
1797sed 's/^/| /' conftest.$ac_ext >&5
1798
1799 ac_retval=1
1800fi
1801 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1802 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1803 # interfere with the next link command; also delete a directory that is
1804 # left behind by Apple's compiler. We do this before executing the actions.
1805 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Antoine Pitrouf65132d2011-02-25 23:25:17 +00001806 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00001807 as_fn_set_status $ac_retval
1808
1809} # ac_fn_c_try_link
1810
1811# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1812# -------------------------------------------
1813# Tests whether TYPE exists after having included INCLUDES, setting cache
1814# variable VAR accordingly.
1815ac_fn_c_check_type ()
1816{
1817 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1818 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1819$as_echo_n "checking for $2... " >&6; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +00001820if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001821 $as_echo_n "(cached) " >&6
1822else
1823 eval "$3=no"
1824 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1825/* end confdefs.h. */
1826$4
1827int
1828main ()
1829{
1830if (sizeof ($2))
1831 return 0;
1832 ;
1833 return 0;
1834}
1835_ACEOF
1836if ac_fn_c_try_compile "$LINENO"; then :
1837 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1838/* end confdefs.h. */
1839$4
1840int
1841main ()
1842{
1843if (sizeof (($2)))
1844 return 0;
1845 ;
1846 return 0;
1847}
1848_ACEOF
1849if ac_fn_c_try_compile "$LINENO"; then :
1850
1851else
1852 eval "$3=yes"
1853fi
1854rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1855fi
1856rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1857fi
1858eval ac_res=\$$3
1859 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1860$as_echo "$ac_res" >&6; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +00001861 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00001862
1863} # ac_fn_c_check_type
1864
1865# ac_fn_c_find_uintX_t LINENO BITS VAR
1866# ------------------------------------
1867# Finds an unsigned integer type with width BITS, setting cache variable VAR
1868# accordingly.
1869ac_fn_c_find_uintX_t ()
1870{
1871 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1872 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1873$as_echo_n "checking for uint$2_t... " >&6; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +00001874if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001875 $as_echo_n "(cached) " >&6
1876else
1877 eval "$3=no"
1878 # Order is important - never check a type that is potentially smaller
1879 # than half of the expected target width.
1880 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1881 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1882 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1883/* end confdefs.h. */
1884$ac_includes_default
1885int
1886main ()
1887{
1888static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
1889test_array [0] = 0
1890
1891 ;
1892 return 0;
1893}
1894_ACEOF
1895if ac_fn_c_try_compile "$LINENO"; then :
1896 case $ac_type in #(
1897 uint$2_t) :
1898 eval "$3=yes" ;; #(
1899 *) :
1900 eval "$3=\$ac_type" ;;
1901esac
1902fi
1903rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitrouf65132d2011-02-25 23:25:17 +00001904 eval as_val=\$$3
1905 if test "x$as_val" = x""no; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001906
1907else
1908 break
1909fi
1910 done
1911fi
1912eval ac_res=\$$3
1913 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1914$as_echo "$ac_res" >&6; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +00001915 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00001916
1917} # ac_fn_c_find_uintX_t
1918
1919# ac_fn_c_find_intX_t LINENO BITS VAR
1920# -----------------------------------
1921# Finds a signed integer type with width BITS, setting cache variable VAR
1922# accordingly.
1923ac_fn_c_find_intX_t ()
1924{
1925 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1926 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
1927$as_echo_n "checking for int$2_t... " >&6; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +00001928if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001929 $as_echo_n "(cached) " >&6
1930else
1931 eval "$3=no"
1932 # Order is important - never check a type that is potentially smaller
1933 # than half of the expected target width.
1934 for ac_type in int$2_t 'int' 'long int' \
1935 'long long int' 'short int' 'signed char'; do
1936 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1937/* end confdefs.h. */
1938$ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00001939int
1940main ()
1941{
Antoine Pitrouf65132d2011-02-25 23:25:17 +00001942static int test_array [1 - 2 * !(enum { N = $2 / 2 - 1 };
1943 0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
Matthias Kloseb9621712010-04-24 17:59:49 +00001944test_array [0] = 0
1945
1946 ;
1947 return 0;
1948}
1949_ACEOF
1950if ac_fn_c_try_compile "$LINENO"; then :
1951 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1952/* end confdefs.h. */
1953$ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00001954int
1955main ()
1956{
Antoine Pitrouf65132d2011-02-25 23:25:17 +00001957static int test_array [1 - 2 * !(enum { N = $2 / 2 - 1 };
1958 ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Kloseb9621712010-04-24 17:59:49 +00001959 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
1960test_array [0] = 0
1961
1962 ;
1963 return 0;
1964}
1965_ACEOF
1966if ac_fn_c_try_compile "$LINENO"; then :
1967
1968else
1969 case $ac_type in #(
1970 int$2_t) :
1971 eval "$3=yes" ;; #(
1972 *) :
1973 eval "$3=\$ac_type" ;;
1974esac
1975fi
1976rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1977fi
1978rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitrouf65132d2011-02-25 23:25:17 +00001979 eval as_val=\$$3
1980 if test "x$as_val" = x""no; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001981
1982else
1983 break
1984fi
1985 done
1986fi
1987eval ac_res=\$$3
1988 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1989$as_echo "$ac_res" >&6; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +00001990 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00001991
1992} # ac_fn_c_find_intX_t
1993
1994# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1995# --------------------------------------------
1996# Tries to find the compile-time value of EXPR in a program that includes
1997# INCLUDES, setting VAR accordingly. Returns whether the value could be
1998# computed
1999ac_fn_c_compute_int ()
2000{
2001 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2002 if test "$cross_compiling" = yes; then
2003 # Depending upon the size, compute the lo and hi bounds.
2004cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2005/* end confdefs.h. */
2006$4
2007int
2008main ()
2009{
2010static int test_array [1 - 2 * !(($2) >= 0)];
2011test_array [0] = 0
2012
2013 ;
2014 return 0;
2015}
2016_ACEOF
2017if ac_fn_c_try_compile "$LINENO"; then :
2018 ac_lo=0 ac_mid=0
2019 while :; do
2020 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2021/* end confdefs.h. */
2022$4
2023int
2024main ()
2025{
2026static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2027test_array [0] = 0
2028
2029 ;
2030 return 0;
2031}
2032_ACEOF
2033if ac_fn_c_try_compile "$LINENO"; then :
2034 ac_hi=$ac_mid; break
2035else
2036 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2037 if test $ac_lo -le $ac_mid; then
2038 ac_lo= ac_hi=
2039 break
2040 fi
2041 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2042fi
2043rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2044 done
2045else
2046 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2047/* end confdefs.h. */
2048$4
2049int
2050main ()
2051{
2052static int test_array [1 - 2 * !(($2) < 0)];
2053test_array [0] = 0
2054
2055 ;
2056 return 0;
2057}
2058_ACEOF
2059if ac_fn_c_try_compile "$LINENO"; then :
2060 ac_hi=-1 ac_mid=-1
2061 while :; do
2062 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2063/* end confdefs.h. */
2064$4
2065int
2066main ()
2067{
2068static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2069test_array [0] = 0
2070
2071 ;
2072 return 0;
2073}
2074_ACEOF
2075if ac_fn_c_try_compile "$LINENO"; then :
2076 ac_lo=$ac_mid; break
2077else
2078 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2079 if test $ac_mid -le $ac_hi; then
2080 ac_lo= ac_hi=
2081 break
2082 fi
2083 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2084fi
2085rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2086 done
2087else
2088 ac_lo= ac_hi=
2089fi
2090rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2091fi
2092rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2093# Binary search between lo and hi bounds.
2094while test "x$ac_lo" != "x$ac_hi"; do
2095 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2096 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2097/* end confdefs.h. */
2098$4
2099int
2100main ()
2101{
2102static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2103test_array [0] = 0
2104
2105 ;
2106 return 0;
2107}
2108_ACEOF
2109if ac_fn_c_try_compile "$LINENO"; then :
2110 ac_hi=$ac_mid
2111else
2112 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2113fi
2114rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2115done
2116case $ac_lo in #((
2117?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2118'') ac_retval=1 ;;
2119esac
2120 else
2121 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2122/* end confdefs.h. */
2123$4
2124static long int longval () { return $2; }
2125static unsigned long int ulongval () { return $2; }
2126#include <stdio.h>
2127#include <stdlib.h>
2128int
2129main ()
2130{
2131
2132 FILE *f = fopen ("conftest.val", "w");
2133 if (! f)
2134 return 1;
2135 if (($2) < 0)
2136 {
2137 long int i = longval ();
2138 if (i != ($2))
2139 return 1;
2140 fprintf (f, "%ld", i);
2141 }
2142 else
2143 {
2144 unsigned long int i = ulongval ();
2145 if (i != ($2))
2146 return 1;
2147 fprintf (f, "%lu", i);
2148 }
2149 /* Do not output a trailing newline, as this causes \r\n confusion
2150 on some platforms. */
2151 return ferror (f) || fclose (f) != 0;
2152
2153 ;
2154 return 0;
2155}
2156_ACEOF
2157if ac_fn_c_try_run "$LINENO"; then :
2158 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2159else
2160 ac_retval=1
2161fi
2162rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2163 conftest.$ac_objext conftest.beam conftest.$ac_ext
2164rm -f conftest.val
2165
2166 fi
Antoine Pitrouf65132d2011-02-25 23:25:17 +00002167 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00002168 as_fn_set_status $ac_retval
2169
2170} # ac_fn_c_compute_int
2171
2172# ac_fn_c_check_func LINENO FUNC VAR
2173# ----------------------------------
2174# Tests whether FUNC exists, setting the cache variable VAR accordingly
2175ac_fn_c_check_func ()
2176{
2177 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2178 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2179$as_echo_n "checking for $2... " >&6; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +00002180if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002181 $as_echo_n "(cached) " >&6
2182else
2183 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2184/* end confdefs.h. */
2185/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2186 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2187#define $2 innocuous_$2
2188
2189/* System header to define __stub macros and hopefully few prototypes,
2190 which can conflict with char $2 (); below.
2191 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2192 <limits.h> exists even on freestanding compilers. */
2193
2194#ifdef __STDC__
2195# include <limits.h>
2196#else
2197# include <assert.h>
2198#endif
2199
2200#undef $2
2201
2202/* Override any GCC internal prototype to avoid an error.
2203 Use char because int might match the return type of a GCC
2204 builtin and then its argument prototype would still apply. */
2205#ifdef __cplusplus
2206extern "C"
2207#endif
2208char $2 ();
2209/* The GNU C library defines this for functions which it implements
2210 to always fail with ENOSYS. Some functions are actually named
2211 something starting with __ and the normal name is an alias. */
2212#if defined __stub_$2 || defined __stub___$2
2213choke me
2214#endif
2215
2216int
2217main ()
2218{
2219return $2 ();
2220 ;
2221 return 0;
2222}
2223_ACEOF
2224if ac_fn_c_try_link "$LINENO"; then :
2225 eval "$3=yes"
2226else
2227 eval "$3=no"
2228fi
2229rm -f core conftest.err conftest.$ac_objext \
2230 conftest$ac_exeext conftest.$ac_ext
2231fi
2232eval ac_res=\$$3
2233 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2234$as_echo "$ac_res" >&6; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +00002235 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00002236
2237} # ac_fn_c_check_func
2238
2239# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2240# ----------------------------------------------------
2241# Tries to find if the field MEMBER exists in type AGGR, after including
2242# INCLUDES, setting cache variable VAR accordingly.
2243ac_fn_c_check_member ()
2244{
2245 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2246 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2247$as_echo_n "checking for $2.$3... " >&6; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +00002248if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002249 $as_echo_n "(cached) " >&6
2250else
2251 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2252/* end confdefs.h. */
2253$5
2254int
2255main ()
2256{
2257static $2 ac_aggr;
2258if (ac_aggr.$3)
2259return 0;
2260 ;
2261 return 0;
2262}
2263_ACEOF
2264if ac_fn_c_try_compile "$LINENO"; then :
2265 eval "$4=yes"
2266else
2267 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2268/* end confdefs.h. */
2269$5
2270int
2271main ()
2272{
2273static $2 ac_aggr;
2274if (sizeof ac_aggr.$3)
2275return 0;
2276 ;
2277 return 0;
2278}
2279_ACEOF
2280if ac_fn_c_try_compile "$LINENO"; then :
2281 eval "$4=yes"
2282else
2283 eval "$4=no"
2284fi
2285rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2286fi
2287rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2288fi
2289eval ac_res=\$$4
2290 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2291$as_echo "$ac_res" >&6; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +00002292 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00002293
2294} # ac_fn_c_check_member
2295
Antoine Pitrouf65132d2011-02-25 23:25:17 +00002296# ac_fn_c_check_decl LINENO SYMBOL VAR
2297# ------------------------------------
2298# Tests whether SYMBOL is declared, setting cache variable VAR accordingly.
Matthias Kloseb9621712010-04-24 17:59:49 +00002299ac_fn_c_check_decl ()
2300{
2301 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Antoine Pitrouf65132d2011-02-25 23:25:17 +00002302 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $2 is declared" >&5
2303$as_echo_n "checking whether $2 is declared... " >&6; }
2304if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002305 $as_echo_n "(cached) " >&6
2306else
2307 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2308/* end confdefs.h. */
2309$4
2310int
2311main ()
2312{
Antoine Pitrouf65132d2011-02-25 23:25:17 +00002313#ifndef $2
2314 (void) $2;
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; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +00002331 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00002332
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
Georg Brandl3ebb6b32011-02-20 10:37:07 +00002338It was created by python $as_me 3.3, which was
Antoine Pitrouf65132d2011-02-25 23:25:17 +00002339generated by GNU Autoconf 2.65. 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
Antoine Pitrouf65132d2011-02-25 23:25:17 +00002449 cat <<\_ASBOX
2450## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002451## Cache variables. ##
Antoine Pitrouf65132d2011-02-25 23:25:17 +00002452## ---------------- ##
2453_ASBOX
Martin v. Löwis11437992002-04-12 09:54:03 +00002454 echo
2455 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002456(
2457 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2458 eval ac_val=\$$ac_var
2459 case $ac_val in #(
2460 *${as_nl}*)
2461 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002462 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2463$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002464 esac
2465 case $ac_var in #(
2466 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002467 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2468 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002469 esac ;;
2470 esac
2471 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002472 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002473 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2474 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002475 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002476 "s/'\''/'\''\\\\'\'''\''/g;
2477 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2478 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002479 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002480 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002481 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002482 esac |
2483 sort
2484)
Martin v. Löwis11437992002-04-12 09:54:03 +00002485 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002486
Antoine Pitrouf65132d2011-02-25 23:25:17 +00002487 cat <<\_ASBOX
2488## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002489## Output variables. ##
Antoine Pitrouf65132d2011-02-25 23:25:17 +00002490## ----------------- ##
2491_ASBOX
Skip Montanaro6dead952003-09-25 14:50:04 +00002492 echo
2493 for ac_var in $ac_subst_vars
2494 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002495 eval ac_val=\$$ac_var
2496 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002497 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002498 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002499 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002500 done | sort
2501 echo
2502
2503 if test -n "$ac_subst_files"; then
Antoine Pitrouf65132d2011-02-25 23:25:17 +00002504 cat <<\_ASBOX
2505## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002506## File substitutions. ##
Antoine Pitrouf65132d2011-02-25 23:25:17 +00002507## ------------------- ##
2508_ASBOX
Skip Montanaro6dead952003-09-25 14:50:04 +00002509 echo
2510 for ac_var in $ac_subst_files
2511 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002512 eval ac_val=\$$ac_var
2513 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002514 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002515 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002516 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002517 done | sort
2518 echo
2519 fi
2520
Martin v. Löwis11437992002-04-12 09:54:03 +00002521 if test -s confdefs.h; then
Antoine Pitrouf65132d2011-02-25 23:25:17 +00002522 cat <<\_ASBOX
2523## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002524## confdefs.h. ##
Antoine Pitrouf65132d2011-02-25 23:25:17 +00002525## ----------- ##
2526_ASBOX
Martin v. Löwis11437992002-04-12 09:54:03 +00002527 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002528 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002529 echo
2530 fi
2531 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002532 $as_echo "$as_me: caught signal $ac_signal"
2533 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002534 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002535 rm -f core *.core core.conftest.* &&
2536 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002537 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002538' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002539for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002540 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002541done
2542ac_signal=0
2543
2544# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002545rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002546
Matthias Kloseb9621712010-04-24 17:59:49 +00002547$as_echo "/* confdefs.h */" > confdefs.h
2548
Martin v. Löwis11437992002-04-12 09:54:03 +00002549# Predefined preprocessor variables.
2550
2551cat >>confdefs.h <<_ACEOF
2552#define PACKAGE_NAME "$PACKAGE_NAME"
2553_ACEOF
2554
Martin v. Löwis11437992002-04-12 09:54:03 +00002555cat >>confdefs.h <<_ACEOF
2556#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2557_ACEOF
2558
Martin v. Löwis11437992002-04-12 09:54:03 +00002559cat >>confdefs.h <<_ACEOF
2560#define PACKAGE_VERSION "$PACKAGE_VERSION"
2561_ACEOF
2562
Martin v. Löwis11437992002-04-12 09:54:03 +00002563cat >>confdefs.h <<_ACEOF
2564#define PACKAGE_STRING "$PACKAGE_STRING"
2565_ACEOF
2566
Martin v. Löwis11437992002-04-12 09:54:03 +00002567cat >>confdefs.h <<_ACEOF
2568#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2569_ACEOF
2570
Matthias Kloseb9621712010-04-24 17:59:49 +00002571cat >>confdefs.h <<_ACEOF
2572#define PACKAGE_URL "$PACKAGE_URL"
2573_ACEOF
2574
Martin v. Löwis11437992002-04-12 09:54:03 +00002575
2576# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002577# Prefer an explicitly selected file to automatically selected ones.
2578ac_site_file1=NONE
2579ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002580if test -n "$CONFIG_SITE"; then
Antoine Pitrouf65132d2011-02-25 23:25:17 +00002581 ac_site_file1=$CONFIG_SITE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002582elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002583 ac_site_file1=$prefix/share/config.site
2584 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002585else
Matthias Kloseb9621712010-04-24 17:59:49 +00002586 ac_site_file1=$ac_default_prefix/share/config.site
2587 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002588fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002589for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002590do
Matthias Kloseb9621712010-04-24 17:59:49 +00002591 test "x$ac_site_file" = xNONE && continue
2592 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2593 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2594$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002595 sed 's/^/| /' "$ac_site_file" >&5
Antoine Pitrouf65132d2011-02-25 23:25:17 +00002596 . "$ac_site_file"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002597 fi
2598done
2599
2600if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002601 # Some versions of bash will fail to source /dev/null (special files
2602 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2603 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2604 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2605$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002606 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002607 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2608 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002609 esac
2610 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002611else
Matthias Kloseb9621712010-04-24 17:59:49 +00002612 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2613$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002614 >$cache_file
2615fi
2616
2617# Check that the precious variables saved in the cache have kept the same
2618# value.
2619ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002620for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002621 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2622 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002623 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2624 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002625 case $ac_old_set,$ac_new_set in
2626 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002627 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2628$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 +00002629 ac_cache_corrupted=: ;;
2630 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002631 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2632$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002633 ac_cache_corrupted=: ;;
2634 ,);;
2635 *)
2636 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002637 # differences in whitespace do not lead to failure.
2638 ac_old_val_w=`echo x $ac_old_val`
2639 ac_new_val_w=`echo x $ac_new_val`
2640 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2641 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2642$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2643 ac_cache_corrupted=:
2644 else
2645 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2646$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2647 eval $ac_var=\$ac_old_val
2648 fi
2649 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2650$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2651 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2652$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002653 fi;;
2654 esac
2655 # Pass precious variables to config.status.
2656 if test "$ac_new_set" = set; then
2657 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002658 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002659 *) ac_arg=$ac_var=$ac_new_val ;;
2660 esac
2661 case " $ac_configure_args " in
2662 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002663 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002664 esac
2665 fi
2666done
2667if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002668 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2669$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2670 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2671$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Antoine Pitrouf65132d2011-02-25 23:25:17 +00002672 as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002673fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002674## -------------------- ##
2675## Main body of script. ##
2676## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002677
Guido van Rossum7f43da71994-08-01 12:15:30 +00002678ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002679ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002680ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2681ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2682ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002683
Guido van Rossum627b2d71993-12-24 10:39:16 +00002684
Michael W. Hudson54241132001-12-07 15:38:26 +00002685
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002686ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002687
2688
Martin v. Löwis11437992002-04-12 09:54:03 +00002689
Benjamin Petersond23f8222009-04-05 19:13:16 +00002690if test "$prefix" != "/"; then
2691 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2692fi
2693
2694
Martin v. Löwis11437992002-04-12 09:54:03 +00002695
2696
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002697# We don't use PACKAGE_ variables, and they cause conflicts
2698# with other autoconf-based packages that include Python.h
2699grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2700rm confdefs.h
2701mv confdefs.h.new confdefs.h
2702
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002703
Georg Brandl3ebb6b32011-02-20 10:37:07 +00002704VERSION=3.3
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002705
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002706# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002707
2708SOVERSION=1.0
2709
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002710# The later defininition of _XOPEN_SOURCE disables certain features
2711# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2712
Matthias Kloseb9621712010-04-24 17:59:49 +00002713$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002714
2715
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002716# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2717# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2718# them.
2719
Matthias Kloseb9621712010-04-24 17:59:49 +00002720$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002721
2722
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002723# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2724# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2725# them.
2726
Matthias Kloseb9621712010-04-24 17:59:49 +00002727$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002728
2729
Martin v. Löwisd6320502004-08-12 13:45:08 +00002730# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2731# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
2732
Matthias Kloseb9621712010-04-24 17:59:49 +00002733$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00002734
2735
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002736# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2737# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2738# them.
2739
Matthias Kloseb9621712010-04-24 17:59:49 +00002740$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002741
2742
2743
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002744define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002745
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00002746# Arguments passed to configure.
2747
2748CONFIG_ARGS="$ac_configure_args"
2749
Matthias Kloseb9621712010-04-24 17:59:49 +00002750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
2751$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002752# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002753if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002754 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00002755 case $enableval in
2756 yes)
2757 enableval=/Developer/SDKs/MacOSX10.4u.sdk
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002758 if test ! -d "${enableval}"
2759 then
2760 enableval=/
2761 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002762 ;;
2763 esac
2764 case $enableval in
2765 no)
2766 UNIVERSALSDK=
2767 enable_universalsdk=
2768 ;;
2769 *)
2770 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002771 if test ! -d "${UNIVERSALSDK}"
2772 then
Antoine Pitrouf65132d2011-02-25 23:25:17 +00002773 as_fn_error "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002774 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002775 ;;
2776 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002777
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002778
Thomas Wouters477c8d52006-05-27 19:21:47 +00002779else
2780
2781 UNIVERSALSDK=
2782 enable_universalsdk=
2783
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002784fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002785
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002786if test -n "${UNIVERSALSDK}"
2787then
Matthias Kloseb9621712010-04-24 17:59:49 +00002788 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
2789$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002790else
Matthias Kloseb9621712010-04-24 17:59:49 +00002791 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2792$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002793fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002794
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002795
Benjamin Peterson6794aa32008-07-16 20:33:37 +00002796
2797
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002798UNIVERSAL_ARCHS="32-bit"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00002799
Matthias Kloseb9621712010-04-24 17:59:49 +00002800{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
2801$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002802
2803# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002804if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002805 withval=$with_universal_archs;
Matthias Kloseb9621712010-04-24 17:59:49 +00002806 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
2807$as_echo "$withval" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002808 UNIVERSAL_ARCHS="$withval"
2809
2810else
2811
Matthias Kloseb9621712010-04-24 17:59:49 +00002812 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 32-bit" >&5
2813$as_echo "32-bit" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002814
2815fi
2816
2817
2818
2819
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002820
2821# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002822if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002823 withval=$with_framework_name;
2824 PYTHONFRAMEWORK=${withval}
2825 PYTHONFRAMEWORKDIR=${withval}.framework
2826 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
2827
2828else
2829
2830 PYTHONFRAMEWORK=Python
2831 PYTHONFRAMEWORKDIR=Python.framework
2832 PYTHONFRAMEWORKIDENTIFIER=org.python.python
2833
2834fi
2835
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002836# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002837if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002838 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00002839 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00002840 yes)
Jack Jansene578a632001-08-15 01:27:14 +00002841 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00002842 esac
2843 case $enableval in
2844 no)
2845 PYTHONFRAMEWORK=
2846 PYTHONFRAMEWORKDIR=no-framework
2847 PYTHONFRAMEWORKPREFIX=
2848 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002849 FRAMEWORKINSTALLFIRST=
2850 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002851 FRAMEWORKALTINSTALLFIRST=
2852 FRAMEWORKALTINSTALLLAST=
2853 if test "x${prefix}" = "xNONE"; then
2854 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2855 else
2856 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2857 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00002858 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00002859 ;;
2860 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002861 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00002862 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00002863 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00002864 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00002865 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
2866 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002867 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002868
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002869 if test "x${prefix}" = "xNONE" ; then
2870 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002871
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002872 else
2873 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2874 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002875
2876 case "${enableval}" in
2877 /System*)
2878 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2879 if test "${prefix}" = "NONE" ; then
2880 # See below
2881 FRAMEWORKUNIXTOOLSPREFIX="/usr"
2882 fi
2883 ;;
2884
2885 /Library*)
2886 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2887 ;;
2888
2889 */Library/Frameworks)
2890 MDIR="`dirname "${enableval}"`"
2891 MDIR="`dirname "${MDIR}"`"
2892 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
2893
2894 if test "${prefix}" = "NONE"; then
2895 # User hasn't specified the
2896 # --prefix option, but wants to install
2897 # the framework in a non-default location,
2898 # ensure that the compatibility links get
2899 # installed relative to that prefix as well
2900 # instead of in /usr/local.
2901 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
2902 fi
2903 ;;
2904
2905 *)
2906 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2907 ;;
2908 esac
2909
Jack Jansen127e56e2001-09-11 14:41:54 +00002910 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00002911
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002912 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00002913 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002914 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002915
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002916 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002917
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002918 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
2919
2920 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
2921
Jack Jansene578a632001-08-15 01:27:14 +00002922 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002923
Guido van Rossum563e7081996-09-10 18:20:48 +00002924else
Martin v. Löwis11437992002-04-12 09:54:03 +00002925
Jack Jansene578a632001-08-15 01:27:14 +00002926 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00002927 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00002928 PYTHONFRAMEWORKPREFIX=
2929 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002930 FRAMEWORKINSTALLFIRST=
2931 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002932 FRAMEWORKALTINSTALLFIRST=
2933 FRAMEWORKALTINSTALLLAST=
2934 if test "x${prefix}" = "xNONE" ; then
2935 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2936 else
2937 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2938 fi
Jack Jansene578a632001-08-15 01:27:14 +00002939 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002940
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002941
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002942fi
2943
Thomas Wouters477c8d52006-05-27 19:21:47 +00002944
2945
Michael W. Hudson54241132001-12-07 15:38:26 +00002946
2947
2948
2949
Jack Jansene578a632001-08-15 01:27:14 +00002950
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002951
2952
2953
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002954
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002955
Jack Jansene578a632001-08-15 01:27:14 +00002956##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00002957## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00002958## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00002959##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002960# Set name for machine-dependent library files
2961
Matthias Kloseb9621712010-04-24 17:59:49 +00002962{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
2963$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002964if test -z "$MACHDEP"
2965then
Guido van Rossum563e7081996-09-10 18:20:48 +00002966 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002967 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00002968 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00002969 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002970 else
Guido van Rossum563e7081996-09-10 18:20:48 +00002971 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002972 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00002973 ac_md_system=`echo $ac_sys_system |
2974 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
2975 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00002976 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00002977 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00002978
Guido van Rossum07397971997-04-29 21:49:50 +00002979 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002980 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002981 darwin*) MACHDEP="darwin";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00002982 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00002983 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002984 esac
2985fi
Guido van Rossum91922671997-10-09 20:24:13 +00002986
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002987# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
2988# disable features if it is defined, without any means to access these
2989# features as extensions. For these systems, we skip the definition of
2990# _XOPEN_SOURCE. Before adding a system to the list to gain access to
2991# some feature, make sure there is no alternative way to access this
2992# feature. Also, when using wildcards, make sure you have verified the
2993# need for not defining _XOPEN_SOURCE on all systems matching the
2994# wildcard, and that the wildcard does not include future systems
2995# (which may remove their limitations).
2996case $ac_sys_system/$ac_sys_release in
2997 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
2998 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00002999 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003000 # In addition, Stefan Krah confirms that issue #1244610 exists through
3001 # OpenBSD 4.6, but is fixed in 4.7.
3002 OpenBSD/2.* | OpenBSD/3.[0123456789] | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003003 define_xopen_source=no
3004 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3005 # also defined. This can be overridden by defining _BSD_SOURCE
3006 # As this has a different meaning on Linux, only define it on OpenBSD
3007
Matthias Kloseb9621712010-04-24 17:59:49 +00003008$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003009
3010 ;;
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003011 OpenBSD/4.[789])
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003012 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3013 # also defined. This can be overridden by defining _BSD_SOURCE
3014 # As this has a different meaning on Linux, only define it on OpenBSD
3015
Matthias Kloseb9621712010-04-24 17:59:49 +00003016$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003017
3018 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003019 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3020 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3021 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003022 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 +00003023 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003024 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3025 # request to enable features supported by the standard as a request
3026 # to disable features not supported by the standard. The best way
3027 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3028 # entirely and define __EXTENSIONS__ instead.
3029 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003030 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003031 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3032 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003033 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003034 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003035 define_xopen_source=no;;
3036 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003037 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003038 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003039 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003040 # On FreeBSD 4, the math functions C89 does not cover are never defined
3041 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3042 FreeBSD/4.*)
3043 define_xopen_source=no;;
3044 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3045 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3046 # identifies itself as Darwin/7.*
3047 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3048 # disables platform specific features beyond repair.
3049 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3050 # has no effect, don't bother defining them
3051 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003052 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003053 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003054 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003055 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3056 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3057 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003058 AIX/4)
3059 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003060 AIX/5)
3061 if test `uname -r` -eq 1; then
3062 define_xopen_source=no
3063 fi
3064 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003065 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3066 # defining NI_NUMERICHOST.
3067 QNX/6.3.2)
3068 define_xopen_source=no
3069 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003070
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003071esac
3072
3073if test $define_xopen_source = yes
3074then
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003075
Matthias Kloseb9621712010-04-24 17:59:49 +00003076$as_echo "#define _XOPEN_SOURCE 600" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003077
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003078
3079 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3080 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3081 # several APIs are not declared. Since this is also needed in some
3082 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003083
Matthias Kloseb9621712010-04-24 17:59:49 +00003084$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003085
3086
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003087
Matthias Kloseb9621712010-04-24 17:59:49 +00003088$as_echo "#define _POSIX_C_SOURCE 200112L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003089
3090
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003091fi
3092
Guido van Rossum91922671997-10-09 20:24:13 +00003093#
3094# SGI compilers allow the specification of the both the ABI and the
3095# ISA on the command line. Depending on the values of these switches,
3096# different and often incompatable code will be generated.
3097#
3098# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3099# thus supply support for various ABI/ISA combinations. The MACHDEP
3100# variable is also adjusted.
3101#
3102
3103if test ! -z "$SGI_ABI"
3104then
3105 CC="cc $SGI_ABI"
3106 LDFLAGS="$SGI_ABI $LDFLAGS"
3107 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3108fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003109{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3110$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003111
Jack Jansen6b08a402004-06-03 12:41:45 +00003112# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3113# it may influence the way we can build extensions, so distutils
3114# needs to check it
3115
Thomas Wouters477c8d52006-05-27 19:21:47 +00003116
Jack Jansen6b08a402004-06-03 12:41:45 +00003117CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003118EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003119
Matthias Kloseb9621712010-04-24 17:59:49 +00003120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking machine type as reported by uname -m" >&5
3121$as_echo_n "checking machine type as reported by uname -m... " >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00003122ac_sys_machine=`uname -m`
Matthias Kloseb9621712010-04-24 17:59:49 +00003123{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_sys_machine" >&5
3124$as_echo "$ac_sys_machine" >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00003125
Guido van Rossum627b2d71993-12-24 10:39:16 +00003126# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003127
3128# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3129# for debug/optimization stuff. BASECFLAGS is for flags that are required
3130# just to get things to compile and link. Users are free to override OPT
3131# when running configure or make. The build should not break if they do.
3132# BASECFLAGS should generally not be messed with, however.
3133
3134# XXX shouldn't some/most/all of this code be merged with the stuff later
3135# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003136{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3137$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003138
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003139# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003140if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003141 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003142 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003143 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003144 without_gcc=yes;;
3145 yes) CC=gcc
3146 without_gcc=no;;
3147 *) CC=$withval
3148 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003149 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003150else
Martin v. Löwis11437992002-04-12 09:54:03 +00003151
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003152 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003153 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003154 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003155 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003156 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003157fi
3158
Matthias Kloseb9621712010-04-24 17:59:49 +00003159{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3160$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003161
Guido van Rossum8b131c51995-03-09 14:10:13 +00003162# If the user switches compilers, we can't believe the cache
3163if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3164then
Antoine Pitrouf65132d2011-02-25 23:25:17 +00003165 as_fn_error "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003166(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003167fi
3168
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003169# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3170# when the compiler supports them, but we don't always want -O2, and
3171# we set -g later.
3172if test -z "$CFLAGS"; then
3173 CFLAGS=
3174fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003175ac_ext=c
3176ac_cpp='$CPP $CPPFLAGS'
3177ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3178ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3179ac_compiler_gnu=$ac_cv_c_compiler_gnu
3180if test -n "$ac_tool_prefix"; then
3181 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3182set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003183{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3184$as_echo_n "checking for $ac_word... " >&6; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +00003185if test "${ac_cv_prog_CC+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003186 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003187else
3188 if test -n "$CC"; then
3189 ac_cv_prog_CC="$CC" # Let the user override the test.
3190else
Martin v. Löwis11437992002-04-12 09:54:03 +00003191as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3192for as_dir in $PATH
3193do
3194 IFS=$as_save_IFS
3195 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003196 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003197 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 +00003198 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003199 $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 +00003200 break 2
3201 fi
3202done
Matthias Kloseb9621712010-04-24 17:59:49 +00003203 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003204IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003205
Jack Jansendd19cf82001-12-06 22:36:17 +00003206fi
3207fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003208CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003209if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003210 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3211$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003212else
Matthias Kloseb9621712010-04-24 17:59:49 +00003213 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3214$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003215fi
3216
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003217
Martin v. Löwis11437992002-04-12 09:54:03 +00003218fi
3219if test -z "$ac_cv_prog_CC"; then
3220 ac_ct_CC=$CC
3221 # Extract the first word of "gcc", so it can be a program name with args.
3222set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003223{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3224$as_echo_n "checking for $ac_word... " >&6; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +00003225if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003226 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003227else
3228 if test -n "$ac_ct_CC"; then
3229 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3230else
3231as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3232for as_dir in $PATH
3233do
3234 IFS=$as_save_IFS
3235 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003236 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003237 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 +00003238 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003239 $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 +00003240 break 2
3241 fi
3242done
Matthias Kloseb9621712010-04-24 17:59:49 +00003243 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003244IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003245
3246fi
3247fi
3248ac_ct_CC=$ac_cv_prog_ac_ct_CC
3249if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003250 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3251$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003252else
Matthias Kloseb9621712010-04-24 17:59:49 +00003253 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3254$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003255fi
3256
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003257 if test "x$ac_ct_CC" = x; then
3258 CC=""
3259 else
3260 case $cross_compiling:$ac_tool_warned in
3261yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003262{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3263$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003264ac_tool_warned=yes ;;
3265esac
3266 CC=$ac_ct_CC
3267 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003268else
3269 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003270fi
3271
Jack Jansendd19cf82001-12-06 22:36:17 +00003272if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003273 if test -n "$ac_tool_prefix"; then
3274 # 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 +00003275set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003276{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3277$as_echo_n "checking for $ac_word... " >&6; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +00003278if test "${ac_cv_prog_CC+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003279 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003280else
3281 if test -n "$CC"; then
3282 ac_cv_prog_CC="$CC" # Let the user override the test.
3283else
Martin v. Löwis11437992002-04-12 09:54:03 +00003284as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3285for as_dir in $PATH
3286do
3287 IFS=$as_save_IFS
3288 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003289 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003290 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 +00003291 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003292 $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 +00003293 break 2
3294 fi
3295done
Matthias Kloseb9621712010-04-24 17:59:49 +00003296 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003297IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003298
3299fi
3300fi
3301CC=$ac_cv_prog_CC
3302if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003303 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3304$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003305else
Matthias Kloseb9621712010-04-24 17:59:49 +00003306 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3307$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003308fi
3309
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003310
Martin v. Löwis11437992002-04-12 09:54:03 +00003311 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003312fi
3313if test -z "$CC"; then
3314 # Extract the first word of "cc", so it can be a program name with args.
3315set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003316{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3317$as_echo_n "checking for $ac_word... " >&6; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +00003318if test "${ac_cv_prog_CC+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003319 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003320else
3321 if test -n "$CC"; then
3322 ac_cv_prog_CC="$CC" # Let the user override the test.
3323else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003324 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003325as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3326for as_dir in $PATH
3327do
3328 IFS=$as_save_IFS
3329 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003330 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003331 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 +00003332 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3333 ac_prog_rejected=yes
3334 continue
3335 fi
3336 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003337 $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 +00003338 break 2
3339 fi
3340done
Matthias Kloseb9621712010-04-24 17:59:49 +00003341 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003342IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003343
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003344if test $ac_prog_rejected = yes; then
3345 # We found a bogon in the path, so make sure we never use it.
3346 set dummy $ac_cv_prog_CC
3347 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003348 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003349 # We chose a different compiler from the bogus one.
3350 # However, it has the same basename, so the bogon will be chosen
3351 # first if we set CC to just the basename; use the full file name.
3352 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003353 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003354 fi
3355fi
3356fi
3357fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003358CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003359if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003360 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3361$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003362else
Matthias Kloseb9621712010-04-24 17:59:49 +00003363 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3364$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003365fi
3366
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003367
Martin v. Löwis11437992002-04-12 09:54:03 +00003368fi
3369if test -z "$CC"; then
3370 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003371 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003372 do
3373 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3374set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003375{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3376$as_echo_n "checking for $ac_word... " >&6; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +00003377if test "${ac_cv_prog_CC+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003378 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003379else
3380 if test -n "$CC"; then
3381 ac_cv_prog_CC="$CC" # Let the user override the test.
3382else
Martin v. Löwis11437992002-04-12 09:54:03 +00003383as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3384for as_dir in $PATH
3385do
3386 IFS=$as_save_IFS
3387 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003388 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003389 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 +00003390 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003391 $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 +00003392 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003393 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003394done
Matthias Kloseb9621712010-04-24 17:59:49 +00003395 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003396IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003397
3398fi
3399fi
3400CC=$ac_cv_prog_CC
3401if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003402 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3403$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003404else
Matthias Kloseb9621712010-04-24 17:59:49 +00003405 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3406$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003407fi
3408
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003409
Martin v. Löwis11437992002-04-12 09:54:03 +00003410 test -n "$CC" && break
3411 done
3412fi
3413if test -z "$CC"; then
3414 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003415 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003416do
3417 # Extract the first word of "$ac_prog", so it can be a program name with args.
3418set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003419{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3420$as_echo_n "checking for $ac_word... " >&6; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +00003421if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003422 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003423else
3424 if test -n "$ac_ct_CC"; then
3425 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3426else
3427as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3428for as_dir in $PATH
3429do
3430 IFS=$as_save_IFS
3431 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003432 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003433 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 +00003434 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003435 $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 +00003436 break 2
3437 fi
3438done
Matthias Kloseb9621712010-04-24 17:59:49 +00003439 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003440IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003441
Martin v. Löwis11437992002-04-12 09:54:03 +00003442fi
3443fi
3444ac_ct_CC=$ac_cv_prog_ac_ct_CC
3445if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003446 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3447$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003448else
Matthias Kloseb9621712010-04-24 17:59:49 +00003449 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3450$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003451fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003452
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003453
Martin v. Löwis11437992002-04-12 09:54:03 +00003454 test -n "$ac_ct_CC" && break
3455done
Michael W. Hudson54241132001-12-07 15:38:26 +00003456
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003457 if test "x$ac_ct_CC" = x; then
3458 CC=""
3459 else
3460 case $cross_compiling:$ac_tool_warned in
3461yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003462{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3463$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003464ac_tool_warned=yes ;;
3465esac
3466 CC=$ac_ct_CC
3467 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003468fi
3469
3470fi
3471
3472
Matthias Kloseb9621712010-04-24 17:59:49 +00003473test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3474$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Antoine Pitrouf65132d2011-02-25 23:25:17 +00003475as_fn_error "no acceptable C compiler found in \$PATH
3476See \`config.log' for more details." "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003477
3478# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003479$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3480set X $ac_compile
3481ac_compiler=$2
3482for ac_option in --version -v -V -qversion; do
3483 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003484case "(($ac_try" in
3485 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3486 *) ac_try_echo=$ac_try;;
3487esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003488eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3489$as_echo "$ac_try_echo"; } >&5
3490 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003491 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003492 if test -s conftest.err; then
3493 sed '10a\
3494... rest of stderr output deleted ...
3495 10q' conftest.err >conftest.er1
3496 cat conftest.er1 >&5
3497 fi
3498 rm -f conftest.er1 conftest.err
3499 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3500 test $ac_status = 0; }
3501done
Martin v. Löwis11437992002-04-12 09:54:03 +00003502
Matthias Kloseb9621712010-04-24 17:59:49 +00003503cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003504/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003505
Martin v. Löwis11437992002-04-12 09:54:03 +00003506int
3507main ()
3508{
3509
3510 ;
3511 return 0;
3512}
3513_ACEOF
3514ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003515ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003516# Try to create an executable without -o first, disregard a.out.
3517# It will help us diagnose broken compilers, and finding out an intuition
3518# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003519{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3520$as_echo_n "checking whether the C compiler works... " >&6; }
3521ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3522
3523# The possible output files:
3524ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3525
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003526ac_rmfiles=
3527for ac_file in $ac_files
3528do
3529 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003530 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003531 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3532 esac
3533done
3534rm -f $ac_rmfiles
3535
Matthias Kloseb9621712010-04-24 17:59:49 +00003536if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003537case "(($ac_try" in
3538 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3539 *) ac_try_echo=$ac_try;;
3540esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003541eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3542$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003543 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003544 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003545 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3546 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003547 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3548# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3549# in a Makefile. We should not override ac_cv_exeext if it was cached,
3550# so that the user can short-circuit this test for compilers unknown to
3551# Autoconf.
3552for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003553do
3554 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003555 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003556 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003557 ;;
3558 [ab].out )
3559 # We found the default executable, but exeext='' is most
3560 # certainly right.
3561 break;;
3562 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003563 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003564 then :; else
3565 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3566 fi
3567 # We set ac_cv_exeext here because the later test for it is not
3568 # safe: cross compilers may not add the suffix if given an `-o'
3569 # argument, so we may need to know it at that point already.
3570 # Even if this section looks crufty: it has the advantage of
3571 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003572 break;;
3573 * )
3574 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003575 esac
3576done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003577test "$ac_cv_exeext" = no && ac_cv_exeext=
3578
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003579else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003580 ac_file=''
3581fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003582if test -z "$ac_file"; then :
3583 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3584$as_echo "no" >&6; }
3585$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003586sed 's/^/| /' conftest.$ac_ext >&5
3587
Matthias Kloseb9621712010-04-24 17:59:49 +00003588{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3589$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Antoine Pitrouf65132d2011-02-25 23:25:17 +00003590{ as_fn_set_status 77
3591as_fn_error "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;}
Antoine Pitrouf65132d2011-02-25 23:25:17 +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;}
Antoine Pitrouf65132d2011-02-25 23:25:17 +00003692as_fn_error "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00003693If you meant to cross compile, use \`--host'.
Antoine Pitrouf65132d2011-02-25 23:25:17 +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; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +00003705if test "${ac_cv_objext+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003706 $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;}
Antoine Pitrouf65132d2011-02-25 23:25:17 +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; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +00003756if test "${ac_cv_c_compiler_gnu+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003757 $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; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +00003793if test "${ac_cv_prog_cc_g+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003794 $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; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +00003871if test "${ac_cv_prog_cc_c89+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003872 $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; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +00004006if test "${ac_cv_path_CXX+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004007 $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; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +00004047if test "${ac_cv_path_CXX+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004048 $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; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +00004098if test "${ac_cv_prog_CXX+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004099 $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
Antoine Pitrouf65132d2011-02-25 23:25:17 +00004169 if test "${ac_cv_prog_CPP+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004170 $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
Antoine Pitrouf65132d2011-02-25 23:25:17 +00004199rm -f conftest.err 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
Antoine Pitrouf65132d2011-02-25 23:25:17 +00004215rm -f conftest.err 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.
Antoine Pitrouf65132d2011-02-25 23:25:17 +00004219rm -f 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
Antoine Pitrouf65132d2011-02-25 23:25:17 +00004258rm -f conftest.err 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
Antoine Pitrouf65132d2011-02-25 23:25:17 +00004274rm -f conftest.err 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.
Antoine Pitrouf65132d2011-02-25 23:25:17 +00004278rm -f 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;}
Antoine Pitrouf65132d2011-02-25 23:25:17 +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; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +00004297if test "${ac_cv_path_GREP+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004298 $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
Antoine Pitrouf65132d2011-02-25 23:25:17 +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; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +00004360if test "${ac_cv_path_EGREP+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004361 $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
Antoine Pitrouf65132d2011-02-25 23:25:17 +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; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +00004427if test "${ac_cv_header_stdc+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004428 $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"
Antoine Pitrouf65132d2011-02-25 23:25:17 +00004544eval as_val=\$$as_ac_Header
4545 if test "x$as_val" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004546 cat >>confdefs.h <<_ACEOF
4547#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4548_ACEOF
4549
4550fi
4551
4552done
4553
4554
4555
4556 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
Antoine Pitrouf65132d2011-02-25 23:25:17 +00004557if test "x$ac_cv_header_minix_config_h" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004558 MINIX=yes
4559else
4560 MINIX=
4561fi
4562
4563
4564 if test "$MINIX" = yes; then
4565
4566$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4567
4568
4569$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4570
4571
4572$as_echo "#define _MINIX 1" >>confdefs.h
4573
4574 fi
4575
4576
4577 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4578$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +00004579if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004580 $as_echo_n "(cached) " >&6
4581else
4582 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4583/* end confdefs.h. */
4584
4585# define __EXTENSIONS__ 1
4586 $ac_includes_default
4587int
4588main ()
4589{
4590
4591 ;
4592 return 0;
4593}
4594_ACEOF
4595if ac_fn_c_try_compile "$LINENO"; then :
4596 ac_cv_safe_to_define___extensions__=yes
4597else
4598 ac_cv_safe_to_define___extensions__=no
4599fi
4600rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4601fi
4602{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4603$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4604 test $ac_cv_safe_to_define___extensions__ = yes &&
4605 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4606
4607 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4608
4609 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4610
4611 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4612
4613 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4614
4615
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004616
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004617# Check for unsupported systems
4618case $ac_sys_system/$ac_sys_release in
4619atheos*|Linux*/1*)
4620 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
4621 echo See README for details.
4622 exit 1;;
4623esac
4624
4625
Matthias Kloseb9621712010-04-24 17:59:49 +00004626{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
4627$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004628
4629# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004630if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004631 withval=$with_suffix;
4632 case $withval in
4633 no) EXEEXT=;;
4634 yes) EXEEXT=.exe;;
4635 *) EXEEXT=$withval;;
4636 esac
4637fi
4638
Matthias Kloseb9621712010-04-24 17:59:49 +00004639{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
4640$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004641
4642# Test whether we're running on a non-case-sensitive system, in which
4643# case we give a warning if no ext is given
4644
Matthias Kloseb9621712010-04-24 17:59:49 +00004645{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
4646$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004647if test ! -d CaseSensitiveTestDir; then
4648mkdir CaseSensitiveTestDir
4649fi
4650
4651if test -d casesensitivetestdir
4652then
Matthias Kloseb9621712010-04-24 17:59:49 +00004653 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4654$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004655 BUILDEXEEXT=.exe
4656else
Matthias Kloseb9621712010-04-24 17:59:49 +00004657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4658$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004659 BUILDEXEEXT=$EXEEXT
4660fi
4661rmdir CaseSensitiveTestDir
4662
4663case $MACHDEP in
4664bsdos*)
4665 case $CC in
4666 gcc) CC="$CC -D_HAVE_BSDI";;
4667 esac;;
4668esac
4669
4670case $ac_sys_system in
4671hp*|HP*)
4672 case $CC in
4673 cc|*/cc) CC="$CC -Ae";;
4674 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004675esac
4676
4677
4678
Matthias Kloseb9621712010-04-24 17:59:49 +00004679{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
4680$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004681if test -z "$LIBRARY"
4682then
Barry Warsawf040d7d2010-10-18 17:09:07 +00004683 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004684fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004685{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
4686$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004687
4688# LDLIBRARY is the name of the library to link against (as opposed to the
4689# name of the library into which to insert object files). BLDLIBRARY is also
4690# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
4691# is blank as the main program is not linked directly against LDLIBRARY.
4692# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
4693# systems without shared libraries, LDLIBRARY is the same as LIBRARY
4694# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
4695# DLLLIBRARY is the shared (i.e., DLL) library.
4696#
4697# RUNSHARED is used to run shared python without installed libraries
4698#
4699# INSTSONAME is the name of the shared library that will be use to install
4700# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004701#
4702# LDVERSION is the shared library version number, normally the Python version
4703# with the ABI build flags appended.
4704
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004705
4706
4707
4708
4709
4710
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00004711
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004712LDLIBRARY="$LIBRARY"
4713BLDLIBRARY='$(LDLIBRARY)'
4714INSTSONAME='$(LDLIBRARY)'
4715DLLLIBRARY=''
4716LDLIBRARYDIR=''
4717RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00004718LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004719
4720# LINKCC is the command that links the python executable -- default is $(CC).
4721# If CXX is set, and if it is needed to link a main function that was
4722# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
4723# python might then depend on the C++ runtime
4724# This is altered for AIX in order to build the export list before
4725# linking.
4726
Matthias Kloseb9621712010-04-24 17:59:49 +00004727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
4728$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004729if test -z "$LINKCC"
4730then
4731 LINKCC='$(PURIFY) $(MAINCC)'
4732 case $ac_sys_system in
4733 AIX*)
4734 exp_extra="\"\""
4735 if test $ac_sys_release -ge 5 -o \
4736 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
4737 exp_extra="."
4738 fi
4739 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004740 QNX*)
4741 # qcc must be used because the other compilers do not
4742 # support -N.
4743 LINKCC=qcc;;
4744 esac
4745fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004746{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
4747$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004748
4749# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
4750# make sure we default having it set to "no": this is used by
4751# distutils.unixccompiler to know if it should add --enable-new-dtags
4752# to linker command lines, and failing to detect GNU ld simply results
4753# in the same bahaviour as before.
4754
Matthias Kloseb9621712010-04-24 17:59:49 +00004755{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
4756$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004757ac_prog=ld
4758if test "$GCC" = yes; then
4759 ac_prog=`$CC -print-prog-name=ld`
4760fi
4761case `"$ac_prog" -V 2>&1 < /dev/null` in
4762 *GNU*)
4763 GNULD=yes;;
4764 *)
4765 GNULD=no;;
4766esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004767{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
4768$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004769
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
4771$as_echo_n "checking for inline... " >&6; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +00004772if test "${ac_cv_c_inline+set}" = set; then :
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004773 $as_echo_n "(cached) " >&6
4774else
4775 ac_cv_c_inline=no
4776for ac_kw in inline __inline__ __inline; do
4777 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4778/* end confdefs.h. */
4779#ifndef __cplusplus
4780typedef int foo_t;
4781static $ac_kw foo_t static_foo () {return 0; }
4782$ac_kw foo_t foo () {return 0; }
4783#endif
4784
4785_ACEOF
4786if ac_fn_c_try_compile "$LINENO"; then :
4787 ac_cv_c_inline=$ac_kw
4788fi
4789rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4790 test "$ac_cv_c_inline" != no && break
4791done
4792
4793fi
4794{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
4795$as_echo "$ac_cv_c_inline" >&6; }
4796
4797case $ac_cv_c_inline in
4798 inline | yes) ;;
4799 *)
4800 case $ac_cv_c_inline in
4801 no) ac_val=;;
4802 *) ac_val=$ac_cv_c_inline;;
4803 esac
4804 cat >>confdefs.h <<_ACEOF
4805#ifndef __cplusplus
4806#define inline $ac_val
4807#endif
4808_ACEOF
4809 ;;
4810esac
4811
4812if test "$ac_cv_c_inline" != no ; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00004813
4814$as_echo "#define USE_INLINE 1" >>confdefs.h
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004815
4816
4817fi
4818
4819
Matthias Kloseb9621712010-04-24 17:59:49 +00004820{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
4821$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004822# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004823if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004824 enableval=$enable_shared;
4825fi
4826
4827
4828if test -z "$enable_shared"
4829then
4830 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00004831 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004832 enable_shared="yes";;
4833 *)
4834 enable_shared="no";;
4835 esac
4836fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004837{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
4838$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004839
Matthias Kloseb9621712010-04-24 17:59:49 +00004840{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
4841$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004842# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004843if test "${enable_profiling+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004844 enableval=$enable_profiling; ac_save_cc="$CC"
4845 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004846 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004847 ac_enable_profiling="no"
4848else
Matthias Kloseb9621712010-04-24 17:59:49 +00004849 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004850/* end confdefs.h. */
4851int main() { return 0; }
4852_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004853if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004854 ac_enable_profiling="yes"
4855else
Matthias Kloseb9621712010-04-24 17:59:49 +00004856 ac_enable_profiling="no"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004857fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004858rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4859 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004860fi
4861
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004862 CC="$ac_save_cc"
4863fi
4864
Matthias Kloseb9621712010-04-24 17:59:49 +00004865{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_profiling" >&5
4866$as_echo "$ac_enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004867
4868case "$ac_enable_profiling" in
4869 "yes")
4870 BASECFLAGS="-pg $BASECFLAGS"
4871 LDFLAGS="-pg $LDFLAGS"
4872 ;;
4873esac
4874
Matthias Kloseb9621712010-04-24 17:59:49 +00004875{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
4876$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004877
4878# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4879# library that we build, but we do not want to link against it (we
4880# will find it with a -framework option). For this reason there is an
4881# extra variable BLDLIBRARY against which Python and the extension
4882# modules are linked, BLDLIBRARY. This is normally the same as
4883# LDLIBRARY, but empty for MacOSX framework builds.
4884if test "$enable_framework"
4885then
4886 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
4887 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
4888 BLDLIBRARY=''
4889else
4890 BLDLIBRARY='$(LDLIBRARY)'
4891fi
4892
4893# Other platforms follow
4894if test $enable_shared = "yes"; then
4895
Matthias Kloseb9621712010-04-24 17:59:49 +00004896$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004897
4898 case $ac_sys_system in
4899 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004900 LDLIBRARY='libpython$(LDVERSION).dll.a'
4901 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004902 ;;
4903 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004904 LDLIBRARY='libpython$(LDVERSION).so'
4905 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004906 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4907 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004908 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00004909 then
4910 PY3LIBRARY=libpython3.so
4911 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004912 ;;
4913 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004914 LDLIBRARY='libpython$(LDVERSION).so'
4915 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004916 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4917 case $ac_sys_system in
4918 FreeBSD*)
4919 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4920 ;;
4921 esac
4922 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004923 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00004924 then
4925 PY3LIBRARY=libpython3.so
4926 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004927 ;;
4928 hp*|HP*)
4929 case `uname -m` in
4930 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004931 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004932 ;;
4933 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004934 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004935 ;;
4936 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004937 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004938 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
4939 ;;
4940 OSF*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004941 LDLIBRARY='libpython$(LDVERSION).so'
4942 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004943 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4944 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004945 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004946 LDLIBRARY='libpython$(LDVERSION).dylib'
4947 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004948 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
4949 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00004950 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004951 LDLIBRARY='libpython$(LDVERSION).so'
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00004952 RUNSHARED=LIBPATH=`pwd`:${LIBPATH}
4953 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004954
4955 esac
4956else # shared is disabled
4957 case $ac_sys_system in
4958 CYGWIN*)
4959 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004960 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004961 ;;
4962 esac
4963fi
4964
Matthias Kloseb9621712010-04-24 17:59:49 +00004965{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
4966$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004967
4968if test -n "$ac_tool_prefix"; then
4969 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4970set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004971{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4972$as_echo_n "checking for $ac_word... " >&6; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +00004973if test "${ac_cv_prog_RANLIB+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004974 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004975else
4976 if test -n "$RANLIB"; then
4977 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4978else
4979as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4980for as_dir in $PATH
4981do
4982 IFS=$as_save_IFS
4983 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004984 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004985 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4986 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00004987 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004988 break 2
4989 fi
4990done
Matthias Kloseb9621712010-04-24 17:59:49 +00004991 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004992IFS=$as_save_IFS
4993
4994fi
4995fi
4996RANLIB=$ac_cv_prog_RANLIB
4997if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004998 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
4999$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005000else
Matthias Kloseb9621712010-04-24 17:59:49 +00005001 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5002$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005003fi
5004
5005
5006fi
5007if test -z "$ac_cv_prog_RANLIB"; then
5008 ac_ct_RANLIB=$RANLIB
5009 # Extract the first word of "ranlib", so it can be a program name with args.
5010set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5012$as_echo_n "checking for $ac_word... " >&6; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +00005013if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005014 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005015else
5016 if test -n "$ac_ct_RANLIB"; then
5017 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5018else
5019as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5020for as_dir in $PATH
5021do
5022 IFS=$as_save_IFS
5023 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005024 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005025 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5026 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005027 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005028 break 2
5029 fi
5030done
Matthias Kloseb9621712010-04-24 17:59:49 +00005031 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005032IFS=$as_save_IFS
5033
5034fi
5035fi
5036ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5037if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005038 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5039$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005040else
Matthias Kloseb9621712010-04-24 17:59:49 +00005041 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5042$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005043fi
5044
5045 if test "x$ac_ct_RANLIB" = x; then
5046 RANLIB=":"
5047 else
5048 case $cross_compiling:$ac_tool_warned in
5049yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00005050{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5051$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005052ac_tool_warned=yes ;;
5053esac
5054 RANLIB=$ac_ct_RANLIB
5055 fi
5056else
5057 RANLIB="$ac_cv_prog_RANLIB"
5058fi
5059
5060
5061for ac_prog in ar aal
5062do
5063 # Extract the first word of "$ac_prog", so it can be a program name with args.
5064set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005065{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5066$as_echo_n "checking for $ac_word... " >&6; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +00005067if test "${ac_cv_prog_AR+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005068 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005069else
5070 if test -n "$AR"; then
5071 ac_cv_prog_AR="$AR" # Let the user override the test.
5072else
5073as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5074for as_dir in $PATH
5075do
5076 IFS=$as_save_IFS
5077 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005078 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005079 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5080 ac_cv_prog_AR="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005081 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005082 break 2
5083 fi
5084done
Matthias Kloseb9621712010-04-24 17:59:49 +00005085 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005086IFS=$as_save_IFS
5087
5088fi
5089fi
5090AR=$ac_cv_prog_AR
5091if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005092 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5093$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005094else
Matthias Kloseb9621712010-04-24 17:59:49 +00005095 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5096$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005097fi
5098
5099
5100 test -n "$AR" && break
5101done
5102test -n "$AR" || AR="ar"
5103
5104
5105# tweak ARFLAGS only if the user didn't set it on the command line
5106
5107if test -z "$ARFLAGS"
5108then
5109 ARFLAGS="rc"
5110fi
5111
5112
5113# Extract the first word of "svnversion", so it can be a program name with args.
5114set dummy svnversion; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005115{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5116$as_echo_n "checking for $ac_word... " >&6; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +00005117if test "${ac_cv_prog_SVNVERSION+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005118 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005119else
5120 if test -n "$SVNVERSION"; then
5121 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
5122else
5123as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5124for as_dir in $PATH
5125do
5126 IFS=$as_save_IFS
5127 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005128 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005129 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5130 ac_cv_prog_SVNVERSION="found"
Matthias Kloseb9621712010-04-24 17:59:49 +00005131 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005132 break 2
5133 fi
5134done
Matthias Kloseb9621712010-04-24 17:59:49 +00005135 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005136IFS=$as_save_IFS
5137
5138 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
5139fi
5140fi
5141SVNVERSION=$ac_cv_prog_SVNVERSION
5142if test -n "$SVNVERSION"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005143 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SVNVERSION" >&5
5144$as_echo "$SVNVERSION" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005145else
Matthias Kloseb9621712010-04-24 17:59:49 +00005146 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5147$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005148fi
5149
5150
5151if test $SVNVERSION = found
5152then
5153 SVNVERSION="svnversion \$(srcdir)"
5154else
5155 SVNVERSION="echo Unversioned directory"
5156fi
5157
5158case $MACHDEP in
5159bsdos*|hp*|HP*)
5160 # install -d does not work on BSDI or HP-UX
5161 if test -z "$INSTALL"
5162 then
5163 INSTALL="${srcdir}/install-sh -c"
5164 fi
5165esac
5166ac_aux_dir=
5167for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
Antoine Pitrouf65132d2011-02-25 23:25:17 +00005168 for ac_t in install-sh install.sh shtool; do
5169 if test -f "$ac_dir/$ac_t"; then
5170 ac_aux_dir=$ac_dir
5171 ac_install_sh="$ac_aux_dir/$ac_t -c"
5172 break 2
5173 fi
5174 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005175done
5176if test -z "$ac_aux_dir"; then
Antoine Pitrouf65132d2011-02-25 23:25:17 +00005177 as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005178fi
5179
5180# These three variables are undocumented and unsupported,
5181# and are intended to be withdrawn in a future Autoconf release.
5182# They can cause serious problems if a builder's source tree is in a directory
5183# whose full name contains unusual characters.
5184ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
5185ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
5186ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
5187
5188
5189# Find a good install program. We prefer a C program (faster),
5190# so one script is as good as another. But avoid the broken or
5191# incompatible versions:
5192# SysV /etc/install, /usr/sbin/install
5193# SunOS /usr/etc/install
5194# IRIX /sbin/install
5195# AIX /bin/install
5196# AmigaOS /C/install, which installs bootblocks on floppy discs
5197# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5198# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5199# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5200# OS/2's system install, which has a completely different semantic
5201# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00005202# Reject install programs that cannot install multiple files.
5203{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
5204$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005205if test -z "$INSTALL"; then
Antoine Pitrouf65132d2011-02-25 23:25:17 +00005206if test "${ac_cv_path_install+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005207 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005208else
5209 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5210for as_dir in $PATH
5211do
5212 IFS=$as_save_IFS
5213 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005214 # Account for people who put trailing slashes in PATH elements.
5215case $as_dir/ in #((
5216 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005217 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00005218 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005219 /usr/ucb/* ) ;;
5220 *)
5221 # OSF1 and SCO ODT 3.0 have their own names for install.
5222 # Don't use installbsd from OSF since it installs stuff as root
5223 # by default.
5224 for ac_prog in ginstall scoinst install; do
5225 for ac_exec_ext in '' $ac_executable_extensions; do
5226 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
5227 if test $ac_prog = install &&
5228 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5229 # AIX install. It has an incompatible calling convention.
5230 :
5231 elif test $ac_prog = install &&
5232 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5233 # program-specific install script used by HP pwplus--don't use.
5234 :
5235 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005236 rm -rf conftest.one conftest.two conftest.dir
5237 echo one > conftest.one
5238 echo two > conftest.two
5239 mkdir conftest.dir
5240 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5241 test -s conftest.one && test -s conftest.two &&
5242 test -s conftest.dir/conftest.one &&
5243 test -s conftest.dir/conftest.two
5244 then
5245 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5246 break 3
5247 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005248 fi
5249 fi
5250 done
5251 done
5252 ;;
5253esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005254
5255 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005256IFS=$as_save_IFS
5257
Matthias Kloseb9621712010-04-24 17:59:49 +00005258rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005259
5260fi
5261 if test "${ac_cv_path_install+set}" = set; then
5262 INSTALL=$ac_cv_path_install
5263 else
5264 # As a last resort, use the slow shell script. Don't cache a
5265 # value for INSTALL within a source directory, because that will
5266 # break other packages using the cache if that directory is
5267 # removed, or if the value is a relative name.
5268 INSTALL=$ac_install_sh
5269 fi
5270fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005271{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
5272$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005273
5274# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5275# It thinks the first close brace ends the variable substitution.
5276test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5277
5278test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
5279
5280test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5281
5282
5283# Not every filesystem supports hard links
5284
5285if test -z "$LN" ; then
5286 case $ac_sys_system in
5287 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005288 *) LN=ln;;
5289 esac
5290fi
5291
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00005292# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005293
5294ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00005295
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005296# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00005297{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
5298$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005299
5300# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005301if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005302 withval=$with_pydebug;
5303if test "$withval" != no
5304then
5305
Matthias Kloseb9621712010-04-24 17:59:49 +00005306$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005307
Matthias Kloseb9621712010-04-24 17:59:49 +00005308 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5309$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005310 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005311 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00005312else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5313$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005314fi
5315else
Matthias Kloseb9621712010-04-24 17:59:49 +00005316 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5317$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005318fi
5319
5320
5321# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
5322# merged with this chunk of code?
5323
5324# Optimizer/debugger flags
5325# ------------------------
5326# (The following bit of code is complicated enough - please keep things
5327# indented properly. Just pretend you're editing Python code. ;-)
5328
5329# There are two parallel sets of case statements below, one that checks to
5330# see if OPT was set and one that does BASECFLAGS setting based upon
5331# compiler and platform. BASECFLAGS tweaks need to be made even if the
5332# user set OPT.
5333
5334# tweak OPT based on compiler and platform, only if the user didn't set
5335# it on the command line
5336
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00005337if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005338then
5339 case $GCC in
5340 yes)
5341 if test "$CC" != 'g++' ; then
5342 STRICT_PROTO="-Wstrict-prototypes"
5343 fi
5344 # For gcc 4.x we need to use -fwrapv so lets check if its supported
5345 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
5346 WRAP="-fwrapv"
5347 fi
5348 case $ac_cv_prog_cc_g in
5349 yes)
5350 if test "$Py_DEBUG" = 'true' ; then
5351 # Optimization messes up debuggers, so turn it off for
5352 # debug builds.
Mark Dickinsonb2153e92010-05-05 22:31:36 +00005353 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005354 else
5355 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
5356 fi
5357 ;;
5358 *)
5359 OPT="-O3 -Wall $STRICT_PROTO"
5360 ;;
5361 esac
5362 case $ac_sys_system in
5363 SCO_SV*) OPT="$OPT -m486 -DSCO5"
5364 ;;
5365 esac
5366 ;;
5367
5368 *)
5369 OPT="-O"
5370 ;;
5371 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005372fi
5373
5374
5375
5376# The -arch flags for universal builds on OSX
5377UNIVERSAL_ARCH_FLAGS=
5378
5379
5380# tweak BASECFLAGS based on compiler and platform
5381case $GCC in
5382yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005383 # Python doesn't violate C99 aliasing rules, but older versions of
5384 # GCC produce warnings for legal Python code. Enable
5385 # -fno-strict-aliasing on versions of GCC that support but produce
5386 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00005387 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
5388$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005389 ac_save_cc="$CC"
5390 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005391 save_CFLAGS="$CFLAGS"
Antoine Pitrouf65132d2011-02-25 23:25:17 +00005392 if test "${ac_cv_no_strict_aliasing+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005393 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00005394else
Matthias Kloseb9621712010-04-24 17:59:49 +00005395 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005396/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005397
Matthias Kloseb159a552010-04-25 21:00:44 +00005398
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005399int
5400main ()
5401{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005402
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005403 ;
5404 return 0;
5405}
Matthias Kloseb159a552010-04-25 21:00:44 +00005406
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005407_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005408if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00005409
5410 CC="$ac_save_cc -fstrict-aliasing"
5411 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
5412 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005413/* end confdefs.h. */
5414
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005415 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005416int
5417main ()
5418{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005419double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005420 ;
5421 return 0;
5422}
Matthias Kloseb159a552010-04-25 21:00:44 +00005423
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005424_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005425if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00005426
5427 ac_cv_no_strict_aliasing=no
5428
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005429else
Matthias Kloseb159a552010-04-25 21:00:44 +00005430
5431 ac_cv_no_strict_aliasing=yes
5432
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005433fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005434rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00005435
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005436else
Matthias Kloseb159a552010-04-25 21:00:44 +00005437
5438 ac_cv_no_strict_aliasing=no
5439
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005440fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005441rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00005442fi
5443
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005444 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005445 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00005446 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
5447$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005448 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005449 then
5450 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
5451 fi
5452
5453 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
5454 # support. Without this, treatment of subnormals doesn't follow
5455 # the standard.
5456 case $ac_sys_machine in
5457 alpha*)
5458 BASECFLAGS="$BASECFLAGS -mieee"
5459 ;;
5460 esac
5461
5462 case $ac_sys_system in
5463 SCO_SV*)
5464 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
5465 ;;
5466 # is there any other compiler on Darwin besides gcc?
5467 Darwin*)
5468 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
5469 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussoren666028b2010-04-18 19:07:43 +00005470 if test "${CC}" = gcc
5471 then
Matthias Kloseb9621712010-04-24 17:59:49 +00005472 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
5473$as_echo_n "checking which compiler should be used... " >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00005474 case "${UNIVERSALSDK}" in
5475 */MacOSX10.4u.sdk)
5476 # Build using 10.4 SDK, force usage of gcc when the
5477 # compiler is gcc, otherwise the user will get very
5478 # confusing error messages when building on OSX 10.6
5479 CC=gcc-4.0
5480 CPP=cpp-4.0
5481 ;;
5482 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005483 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5484$as_echo "$CC" >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00005485 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005486
5487
5488 if test "${enable_universalsdk}"; then
5489 UNIVERSAL_ARCH_FLAGS=""
5490 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
5491 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
5492 ARCH_RUN_32BIT=""
Benjamin Peterson99f03762010-04-11 22:15:28 +00005493 LIPO_32BIT_FLAGS=""
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005494 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
5495 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005496 LIPO_32BIT_FLAGS=""
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005497 ARCH_RUN_32BIT="true"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005498
5499 elif test "$UNIVERSAL_ARCHS" = "all" ; then
5500 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005501 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005502 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005503
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005504 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
5505 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005506 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005507 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005508
5509 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
5510 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005511 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005512 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005513
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005514 else
Antoine Pitrouf65132d2011-02-25 23:25:17 +00005515 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 +00005516
5517 fi
5518
5519
Ronald Oussoren666028b2010-04-18 19:07:43 +00005520 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
5521 if test "${UNIVERSALSDK}" != "/"
5522 then
5523 CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
5524 LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren712979d2010-04-20 19:51:33 +00005525 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005526 fi
5527 fi
5528
5529 # Calculate the right deployment target for this build.
5530 #
5531 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
5532 if test ${cur_target} '>' 10.2; then
5533 cur_target=10.3
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005534 if test ${enable_universalsdk}; then
5535 if test "${UNIVERSAL_ARCHS}" = "all"; then
5536 # Ensure that the default platform for a
5537 # 4-way universal build is OSX 10.5,
5538 # that's the first OS release where
5539 # 4-way builds make sense.
5540 cur_target='10.5'
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005541
5542 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
5543 cur_target='10.5'
5544
5545 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
5546 cur_target='10.5'
5547
5548 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
5549 cur_target='10.5'
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005550 fi
5551 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00005552 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005553 # On Intel macs default to a deployment
5554 # target of 10.4, that's the first OSX
5555 # release with Intel support.
5556 cur_target="10.4"
5557 fi
5558 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005559 fi
5560 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
5561
5562 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
5563 # environment with a value that is the same as what we'll use
5564 # in the Makefile to ensure that we'll get the same compiler
5565 # environment during configure and build time.
5566 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
5567 export MACOSX_DEPLOYMENT_TARGET
5568 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
5569
5570 ;;
5571 OSF*)
5572 BASECFLAGS="$BASECFLAGS -mieee"
5573 ;;
5574 esac
5575 ;;
5576
5577*)
5578 case $ac_sys_system in
5579 OpenUNIX*|UnixWare*)
5580 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
5581 ;;
5582 OSF*)
5583 BASECFLAGS="$BASECFLAGS -ieee -std"
5584 ;;
5585 SCO_SV*)
5586 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
5587 ;;
5588 esac
5589 ;;
5590esac
5591
5592if test "$Py_DEBUG" = 'true'; then
5593 :
5594else
5595 OPT="-DNDEBUG $OPT"
5596fi
5597
5598if test "$ac_arch_flags"
5599then
5600 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
5601fi
5602
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005603# Check whether GCC supports PyArg_ParseTuple format
5604if test "$GCC" = "yes"
5605then
Matthias Kloseb9621712010-04-24 17:59:49 +00005606 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5
5607$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005608 save_CFLAGS=$CFLAGS
5609 CFLAGS="$CFLAGS -Werror"
Matthias Kloseb9621712010-04-24 17:59:49 +00005610 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005611/* end confdefs.h. */
5612
5613 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005614int
5615main ()
5616{
5617
5618 ;
5619 return 0;
5620}
Matthias Kloseb159a552010-04-25 21:00:44 +00005621
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
Matthias Kloseb159a552010-04-25 21:00:44 +00005625
Matthias Kloseb9621712010-04-24 17:59:49 +00005626$as_echo "#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005627
Matthias Kloseb159a552010-04-25 21:00:44 +00005628 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00005629$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00005630
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005631else
Matthias Kloseb159a552010-04-25 21:00:44 +00005632
5633 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00005634$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005635
5636fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005637rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5638 CFLAGS=$save_CFLAGS
5639fi
5640
5641# On some compilers, pthreads are available without further options
5642# (e.g. MacOS X). On some of these systems, the compiler will not
5643# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
5644# So we have to see first whether pthreads are available without
5645# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00005646{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
5647$as_echo_n "checking whether pthreads are available without options... " >&6; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +00005648if test "${ac_cv_pthread_is_default+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005649 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005650else
Matthias Kloseb9621712010-04-24 17:59:49 +00005651 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005652 ac_cv_pthread_is_default=no
5653else
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. */
5656
5657#include <pthread.h>
5658
5659void* routine(void* p){return NULL;}
5660
5661int main(){
5662 pthread_t p;
5663 if(pthread_create(&p,NULL,routine,NULL)!=0)
5664 return 1;
5665 (void)pthread_detach(p);
5666 return 0;
5667}
5668
5669_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005670if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005671
5672 ac_cv_pthread_is_default=yes
5673 ac_cv_kthread=no
5674 ac_cv_pthread=no
5675
5676else
Matthias Kloseb9621712010-04-24 17:59:49 +00005677 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005678fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005679rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5680 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005681fi
5682
5683
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005684fi
5685
Matthias Kloseb9621712010-04-24 17:59:49 +00005686{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
5687$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005688
5689
5690if test $ac_cv_pthread_is_default = yes
5691then
5692 ac_cv_kpthread=no
5693else
5694# -Kpthread, if available, provides the right #defines
5695# and linker options to make pthread_create available
5696# Some compilers won't report that they do not support -Kpthread,
5697# so we need to run a program to see whether it really made the
5698# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005699{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
5700$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +00005701if test "${ac_cv_kpthread+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005702 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005703else
5704 ac_save_cc="$CC"
5705CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005706if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005707 ac_cv_kpthread=no
5708else
Matthias Kloseb9621712010-04-24 17:59:49 +00005709 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005710/* end confdefs.h. */
5711
5712#include <pthread.h>
5713
5714void* routine(void* p){return NULL;}
5715
5716int main(){
5717 pthread_t p;
5718 if(pthread_create(&p,NULL,routine,NULL)!=0)
5719 return 1;
5720 (void)pthread_detach(p);
5721 return 0;
5722}
5723
5724_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005725if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005726 ac_cv_kpthread=yes
5727else
Matthias Kloseb9621712010-04-24 17:59:49 +00005728 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005729fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005730rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5731 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005732fi
5733
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005734CC="$ac_save_cc"
5735fi
5736
Matthias Kloseb9621712010-04-24 17:59:49 +00005737{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
5738$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005739fi
5740
5741if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
5742then
5743# -Kthread, if available, provides the right #defines
5744# and linker options to make pthread_create available
5745# Some compilers won't report that they do not support -Kthread,
5746# so we need to run a program to see whether it really made the
5747# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
5749$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +00005750if test "${ac_cv_kthread+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005751 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005752else
5753 ac_save_cc="$CC"
5754CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005755if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005756 ac_cv_kthread=no
5757else
Matthias Kloseb9621712010-04-24 17:59:49 +00005758 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005759/* end confdefs.h. */
5760
5761#include <pthread.h>
5762
5763void* routine(void* p){return NULL;}
5764
5765int main(){
5766 pthread_t p;
5767 if(pthread_create(&p,NULL,routine,NULL)!=0)
5768 return 1;
5769 (void)pthread_detach(p);
5770 return 0;
5771}
5772
5773_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005774if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005775 ac_cv_kthread=yes
5776else
Matthias Kloseb9621712010-04-24 17:59:49 +00005777 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005778fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005779rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5780 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005781fi
5782
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005783CC="$ac_save_cc"
5784fi
5785
Matthias Kloseb9621712010-04-24 17:59:49 +00005786{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
5787$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005788fi
5789
5790if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
5791then
5792# -pthread, if available, provides the right #defines
5793# and linker options to make pthread_create available
5794# Some compilers won't report that they do not support -pthread,
5795# so we need to run a program to see whether it really made the
5796# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005797{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
5798$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +00005799if test "${ac_cv_thread+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005800 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005801else
5802 ac_save_cc="$CC"
5803CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005804if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005805 ac_cv_pthread=no
5806else
Matthias Kloseb9621712010-04-24 17:59:49 +00005807 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005808/* end confdefs.h. */
5809
5810#include <pthread.h>
5811
5812void* routine(void* p){return NULL;}
5813
5814int main(){
5815 pthread_t p;
5816 if(pthread_create(&p,NULL,routine,NULL)!=0)
5817 return 1;
5818 (void)pthread_detach(p);
5819 return 0;
5820}
5821
5822_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005823if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005824 ac_cv_pthread=yes
5825else
Matthias Kloseb9621712010-04-24 17:59:49 +00005826 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005827fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005828rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5829 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005830fi
5831
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005832CC="$ac_save_cc"
5833fi
5834
Matthias Kloseb9621712010-04-24 17:59:49 +00005835{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
5836$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005837fi
5838
5839# If we have set a CC compiler flag for thread support then
5840# check if it works for CXX, too.
5841ac_cv_cxx_thread=no
5842if test ! -z "$CXX"
5843then
Matthias Kloseb9621712010-04-24 17:59:49 +00005844{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
5845$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005846ac_save_cxx="$CXX"
5847
5848if test "$ac_cv_kpthread" = "yes"
5849then
5850 CXX="$CXX -Kpthread"
5851 ac_cv_cxx_thread=yes
5852elif test "$ac_cv_kthread" = "yes"
5853then
5854 CXX="$CXX -Kthread"
5855 ac_cv_cxx_thread=yes
5856elif test "$ac_cv_pthread" = "yes"
5857then
5858 CXX="$CXX -pthread"
5859 ac_cv_cxx_thread=yes
5860fi
5861
5862if test $ac_cv_cxx_thread = yes
5863then
5864 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5865 $CXX -c conftest.$ac_ext 2>&5
5866 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5867 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5868 then
5869 ac_cv_cxx_thread=yes
5870 else
5871 ac_cv_cxx_thread=no
5872 fi
5873 rm -fr conftest*
5874fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005875{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
5876$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005877fi
5878CXX="$ac_save_cxx"
5879
5880
5881# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00005882{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5883$as_echo_n "checking for ANSI C header files... " >&6; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +00005884if test "${ac_cv_header_stdc+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005885 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005886else
Matthias Kloseb9621712010-04-24 17:59:49 +00005887 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005888/* end confdefs.h. */
5889#include <stdlib.h>
5890#include <stdarg.h>
5891#include <string.h>
5892#include <float.h>
5893
5894int
5895main ()
5896{
5897
5898 ;
5899 return 0;
5900}
5901_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005902if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005903 ac_cv_header_stdc=yes
5904else
Matthias Kloseb9621712010-04-24 17:59:49 +00005905 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005906fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005907rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5908
5909if test $ac_cv_header_stdc = yes; then
5910 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00005911 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005912/* end confdefs.h. */
5913#include <string.h>
5914
5915_ACEOF
5916if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005917 $EGREP "memchr" >/dev/null 2>&1; then :
5918
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005919else
5920 ac_cv_header_stdc=no
5921fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005922rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005923
5924fi
5925
5926if test $ac_cv_header_stdc = yes; then
5927 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00005928 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005929/* end confdefs.h. */
5930#include <stdlib.h>
5931
5932_ACEOF
5933if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005934 $EGREP "free" >/dev/null 2>&1; then :
5935
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005936else
5937 ac_cv_header_stdc=no
5938fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005939rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005940
5941fi
5942
5943if test $ac_cv_header_stdc = yes; then
5944 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00005945 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005946 :
5947else
Matthias Kloseb9621712010-04-24 17:59:49 +00005948 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005949/* end confdefs.h. */
5950#include <ctype.h>
5951#include <stdlib.h>
5952#if ((' ' & 0x0FF) == 0x020)
5953# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5954# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5955#else
5956# define ISLOWER(c) \
5957 (('a' <= (c) && (c) <= 'i') \
5958 || ('j' <= (c) && (c) <= 'r') \
5959 || ('s' <= (c) && (c) <= 'z'))
5960# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5961#endif
5962
5963#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5964int
5965main ()
5966{
5967 int i;
5968 for (i = 0; i < 256; i++)
5969 if (XOR (islower (i), ISLOWER (i))
5970 || toupper (i) != TOUPPER (i))
5971 return 2;
5972 return 0;
5973}
5974_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005975if ac_fn_c_try_run "$LINENO"; then :
5976
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005977else
Matthias Kloseb9621712010-04-24 17:59:49 +00005978 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005979fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005980rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5981 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005982fi
5983
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005984fi
5985fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005986{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5987$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005988if test $ac_cv_header_stdc = yes; then
5989
Matthias Kloseb9621712010-04-24 17:59:49 +00005990$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005991
5992fi
5993
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005994for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
5995fcntl.h grp.h \
Christian Heimesbbe741d2008-03-28 10:53:29 +00005996ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Thomas Wouters89f507f2006-12-13 04:49:30 +00005997shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00005998unistd.h utime.h \
Christian Heimes4fbc72b2008-03-22 00:47:35 +00005999sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
6000sys/lock.h sys/mkdev.h sys/modem.h \
Georg Brandl941f9562011-02-25 15:21:47 +00006001sys/param.h sys/poll.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
6002sys/stat.h sys/termio.h sys/time.h \
6003sys/times.h sys/types.h sys/uio.h sys/un.h sys/utsname.h sys/wait.h pty.h \
6004libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Ronald Oussoren755740f2010-02-07 19:56:39 +00006005bluetooth/bluetooth.h linux/tipc.h spawn.h util.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006006do :
6007 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6008ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Antoine Pitrouf65132d2011-02-25 23:25:17 +00006009eval as_val=\$$as_ac_Header
6010 if test "x$as_val" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006011 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006012#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006013_ACEOF
6014
6015fi
6016
Guido van Rossum627b2d71993-12-24 10:39:16 +00006017done
6018
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006019ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006020for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00006021 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6022{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
6023$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +00006024if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006025 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006026else
Matthias Kloseb9621712010-04-24 17:59:49 +00006027 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006028/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006029#include <sys/types.h>
6030#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00006031
Martin v. Löwis11437992002-04-12 09:54:03 +00006032int
6033main ()
6034{
6035if ((DIR *) 0)
6036return 0;
6037 ;
6038 return 0;
6039}
6040_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006041if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006042 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00006043else
Matthias Kloseb9621712010-04-24 17:59:49 +00006044 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006045fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006046rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006047fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006048eval ac_res=\$$as_ac_Header
6049 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6050$as_echo "$ac_res" >&6; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +00006051eval as_val=\$$as_ac_Header
6052 if test "x$as_val" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006053 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006054#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006055_ACEOF
6056
6057ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00006058fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006059
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006060done
6061# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6062if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006063 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6064$as_echo_n "checking for library containing opendir... " >&6; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +00006065if test "${ac_cv_search_opendir+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006066 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006067else
Martin v. Löwis11437992002-04-12 09:54:03 +00006068 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006069cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006070/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006071
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006072/* Override any GCC internal prototype to avoid an error.
6073 Use char because int might match the return type of a GCC
6074 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006075#ifdef __cplusplus
6076extern "C"
6077#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006078char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006079int
6080main ()
6081{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006082return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006083 ;
6084 return 0;
6085}
6086_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006087for ac_lib in '' dir; do
6088 if test -z "$ac_lib"; then
6089 ac_res="none required"
6090 else
6091 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006092 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006093 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006094 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006095 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006096fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006097rm -f core conftest.err conftest.$ac_objext \
6098 conftest$ac_exeext
Antoine Pitrouf65132d2011-02-25 23:25:17 +00006099 if test "${ac_cv_search_opendir+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006100 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006101fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006102done
Antoine Pitrouf65132d2011-02-25 23:25:17 +00006103if test "${ac_cv_search_opendir+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006104
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006105else
6106 ac_cv_search_opendir=no
6107fi
6108rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006109LIBS=$ac_func_search_save_LIBS
6110fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006111{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6112$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006113ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006114if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006115 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00006116
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006117fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006118
Michael W. Hudson54241132001-12-07 15:38:26 +00006119else
Matthias Kloseb9621712010-04-24 17:59:49 +00006120 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6121$as_echo_n "checking for library containing opendir... " >&6; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +00006122if test "${ac_cv_search_opendir+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006123 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006124else
6125 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006126cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006127/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006128
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006129/* Override any GCC internal prototype to avoid an error.
6130 Use char because int might match the return type of a GCC
6131 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006132#ifdef __cplusplus
6133extern "C"
6134#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006135char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006136int
6137main ()
6138{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006139return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006140 ;
6141 return 0;
6142}
6143_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006144for ac_lib in '' x; do
6145 if test -z "$ac_lib"; then
6146 ac_res="none required"
6147 else
6148 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006149 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006150 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006151 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006152 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006153fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006154rm -f core conftest.err conftest.$ac_objext \
6155 conftest$ac_exeext
Antoine Pitrouf65132d2011-02-25 23:25:17 +00006156 if test "${ac_cv_search_opendir+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006157 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006158fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006159done
Antoine Pitrouf65132d2011-02-25 23:25:17 +00006160if test "${ac_cv_search_opendir+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006161
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006162else
6163 ac_cv_search_opendir=no
6164fi
6165rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006166LIBS=$ac_func_search_save_LIBS
6167fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006168{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6169$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006170ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006171if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006172 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006173
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006174fi
6175
6176fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006177
Matthias Kloseb9621712010-04-24 17:59:49 +00006178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
6179$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +00006180if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006181 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006182else
Matthias Kloseb9621712010-04-24 17:59:49 +00006183 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006184/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006185#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006186int
6187main ()
6188{
6189return makedev(0, 0);
6190 ;
6191 return 0;
6192}
6193_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006194if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006195 ac_cv_header_sys_types_h_makedev=yes
6196else
Matthias Kloseb9621712010-04-24 17:59:49 +00006197 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006198fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006199rm -f core conftest.err conftest.$ac_objext \
6200 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006201
6202fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006203{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
6204$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006205
6206if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006207ac_fn_c_check_header_mongrel "$LINENO" "sys/mkdev.h" "ac_cv_header_sys_mkdev_h" "$ac_includes_default"
Antoine Pitrouf65132d2011-02-25 23:25:17 +00006208if test "x$ac_cv_header_sys_mkdev_h" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006209
Matthias Kloseb9621712010-04-24 17:59:49 +00006210$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006211
6212fi
6213
6214
6215
6216 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006217 ac_fn_c_check_header_mongrel "$LINENO" "sys/sysmacros.h" "ac_cv_header_sys_sysmacros_h" "$ac_includes_default"
Antoine Pitrouf65132d2011-02-25 23:25:17 +00006218if test "x$ac_cv_header_sys_sysmacros_h" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006219
Matthias Kloseb9621712010-04-24 17:59:49 +00006220$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006221
6222fi
6223
6224
6225 fi
6226fi
6227
Michael W. Hudson54241132001-12-07 15:38:26 +00006228
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006229# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006230for ac_header in term.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006231do :
6232 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006233#ifdef HAVE_CURSES_H
6234#include <curses.h>
6235#endif
6236
Matthias Kloseb9621712010-04-24 17:59:49 +00006237"
Antoine Pitrouf65132d2011-02-25 23:25:17 +00006238if test "x$ac_cv_header_term_h" = x""yes; then :
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006239 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006240#define HAVE_TERM_H 1
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006241_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006242
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006243fi
6244
6245done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006246
6247
Martin v. Löwis11017b12006-01-14 18:12:57 +00006248# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00006249for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006250do :
6251 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 +00006252#ifdef HAVE_ASM_TYPES_H
6253#include <asm/types.h>
6254#endif
6255#ifdef HAVE_SYS_SOCKET_H
6256#include <sys/socket.h>
6257#endif
6258
Matthias Kloseb9621712010-04-24 17:59:49 +00006259"
Antoine Pitrouf65132d2011-02-25 23:25:17 +00006260if test "x$ac_cv_header_linux_netlink_h" = x""yes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00006261 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006262#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006263_ACEOF
6264
6265fi
6266
6267done
6268
6269
Guido van Rossum627b2d71993-12-24 10:39:16 +00006270# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006271was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
6273$as_echo_n "checking for clock_t in time.h... " >&6; }
6274cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006275/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006276#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006277
6278_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006279if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006280 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00006281 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006282else
Martin v. Löwis11437992002-04-12 09:54:03 +00006283
6284
Matthias Kloseb9621712010-04-24 17:59:49 +00006285$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00006286
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006287
Guido van Rossum627b2d71993-12-24 10:39:16 +00006288fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006289rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006290
Matthias Kloseb9621712010-04-24 17:59:49 +00006291{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
6292$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006293
Neal Norwitz11690112002-07-30 01:08:28 +00006294# Check whether using makedev requires defining _OSF_SOURCE
Matthias Kloseb9621712010-04-24 17:59:49 +00006295{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
6296$as_echo_n "checking for makedev... " >&6; }
6297cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006298/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00006299
Jesus Cea740f53a2010-04-28 11:35:30 +00006300#if defined(MAJOR_IN_MKDEV)
6301#include <sys/mkdev.h>
6302#elif defined(MAJOR_IN_SYSMACROS)
6303#include <sys/sysmacros.h>
6304#else
6305#include <sys/types.h>
6306#endif
6307
Neal Norwitz11690112002-07-30 01:08:28 +00006308int
6309main ()
6310{
Jesus Cea740f53a2010-04-28 11:35:30 +00006311
6312 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00006313 ;
6314 return 0;
6315}
Matthias Kloseb159a552010-04-25 21:00:44 +00006316
Neal Norwitz11690112002-07-30 01:08:28 +00006317_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006318if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006319 ac_cv_has_makedev=yes
6320else
Matthias Kloseb9621712010-04-24 17:59:49 +00006321 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006322fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006323rm -f core conftest.err conftest.$ac_objext \
6324 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006325if test "$ac_cv_has_makedev" = "no"; then
6326 # we didn't link, try if _OSF_SOURCE will allow us to link
Matthias Kloseb9621712010-04-24 17:59:49 +00006327 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006328/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006329
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006330#define _OSF_SOURCE 1
6331#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006332
Neal Norwitz11690112002-07-30 01:08:28 +00006333int
6334main ()
6335{
6336 makedev(0, 0)
6337 ;
6338 return 0;
6339}
6340_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006341if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006342 ac_cv_has_makedev=yes
6343else
Matthias Kloseb9621712010-04-24 17:59:49 +00006344 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006345fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006346rm -f core conftest.err conftest.$ac_objext \
6347 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006348 if test "$ac_cv_has_makedev" = "yes"; then
6349
Matthias Kloseb9621712010-04-24 17:59:49 +00006350$as_echo "#define _OSF_SOURCE 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006351
6352 fi
6353fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006354{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
6355$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006356if test "$ac_cv_has_makedev" = "yes"; then
6357
Matthias Kloseb9621712010-04-24 17:59:49 +00006358$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006359
6360fi
6361
Martin v. Löwis399a6892002-10-04 10:22:02 +00006362# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6363# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6364# defined, but the compiler does not support pragma redefine_extname,
6365# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6366# structures (such as rlimit64) without declaring them. As a
6367# work-around, disable LFS on such configurations
6368
6369use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00006370{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
6371$as_echo_n "checking Solaris LFS bug... " >&6; }
6372cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006373/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006374
6375#define _LARGEFILE_SOURCE 1
6376#define _FILE_OFFSET_BITS 64
6377#include <sys/resource.h>
6378
Martin v. Löwis399a6892002-10-04 10:22:02 +00006379int
6380main ()
6381{
6382struct rlimit foo;
6383 ;
6384 return 0;
6385}
6386_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006387if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00006388 sol_lfs_bug=no
6389else
Matthias Kloseb9621712010-04-24 17:59:49 +00006390 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006391fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006392rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006393{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
6394$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006395if test "$sol_lfs_bug" = "yes"; then
6396 use_lfs=no
6397fi
6398
6399if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006400# Two defines needed to enable largefile support on various platforms
6401# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00006402case $ac_sys_system/$ac_sys_release in
6403AIX*)
6404
6405$as_echo "#define _LARGE_FILES 1" >>confdefs.h
6406
6407 ;;
6408esac
Guido van Rossum810cc512001-09-09 23:51:39 +00006409
Matthias Kloseb9621712010-04-24 17:59:49 +00006410$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006411
6412
Matthias Kloseb9621712010-04-24 17:59:49 +00006413$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00006414
Martin v. Löwis399a6892002-10-04 10:22:02 +00006415fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006416
Guido van Rossum84e7b241996-08-19 21:59:00 +00006417# Add some code to confdefs.h so that the test for off_t works on SCO
6418cat >> confdefs.h <<\EOF
6419#if defined(SCO_DS)
6420#undef _OFF_T
6421#endif
6422EOF
6423
Guido van Rossumef2255b2000-03-10 22:30:29 +00006424# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00006425ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Antoine Pitrouf65132d2011-02-25 23:25:17 +00006426if test "x$ac_cv_type_mode_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006427
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006428else
Martin v. Löwis11437992002-04-12 09:54:03 +00006429
6430cat >>confdefs.h <<_ACEOF
6431#define mode_t int
6432_ACEOF
6433
6434fi
6435
Matthias Kloseb9621712010-04-24 17:59:49 +00006436ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Antoine Pitrouf65132d2011-02-25 23:25:17 +00006437if test "x$ac_cv_type_off_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006438
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006439else
Martin v. Löwis11437992002-04-12 09:54:03 +00006440
6441cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006442#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006443_ACEOF
6444
6445fi
6446
Matthias Kloseb9621712010-04-24 17:59:49 +00006447ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Antoine Pitrouf65132d2011-02-25 23:25:17 +00006448if test "x$ac_cv_type_pid_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006449
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006450else
Martin v. Löwis11437992002-04-12 09:54:03 +00006451
6452cat >>confdefs.h <<_ACEOF
6453#define pid_t int
6454_ACEOF
6455
6456fi
6457
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006458
Martin v. Löwis11437992002-04-12 09:54:03 +00006459cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00006460#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00006461_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006462
Matthias Kloseb9621712010-04-24 17:59:49 +00006463ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Antoine Pitrouf65132d2011-02-25 23:25:17 +00006464if test "x$ac_cv_type_size_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006465
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006466else
Martin v. Löwis11437992002-04-12 09:54:03 +00006467
6468cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006469#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00006470_ACEOF
6471
6472fi
6473
Matthias Kloseb9621712010-04-24 17:59:49 +00006474{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
6475$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +00006476if test "${ac_cv_type_uid_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006477 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006478else
Matthias Kloseb9621712010-04-24 17:59:49 +00006479 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006480/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006481#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006482
6483_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006484if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006485 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006486 ac_cv_type_uid_t=yes
6487else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006488 ac_cv_type_uid_t=no
6489fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006490rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006491
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006492fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006493{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
6494$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00006495if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006496
Matthias Kloseb9621712010-04-24 17:59:49 +00006497$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006498
6499
Matthias Kloseb9621712010-04-24 17:59:49 +00006500$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006501
6502fi
6503
Matthias Kloseb9621712010-04-24 17:59:49 +00006504ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
6505case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006506 no|yes) ;; #(
6507 *)
6508
Matthias Kloseb9621712010-04-24 17:59:49 +00006509$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006510
6511
6512cat >>confdefs.h <<_ACEOF
6513#define uint32_t $ac_cv_c_uint32_t
6514_ACEOF
6515;;
6516 esac
6517
Matthias Kloseb9621712010-04-24 17:59:49 +00006518ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
6519case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006520 no|yes) ;; #(
6521 *)
6522
Matthias Kloseb9621712010-04-24 17:59:49 +00006523$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006524
6525
6526cat >>confdefs.h <<_ACEOF
6527#define uint64_t $ac_cv_c_uint64_t
6528_ACEOF
6529;;
6530 esac
6531
Matthias Kloseb9621712010-04-24 17:59:49 +00006532ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
6533case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006534 no|yes) ;; #(
6535 *)
6536
6537cat >>confdefs.h <<_ACEOF
6538#define int32_t $ac_cv_c_int32_t
6539_ACEOF
6540;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00006541esac
6542
Matthias Kloseb9621712010-04-24 17:59:49 +00006543ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
6544case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006545 no|yes) ;; #(
6546 *)
6547
6548cat >>confdefs.h <<_ACEOF
6549#define int64_t $ac_cv_c_int64_t
6550_ACEOF
6551;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006552esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00006553
Matthias Kloseb9621712010-04-24 17:59:49 +00006554ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Antoine Pitrouf65132d2011-02-25 23:25:17 +00006555if test "x$ac_cv_type_ssize_t" = x""yes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006556
Matthias Kloseb9621712010-04-24 17:59:49 +00006557$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00006558
6559fi
6560
Jack Jansendd19cf82001-12-06 22:36:17 +00006561
Michael W. Hudson54241132001-12-07 15:38:26 +00006562# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00006563# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006564# The cast to long int works around a bug in the HP C Compiler
6565# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6566# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6567# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006568{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
6569$as_echo_n "checking size of int... " >&6; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +00006570if test "${ac_cv_sizeof_int+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006571 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006572else
Matthias Kloseb9621712010-04-24 17:59:49 +00006573 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 +00006574
Martin v. Löwis11437992002-04-12 09:54:03 +00006575else
Matthias Kloseb9621712010-04-24 17:59:49 +00006576 if test "$ac_cv_type_int" = yes; then
6577 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6578$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Antoine Pitrouf65132d2011-02-25 23:25:17 +00006579{ as_fn_set_status 77
6580as_fn_error "cannot compute sizeof (int)
6581See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006582 else
6583 ac_cv_sizeof_int=0
6584 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006585fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006586
Martin v. Löwis11437992002-04-12 09:54:03 +00006587fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006588{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
6589$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006590
6591
6592
Martin v. Löwis11437992002-04-12 09:54:03 +00006593cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006594#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00006595_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006596
6597
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006598# The cast to long int works around a bug in the HP C Compiler
6599# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6600# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6601# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006602{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
6603$as_echo_n "checking size of long... " >&6; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +00006604if test "${ac_cv_sizeof_long+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006605 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006606else
Matthias Kloseb9621712010-04-24 17:59:49 +00006607 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 +00006608
Martin v. Löwis11437992002-04-12 09:54:03 +00006609else
Matthias Kloseb9621712010-04-24 17:59:49 +00006610 if test "$ac_cv_type_long" = yes; then
6611 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6612$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Antoine Pitrouf65132d2011-02-25 23:25:17 +00006613{ as_fn_set_status 77
6614as_fn_error "cannot compute sizeof (long)
6615See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006616 else
6617 ac_cv_sizeof_long=0
6618 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006619fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006620
Martin v. Löwis11437992002-04-12 09:54:03 +00006621fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006622{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
6623$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006624
6625
6626
Martin v. Löwis11437992002-04-12 09:54:03 +00006627cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006628#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006629_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006630
6631
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006632# The cast to long int works around a bug in the HP C Compiler
6633# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6634# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6635# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006636{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
6637$as_echo_n "checking size of void *... " >&6; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +00006638if test "${ac_cv_sizeof_void_p+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006639 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006640else
Matthias Kloseb9621712010-04-24 17:59:49 +00006641 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 +00006642
Martin v. Löwis11437992002-04-12 09:54:03 +00006643else
Matthias Kloseb9621712010-04-24 17:59:49 +00006644 if test "$ac_cv_type_void_p" = yes; then
6645 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6646$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Antoine Pitrouf65132d2011-02-25 23:25:17 +00006647{ as_fn_set_status 77
6648as_fn_error "cannot compute sizeof (void *)
6649See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006650 else
6651 ac_cv_sizeof_void_p=0
6652 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006653fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006654
Martin v. Löwis11437992002-04-12 09:54:03 +00006655fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006656{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
6657$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006658
6659
6660
Martin v. Löwis11437992002-04-12 09:54:03 +00006661cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006662#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00006663_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006664
6665
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006666# The cast to long int works around a bug in the HP C Compiler
6667# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6668# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6669# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
6671$as_echo_n "checking size of short... " >&6; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +00006672if test "${ac_cv_sizeof_short+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006673 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006674else
Matthias Kloseb9621712010-04-24 17:59:49 +00006675 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 +00006676
Martin v. Löwis11437992002-04-12 09:54:03 +00006677else
Matthias Kloseb9621712010-04-24 17:59:49 +00006678 if test "$ac_cv_type_short" = yes; then
6679 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6680$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Antoine Pitrouf65132d2011-02-25 23:25:17 +00006681{ as_fn_set_status 77
6682as_fn_error "cannot compute sizeof (short)
6683See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006684 else
6685 ac_cv_sizeof_short=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_short" >&5
6691$as_echo "$ac_cv_sizeof_short" >&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 Rossumef2255b2000-03-10 22:30:29 +00006696#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00006697_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +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 float" >&5
6705$as_echo_n "checking size of float... " >&6; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +00006706if test "${ac_cv_sizeof_float+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006707 $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 (float))" "ac_cv_sizeof_float" "$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_float" = 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;}
Antoine Pitrouf65132d2011-02-25 23:25:17 +00006715{ as_fn_set_status 77
6716as_fn_error "cannot compute sizeof (float)
6717See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006718 else
6719 ac_cv_sizeof_float=0
6720 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006721fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006722
Martin v. Löwis11437992002-04-12 09:54:03 +00006723fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006724{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
6725$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006726
6727
6728
Martin v. Löwis11437992002-04-12 09:54:03 +00006729cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006730#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00006731_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006732
6733
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006734# The cast to long int works around a bug in the HP C Compiler
6735# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6736# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6737# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006738{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
6739$as_echo_n "checking size of double... " >&6; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +00006740if test "${ac_cv_sizeof_double+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006741 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006742else
Matthias Kloseb9621712010-04-24 17:59:49 +00006743 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 +00006744
Martin v. Löwis11437992002-04-12 09:54:03 +00006745else
Matthias Kloseb9621712010-04-24 17:59:49 +00006746 if test "$ac_cv_type_double" = yes; then
6747 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6748$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Antoine Pitrouf65132d2011-02-25 23:25:17 +00006749{ as_fn_set_status 77
6750as_fn_error "cannot compute sizeof (double)
6751See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006752 else
6753 ac_cv_sizeof_double=0
6754 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006755fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006756
Martin v. Löwis11437992002-04-12 09:54:03 +00006757fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006758{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
6759$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006760
6761
6762
Martin v. Löwis11437992002-04-12 09:54:03 +00006763cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006764#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00006765_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006766
6767
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006768# The cast to long int works around a bug in the HP C Compiler
6769# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6770# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6771# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006772{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
6773$as_echo_n "checking size of fpos_t... " >&6; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +00006774if test "${ac_cv_sizeof_fpos_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006775 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006776else
Matthias Kloseb9621712010-04-24 17:59:49 +00006777 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 +00006778
Martin v. Löwis11437992002-04-12 09:54:03 +00006779else
Matthias Kloseb9621712010-04-24 17:59:49 +00006780 if test "$ac_cv_type_fpos_t" = yes; then
6781 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6782$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Antoine Pitrouf65132d2011-02-25 23:25:17 +00006783{ as_fn_set_status 77
6784as_fn_error "cannot compute sizeof (fpos_t)
6785See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006786 else
6787 ac_cv_sizeof_fpos_t=0
6788 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006789fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006790
Martin v. Löwis11437992002-04-12 09:54:03 +00006791fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006792{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
6793$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006794
6795
6796
Martin v. Löwis11437992002-04-12 09:54:03 +00006797cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006798#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00006799_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006800
Michael W. Hudson54241132001-12-07 15:38:26 +00006801
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006802# The cast to long int works around a bug in the HP C Compiler
6803# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6804# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6805# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
6807$as_echo_n "checking size of size_t... " >&6; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +00006808if test "${ac_cv_sizeof_size_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006809 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00006810else
Matthias Kloseb9621712010-04-24 17:59:49 +00006811 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 +00006812
Martin v. Löwis18e16552006-02-15 17:27:45 +00006813else
Matthias Kloseb9621712010-04-24 17:59:49 +00006814 if test "$ac_cv_type_size_t" = yes; then
6815 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6816$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Antoine Pitrouf65132d2011-02-25 23:25:17 +00006817{ as_fn_set_status 77
6818as_fn_error "cannot compute sizeof (size_t)
6819See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006820 else
6821 ac_cv_sizeof_size_t=0
6822 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00006823fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006824
Martin v. Löwis18e16552006-02-15 17:27:45 +00006825fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006826{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
6827$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006828
6829
6830
Martin v. Löwis18e16552006-02-15 17:27:45 +00006831cat >>confdefs.h <<_ACEOF
6832#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
6833_ACEOF
6834
6835
Christian Heimes400adb02008-02-01 08:12:03 +00006836# The cast to long int works around a bug in the HP C Compiler
6837# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6838# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6839# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006840{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
6841$as_echo_n "checking size of pid_t... " >&6; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +00006842if test "${ac_cv_sizeof_pid_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006843 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00006844else
Matthias Kloseb9621712010-04-24 17:59:49 +00006845 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 +00006846
Christian Heimes400adb02008-02-01 08:12:03 +00006847else
Matthias Kloseb9621712010-04-24 17:59:49 +00006848 if test "$ac_cv_type_pid_t" = yes; then
6849 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6850$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Antoine Pitrouf65132d2011-02-25 23:25:17 +00006851{ as_fn_set_status 77
6852as_fn_error "cannot compute sizeof (pid_t)
6853See \`config.log' for more details." "$LINENO" 5; }; }
Christian Heimes400adb02008-02-01 08:12:03 +00006854 else
6855 ac_cv_sizeof_pid_t=0
6856 fi
6857fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006858
Christian Heimes400adb02008-02-01 08:12:03 +00006859fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006860{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
6861$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00006862
6863
6864
6865cat >>confdefs.h <<_ACEOF
6866#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
6867_ACEOF
6868
6869
Michael W. Hudson54241132001-12-07 15:38:26 +00006870
Matthias Kloseb9621712010-04-24 17:59:49 +00006871{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
6872$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006873have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006874cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006875/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006876
Martin v. Löwis11437992002-04-12 09:54:03 +00006877int
6878main ()
6879{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006880long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00006881 ;
6882 return 0;
6883}
6884_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006885if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006886
6887
Matthias Kloseb9621712010-04-24 17:59:49 +00006888$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006889
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006890 have_long_long=yes
6891
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006892fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006893rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006894{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
6895$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00006896if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006897# The cast to long int works around a bug in the HP C Compiler
6898# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6899# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6900# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006901{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
6902$as_echo_n "checking size of long long... " >&6; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +00006903if test "${ac_cv_sizeof_long_long+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006904 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006905else
Matthias Kloseb9621712010-04-24 17:59:49 +00006906 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 +00006907
Martin v. Löwis11437992002-04-12 09:54:03 +00006908else
Matthias Kloseb9621712010-04-24 17:59:49 +00006909 if test "$ac_cv_type_long_long" = yes; then
6910 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6911$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Antoine Pitrouf65132d2011-02-25 23:25:17 +00006912{ as_fn_set_status 77
6913as_fn_error "cannot compute sizeof (long long)
6914See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006915 else
6916 ac_cv_sizeof_long_long=0
6917 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006918fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006919
Martin v. Löwis11437992002-04-12 09:54:03 +00006920fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006921{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
6922$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006923
6924
6925
Martin v. Löwis11437992002-04-12 09:54:03 +00006926cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006927#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006928_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006929
Michael W. Hudson54241132001-12-07 15:38:26 +00006930
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006931fi
6932
Matthias Kloseb9621712010-04-24 17:59:49 +00006933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
6934$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006935have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006936cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006937/* end confdefs.h. */
6938
6939int
6940main ()
6941{
6942long double x; x = (long double)0;
6943 ;
6944 return 0;
6945}
6946_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006947if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006948
6949
Matthias Kloseb9621712010-04-24 17:59:49 +00006950$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006951
6952 have_long_double=yes
6953
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006954fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006955rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006956{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
6957$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006958if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006959# The cast to long int works around a bug in the HP C Compiler
6960# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6961# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6962# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
6964$as_echo_n "checking size of long double... " >&6; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +00006965if test "${ac_cv_sizeof_long_double+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006966 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006967else
Matthias Kloseb9621712010-04-24 17:59:49 +00006968 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 +00006969
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006970else
Matthias Kloseb9621712010-04-24 17:59:49 +00006971 if test "$ac_cv_type_long_double" = yes; then
6972 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6973$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Antoine Pitrouf65132d2011-02-25 23:25:17 +00006974{ as_fn_set_status 77
6975as_fn_error "cannot compute sizeof (long double)
6976See \`config.log' for more details." "$LINENO" 5; }; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006977 else
6978 ac_cv_sizeof_long_double=0
6979 fi
6980fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006981
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006982fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006983{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
6984$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006985
6986
6987
6988cat >>confdefs.h <<_ACEOF
6989#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
6990_ACEOF
6991
6992
6993fi
6994
6995
Matthias Kloseb9621712010-04-24 17:59:49 +00006996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
6997$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00006998have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006999cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00007000/* end confdefs.h. */
7001
7002int
7003main ()
7004{
7005_Bool x; x = (_Bool)0;
7006 ;
7007 return 0;
7008}
7009_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007010if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00007011
7012
Matthias Kloseb9621712010-04-24 17:59:49 +00007013$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00007014
7015 have_c99_bool=yes
7016
Thomas Woutersb2137042007-02-01 18:02:27 +00007017fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007018rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007019{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
7020$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007021if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007022# The cast to long int works around a bug in the HP C Compiler
7023# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7024# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7025# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007026{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
7027$as_echo_n "checking size of _Bool... " >&6; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +00007028if test "${ac_cv_sizeof__Bool+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007029 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00007030else
Matthias Kloseb9621712010-04-24 17:59:49 +00007031 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 +00007032
Thomas Woutersb2137042007-02-01 18:02:27 +00007033else
Matthias Kloseb9621712010-04-24 17:59:49 +00007034 if test "$ac_cv_type__Bool" = yes; then
7035 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7036$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Antoine Pitrouf65132d2011-02-25 23:25:17 +00007037{ as_fn_set_status 77
7038as_fn_error "cannot compute sizeof (_Bool)
7039See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007040 else
7041 ac_cv_sizeof__Bool=0
7042 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00007043fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007044
Thomas Woutersb2137042007-02-01 18:02:27 +00007045fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007046{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
7047$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007048
7049
7050
Thomas Woutersb2137042007-02-01 18:02:27 +00007051cat >>confdefs.h <<_ACEOF
7052#define SIZEOF__BOOL $ac_cv_sizeof__Bool
7053_ACEOF
7054
7055
7056fi
7057
Matthias Kloseb9621712010-04-24 17:59:49 +00007058ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00007059 #include <stdint.h>
7060 #endif
Antoine Pitrou1bf29b72010-10-10 08:10:16 +00007061 #ifdef HAVE_INTTYPES_H
7062 #include <inttypes.h>
7063 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00007064"
Antoine Pitrouf65132d2011-02-25 23:25:17 +00007065if test "x$ac_cv_type_uintptr_t" = x""yes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00007066
7067cat >>confdefs.h <<_ACEOF
7068#define HAVE_UINTPTR_T 1
7069_ACEOF
7070
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007071# The cast to long int works around a bug in the HP C Compiler
7072# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7073# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7074# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007075{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
7076$as_echo_n "checking size of uintptr_t... " >&6; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +00007077if test "${ac_cv_sizeof_uintptr_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007078 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007079else
Matthias Kloseb9621712010-04-24 17:59:49 +00007080 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 +00007081
Martin v. Löwis11437992002-04-12 09:54:03 +00007082else
Matthias Kloseb9621712010-04-24 17:59:49 +00007083 if test "$ac_cv_type_uintptr_t" = yes; then
7084 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7085$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Antoine Pitrouf65132d2011-02-25 23:25:17 +00007086{ as_fn_set_status 77
7087as_fn_error "cannot compute sizeof (uintptr_t)
7088See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007089 else
7090 ac_cv_sizeof_uintptr_t=0
7091 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007092fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007093
Martin v. Löwis11437992002-04-12 09:54:03 +00007094fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007095{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
7096$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007097
7098
7099
Martin v. Löwis11437992002-04-12 09:54:03 +00007100cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007101#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007102_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007103
Michael W. Hudson54241132001-12-07 15:38:26 +00007104
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007105fi
7106
Thomas Wouters89f507f2006-12-13 04:49:30 +00007107
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007108# The cast to long int works around a bug in the HP C Compiler
7109# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7110# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7111# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
7113$as_echo_n "checking size of off_t... " >&6; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +00007114if test "${ac_cv_sizeof_off_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007115 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007116else
Matthias Kloseb9621712010-04-24 17:59:49 +00007117 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007118#ifdef HAVE_SYS_TYPES_H
7119#include <sys/types.h>
7120#endif
7121
Matthias Kloseb9621712010-04-24 17:59:49 +00007122"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007123
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007124else
Matthias Kloseb9621712010-04-24 17:59:49 +00007125 if test "$ac_cv_type_off_t" = yes; then
7126 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7127$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Antoine Pitrouf65132d2011-02-25 23:25:17 +00007128{ as_fn_set_status 77
7129as_fn_error "cannot compute sizeof (off_t)
7130See \`config.log' for more details." "$LINENO" 5; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007131 else
7132 ac_cv_sizeof_off_t=0
7133 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007134fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007135
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007136fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007137{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
7138$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007139
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007140
7141
Martin v. Löwis11437992002-04-12 09:54:03 +00007142cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007143#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007144_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007145
Michael W. Hudson54241132001-12-07 15:38:26 +00007146
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007147
Matthias Kloseb9621712010-04-24 17:59:49 +00007148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
7149$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007150if test "$have_long_long" = yes
7151then
7152if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007153 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007154
Matthias Kloseb9621712010-04-24 17:59:49 +00007155$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007156
Matthias Kloseb9621712010-04-24 17:59:49 +00007157 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7158$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007159else
Matthias Kloseb9621712010-04-24 17:59:49 +00007160 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7161$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007162fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00007163else
Matthias Kloseb9621712010-04-24 17:59:49 +00007164 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7165$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007166fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007167
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007168# The cast to long int works around a bug in the HP C Compiler
7169# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7170# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7171# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007172{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
7173$as_echo_n "checking size of time_t... " >&6; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +00007174if test "${ac_cv_sizeof_time_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007175 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007176else
Matthias Kloseb9621712010-04-24 17:59:49 +00007177 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007178#ifdef HAVE_SYS_TYPES_H
7179#include <sys/types.h>
7180#endif
7181#ifdef HAVE_TIME_H
7182#include <time.h>
7183#endif
7184
Matthias Kloseb9621712010-04-24 17:59:49 +00007185"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007186
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007187else
Matthias Kloseb9621712010-04-24 17:59:49 +00007188 if test "$ac_cv_type_time_t" = yes; then
7189 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7190$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Antoine Pitrouf65132d2011-02-25 23:25:17 +00007191{ as_fn_set_status 77
7192as_fn_error "cannot compute sizeof (time_t)
7193See \`config.log' for more details." "$LINENO" 5; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007194 else
7195 ac_cv_sizeof_time_t=0
7196 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007197fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007198
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007199fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007200{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
7201$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007202
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007203
7204
Martin v. Löwis11437992002-04-12 09:54:03 +00007205cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007206#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007207_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007208
Michael W. Hudson54241132001-12-07 15:38:26 +00007209
7210
Trent Mick635f6fb2000-08-23 21:33:05 +00007211# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007212ac_save_cc="$CC"
7213if test "$ac_cv_kpthread" = "yes"
7214then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00007215elif test "$ac_cv_kthread" = "yes"
7216then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00007217elif test "$ac_cv_pthread" = "yes"
7218then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007219fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007220
Matthias Kloseb9621712010-04-24 17:59:49 +00007221{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
7222$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007223have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007224cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007225/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007226
7227 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007228int
7229main ()
7230{
Guido van Rossum12580492000-09-24 16:47:19 +00007231pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007232 ;
7233 return 0;
7234}
Matthias Kloseb159a552010-04-25 21:00:44 +00007235
Martin v. Löwis11437992002-04-12 09:54:03 +00007236_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007237if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00007238 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00007239fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007240rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007241{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
7242$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007243if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007244 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007245# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7246# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7247# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007248{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
7249$as_echo_n "checking size of pthread_t... " >&6; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +00007250if test "${ac_cv_sizeof_pthread_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007251 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007252else
Matthias Kloseb9621712010-04-24 17:59:49 +00007253 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007254#ifdef HAVE_PTHREAD_H
7255#include <pthread.h>
7256#endif
7257
Matthias Kloseb9621712010-04-24 17:59:49 +00007258"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007259
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007260else
Matthias Kloseb9621712010-04-24 17:59:49 +00007261 if test "$ac_cv_type_pthread_t" = yes; then
7262 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7263$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Antoine Pitrouf65132d2011-02-25 23:25:17 +00007264{ as_fn_set_status 77
7265as_fn_error "cannot compute sizeof (pthread_t)
7266See \`config.log' for more details." "$LINENO" 5; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007267 else
7268 ac_cv_sizeof_pthread_t=0
7269 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00007270fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007271
Trent Mick635f6fb2000-08-23 21:33:05 +00007272fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007273{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
7274$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007275
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007276
7277
Martin v. Löwis11437992002-04-12 09:54:03 +00007278cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007279#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007280_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007281
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007282
Trent Mick635f6fb2000-08-23 21:33:05 +00007283fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007284CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00007285
Michael W. Hudson54241132001-12-07 15:38:26 +00007286
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007287case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007288 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007289 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
7290 ;;
7291 Darwin/*)
7292 OTHER_LIBTOOL_OPT=""
7293 ;;
7294esac
7295
7296
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007297ARCH_RUN_32BIT=""
7298
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007299case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007300 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00007301 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
7302 if test "${enable_universalsdk}"; then
7303 :
7304 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007305 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007306 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00007307 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007308 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00007309 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00007310 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007311 if test ${gcc_version} '<' 4.0
7312 then
7313 LIBTOOL_CRUFT="-lcc_dynamic"
7314 else
7315 LIBTOOL_CRUFT=""
7316 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007317 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007318 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007319else
Matthias Kloseb9621712010-04-24 17:59:49 +00007320 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007321/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007322
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007323 #include <unistd.h>
7324 int main(int argc, char*argv[])
7325 {
7326 if (sizeof(long) == 4) {
7327 return 0;
7328 } else {
7329 return 1;
7330 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007331 }
7332
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007333_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007334if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007335 ac_osx_32bit=yes
7336else
Matthias Kloseb9621712010-04-24 17:59:49 +00007337 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007338fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007339rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7340 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007341fi
7342
7343
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007344 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007345 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007346 i386)
7347 MACOSX_DEFAULT_ARCH="i386"
7348 ;;
7349 ppc)
7350 MACOSX_DEFAULT_ARCH="ppc"
7351 ;;
7352 *)
Antoine Pitrouf65132d2011-02-25 23:25:17 +00007353 as_fn_error "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007354 ;;
7355 esac
7356 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007357 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007358 i386)
7359 MACOSX_DEFAULT_ARCH="x86_64"
7360 ;;
7361 ppc)
7362 MACOSX_DEFAULT_ARCH="ppc64"
7363 ;;
7364 *)
Antoine Pitrouf65132d2011-02-25 23:25:17 +00007365 as_fn_error "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007366 ;;
7367 esac
7368
7369 #ARCH_RUN_32BIT="true"
7370 fi
7371
7372 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00007373 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007374 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007375esac
7376
Matthias Kloseb9621712010-04-24 17:59:49 +00007377{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
7378$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007379if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007380then
Skip Montanarodecc6a42003-01-01 20:07:49 +00007381 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00007382 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00007383 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007384
Matthias Kloseb9621712010-04-24 17:59:49 +00007385$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007386
Matthias Kloseb9621712010-04-24 17:59:49 +00007387 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7388$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00007389 if test $enable_shared = "yes"
7390 then
Antoine Pitrouf65132d2011-02-25 23:25:17 +00007391 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 +00007392 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007393else
Matthias Kloseb9621712010-04-24 17:59:49 +00007394 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7395$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007396fi
7397
Matthias Kloseb9621712010-04-24 17:59:49 +00007398{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
7399$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007400case $ac_sys_system/$ac_sys_release in
7401 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007402
Matthias Kloseb9621712010-04-24 17:59:49 +00007403$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007404
Matthias Kloseb9621712010-04-24 17:59:49 +00007405 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
7406$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007407 ;;
7408 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00007409 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7410$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007411 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007412esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007413
Guido van Rossum0a516c91994-09-12 10:58:40 +00007414# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00007415
Michael W. Hudson54241132001-12-07 15:38:26 +00007416
7417
7418
7419
Benjamin Peterson99f03762010-04-11 22:15:28 +00007420
Thomas Wouters477c8d52006-05-27 19:21:47 +00007421
Georg Brandlb1441c72009-01-03 22:33:39 +00007422
Thomas Wouters477c8d52006-05-27 19:21:47 +00007423cat >>confdefs.h <<_ACEOF
7424#define SHLIB_EXT "$SO"
7425_ACEOF
7426
Guido van Rossum0a516c91994-09-12 10:58:40 +00007427# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00007428# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007429# (Shared libraries in this instance are shared modules to be loaded into
7430# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00007431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
7432$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007433if test -z "$LDSHARED"
7434then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007435 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007436 AIX*)
Georg Brandl9a829be2011-02-15 15:44:51 +00007437 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00007438 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007439 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00007440 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00007441 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00007442 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007443 if test "$GCC" = "yes" ; then
7444 LDSHARED='$(CC) -shared'
7445 LDCXXSHARED='$(CXX) -shared'
7446 else
7447 LDSHARED='$(CC) -G'
7448 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00007449 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007450 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007451 if test "$GCC" = "yes" ; then
7452 LDSHARED='$(CC) -shared'
7453 LDCXXSHARED='$(CXX) -shared'
7454 else
7455 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007456 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +00007457 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +00007458 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007459 LDSHARED='$(CC) -bundle'
7460 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00007461 if test "$enable_framework" ; then
7462 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007463 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7464 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007465 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007466 else
7467 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00007468 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00007469 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00007470 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007471 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007472 LDSHARED='$(CC) -bundle'
7473 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00007474 if test "$enable_framework" ; then
7475 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007476 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7477 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007478 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007479 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00007480 # No framework, use the Python app as bundle-loader
7481 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00007482 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007483 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007484 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007485 Darwin/*)
7486 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
7487 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00007488
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007489 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +00007490 then
Thomas Wouters477c8d52006-05-27 19:21:47 +00007491 if test "${enable_universalsdk}"; then
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007492 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007493 fi
Antoine Pitroud4958c22010-10-13 17:01:10 +00007494 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
7495 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
Jack Jansen6b08a402004-06-03 12:41:45 +00007496 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00007497 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00007498 LDSHARED='$(CC) -bundle'
7499 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00007500 if test "$enable_framework" ; then
7501 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007502 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7503 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007504 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007505 else
7506 # No framework, use the Python app as bundle-loader
7507 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
7508 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007509 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007510 fi
7511 fi
7512 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007513 Linux*|GNU*|QNX*)
7514 LDSHARED='$(CC) -shared'
7515 LDCXXSHARED='$(CXX) -shared';;
7516 BSD/OS*/4*)
7517 LDSHARED="gcc -shared"
7518 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007519 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00007520 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00007521 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00007522 LDSHARED='$(CC) -shared'
7523 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00007524 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00007525 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00007526 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007527 OpenBSD*)
7528 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7529 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00007530 LDSHARED='$(CC) -shared $(CCSHARED)'
7531 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007532 else
7533 case `uname -r` in
7534 [01].* | 2.[0-7] | 2.[0-7].*)
7535 LDSHARED="ld -Bshareable ${LDFLAGS}"
7536 ;;
7537 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007538 LDSHARED='$(CC) -shared $(CCSHARED)'
7539 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007540 ;;
7541 esac
7542 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007543 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00007544 LDSHARED='$(CC) -shared'
7545 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007546 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007547 if test "$GCC" = "yes" ; then
7548 LDSHARED='$(CC) -shared'
7549 LDCXXSHARED='$(CXX) -shared'
7550 else
7551 LDSHARED='$(CC) -G'
7552 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00007553 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007554 SCO_SV*)
7555 LDSHARED='$(CC) -Wl,-G,-Bexport'
7556 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
7557 CYGWIN*)
7558 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
7559 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007560 *) LDSHARED="ld";;
7561 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007562fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007563{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
7564$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00007565LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007566BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00007567# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007568# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007569{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
7570$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007571if test -z "$CCSHARED"
7572then
Guido van Rossum07397971997-04-29 21:49:50 +00007573 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00007574 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007575 then CCSHARED="-fPIC";
7576 elif test `uname -p` = sparc;
7577 then CCSHARED="-xcode=pic32";
7578 else CCSHARED="-Kpic";
7579 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00007580 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00007581 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00007582 else CCSHARED="+z";
7583 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007584 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007585 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007586 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007587 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00007588 if test "$GCC" = "yes"
7589 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00007590 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00007591 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007592 SCO_SV*)
7593 if test "$GCC" = "yes"
7594 then CCSHARED="-fPIC"
7595 else CCSHARED="-Kpic -belf"
7596 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007597 IRIX*/6*) case $CC in
7598 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00007599 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007600 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007601 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007602fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007603{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
7604$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007605# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007606# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007607{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
7608$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007609if test -z "$LINKFORSHARED"
7610then
Guido van Rossum07397971997-04-29 21:49:50 +00007611 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007612 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007613 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00007614 LINKFORSHARED="-Wl,-E -Wl,+s";;
7615# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007616 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007617 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007618 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00007619 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00007620 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Jack Jansene578a632001-08-15 01:27:14 +00007621 if test "$enable_framework"
7622 then
Jack Jansenda49e192005-01-07 13:08:22 +00007623 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007624 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007625 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007626 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007627 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00007628 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007629 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00007630 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7631 then
7632 LINKFORSHARED="-Wl,--export-dynamic"
7633 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007634 SunOS/5*) case $CC in
7635 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00007636 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00007637 then
7638 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007639 fi;;
7640 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00007641 CYGWIN*)
7642 if test $enable_shared = "no"
7643 then
7644 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
7645 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00007646 QNX*)
7647 # -Wl,-E causes the symbols to be added to the dynamic
7648 # symbol table so that they can be found when a module
7649 # is loaded. -N 2048K causes the stack size to be set
7650 # to 2048 kilobytes so that the stack doesn't overflow
7651 # when running test_compile.py.
7652 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007653 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007654fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007655{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
7656$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007657
Michael W. Hudson54241132001-12-07 15:38:26 +00007658
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00007659
Matthias Kloseb9621712010-04-24 17:59:49 +00007660{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
7661$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007662if test ! "$LIBRARY" = "$LDLIBRARY"
7663then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00007664 case $ac_sys_system in
7665 CYGWIN*)
7666 # Cygwin needs CCSHARED when building extension DLLs
7667 # but not when building the interpreter DLL.
7668 CFLAGSFORSHARED='';;
7669 *)
7670 CFLAGSFORSHARED='$(CCSHARED)'
7671 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007672fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007673{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
7674$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007675
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007676# SHLIBS are libraries (except -lc and -lm) to link to the python shared
7677# library (with --enable-shared).
7678# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007679# symbols, this must be set to $(LIBS) (expanded by make). We do this even
7680# if it is not required, since it creates a dependency of the shared library
7681# to LIBS. This, in turn, means that applications linking the shared libpython
7682# don't need to link LIBS explicitly. The default should be only changed
7683# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007684
Matthias Kloseb9621712010-04-24 17:59:49 +00007685{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
7686$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007687case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007688 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007689 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007690esac
Matthias Kloseb9621712010-04-24 17:59:49 +00007691{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
7692$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007693
7694
Guido van Rossum627b2d71993-12-24 10:39:16 +00007695# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00007696{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
7697$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +00007698if test "${ac_cv_lib_sendfile_sendfile+set}" = set; then :
Georg Brandl941f9562011-02-25 15:21:47 +00007699 $as_echo_n "(cached) " >&6
7700else
7701 ac_check_lib_save_LIBS=$LIBS
7702LIBS="-lsendfile $LIBS"
7703cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7704/* end confdefs.h. */
7705
7706/* Override any GCC internal prototype to avoid an error.
7707 Use char because int might match the return type of a GCC
7708 builtin and then its argument prototype would still apply. */
7709#ifdef __cplusplus
7710extern "C"
7711#endif
7712char sendfile ();
7713int
7714main ()
7715{
7716return sendfile ();
7717 ;
7718 return 0;
7719}
7720_ACEOF
7721if ac_fn_c_try_link "$LINENO"; then :
7722 ac_cv_lib_sendfile_sendfile=yes
7723else
7724 ac_cv_lib_sendfile_sendfile=no
7725fi
7726rm -f core conftest.err conftest.$ac_objext \
7727 conftest$ac_exeext conftest.$ac_ext
7728LIBS=$ac_check_lib_save_LIBS
7729fi
7730{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
7731$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +00007732if test "x$ac_cv_lib_sendfile_sendfile" = x""yes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00007733 cat >>confdefs.h <<_ACEOF
7734#define HAVE_LIBSENDFILE 1
7735_ACEOF
7736
7737 LIBS="-lsendfile $LIBS"
7738
7739fi
7740
Matthias Kloseb9621712010-04-24 17:59:49 +00007741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
7742$as_echo_n "checking for dlopen in -ldl... " >&6; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +00007743if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007744 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007745else
Martin v. Löwis11437992002-04-12 09:54:03 +00007746 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007747LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007748cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007749/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007750
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007751/* Override any GCC internal prototype to avoid an error.
7752 Use char because int might match the return type of a GCC
7753 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007754#ifdef __cplusplus
7755extern "C"
7756#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007757char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007758int
7759main ()
7760{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007761return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007762 ;
7763 return 0;
7764}
7765_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007766if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007767 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007768else
Matthias Kloseb9621712010-04-24 17:59:49 +00007769 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007770fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007771rm -f core conftest.err conftest.$ac_objext \
7772 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007773LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007774fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007775{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
7776$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +00007777if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007778 cat >>confdefs.h <<_ACEOF
7779#define HAVE_LIBDL 1
7780_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007781
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007782 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00007783
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007784fi
7785 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00007786{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
7787$as_echo_n "checking for shl_load in -ldld... " >&6; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +00007788if test "${ac_cv_lib_dld_shl_load+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007789 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007790else
Martin v. Löwis11437992002-04-12 09:54:03 +00007791 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007792LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007793cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007794/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007795
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007796/* Override any GCC internal prototype to avoid an error.
7797 Use char because int might match the return type of a GCC
7798 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007799#ifdef __cplusplus
7800extern "C"
7801#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007802char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007803int
7804main ()
7805{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007806return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007807 ;
7808 return 0;
7809}
7810_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007811if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007812 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007813else
Matthias Kloseb9621712010-04-24 17:59:49 +00007814 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007815fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007816rm -f core conftest.err conftest.$ac_objext \
7817 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007818LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007819fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007820{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
7821$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +00007822if test "x$ac_cv_lib_dld_shl_load" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007823 cat >>confdefs.h <<_ACEOF
7824#define HAVE_LIBDLD 1
7825_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007826
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007827 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007828
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007829fi
7830 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00007831
Georg Brandlb1441c72009-01-03 22:33:39 +00007832# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00007833if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007834 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
7835$as_echo_n "checking for library containing sem_init... " >&6; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +00007836if test "${ac_cv_search_sem_init+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007837 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007838else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00007839 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007840cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007841/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007842
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007843/* Override any GCC internal prototype to avoid an error.
7844 Use char because int might match the return type of a GCC
7845 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007846#ifdef __cplusplus
7847extern "C"
7848#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007849char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007850int
7851main ()
7852{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007853return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007854 ;
7855 return 0;
7856}
7857_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007858for ac_lib in '' pthread rt posix4; do
7859 if test -z "$ac_lib"; then
7860 ac_res="none required"
7861 else
7862 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007863 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007864 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007865 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007866 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007867fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007868rm -f core conftest.err conftest.$ac_objext \
7869 conftest$ac_exeext
Antoine Pitrouf65132d2011-02-25 23:25:17 +00007870 if test "${ac_cv_search_sem_init+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007871 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007872fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007873done
Antoine Pitrouf65132d2011-02-25 23:25:17 +00007874if test "${ac_cv_search_sem_init+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007875
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007876else
7877 ac_cv_search_sem_init=no
7878fi
7879rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00007880LIBS=$ac_func_search_save_LIBS
7881fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007882{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
7883$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007884ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00007885if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007886 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007887
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007888fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00007889 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00007890 # posix4 on Solaris 2.6
7891 # pthread (first!) on Linux
7892fi
7893
Martin v. Löwis19d17342003-06-14 21:03:05 +00007894# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00007895{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
7896$as_echo_n "checking for textdomain in -lintl... " >&6; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +00007897if test "${ac_cv_lib_intl_textdomain+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007898 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00007899else
7900 ac_check_lib_save_LIBS=$LIBS
7901LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007902cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007903/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00007904
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007905/* Override any GCC internal prototype to avoid an error.
7906 Use char because int might match the return type of a GCC
7907 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00007908#ifdef __cplusplus
7909extern "C"
7910#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00007911char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00007912int
7913main ()
7914{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007915return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00007916 ;
7917 return 0;
7918}
7919_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007920if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00007921 ac_cv_lib_intl_textdomain=yes
7922else
Matthias Kloseb9621712010-04-24 17:59:49 +00007923 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00007924fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007925rm -f core conftest.err conftest.$ac_objext \
7926 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00007927LIBS=$ac_check_lib_save_LIBS
7928fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007929{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
7930$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +00007931if test "x$ac_cv_lib_intl_textdomain" = x""yes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00007932
Matthias Kloseb9621712010-04-24 17:59:49 +00007933$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00007934
Brett Cannonc6d936e2009-06-07 20:09:53 +00007935 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00007936fi
7937
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007938
7939# checks for system dependent C++ extensions support
7940case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00007941 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
7942$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
7943 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007944/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007945
Georg Brandl59e87bd2011-02-15 19:48:59 +00007946 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007947int
7948main ()
7949{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007950loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00007951 ;
7952 return 0;
7953}
Matthias Kloseb159a552010-04-25 21:00:44 +00007954
Martin v. Löwis11437992002-04-12 09:54:03 +00007955_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007956if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007957
Matthias Kloseb159a552010-04-25 21:00:44 +00007958
Matthias Kloseb9621712010-04-24 17:59:49 +00007959$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007960
Matthias Kloseb159a552010-04-25 21:00:44 +00007961 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007962$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00007963
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007964else
Matthias Kloseb159a552010-04-25 21:00:44 +00007965
7966 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007967$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00007968
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007969fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007970rm -f core conftest.err conftest.$ac_objext \
7971 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007972 *) ;;
7973esac
7974
Guido van Rossum70c7f481998-03-26 18:44:10 +00007975# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00007976{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
7977$as_echo_n "checking for t_open in -lnsl... " >&6; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +00007978if test "${ac_cv_lib_nsl_t_open+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007979 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007980else
Martin v. Löwis11437992002-04-12 09:54:03 +00007981 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007982LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007983cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007984/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007985
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007986/* Override any GCC internal prototype to avoid an error.
7987 Use char because int might match the return type of a GCC
7988 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007989#ifdef __cplusplus
7990extern "C"
7991#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007992char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007993int
7994main ()
7995{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007996return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007997 ;
7998 return 0;
7999}
8000_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008001if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008002 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008003else
Matthias Kloseb9621712010-04-24 17:59:49 +00008004 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008005fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008006rm -f core conftest.err conftest.$ac_objext \
8007 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008008LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008009fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008010{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
8011$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +00008012if test "x$ac_cv_lib_nsl_t_open" = x""yes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008013 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008014fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00008015 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00008016{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
8017$as_echo_n "checking for socket in -lsocket... " >&6; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +00008018if test "${ac_cv_lib_socket_socket+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008019 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008020else
Martin v. Löwis11437992002-04-12 09:54:03 +00008021 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008022LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008023cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008024/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008025
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008026/* Override any GCC internal prototype to avoid an error.
8027 Use char because int might match the return type of a GCC
8028 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008029#ifdef __cplusplus
8030extern "C"
8031#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008032char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008033int
8034main ()
8035{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008036return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008037 ;
8038 return 0;
8039}
8040_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008041if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008042 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008043else
Matthias Kloseb9621712010-04-24 17:59:49 +00008044 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008045fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008046rm -f core conftest.err conftest.$ac_objext \
8047 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008048LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008049fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008050{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
8051$as_echo "$ac_cv_lib_socket_socket" >&6; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +00008052if test "x$ac_cv_lib_socket_socket" = x""yes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00008053 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00008054fi
8055 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00008056
Matthias Kloseb9621712010-04-24 17:59:49 +00008057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
8058$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008059
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008060# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008061if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008062 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00008063{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8064$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00008065LIBS="$withval $LIBS"
8066
8067else
Matthias Kloseb9621712010-04-24 17:59:49 +00008068 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8069$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008070fi
8071
Guido van Rossum7f43da71994-08-01 12:15:30 +00008072
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008073if test -n "$ac_tool_prefix"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008074 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
8075set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008076{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8077$as_echo_n "checking for $ac_word... " >&6; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +00008078if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008079 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008080else
8081 case $PKG_CONFIG in
8082 [\\/]* | ?:[\\/]*)
8083 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8084 ;;
8085 *)
8086 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8087for as_dir in $PATH
8088do
8089 IFS=$as_save_IFS
8090 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008091 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Petersond78735d2010-01-01 16:04:23 +00008092 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8093 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008094 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008095 break 2
8096 fi
8097done
Matthias Kloseb9621712010-04-24 17:59:49 +00008098 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008099IFS=$as_save_IFS
8100
8101 ;;
8102esac
8103fi
8104PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8105if test -n "$PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008106 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8107$as_echo "$PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008108else
Matthias Kloseb9621712010-04-24 17:59:49 +00008109 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8110$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008111fi
8112
8113
8114fi
8115if test -z "$ac_cv_path_PKG_CONFIG"; then
8116 ac_pt_PKG_CONFIG=$PKG_CONFIG
8117 # Extract the first word of "pkg-config", so it can be a program name with args.
8118set dummy pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008119{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8120$as_echo_n "checking for $ac_word... " >&6; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +00008121if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008122 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008123else
8124 case $ac_pt_PKG_CONFIG in
8125 [\\/]* | ?:[\\/]*)
8126 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
8127 ;;
8128 *)
8129 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8130for as_dir in $PATH
8131do
8132 IFS=$as_save_IFS
8133 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008134 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Petersond78735d2010-01-01 16:04:23 +00008135 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8136 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008137 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008138 break 2
8139 fi
8140done
Matthias Kloseb9621712010-04-24 17:59:49 +00008141 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008142IFS=$as_save_IFS
8143
8144 ;;
8145esac
8146fi
8147ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
8148if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008149 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
8150$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008151else
Matthias Kloseb9621712010-04-24 17:59:49 +00008152 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8153$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008154fi
8155
8156 if test "x$ac_pt_PKG_CONFIG" = x; then
8157 PKG_CONFIG=""
8158 else
8159 case $cross_compiling:$ac_tool_warned in
8160yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00008161{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8162$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Petersond78735d2010-01-01 16:04:23 +00008163ac_tool_warned=yes ;;
8164esac
8165 PKG_CONFIG=$ac_pt_PKG_CONFIG
8166 fi
8167else
8168 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
8169fi
8170
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008171
8172# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00008173{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
8174$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008175
8176# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008177if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008178 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00008179else
8180 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008181fi
8182
8183
Matthias Kloseb9621712010-04-24 17:59:49 +00008184{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
8185$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008186
8187# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00008188{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
8189$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008190
8191# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008192if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008193 withval=$with_system_ffi;
Benjamin Peterson79263252010-10-31 16:50:44 +00008194else
8195 with_system_ffi="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008196fi
8197
8198
8199if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008200 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
8201else
8202 LIBFFI_INCLUDEDIR=""
8203fi
8204
8205
Matthias Kloseb9621712010-04-24 17:59:49 +00008206{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
8207$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008208
Benjamin Peterson076ed002010-10-31 17:11:02 +00008209# Check for support for loadable sqlite extensions
8210{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
8211$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
8212# Check whether --enable-loadable-sqlite-extensions was given.
8213if test "${enable_loadable_sqlite_extensions+set}" = set; then :
8214 enableval=$enable_loadable_sqlite_extensions;
8215else
8216 enable_loadable_sqlite_extensions="no"
8217fi
8218
8219
8220{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
8221$as_echo "$enable_loadable_sqlite_extensions" >&6; }
8222
Matthias Klose55708cc2009-04-30 08:06:49 +00008223# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +00008224{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
8225$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008226
8227# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008228if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +00008229 withval=$with_dbmliborder;
8230if test x$with_dbmliborder = xyes
8231then
Antoine Pitrouf65132d2011-02-25 23:25:17 +00008232as_fn_error "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008233else
8234 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
8235 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
8236 then
Antoine Pitrouf65132d2011-02-25 23:25:17 +00008237 as_fn_error "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008238 fi
8239 done
8240fi
8241fi
8242
Matthias Kloseb9621712010-04-24 17:59:49 +00008243{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
8244$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008245
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00008246# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008247
8248
Matthias Kloseb9621712010-04-24 17:59:49 +00008249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
8250$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008251
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008252# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008253if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008254 withval=$with_signal_module;
8255fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008256
8257
8258if test -z "$with_signal_module"
8259then with_signal_module="yes"
8260fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008261{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
8262$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008263
8264if test "${with_signal_module}" = "yes"; then
8265 USE_SIGNAL_MODULE=""
8266 SIGNAL_OBJS=""
8267else
8268 USE_SIGNAL_MODULE="#"
8269 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
8270fi
8271
Guido van Rossum3d15bd82001-01-10 18:53:48 +00008272# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00008273
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008274USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00008275
Matthias Kloseb9621712010-04-24 17:59:49 +00008276{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dec-threads" >&5
8277$as_echo_n "checking for --with-dec-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008278
Guido van Rossumec2f0731997-01-22 20:54:01 +00008279
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008280# Check whether --with-dec-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008281if test "${with_dec_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008282 withval=$with_dec_threads;
Matthias Kloseb9621712010-04-24 17:59:49 +00008283{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8284$as_echo "$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +00008285LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00008286if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00008287 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00008288fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008289else
Matthias Kloseb9621712010-04-24 17:59:49 +00008290 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8291$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008292fi
8293
Martin v. Löwis11437992002-04-12 09:54:03 +00008294
8295# Templates for things AC_DEFINEd more than once.
8296# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00008297
8298
Martin v. Löwis11437992002-04-12 09:54:03 +00008299
8300
Matthias Kloseb9621712010-04-24 17:59:49 +00008301{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
8302$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008303
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008304# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008305if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008306 withval=$with_threads;
8307fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008308
8309
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008310# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00008311
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008312# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008313if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008314 withval=$with_thread; with_threads=$with_thread
8315fi
8316
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008317
8318if test -z "$with_threads"
8319then with_threads="yes"
8320fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008321{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
8322$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008323
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008324
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008325if test "$with_threads" = "no"
8326then
8327 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008328elif test "$ac_cv_pthread_is_default" = yes
8329then
Matthias Kloseb9621712010-04-24 17:59:49 +00008330 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008331
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008332 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +00008333 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008334
8335 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00008336 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008337elif test "$ac_cv_kpthread" = "yes"
8338then
8339 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008340 if test "$ac_cv_cxx_thread" = "yes"; then
8341 CXX="$CXX -Kpthread"
8342 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008343 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00008344
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008345 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008346 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008347elif test "$ac_cv_kthread" = "yes"
8348then
8349 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008350 if test "$ac_cv_cxx_thread" = "yes"; then
8351 CXX="$CXX -Kthread"
8352 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008353 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008354
8355 posix_threads=yes
8356 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008357elif test "$ac_cv_pthread" = "yes"
8358then
8359 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008360 if test "$ac_cv_cxx_thread" = "yes"; then
8361 CXX="$CXX -pthread"
8362 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008363 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008364
8365 posix_threads=yes
8366 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008367else
8368 if test ! -z "$with_threads" -a -d "$with_threads"
8369 then LDFLAGS="$LDFLAGS -L$with_threads"
8370 fi
8371 if test ! -z "$withval" -a -d "$withval"
8372 then LDFLAGS="$LDFLAGS -L$withval"
8373 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008374
8375 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00008376 # define _POSIX_THREADS in unistd.h. Some apparently don't
8377 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +00008378 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
8379$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
8380 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008381/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008382
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008383#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008384#ifdef _POSIX_THREADS
8385yes
8386#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008387
8388_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008389if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008390 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008391 unistd_defines_pthreads=yes
8392else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008393 unistd_defines_pthreads=no
8394fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008395rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008396
Matthias Kloseb9621712010-04-24 17:59:49 +00008397 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
8398$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008399
Matthias Kloseb9621712010-04-24 17:59:49 +00008400 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00008401
Matthias Kloseb9621712010-04-24 17:59:49 +00008402 ac_fn_c_check_header_mongrel "$LINENO" "cthreads.h" "ac_cv_header_cthreads_h" "$ac_includes_default"
Antoine Pitrouf65132d2011-02-25 23:25:17 +00008403if test "x$ac_cv_header_cthreads_h" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008404 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008405
Matthias Kloseb9621712010-04-24 17:59:49 +00008406 $as_echo "#define C_THREADS 1" >>confdefs.h
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008407
Martin v. Löwis11437992002-04-12 09:54:03 +00008408
Matthias Kloseb9621712010-04-24 17:59:49 +00008409$as_echo "#define HURD_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008410
8411 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008412 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008413else
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008414
Matthias Kloseb9621712010-04-24 17:59:49 +00008415 ac_fn_c_check_header_mongrel "$LINENO" "mach/cthreads.h" "ac_cv_header_mach_cthreads_h" "$ac_includes_default"
Antoine Pitrouf65132d2011-02-25 23:25:17 +00008416if test "x$ac_cv_header_mach_cthreads_h" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008417 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008418
Matthias Kloseb9621712010-04-24 17:59:49 +00008419 $as_echo "#define C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008420
Martin v. Löwis11437992002-04-12 09:54:03 +00008421
Matthias Kloseb9621712010-04-24 17:59:49 +00008422$as_echo "#define MACH_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008423
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008424 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008425else
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008426
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008427 # Just looking for pthread_create in libpthread is not enough:
8428 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
8429 # So we really have to include pthread.h, and then link.
8430 _libs=$LIBS
8431 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00008432 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
8433$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
8434 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008435/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008436#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00008437
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008438void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00008439int
8440main ()
8441{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008442
8443pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00008444 ;
8445 return 0;
8446}
8447_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008448if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008449
Matthias Kloseb9621712010-04-24 17:59:49 +00008450 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8451$as_echo "yes" >&6; }
8452 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +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 Rossum02a1c402000-02-25 19:26:31 +00008456else
Martin v. Löwis11437992002-04-12 09:54:03 +00008457
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008458 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +00008459 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Antoine Pitrouf65132d2011-02-25 23:25:17 +00008460if test "x$ac_cv_func_pthread_detach" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008461 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00008462
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008463 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008464 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00008465else
Guido van Rossumad678af1998-10-02 14:42:15 +00008466
Matthias Kloseb9621712010-04-24 17:59:49 +00008467 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
8468$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +00008469if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008470 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008471else
Martin v. Löwis11437992002-04-12 09:54:03 +00008472 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008473LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008474cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008475/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008476
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008477/* Override any GCC internal prototype to avoid an error.
8478 Use char because int might match the return type of a GCC
8479 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008480#ifdef __cplusplus
8481extern "C"
8482#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008483char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008484int
8485main ()
8486{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008487return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008488 ;
8489 return 0;
8490}
8491_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008492if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008493 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00008494else
Matthias Kloseb9621712010-04-24 17:59:49 +00008495 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00008496fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008497rm -f core conftest.err conftest.$ac_objext \
8498 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008499LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008500fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008501{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
8502$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +00008503if test "x$ac_cv_lib_pthreads_pthread_create" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008504 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00008505
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008506 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008507 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008508 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00008509else
Greg Steinadf63d62000-07-05 10:38:09 +00008510
Matthias Kloseb9621712010-04-24 17:59:49 +00008511 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
8512$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +00008513if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008514 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00008515else
Martin v. Löwis11437992002-04-12 09:54:03 +00008516 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008517LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008518cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008519/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008520
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008521/* Override any GCC internal prototype to avoid an error.
8522 Use char because int might match the return type of a GCC
8523 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008524#ifdef __cplusplus
8525extern "C"
8526#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008527char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008528int
8529main ()
8530{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008531return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008532 ;
8533 return 0;
8534}
8535_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008536if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008537 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00008538else
Matthias Kloseb9621712010-04-24 17:59:49 +00008539 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00008540fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008541rm -f core conftest.err conftest.$ac_objext \
8542 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008543LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00008544fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008545{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
8546$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +00008547if test "x$ac_cv_lib_c_r_pthread_create" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008548 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00008549
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008550 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008551 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008552 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008553else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008554
Matthias Kloseb9621712010-04-24 17:59:49 +00008555 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
8556$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +00008557if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008558 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008559else
Martin v. Löwis11437992002-04-12 09:54:03 +00008560 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008561LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008562cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008563/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008564
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008565/* Override any GCC internal prototype to avoid an error.
8566 Use char because int might match the return type of a GCC
8567 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008568#ifdef __cplusplus
8569extern "C"
8570#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008571char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008572int
8573main ()
8574{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008575return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008576 ;
8577 return 0;
8578}
8579_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008580if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008581 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008582else
Matthias Kloseb9621712010-04-24 17:59:49 +00008583 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008584fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008585rm -f core conftest.err conftest.$ac_objext \
8586 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008587LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008588fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008589{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
8590$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +00008591if test "x$ac_cv_lib_pthread___pthread_create_system" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008592 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008593
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008594 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008595 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008596 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008597else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008598
Matthias Kloseb9621712010-04-24 17:59:49 +00008599 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
8600$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +00008601if test "${ac_cv_lib_cma_pthread_create+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008602 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00008603else
Martin v. Löwis11437992002-04-12 09:54:03 +00008604 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008605LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008606cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008607/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008608
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008609/* Override any GCC internal prototype to avoid an error.
8610 Use char because int might match the return type of a GCC
8611 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008612#ifdef __cplusplus
8613extern "C"
8614#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008615char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008616int
8617main ()
8618{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008619return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008620 ;
8621 return 0;
8622}
8623_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008624if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008625 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00008626else
Matthias Kloseb9621712010-04-24 17:59:49 +00008627 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00008628fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008629rm -f core conftest.err conftest.$ac_objext \
8630 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008631LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008632fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008633{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
8634$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +00008635if test "x$ac_cv_lib_cma_pthread_create" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008636 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00008637
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008638 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008639 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008640 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00008641else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00008642
Martin v. Löwis130fb172001-07-19 11:00:41 +00008643 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00008644fi
8645
Guido van Rossum627b2d71993-12-24 10:39:16 +00008646
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008647fi
8648
Guido van Rossum0be3e491997-05-22 20:33:33 +00008649fi
8650
Guido van Rossum49545951997-12-02 19:28:29 +00008651fi
8652
Guido van Rossumb93a8621998-05-07 13:27:32 +00008653fi
8654
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008655fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008656rm -f core conftest.err conftest.$ac_objext \
8657 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008658fi
8659
Martin v. Löwis11437992002-04-12 09:54:03 +00008660
8661fi
8662
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008663
Michael W. Hudson54241132001-12-07 15:38:26 +00008664
Matthias Kloseb9621712010-04-24 17:59:49 +00008665 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
8666$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +00008667if test "${ac_cv_lib_mpc_usconfig+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008668 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008669else
Martin v. Löwis11437992002-04-12 09:54:03 +00008670 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008671LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008672cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008673/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008674
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008675/* Override any GCC internal prototype to avoid an error.
8676 Use char because int might match the return type of a GCC
8677 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008678#ifdef __cplusplus
8679extern "C"
8680#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008681char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008682int
8683main ()
8684{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008685return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008686 ;
8687 return 0;
8688}
8689_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008690if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008691 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008692else
Matthias Kloseb9621712010-04-24 17:59:49 +00008693 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008694fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008695rm -f core conftest.err conftest.$ac_objext \
8696 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008697LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008698fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008699{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
8700$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +00008701if test "x$ac_cv_lib_mpc_usconfig" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008702 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008703
Martin v. Löwis130fb172001-07-19 11:00:41 +00008704 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008705 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008706 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008707fi
8708
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008709
Neal Norwitza978ab02002-11-02 16:58:05 +00008710 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008711 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
8712$as_echo_n "checking for thr_create in -lthread... " >&6; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +00008713if test "${ac_cv_lib_thread_thr_create+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008714 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008715else
Martin v. Löwis11437992002-04-12 09:54:03 +00008716 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008717LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008718cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008719/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008720
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008721/* Override any GCC internal prototype to avoid an error.
8722 Use char because int might match the return type of a GCC
8723 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008724#ifdef __cplusplus
8725extern "C"
8726#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008727char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008728int
8729main ()
8730{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008731return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008732 ;
8733 return 0;
8734}
8735_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008736if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008737 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008738else
Matthias Kloseb9621712010-04-24 17:59:49 +00008739 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008740fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008741rm -f core conftest.err conftest.$ac_objext \
8742 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008743LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008744fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008745{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
8746$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +00008747if test "x$ac_cv_lib_thread_thr_create" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008748 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008749
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008750 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008751 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008752 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008753fi
8754
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008755 fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008756
Martin v. Löwis130fb172001-07-19 11:00:41 +00008757 if test "$USE_THREAD_MODULE" != "#"
8758 then
8759 # If the above checks didn't disable threads, (at least) OSF1
8760 # needs this '-threads' argument during linking.
8761 case $ac_sys_system in
8762 OSF1) LDLAST=-threads;;
8763 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +00008764 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008765fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008766
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008767if test "$posix_threads" = "yes"; then
8768 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008769
Matthias Kloseb9621712010-04-24 17:59:49 +00008770$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008771
8772 fi
8773
8774 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
8775 case $ac_sys_system/$ac_sys_release in
8776 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +00008777$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008778
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008779 ;;
8780 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +00008781$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008782
8783 ;;
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00008784 AIX/5)
Matthias Kloseb9621712010-04-24 17:59:49 +00008785$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00008786
8787 ;;
Antoine Pitrou33a29942010-08-30 14:52:00 +00008788 AIX/6)
8789$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
8790
8791 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008792 esac
8793
Matthias Kloseb9621712010-04-24 17:59:49 +00008794 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
8795$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +00008796 if test "${ac_cv_pthread_system_supported+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008797 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008798else
Matthias Kloseb9621712010-04-24 17:59:49 +00008799 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008800 ac_cv_pthread_system_supported=no
8801else
Matthias Kloseb9621712010-04-24 17:59:49 +00008802 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008803/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008804#include <pthread.h>
8805 void *foo(void *parm) {
8806 return NULL;
8807 }
8808 main() {
8809 pthread_attr_t attr;
8810 pthread_t id;
8811 if (pthread_attr_init(&attr)) exit(-1);
8812 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
8813 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
8814 exit(0);
8815 }
8816_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008817if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008818 ac_cv_pthread_system_supported=yes
8819else
Matthias Kloseb9621712010-04-24 17:59:49 +00008820 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008821fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008822rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8823 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008824fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008825
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008826
Guido van Rossum627b2d71993-12-24 10:39:16 +00008827fi
8828
Matthias Kloseb9621712010-04-24 17:59:49 +00008829 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
8830$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008831 if test "$ac_cv_pthread_system_supported" = "yes"; then
8832
Matthias Kloseb9621712010-04-24 17:59:49 +00008833$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008834
8835 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008836 for ac_func in pthread_sigmask
8837do :
8838 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Antoine Pitrouf65132d2011-02-25 23:25:17 +00008839if test "x$ac_cv_func_pthread_sigmask" = x""yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008840 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008841#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008842_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +00008843 case $ac_sys_system in
8844 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008845
Matthias Kloseb9621712010-04-24 17:59:49 +00008846$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +00008847
8848 ;;
8849 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008850fi
8851done
8852
8853fi
8854
8855
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008856# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +00008857
Matthias Kloseb9621712010-04-24 17:59:49 +00008858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
8859$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008860# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008861if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008862 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008863 no)
Matthias Kloseb9621712010-04-24 17:59:49 +00008864 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8865$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008866 ipv6=no
8867 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00008868 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8869$as_echo "yes" >&6; }
8870 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008871
8872 ipv6=yes
8873 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008874 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008875else
Martin v. Löwis11437992002-04-12 09:54:03 +00008876
Matthias Kloseb9621712010-04-24 17:59:49 +00008877 if test "$cross_compiling" = yes; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008878
Matthias Kloseb9621712010-04-24 17:59:49 +00008879 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8880$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008881 ipv6=no
8882
8883else
Matthias Kloseb9621712010-04-24 17:59:49 +00008884 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008885/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008886 /* AF_INET6 available check */
8887#include <sys/types.h>
8888#include <sys/socket.h>
8889main()
8890{
8891 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
8892 exit(1);
8893 else
8894 exit(0);
8895}
8896
Martin v. Löwis11437992002-04-12 09:54:03 +00008897_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008898if ac_fn_c_try_run "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008899
Matthias Kloseb9621712010-04-24 17:59:49 +00008900 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8901$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008902 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +00008903
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008904else
Matthias Kloseb159a552010-04-25 21:00:44 +00008905
Matthias Kloseb9621712010-04-24 17:59:49 +00008906 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8907$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008908 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +00008909
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008910fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008911rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8912 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008913fi
8914
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008915
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008916if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008917 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
8918$as_echo_n "checking if RFC2553 API is available... " >&6; }
8919 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008920/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008921
8922 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008923#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008924int
8925main ()
8926{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008927struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +00008928 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +00008929 ;
8930 return 0;
8931}
Matthias Kloseb159a552010-04-25 21:00:44 +00008932
Martin v. Löwis11437992002-04-12 09:54:03 +00008933_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008934if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008935
8936 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008937$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008938 ipv6=yes
8939
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008940else
Matthias Kloseb159a552010-04-25 21:00:44 +00008941
8942 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008943$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008944 ipv6=no
8945
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008946fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008947rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008948fi
8949
8950if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008951 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008952
8953fi
8954
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008955fi
8956
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008957
8958ipv6type=unknown
8959ipv6lib=none
8960ipv6trylibc=no
8961
8962if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008963 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
8964$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +00008965 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
8966 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008967 case $i in
8968 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +00008969 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008970/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008971
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008972#include <netinet/in.h>
8973#ifdef IPV6_INRIA_VERSION
8974yes
8975#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008976_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008977if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008978 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00008979 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008980fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008981rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008982
8983 ;;
8984 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +00008985 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008986/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008987
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008988#include <netinet/in.h>
8989#ifdef __KAME__
8990yes
8991#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008992_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008993if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008994 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008995 ipv6type=$i;
8996 ipv6lib=inet6
8997 ipv6libdir=/usr/local/v6/lib
8998 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008999fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009000rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009001
9002 ;;
9003 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +00009004 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009005/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009006
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009007#include <features.h>
9008#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
9009yes
9010#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009011_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009012if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009013 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009014 ipv6type=$i;
9015 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009016fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009017rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009018
9019 ;;
9020 linux-inet6)
9021 if test -d /usr/inet6; then
9022 ipv6type=$i
9023 ipv6lib=inet6
9024 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +00009025 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009026 fi
9027 ;;
9028 solaris)
9029 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +00009030 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009031 ipv6type=$i
9032 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009033 fi
9034 fi
9035 ;;
9036 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +00009037 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009038/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009039
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009040#include <sys/param.h>
9041#ifdef _TOSHIBA_INET6
9042yes
9043#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009044_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009045if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009046 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009047 ipv6type=$i;
9048 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009049 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009050fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009051rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009052
9053 ;;
9054 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +00009055 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009056/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009057
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009058#include </usr/local/v6/include/sys/v6config.h>
9059#ifdef __V6D__
9060yes
9061#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009062_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009063if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009064 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009065 ipv6type=$i;
9066 ipv6lib=v6;
9067 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +00009068 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009069fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009070rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009071
9072 ;;
9073 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +00009074 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009075/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009076
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009077#include <sys/param.h>
9078#ifdef _ZETA_MINAMI_INET6
9079yes
9080#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009081_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009082if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009083 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009084 ipv6type=$i;
9085 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009086 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009087fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009088rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009089
9090 ;;
9091 esac
9092 if test "$ipv6type" != "unknown"; then
9093 break
9094 fi
9095 done
Matthias Kloseb9621712010-04-24 17:59:49 +00009096 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
9097$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009098fi
9099
9100if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
9101 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
9102 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
9103 echo "using lib$ipv6lib"
9104 else
9105 if test $ipv6trylibc = "yes"; then
9106 echo "using libc"
9107 else
9108 echo 'Fatal: no $ipv6lib library found. cannot continue.'
9109 echo "You need to fetch lib$ipv6lib.a from appropriate"
9110 echo 'ipv6 kit and compile beforehand.'
9111 exit 1
9112 fi
9113 fi
9114fi
9115
Matthias Kloseb9621712010-04-24 17:59:49 +00009116{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
9117$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
9118cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009119/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009120
9121 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009122int
9123main ()
9124{
9125FSIORefNum fRef = 0
9126 ;
9127 return 0;
9128}
Matthias Kloseb159a552010-04-25 21:00:44 +00009129
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009130_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009131if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009132
Matthias Kloseb159a552010-04-25 21:00:44 +00009133
Matthias Kloseb9621712010-04-24 17:59:49 +00009134$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009135
Matthias Kloseb9621712010-04-24 17:59:49 +00009136 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9137$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009138
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009139else
Matthias Kloseb159a552010-04-25 21:00:44 +00009140
Matthias Kloseb9621712010-04-24 17:59:49 +00009141 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9142$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009143
9144fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009145rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9146
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009147# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +00009148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
9149$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009150
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009151# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009152if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009153 withval=$with_doc_strings;
9154fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009155
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009156
9157if test -z "$with_doc_strings"
9158then with_doc_strings="yes"
9159fi
9160if test "$with_doc_strings" != "no"
9161then
9162
Matthias Kloseb9621712010-04-24 17:59:49 +00009163$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009164
9165fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009166{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
9167$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009168
Antoine Pitrou042b1282010-08-13 21:15:58 +00009169# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +00009170{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
9171$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009172
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009173# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009174if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009175 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009176if test "$withval" != no
9177then
9178
Matthias Kloseb9621712010-04-24 17:59:49 +00009179$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009180
Matthias Kloseb9621712010-04-24 17:59:49 +00009181 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9182$as_echo "yes" >&6; }
9183else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9184$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009185fi
9186else
Matthias Kloseb9621712010-04-24 17:59:49 +00009187 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9188$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009189fi
9190
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009191
9192# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +00009193{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
9194$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009195
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009196# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009197if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009198 withval=$with_pymalloc;
9199fi
Michael W. Hudson54241132001-12-07 15:38:26 +00009200
Neil Schemenauera35c6882001-02-27 04:45:05 +00009201
Neil Schemenauer16c22972002-03-22 15:34:49 +00009202if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00009203then
9204 with_pymalloc="yes"
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00009205 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +00009206fi
9207if test "$with_pymalloc" != "no"
9208then
Martin v. Löwis11437992002-04-12 09:54:03 +00009209
Matthias Kloseb9621712010-04-24 17:59:49 +00009210$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +00009211
9212fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009213{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
9214$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +00009215
Benjamin Peterson05159c42009-12-03 03:01:27 +00009216# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +00009217{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
9218$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009219
9220# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009221if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009222 withval=$with_valgrind;
9223else
9224 with_valgrind=no
9225fi
9226
Matthias Kloseb9621712010-04-24 17:59:49 +00009227{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
9228$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009229if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009230 ac_fn_c_check_header_mongrel "$LINENO" "valgrind/valgrind.h" "ac_cv_header_valgrind_valgrind_h" "$ac_includes_default"
Antoine Pitrouf65132d2011-02-25 23:25:17 +00009231if test "x$ac_cv_header_valgrind_valgrind_h" = x""yes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009232
Matthias Kloseb9621712010-04-24 17:59:49 +00009233$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +00009234
9235else
Antoine Pitrouf65132d2011-02-25 23:25:17 +00009236 as_fn_error "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +00009237
9238fi
9239
9240
Jeffrey Yasskin39370832010-05-03 19:29:34 +00009241 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +00009242fi
9243
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009244# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00009245
Guido van Rossum98935bf2001-09-05 19:13:16 +00009246DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +00009247
Guido van Rossume97ee181999-12-20 21:27:22 +00009248# the dlopen() function means we might want to use dynload_shlib.o. some
9249# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +00009250for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +00009251do :
9252 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Antoine Pitrouf65132d2011-02-25 23:25:17 +00009253if test "x$ac_cv_func_dlopen" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009254 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009255#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009256_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +00009257
Guido van Rossume97ee181999-12-20 21:27:22 +00009258fi
Thomas Wouters3a584202000-08-05 23:28:51 +00009259done
Guido van Rossume97ee181999-12-20 21:27:22 +00009260
Michael W. Hudson54241132001-12-07 15:38:26 +00009261
Guido van Rossume97ee181999-12-20 21:27:22 +00009262# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
9263# loading of modules.
9264
Matthias Kloseb9621712010-04-24 17:59:49 +00009265{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
9266$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009267if test -z "$DYNLOADFILE"
9268then
9269 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00009270 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
9271 if test "$ac_cv_func_dlopen" = yes
9272 then DYNLOADFILE="dynload_shlib.o"
9273 else DYNLOADFILE="dynload_aix.o"
9274 fi
9275 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +00009276 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009277 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
9278 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +00009279 *)
9280 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
9281 # out any dynamic loading
9282 if test "$ac_cv_func_dlopen" = yes
9283 then DYNLOADFILE="dynload_shlib.o"
9284 else DYNLOADFILE="dynload_stub.o"
9285 fi
9286 ;;
9287 esac
9288fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009289{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
9290$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009291if test "$DYNLOADFILE" != "dynload_stub.o"
9292then
Martin v. Löwis11437992002-04-12 09:54:03 +00009293
Matthias Kloseb9621712010-04-24 17:59:49 +00009294$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +00009295
9296fi
9297
Neil Schemenauer4e425612001-06-19 15:44:15 +00009298# MACHDEP_OBJS can be set to platform-specific object files needed by Python
9299
Michael W. Hudson54241132001-12-07 15:38:26 +00009300
Matthias Kloseb9621712010-04-24 17:59:49 +00009301{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
9302$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009303if test -z "$MACHDEP_OBJS"
9304then
Jack Jansene578a632001-08-15 01:27:14 +00009305 MACHDEP_OBJS=$extra_machdep_objs
9306else
9307 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +00009308fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009309{ $as_echo "$as_me:${as_lineno-$LINENO}: result: MACHDEP_OBJS" >&5
9310$as_echo "MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009311
Guido van Rossum627b2d71993-12-24 10:39:16 +00009312# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +00009313for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Antoine Pitrou8250e232011-02-25 23:41:16 +00009314 clock confstr ctermid execv faccessat fchmod fchmodat fchown fchownat \
9315 fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Martin v. Löwis438b5342002-12-27 10:16:42 +00009316 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +00009317 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Antoine Pitrouf65132d2011-02-25 23:25:17 +00009318 initgroups kill killpg lchmod lchown linkat lstat mbrtowc mkdirat mkfifo \
9319 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause plock poll \
9320 pthread_init putenv readlink readlinkat realpath renameat \
Georg Brandl941f9562011-02-25 15:21:47 +00009321 select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Benjamin Peterson965ce872009-04-05 21:24:58 +00009322 setgid \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +00009323 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Antoine Pitrouf65132d2011-02-25 23:25:17 +00009324 sigaction siginterrupt sigrelse snprintf strftime strlcpy symlinkat \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +00009325 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Antoine Pitrouf65132d2011-02-25 23:25:17 +00009326 truncate uname unlinkat unsetenv utimensat utimes waitpid wait3 wait4 \
Martin v. Löwis113a0852009-05-29 17:25:39 +00009327 wcscoll wcsftime wcsxfrm _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +00009328do :
9329 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9330ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Antoine Pitrouf65132d2011-02-25 23:25:17 +00009331eval as_val=\$$as_ac_var
9332 if test "x$as_val" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009333 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009334#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009335_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00009336
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009337fi
9338done
9339
Michael W. Hudson54241132001-12-07 15:38:26 +00009340
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009341# For some functions, having a definition is not sufficient, since
9342# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +00009343{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
9344$as_echo_n "checking for chroot... " >&6; }
9345cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009346/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009347#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009348int
9349main ()
9350{
9351void *x=chroot
9352 ;
9353 return 0;
9354}
9355_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009356if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009357
Matthias Kloseb9621712010-04-24 17:59:49 +00009358$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009359
Matthias Kloseb159a552010-04-25 21:00:44 +00009360 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009361$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009362else
Matthias Kloseb9621712010-04-24 17:59:49 +00009363 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9364$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009365
9366fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009367rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009368{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
9369$as_echo_n "checking for link... " >&6; }
9370cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009371/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009372#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009373int
9374main ()
9375{
9376void *x=link
9377 ;
9378 return 0;
9379}
9380_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009381if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009382
Matthias Kloseb9621712010-04-24 17:59:49 +00009383$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009384
Matthias Kloseb159a552010-04-25 21:00:44 +00009385 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009386$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009387else
Matthias Kloseb9621712010-04-24 17:59:49 +00009388 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9389$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009390
9391fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009392rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009393{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
9394$as_echo_n "checking for symlink... " >&6; }
9395cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009396/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009397#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009398int
9399main ()
9400{
9401void *x=symlink
9402 ;
9403 return 0;
9404}
9405_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009406if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009407
Matthias Kloseb9621712010-04-24 17:59:49 +00009408$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009409
Matthias Kloseb159a552010-04-25 21:00:44 +00009410 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009411$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009412else
Matthias Kloseb9621712010-04-24 17:59:49 +00009413 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9414$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009415
9416fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009417rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009418{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
9419$as_echo_n "checking for fchdir... " >&6; }
9420cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009421/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009422#include <unistd.h>
9423int
9424main ()
9425{
9426void *x=fchdir
9427 ;
9428 return 0;
9429}
9430_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009431if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009432
Matthias Kloseb9621712010-04-24 17:59:49 +00009433$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009434
Matthias Kloseb159a552010-04-25 21:00:44 +00009435 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009436$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009437else
Matthias Kloseb9621712010-04-24 17:59:49 +00009438 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9439$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009440
9441fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009442rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
9444$as_echo_n "checking for fsync... " >&6; }
9445cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009446/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009447#include <unistd.h>
9448int
9449main ()
9450{
9451void *x=fsync
9452 ;
9453 return 0;
9454}
9455_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009456if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009457
Matthias Kloseb9621712010-04-24 17:59:49 +00009458$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009459
Matthias Kloseb159a552010-04-25 21:00:44 +00009460 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009461$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009462else
Matthias Kloseb9621712010-04-24 17:59:49 +00009463 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9464$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009465
9466fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009467rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009468{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
9469$as_echo_n "checking for fdatasync... " >&6; }
9470cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009471/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009472#include <unistd.h>
9473int
9474main ()
9475{
9476void *x=fdatasync
9477 ;
9478 return 0;
9479}
9480_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009481if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009482
Matthias Kloseb9621712010-04-24 17:59:49 +00009483$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009484
Matthias Kloseb159a552010-04-25 21:00:44 +00009485 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009486$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009487else
Matthias Kloseb9621712010-04-24 17:59:49 +00009488 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9489$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009490
9491fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009492rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009493{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
9494$as_echo_n "checking for epoll... " >&6; }
9495cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009496/* end confdefs.h. */
9497#include <sys/epoll.h>
9498int
9499main ()
9500{
9501void *x=epoll_create
9502 ;
9503 return 0;
9504}
9505_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009506if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009507
Matthias Kloseb9621712010-04-24 17:59:49 +00009508$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009509
Matthias Kloseb159a552010-04-25 21:00:44 +00009510 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009511$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009512else
Matthias Kloseb9621712010-04-24 17:59:49 +00009513 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9514$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009515
9516fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009517rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
9519$as_echo_n "checking for kqueue... " >&6; }
9520cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009521/* end confdefs.h. */
9522
9523#include <sys/types.h>
9524#include <sys/event.h>
9525
9526int
9527main ()
9528{
9529int x=kqueue()
9530 ;
9531 return 0;
9532}
9533_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009534if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009535
Matthias Kloseb9621712010-04-24 17:59:49 +00009536$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009537
Matthias Kloseb159a552010-04-25 21:00:44 +00009538 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009539$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009540else
Matthias Kloseb9621712010-04-24 17:59:49 +00009541 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9542$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009543
9544fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009545rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +00009546# On some systems (eg. FreeBSD 5), we would find a definition of the
9547# functions ctermid_r, setgroups in the library, but no prototype
9548# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
9549# address to avoid compiler warnings and potential miscompilations
9550# because of the missing prototypes.
9551
Matthias Kloseb9621712010-04-24 17:59:49 +00009552{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
9553$as_echo_n "checking for ctermid_r... " >&6; }
9554cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009555/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +00009556
Martin v. Löwisd5843682002-11-21 20:41:28 +00009557#include <stdio.h>
9558
Martin v. Löwisd5843682002-11-21 20:41:28 +00009559int
9560main ()
9561{
9562void* p = ctermid_r
9563 ;
9564 return 0;
9565}
9566_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009567if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +00009568
Matthias Kloseb9621712010-04-24 17:59:49 +00009569$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +00009570
Matthias Kloseb159a552010-04-25 21:00:44 +00009571 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009572$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009573else
Matthias Kloseb9621712010-04-24 17:59:49 +00009574 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9575$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009576
9577fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009578rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9579
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009580{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
9581$as_echo_n "checking for flock declaration... " >&6; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +00009582if test "${ac_cv_flock_decl+set}" = set; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009583 $as_echo_n "(cached) " >&6
9584else
9585 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009586/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009587#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009588int
9589main ()
9590{
9591void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009592
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009593 ;
9594 return 0;
9595}
9596_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009597if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009598 ac_cv_flock_decl=yes
9599else
9600 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009601
9602fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009603rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +00009604
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009605fi
9606{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
9607$as_echo "$ac_cv_flock_decl" >&6; }
9608if test "x${ac_cv_flock_decl}" = xyes; then
9609 for ac_func in flock
9610do :
9611 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Antoine Pitrouf65132d2011-02-25 23:25:17 +00009612if test "x$ac_cv_func_flock" = x""yes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009613 cat >>confdefs.h <<_ACEOF
9614#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +00009615_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009616
Antoine Pitroua3000072010-09-07 14:52:42 +00009617else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009618 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +00009619$as_echo_n "checking for flock in -lbsd... " >&6; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +00009620if test "${ac_cv_lib_bsd_flock+set}" = set; then :
Antoine Pitroua3000072010-09-07 14:52:42 +00009621 $as_echo_n "(cached) " >&6
9622else
9623 ac_check_lib_save_LIBS=$LIBS
9624LIBS="-lbsd $LIBS"
9625cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9626/* end confdefs.h. */
9627
9628/* Override any GCC internal prototype to avoid an error.
9629 Use char because int might match the return type of a GCC
9630 builtin and then its argument prototype would still apply. */
9631#ifdef __cplusplus
9632extern "C"
9633#endif
9634char flock ();
9635int
9636main ()
9637{
9638return flock ();
9639 ;
9640 return 0;
9641}
9642_ACEOF
9643if ac_fn_c_try_link "$LINENO"; then :
9644 ac_cv_lib_bsd_flock=yes
9645else
9646 ac_cv_lib_bsd_flock=no
9647fi
9648rm -f core conftest.err conftest.$ac_objext \
9649 conftest$ac_exeext conftest.$ac_ext
9650LIBS=$ac_check_lib_save_LIBS
9651fi
9652{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
9653$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +00009654if test "x$ac_cv_lib_bsd_flock" = x""yes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009655 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +00009656
9657
9658$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
9659
9660
9661fi
9662
9663
9664fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009665done
9666
Antoine Pitroua3000072010-09-07 14:52:42 +00009667fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009668
Matthias Kloseb9621712010-04-24 17:59:49 +00009669{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
9670$as_echo_n "checking for getpagesize... " >&6; }
9671cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009672/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009673
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009674#include <unistd.h>
9675
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009676int
9677main ()
9678{
9679void* p = getpagesize
9680 ;
9681 return 0;
9682}
9683_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009684if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009685
Matthias Kloseb9621712010-04-24 17:59:49 +00009686$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009687
Matthias Kloseb159a552010-04-25 21:00:44 +00009688 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009689$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009690else
Matthias Kloseb9621712010-04-24 17:59:49 +00009691 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9692$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009693
9694fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009695rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009696
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009697for ac_prog in true
9698do
9699 # Extract the first word of "$ac_prog", so it can be a program name with args.
9700set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00009701{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9702$as_echo_n "checking for $ac_word... " >&6; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +00009703if test "${ac_cv_prog_TRUE+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009704 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009705else
9706 if test -n "$TRUE"; then
9707 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
9708else
9709as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9710for as_dir in $PATH
9711do
9712 IFS=$as_save_IFS
9713 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009714 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009715 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 +00009716 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00009717 $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 +00009718 break 2
9719 fi
9720done
Matthias Kloseb9621712010-04-24 17:59:49 +00009721 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009722IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009723
9724fi
9725fi
9726TRUE=$ac_cv_prog_TRUE
9727if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009728 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
9729$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009730else
Matthias Kloseb9621712010-04-24 17:59:49 +00009731 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9732$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009733fi
9734
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009735
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009736 test -n "$TRUE" && break
9737done
9738test -n "$TRUE" || TRUE="/bin/true"
9739
9740
Matthias Kloseb9621712010-04-24 17:59:49 +00009741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
9742$as_echo_n "checking for inet_aton in -lc... " >&6; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +00009743if test "${ac_cv_lib_c_inet_aton+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009744 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009745else
9746 ac_check_lib_save_LIBS=$LIBS
9747LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009748cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009749/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009750
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009751/* Override any GCC internal prototype to avoid an error.
9752 Use char because int might match the return type of a GCC
9753 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009754#ifdef __cplusplus
9755extern "C"
9756#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009757char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009758int
9759main ()
9760{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009761return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009762 ;
9763 return 0;
9764}
9765_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009766if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009767 ac_cv_lib_c_inet_aton=yes
9768else
Matthias Kloseb9621712010-04-24 17:59:49 +00009769 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009770fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009771rm -f core conftest.err conftest.$ac_objext \
9772 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009773LIBS=$ac_check_lib_save_LIBS
9774fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009775{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
9776$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +00009777if test "x$ac_cv_lib_c_inet_aton" = x""yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009778 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009779else
Matthias Kloseb9621712010-04-24 17:59:49 +00009780 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
9781$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +00009782if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009783 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009784else
9785 ac_check_lib_save_LIBS=$LIBS
9786LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009787cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009788/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009789
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009790/* Override any GCC internal prototype to avoid an error.
9791 Use char because int might match the return type of a GCC
9792 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009793#ifdef __cplusplus
9794extern "C"
9795#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009796char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009797int
9798main ()
9799{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009800return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009801 ;
9802 return 0;
9803}
9804_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009805if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009806 ac_cv_lib_resolv_inet_aton=yes
9807else
Matthias Kloseb9621712010-04-24 17:59:49 +00009808 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009809fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009810rm -f core conftest.err conftest.$ac_objext \
9811 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009812LIBS=$ac_check_lib_save_LIBS
9813fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009814{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
9815$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +00009816if test "x$ac_cv_lib_resolv_inet_aton" = x""yes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009817 cat >>confdefs.h <<_ACEOF
9818#define HAVE_LIBRESOLV 1
9819_ACEOF
9820
9821 LIBS="-lresolv $LIBS"
9822
9823fi
9824
9825
9826fi
9827
9828
Christian Heimesd0764e22007-12-04 15:00:33 +00009829# On Tru64, chflags seems to be present, but calling it will
9830# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +00009831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
9832$as_echo_n "checking for chflags... " >&6; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +00009833if test "${ac_cv_have_chflags+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009834 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009835else
Matthias Kloseb9621712010-04-24 17:59:49 +00009836 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009837 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +00009838else
Matthias Kloseb9621712010-04-24 17:59:49 +00009839 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +00009840/* end confdefs.h. */
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009841[
Christian Heimesd0764e22007-12-04 15:00:33 +00009842#include <sys/stat.h>
9843#include <unistd.h>
9844int main(int argc, char*argv[])
9845{
9846 if(chflags(argv[0], 0) != 0)
9847 return 1;
9848 return 0;
9849}
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009850]
Christian Heimesd0764e22007-12-04 15:00:33 +00009851_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009852if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009853 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009854else
Matthias Kloseb9621712010-04-24 17:59:49 +00009855 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009856fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009857rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9858 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009859fi
9860
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009861
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009862fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009863{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
9864$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009865if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009866 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Antoine Pitrouf65132d2011-02-25 23:25:17 +00009867if test "x$ac_cv_func_chflags" = x""yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009868 ac_cv_have_chflags="yes"
9869else
9870 ac_cv_have_chflags="no"
9871fi
9872
9873fi
9874if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009875
Matthias Kloseb9621712010-04-24 17:59:49 +00009876$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009877
9878fi
9879
Matthias Kloseb9621712010-04-24 17:59:49 +00009880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
9881$as_echo_n "checking for lchflags... " >&6; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +00009882if test "${ac_cv_have_lchflags+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009883 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009884else
Matthias Kloseb9621712010-04-24 17:59:49 +00009885 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009886 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +00009887else
Matthias Kloseb9621712010-04-24 17:59:49 +00009888 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +00009889/* end confdefs.h. */
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009890[
Christian Heimesd0764e22007-12-04 15:00:33 +00009891#include <sys/stat.h>
9892#include <unistd.h>
9893int main(int argc, char*argv[])
9894{
9895 if(lchflags(argv[0], 0) != 0)
9896 return 1;
9897 return 0;
9898}
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009899]
Christian Heimesd0764e22007-12-04 15:00:33 +00009900_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009901if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009902 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009903else
Matthias Kloseb9621712010-04-24 17:59:49 +00009904 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +00009905fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009906rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9907 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009908fi
9909
9910
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009911fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009912{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
9913$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009914if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009915 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Antoine Pitrouf65132d2011-02-25 23:25:17 +00009916if test "x$ac_cv_func_lchflags" = x""yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009917 ac_cv_have_lchflags="yes"
9918else
9919 ac_cv_have_lchflags="no"
9920fi
9921
9922fi
9923if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009924
Matthias Kloseb9621712010-04-24 17:59:49 +00009925$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009926
9927fi
9928
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009929case $ac_sys_system/$ac_sys_release in
9930Darwin/*)
9931 _CUR_CFLAGS="${CFLAGS}"
9932 _CUR_LDFLAGS="${LDFLAGS}"
9933 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
9934 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
9935 ;;
9936esac
9937
Matthias Kloseb9621712010-04-24 17:59:49 +00009938{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
9939$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +00009940if test "${ac_cv_lib_z_inflateCopy+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009941 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009942else
9943 ac_check_lib_save_LIBS=$LIBS
9944LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009945cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009946/* end confdefs.h. */
9947
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009948/* Override any GCC internal prototype to avoid an error.
9949 Use char because int might match the return type of a GCC
9950 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009951#ifdef __cplusplus
9952extern "C"
9953#endif
9954char inflateCopy ();
9955int
9956main ()
9957{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009958return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009959 ;
9960 return 0;
9961}
9962_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009963if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009964 ac_cv_lib_z_inflateCopy=yes
9965else
Matthias Kloseb9621712010-04-24 17:59:49 +00009966 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009967fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009968rm -f core conftest.err conftest.$ac_objext \
9969 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009970LIBS=$ac_check_lib_save_LIBS
9971fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009972{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
9973$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +00009974if test "x$ac_cv_lib_z_inflateCopy" = x""yes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009975
Matthias Kloseb9621712010-04-24 17:59:49 +00009976$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009977
9978fi
9979
9980
9981case $ac_sys_system/$ac_sys_release in
9982Darwin/*)
9983 CFLAGS="${_CUR_CFLAGS}"
9984 LDFLAGS="${_CUR_LDFLAGS}"
9985 ;;
9986esac
9987
Matthias Kloseb9621712010-04-24 17:59:49 +00009988{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
9989$as_echo_n "checking for hstrerror... " >&6; }
9990cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009991/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +00009992
Martin v. Löwise9416172003-05-03 10:12:45 +00009993#include <netdb.h>
9994
Martin v. Löwise9416172003-05-03 10:12:45 +00009995int
9996main ()
9997{
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009998void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +00009999 ;
10000 return 0;
10001}
10002_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010003if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010004
Matthias Kloseb9621712010-04-24 17:59:49 +000010005$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010006
Matthias Kloseb159a552010-04-25 21:00:44 +000010007 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010008$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010009else
Matthias Kloseb9621712010-04-24 17:59:49 +000010010 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10011$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010012
10013fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010014rm -f core conftest.err conftest.$ac_objext \
10015 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010016
Matthias Kloseb9621712010-04-24 17:59:49 +000010017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
10018$as_echo_n "checking for inet_aton... " >&6; }
10019cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010020/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010021
Martin v. Löwis86d66262006-02-17 08:40:11 +000010022#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010023#include <sys/socket.h>
10024#include <netinet/in.h>
10025#include <arpa/inet.h>
10026
Martin v. Löwise9416172003-05-03 10:12:45 +000010027int
10028main ()
10029{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010030void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010031 ;
10032 return 0;
10033}
10034_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010035if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010036
Matthias Kloseb9621712010-04-24 17:59:49 +000010037$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010038
Matthias Kloseb159a552010-04-25 21:00:44 +000010039 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010040$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010041else
Matthias Kloseb9621712010-04-24 17:59:49 +000010042 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10043$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010044
10045fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010046rm -f core conftest.err conftest.$ac_objext \
10047 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010048
Matthias Kloseb9621712010-04-24 17:59:49 +000010049{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
10050$as_echo_n "checking for inet_pton... " >&6; }
10051cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010052/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010053
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010054#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010055#include <sys/socket.h>
10056#include <netinet/in.h>
10057#include <arpa/inet.h>
10058
Martin v. Löwise9416172003-05-03 10:12:45 +000010059int
10060main ()
10061{
10062void* p = inet_pton
10063 ;
10064 return 0;
10065}
10066_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010067if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010068
Matthias Kloseb9621712010-04-24 17:59:49 +000010069$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010070
Matthias Kloseb159a552010-04-25 21:00:44 +000010071 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010072$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010073else
Matthias Kloseb9621712010-04-24 17:59:49 +000010074 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10075$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010076
10077fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010078rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000010079
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010080# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000010081{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
10082$as_echo_n "checking for setgroups... " >&6; }
10083cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010084/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010085
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010086#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010087#ifdef HAVE_GRP_H
10088#include <grp.h>
10089#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000010090
Martin v. Löwisd5843682002-11-21 20:41:28 +000010091int
10092main ()
10093{
10094void* p = setgroups
10095 ;
10096 return 0;
10097}
10098_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010099if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010100
Matthias Kloseb9621712010-04-24 17:59:49 +000010101$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010102
Matthias Kloseb159a552010-04-25 21:00:44 +000010103 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010104$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010105else
Matthias Kloseb9621712010-04-24 17:59:49 +000010106 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10107$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010108
10109fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010110rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010111
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010112# check for openpty and forkpty
10113
10114for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010115do :
10116 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Antoine Pitrouf65132d2011-02-25 23:25:17 +000010117if test "x$ac_cv_func_openpty" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010118 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010119#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010120_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010121
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010122else
Matthias Kloseb9621712010-04-24 17:59:49 +000010123 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
10124$as_echo_n "checking for openpty in -lutil... " >&6; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +000010125if test "${ac_cv_lib_util_openpty+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010126 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010127else
Martin v. Löwis11437992002-04-12 09:54:03 +000010128 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010129LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010130cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010131/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010132
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010133/* Override any GCC internal prototype to avoid an error.
10134 Use char because int might match the return type of a GCC
10135 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010136#ifdef __cplusplus
10137extern "C"
10138#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010139char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010140int
10141main ()
10142{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010143return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010144 ;
10145 return 0;
10146}
10147_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010148if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010149 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010150else
Matthias Kloseb9621712010-04-24 17:59:49 +000010151 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010152fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010153rm -f core conftest.err conftest.$ac_objext \
10154 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010155LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010156fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010157{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
10158$as_echo "$ac_cv_lib_util_openpty" >&6; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +000010159if test "x$ac_cv_lib_util_openpty" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010160 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010161 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010162else
Matthias Kloseb9621712010-04-24 17:59:49 +000010163 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
10164$as_echo_n "checking for openpty in -lbsd... " >&6; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +000010165if test "${ac_cv_lib_bsd_openpty+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010166 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010167else
10168 ac_check_lib_save_LIBS=$LIBS
10169LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010170cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010171/* end confdefs.h. */
10172
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010173/* Override any GCC internal prototype to avoid an error.
10174 Use char because int might match the return type of a GCC
10175 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010176#ifdef __cplusplus
10177extern "C"
10178#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010179char openpty ();
10180int
10181main ()
10182{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010183return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010184 ;
10185 return 0;
10186}
10187_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010188if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010189 ac_cv_lib_bsd_openpty=yes
10190else
Matthias Kloseb9621712010-04-24 17:59:49 +000010191 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010192fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010193rm -f core conftest.err conftest.$ac_objext \
10194 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010195LIBS=$ac_check_lib_save_LIBS
10196fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010197{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
10198$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +000010199if test "x$ac_cv_lib_bsd_openpty" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010200 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010201 LIBS="$LIBS -lbsd"
10202fi
10203
10204
10205fi
10206
Fred Drake8cef4cf2000-06-28 16:40:38 +000010207
10208fi
10209done
10210
10211for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010212do :
10213 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Antoine Pitrouf65132d2011-02-25 23:25:17 +000010214if test "x$ac_cv_func_forkpty" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010215 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010216#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010217_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010218
Fred Drake8cef4cf2000-06-28 16:40:38 +000010219else
Matthias Kloseb9621712010-04-24 17:59:49 +000010220 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
10221$as_echo_n "checking for forkpty in -lutil... " >&6; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +000010222if test "${ac_cv_lib_util_forkpty+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010223 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010224else
Martin v. Löwis11437992002-04-12 09:54:03 +000010225 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010226LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010227cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010228/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010229
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010230/* Override any GCC internal prototype to avoid an error.
10231 Use char because int might match the return type of a GCC
10232 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010233#ifdef __cplusplus
10234extern "C"
10235#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010236char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010237int
10238main ()
10239{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010240return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010241 ;
10242 return 0;
10243}
10244_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010245if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010246 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010247else
Matthias Kloseb9621712010-04-24 17:59:49 +000010248 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010249fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010250rm -f core conftest.err conftest.$ac_objext \
10251 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010252LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010253fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010254{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
10255$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +000010256if test "x$ac_cv_lib_util_forkpty" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010257 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010258 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010259else
Matthias Kloseb9621712010-04-24 17:59:49 +000010260 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
10261$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +000010262if test "${ac_cv_lib_bsd_forkpty+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010263 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010264else
10265 ac_check_lib_save_LIBS=$LIBS
10266LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010267cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010268/* end confdefs.h. */
10269
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010270/* Override any GCC internal prototype to avoid an error.
10271 Use char because int might match the return type of a GCC
10272 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010273#ifdef __cplusplus
10274extern "C"
10275#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010276char forkpty ();
10277int
10278main ()
10279{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010280return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010281 ;
10282 return 0;
10283}
10284_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010285if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010286 ac_cv_lib_bsd_forkpty=yes
10287else
Matthias Kloseb9621712010-04-24 17:59:49 +000010288 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010289fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010290rm -f core conftest.err conftest.$ac_objext \
10291 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010292LIBS=$ac_check_lib_save_LIBS
10293fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010294{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
10295$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +000010296if test "x$ac_cv_lib_bsd_forkpty" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010297 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010298 LIBS="$LIBS -lbsd"
10299fi
10300
10301
10302fi
10303
Fred Drake8cef4cf2000-06-28 16:40:38 +000010304
10305fi
10306done
10307
Jack Jansendd19cf82001-12-06 22:36:17 +000010308
Christian Heimesb186d002008-03-18 15:15:01 +000010309# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000010310for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000010311do :
10312 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Antoine Pitrouf65132d2011-02-25 23:25:17 +000010313if test "x$ac_cv_func_memmove" = x""yes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000010314 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010315#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000010316_ACEOF
10317
10318fi
10319done
10320
10321
Michael W. Hudson54241132001-12-07 15:38:26 +000010322# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000010323for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000010324do :
10325 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10326ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Antoine Pitrouf65132d2011-02-25 23:25:17 +000010327eval as_val=\$$as_ac_var
10328 if test "x$as_val" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010329 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010330#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010331_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000010332
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010333fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000010334done
10335
Michael W. Hudson54241132001-12-07 15:38:26 +000010336
Antoine Pitrouf65132d2011-02-25 23:25:17 +000010337for ac_func in dup2 getcwd strdup
10338do :
10339 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10340ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10341eval as_val=\$$as_ac_var
10342 if test "x$as_val" = x""yes; then :
10343 cat >>confdefs.h <<_ACEOF
10344#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
10345_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000010346
Martin v. Löwis1142de32002-03-29 16:28:31 +000010347else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010348 case " $LIBOBJS " in
Antoine Pitrouf65132d2011-02-25 23:25:17 +000010349 *" $ac_func.$ac_objext "* ) ;;
10350 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010351 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010352esac
10353
Martin v. Löwis1142de32002-03-29 16:28:31 +000010354fi
Antoine Pitrouf65132d2011-02-25 23:25:17 +000010355done
Martin v. Löwis1142de32002-03-29 16:28:31 +000010356
10357
10358for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010359do :
10360 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Antoine Pitrouf65132d2011-02-25 23:25:17 +000010361if test "x$ac_cv_func_getpgrp" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010362 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010363#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010364_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010365 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010366/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010367#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010368int
10369main ()
10370{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010371getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010372 ;
10373 return 0;
10374}
10375_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010376if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010377
Matthias Kloseb9621712010-04-24 17:59:49 +000010378$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010379
Guido van Rossum627b2d71993-12-24 10:39:16 +000010380fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010381rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010382
Guido van Rossum627b2d71993-12-24 10:39:16 +000010383fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010384done
Guido van Rossum627b2d71993-12-24 10:39:16 +000010385
Jack Jansen150753c2003-03-29 22:07:47 +000010386for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010387do :
10388 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Antoine Pitrouf65132d2011-02-25 23:25:17 +000010389if test "x$ac_cv_func_setpgrp" = x""yes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000010390 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010391#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000010392_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010393 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010394/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000010395#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000010396int
10397main ()
10398{
10399setpgrp(0,0);
10400 ;
10401 return 0;
10402}
10403_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010404if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010405
Matthias Kloseb9621712010-04-24 17:59:49 +000010406$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010407
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010408fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010409rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000010410
10411fi
10412done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010413
Thomas Wouters3a584202000-08-05 23:28:51 +000010414for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000010415do :
10416 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Antoine Pitrouf65132d2011-02-25 23:25:17 +000010417if test "x$ac_cv_func_gettimeofday" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010418 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010419#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010420_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010421 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010422/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010423#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010424int
10425main ()
10426{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010427gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010428 ;
10429 return 0;
10430}
10431_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010432if ac_fn_c_try_compile "$LINENO"; then :
10433
Guido van Rossum627b2d71993-12-24 10:39:16 +000010434else
Skip Montanaro6dead952003-09-25 14:50:04 +000010435
Matthias Kloseb9621712010-04-24 17:59:49 +000010436$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010437
Martin v. Löwis11437992002-04-12 09:54:03 +000010438
Guido van Rossum627b2d71993-12-24 10:39:16 +000010439fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010440rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010441
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010442fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010443done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010444
Michael W. Hudson54241132001-12-07 15:38:26 +000010445
Matthias Kloseb9621712010-04-24 17:59:49 +000010446{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
10447$as_echo_n "checking for major... " >&6; }
10448cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010449/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010450
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010451#if defined(MAJOR_IN_MKDEV)
10452#include <sys/mkdev.h>
10453#elif defined(MAJOR_IN_SYSMACROS)
10454#include <sys/sysmacros.h>
10455#else
10456#include <sys/types.h>
10457#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010458
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010459int
10460main ()
10461{
10462
10463 makedev(major(0),minor(0));
10464
10465 ;
10466 return 0;
10467}
10468_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010469if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010470
10471
Matthias Kloseb9621712010-04-24 17:59:49 +000010472$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010473
Matthias Kloseb9621712010-04-24 17:59:49 +000010474 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10475$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010476
10477else
Skip Montanaro6dead952003-09-25 14:50:04 +000010478
Matthias Kloseb9621712010-04-24 17:59:49 +000010479 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10480$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010481
10482fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010483rm -f core conftest.err conftest.$ac_objext \
10484 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010485
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010486# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000010487# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000010488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
10489$as_echo_n "checking for getaddrinfo... " >&6; }
10490cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010491/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010492
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010493#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010494#include <sys/socket.h>
10495#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010496#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010497
Martin v. Löwis11437992002-04-12 09:54:03 +000010498int
10499main ()
10500{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010501getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000010502 ;
10503 return 0;
10504}
10505_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010506if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010507 have_getaddrinfo=yes
10508else
Matthias Kloseb9621712010-04-24 17:59:49 +000010509 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010510fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010511rm -f core conftest.err conftest.$ac_objext \
10512 conftest$ac_exeext conftest.$ac_ext
10513{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
10514$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010515if test $have_getaddrinfo = yes
10516then
Matthias Kloseb9621712010-04-24 17:59:49 +000010517 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
10518$as_echo_n "checking getaddrinfo bug... " >&6; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +000010519 if test "${ac_cv_buggy_getaddrinfo+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010520 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010521else
Matthias Kloseb9621712010-04-24 17:59:49 +000010522 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010523 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010524else
Matthias Kloseb9621712010-04-24 17:59:49 +000010525 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010526/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010527
10528#include <sys/types.h>
10529#include <netdb.h>
10530#include <string.h>
10531#include <sys/socket.h>
10532#include <netinet/in.h>
10533
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010534int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010535{
10536 int passive, gaierr, inet4 = 0, inet6 = 0;
10537 struct addrinfo hints, *ai, *aitop;
10538 char straddr[INET6_ADDRSTRLEN], strport[16];
10539
10540 for (passive = 0; passive <= 1; passive++) {
10541 memset(&hints, 0, sizeof(hints));
10542 hints.ai_family = AF_UNSPEC;
10543 hints.ai_flags = passive ? AI_PASSIVE : 0;
10544 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000010545 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010546 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
10547 (void)gai_strerror(gaierr);
10548 goto bad;
10549 }
10550 for (ai = aitop; ai; ai = ai->ai_next) {
10551 if (ai->ai_addr == NULL ||
10552 ai->ai_addrlen == 0 ||
10553 getnameinfo(ai->ai_addr, ai->ai_addrlen,
10554 straddr, sizeof(straddr), strport, sizeof(strport),
10555 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
10556 goto bad;
10557 }
10558 switch (ai->ai_family) {
10559 case AF_INET:
10560 if (strcmp(strport, "54321") != 0) {
10561 goto bad;
10562 }
10563 if (passive) {
10564 if (strcmp(straddr, "0.0.0.0") != 0) {
10565 goto bad;
10566 }
10567 } else {
10568 if (strcmp(straddr, "127.0.0.1") != 0) {
10569 goto bad;
10570 }
10571 }
10572 inet4++;
10573 break;
10574 case AF_INET6:
10575 if (strcmp(strport, "54321") != 0) {
10576 goto bad;
10577 }
10578 if (passive) {
10579 if (strcmp(straddr, "::") != 0) {
10580 goto bad;
10581 }
10582 } else {
10583 if (strcmp(straddr, "::1") != 0) {
10584 goto bad;
10585 }
10586 }
10587 inet6++;
10588 break;
10589 case AF_UNSPEC:
10590 goto bad;
10591 break;
10592 default:
10593 /* another family support? */
10594 break;
10595 }
10596 }
10597 }
10598
10599 if (!(inet4 == 0 || inet4 == 2))
10600 goto bad;
10601 if (!(inet6 == 0 || inet6 == 2))
10602 goto bad;
10603
10604 if (aitop)
10605 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010606 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010607
10608 bad:
10609 if (aitop)
10610 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010611 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010612}
10613
Martin v. Löwis11437992002-04-12 09:54:03 +000010614_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010615if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010616 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010617else
Matthias Kloseb9621712010-04-24 17:59:49 +000010618 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010619fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010620rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10621 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010622fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010623
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010624fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010625
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010626fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010627
Benjamin Petersond4694ed2010-11-01 01:44:30 +000010628{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
10629$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
10630
Mark Dickinson2df5d282009-12-31 21:22:50 +000010631if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010632then
10633 if test $ipv6 = yes
10634 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010635 echo 'Fatal: You must get working getaddrinfo() function.'
10636 echo ' or you can specify "--disable-ipv6"'.
10637 exit 1
10638 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010639else
Martin v. Löwis11437992002-04-12 09:54:03 +000010640
Matthias Kloseb9621712010-04-24 17:59:49 +000010641$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010642
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010643fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000010644
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010645for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000010646do :
10647 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Antoine Pitrouf65132d2011-02-25 23:25:17 +000010648if test "x$ac_cv_func_getnameinfo" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010649 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010650#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010651_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010652
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010653fi
10654done
10655
Michael W. Hudson54241132001-12-07 15:38:26 +000010656
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010657# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000010658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
10659$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +000010660if test "${ac_cv_header_time+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010661 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010662else
Matthias Kloseb9621712010-04-24 17:59:49 +000010663 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010664/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010665#include <sys/types.h>
10666#include <sys/time.h>
10667#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010668
Martin v. Löwis11437992002-04-12 09:54:03 +000010669int
10670main ()
10671{
10672if ((struct tm *) 0)
10673return 0;
10674 ;
10675 return 0;
10676}
10677_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010678if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010679 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000010680else
Matthias Kloseb9621712010-04-24 17:59:49 +000010681 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010682fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010683rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010684fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010685{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
10686$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010687if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010688
Matthias Kloseb9621712010-04-24 17:59:49 +000010689$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010690
10691fi
10692
Matthias Kloseb9621712010-04-24 17:59:49 +000010693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
10694$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +000010695if test "${ac_cv_struct_tm+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010696 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010697else
Matthias Kloseb9621712010-04-24 17:59:49 +000010698 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010699/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010700#include <sys/types.h>
10701#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010702
Martin v. Löwis11437992002-04-12 09:54:03 +000010703int
10704main ()
10705{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010706struct tm tm;
10707 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000010708 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000010709 ;
10710 return 0;
10711}
10712_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010713if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010714 ac_cv_struct_tm=time.h
10715else
Matthias Kloseb9621712010-04-24 17:59:49 +000010716 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010717fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010718rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010719fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010720{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
10721$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010722if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010723
Matthias Kloseb9621712010-04-24 17:59:49 +000010724$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010725
10726fi
10727
Matthias Kloseb9621712010-04-24 17:59:49 +000010728ac_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 +000010729#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000010730
Matthias Kloseb9621712010-04-24 17:59:49 +000010731"
Antoine Pitrouf65132d2011-02-25 23:25:17 +000010732if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010733
10734cat >>confdefs.h <<_ACEOF
10735#define HAVE_STRUCT_TM_TM_ZONE 1
10736_ACEOF
10737
10738
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010739fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010740
Martin v. Löwis11437992002-04-12 09:54:03 +000010741if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
10742
Matthias Kloseb9621712010-04-24 17:59:49 +000010743$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010744
10745else
Matthias Kloseb9621712010-04-24 17:59:49 +000010746 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
10747"
Antoine Pitrouf65132d2011-02-25 23:25:17 +000010748if test "x$ac_cv_have_decl_tzname" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010749 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010750else
Matthias Kloseb9621712010-04-24 17:59:49 +000010751 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010752fi
10753
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010754cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010755#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010756_ACEOF
10757
Matthias Kloseb9621712010-04-24 17:59:49 +000010758 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
10759$as_echo_n "checking for tzname... " >&6; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +000010760if test "${ac_cv_var_tzname+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010761 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010762else
Matthias Kloseb9621712010-04-24 17:59:49 +000010763 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010764/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010765#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010766#if !HAVE_DECL_TZNAME
10767extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000010768#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010769
Martin v. Löwis11437992002-04-12 09:54:03 +000010770int
10771main ()
10772{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010773return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000010774 ;
10775 return 0;
10776}
10777_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010778if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010779 ac_cv_var_tzname=yes
10780else
Matthias Kloseb9621712010-04-24 17:59:49 +000010781 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010782fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010783rm -f core conftest.err conftest.$ac_objext \
10784 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000010785fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010786{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
10787$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010788 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010789
Matthias Kloseb9621712010-04-24 17:59:49 +000010790$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010791
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010792 fi
10793fi
10794
Matthias Kloseb9621712010-04-24 17:59:49 +000010795ac_fn_c_check_member "$LINENO" "struct stat" "st_rdev" "ac_cv_member_struct_stat_st_rdev" "$ac_includes_default"
Antoine Pitrouf65132d2011-02-25 23:25:17 +000010796if test "x$ac_cv_member_struct_stat_st_rdev" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010797
10798cat >>confdefs.h <<_ACEOF
10799#define HAVE_STRUCT_STAT_ST_RDEV 1
10800_ACEOF
10801
10802
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010803fi
10804
Matthias Kloseb9621712010-04-24 17:59:49 +000010805ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
Antoine Pitrouf65132d2011-02-25 23:25:17 +000010806if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000010807
Martin v. Löwis11437992002-04-12 09:54:03 +000010808cat >>confdefs.h <<_ACEOF
10809#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
10810_ACEOF
10811
10812
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010813fi
10814
Matthias Kloseb9621712010-04-24 17:59:49 +000010815ac_fn_c_check_member "$LINENO" "struct stat" "st_flags" "ac_cv_member_struct_stat_st_flags" "$ac_includes_default"
Antoine Pitrouf65132d2011-02-25 23:25:17 +000010816if test "x$ac_cv_member_struct_stat_st_flags" = x""yes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000010817
10818cat >>confdefs.h <<_ACEOF
10819#define HAVE_STRUCT_STAT_ST_FLAGS 1
10820_ACEOF
10821
10822
10823fi
10824
Matthias Kloseb9621712010-04-24 17:59:49 +000010825ac_fn_c_check_member "$LINENO" "struct stat" "st_gen" "ac_cv_member_struct_stat_st_gen" "$ac_includes_default"
Antoine Pitrouf65132d2011-02-25 23:25:17 +000010826if test "x$ac_cv_member_struct_stat_st_gen" = x""yes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000010827
10828cat >>confdefs.h <<_ACEOF
10829#define HAVE_STRUCT_STAT_ST_GEN 1
10830_ACEOF
10831
10832
10833fi
10834
Matthias Kloseb9621712010-04-24 17:59:49 +000010835ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtime" "ac_cv_member_struct_stat_st_birthtime" "$ac_includes_default"
Antoine Pitrouf65132d2011-02-25 23:25:17 +000010836if test "x$ac_cv_member_struct_stat_st_birthtime" = x""yes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000010837
10838cat >>confdefs.h <<_ACEOF
10839#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
10840_ACEOF
10841
10842
10843fi
10844
Matthias Kloseb9621712010-04-24 17:59:49 +000010845ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
Antoine Pitrouf65132d2011-02-25 23:25:17 +000010846if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000010847
Martin v. Löwis11437992002-04-12 09:54:03 +000010848cat >>confdefs.h <<_ACEOF
10849#define HAVE_STRUCT_STAT_ST_BLOCKS 1
10850_ACEOF
10851
10852
Matthias Kloseb9621712010-04-24 17:59:49 +000010853$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010854
10855else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010856 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000010857 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010858 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
10859 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010860esac
10861
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010862fi
10863
Michael W. Hudson54241132001-12-07 15:38:26 +000010864
Martin v. Löwis11437992002-04-12 09:54:03 +000010865
Matthias Kloseb9621712010-04-24 17:59:49 +000010866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
10867$as_echo_n "checking for time.h that defines altzone... " >&6; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +000010868if test "${ac_cv_header_time_altzone+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010869 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010870else
Matthias Kloseb159a552010-04-25 21:00:44 +000010871
Matthias Kloseb9621712010-04-24 17:59:49 +000010872 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010873/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000010874#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010875int
10876main ()
10877{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010878return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000010879 ;
10880 return 0;
10881}
10882_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010883if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010884 ac_cv_header_time_altzone=yes
10885else
Matthias Kloseb9621712010-04-24 17:59:49 +000010886 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000010887fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010888rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000010889
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010890fi
10891
Matthias Kloseb9621712010-04-24 17:59:49 +000010892{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
10893$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010894if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010895
Matthias Kloseb9621712010-04-24 17:59:49 +000010896$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010897
10898fi
10899
Guido van Rossumda88dad1995-01-26 00:46:29 +000010900was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000010901{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
10902$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
10903cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010904/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000010905
10906#include <sys/types.h>
10907#include <sys/select.h>
10908#include <sys/time.h>
10909
Martin v. Löwis11437992002-04-12 09:54:03 +000010910int
10911main ()
10912{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010913;
Martin v. Löwis11437992002-04-12 09:54:03 +000010914 ;
10915 return 0;
10916}
10917_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010918if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010919
10920
Matthias Kloseb9621712010-04-24 17:59:49 +000010921$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000010922
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010923 was_it_defined=yes
10924
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010925fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010926rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010927{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
10928$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010929
Matthias Kloseb9621712010-04-24 17:59:49 +000010930{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
10931$as_echo_n "checking for addrinfo... " >&6; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +000010932if test "${ac_cv_struct_addrinfo+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010933 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010934else
Matthias Kloseb9621712010-04-24 17:59:49 +000010935 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010936/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010937#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010938int
10939main ()
10940{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010941struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000010942 ;
10943 return 0;
10944}
10945_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010946if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010947 ac_cv_struct_addrinfo=yes
10948else
Matthias Kloseb9621712010-04-24 17:59:49 +000010949 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010950fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010951rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10952fi
10953
Matthias Kloseb9621712010-04-24 17:59:49 +000010954{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
10955$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010956if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010957
Matthias Kloseb9621712010-04-24 17:59:49 +000010958$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010959
10960fi
10961
Matthias Kloseb9621712010-04-24 17:59:49 +000010962{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
10963$as_echo_n "checking for sockaddr_storage... " >&6; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +000010964if test "${ac_cv_struct_sockaddr_storage+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010965 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010966else
Matthias Kloseb9621712010-04-24 17:59:49 +000010967 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010968/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010969
10970# include <sys/types.h>
10971# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010972int
10973main ()
10974{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010975struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000010976 ;
10977 return 0;
10978}
10979_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010980if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010981 ac_cv_struct_sockaddr_storage=yes
10982else
Matthias Kloseb9621712010-04-24 17:59:49 +000010983 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010984fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010985rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10986fi
10987
Matthias Kloseb9621712010-04-24 17:59:49 +000010988{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
10989$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010990if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010991
Matthias Kloseb9621712010-04-24 17:59:49 +000010992$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010993
10994fi
10995
Guido van Rossum627b2d71993-12-24 10:39:16 +000010996# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000010997
Matthias Kloseb9621712010-04-24 17:59:49 +000010998{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
10999$as_echo_n "checking whether char is unsigned... " >&6; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +000011000if test "${ac_cv_c_char_unsigned+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011001 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000011002else
Matthias Kloseb9621712010-04-24 17:59:49 +000011003 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011004/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011005$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000011006int
11007main ()
11008{
11009static int test_array [1 - 2 * !(((char) -1) < 0)];
11010test_array [0] = 0
11011
11012 ;
11013 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000011014}
Martin v. Löwis11437992002-04-12 09:54:03 +000011015_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011016if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000011017 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011018else
Matthias Kloseb9621712010-04-24 17:59:49 +000011019 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011020fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011021rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011022fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011023{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
11024$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011025if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011026 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011027
11028fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000011029
Matthias Kloseb9621712010-04-24 17:59:49 +000011030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
11031$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +000011032if test "${ac_cv_c_const+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011033 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011034else
Matthias Kloseb9621712010-04-24 17:59:49 +000011035 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011036/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011037
Martin v. Löwis11437992002-04-12 09:54:03 +000011038int
11039main ()
11040{
11041/* FIXME: Include the comments suggested by Paul. */
11042#ifndef __cplusplus
11043 /* Ultrix mips cc rejects this. */
11044 typedef int charset[2];
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011045 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000011046 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011047 char const *const *pcpcc;
11048 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011049 /* NEC SVR4.0.2 mips cc rejects this. */
11050 struct point {int x, y;};
11051 static struct point const zero = {0,0};
11052 /* AIX XL C 1.02.0.0 rejects this.
11053 It does not let you subtract one const X* pointer from another in
11054 an arm of an if-expression whose if-part is not a constant
11055 expression */
11056 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011057 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011058 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011059 ++pcpcc;
11060 ppc = (char**) pcpcc;
11061 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011062 { /* SCO 3.2v4 cc rejects this. */
11063 char *t;
11064 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011065
Martin v. Löwis11437992002-04-12 09:54:03 +000011066 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011067 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011068 }
11069 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
11070 int x[] = {25, 17};
11071 const int *foo = &x[0];
11072 ++foo;
11073 }
11074 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11075 typedef const int *iptr;
11076 iptr p = 0;
11077 ++p;
11078 }
11079 { /* AIX XL C 1.02.0.0 rejects this saying
11080 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11081 struct s { int j; const int *ap[3]; };
11082 struct s *b; b->j = 5;
11083 }
11084 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11085 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011086 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011087 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011088 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000011089#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000011090
Martin v. Löwis11437992002-04-12 09:54:03 +000011091 ;
11092 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000011093}
Martin v. Löwis11437992002-04-12 09:54:03 +000011094_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011095if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011096 ac_cv_c_const=yes
11097else
Matthias Kloseb9621712010-04-24 17:59:49 +000011098 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011099fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011100rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011101fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011102{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
11103$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011104if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011105
Matthias Kloseb9621712010-04-24 17:59:49 +000011106$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011107
11108fi
11109
Michael W. Hudson54241132001-12-07 15:38:26 +000011110
Guido van Rossumda88dad1995-01-26 00:46:29 +000011111works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
11113$as_echo_n "checking for working volatile... " >&6; }
11114cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011115/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011116
Martin v. Löwis11437992002-04-12 09:54:03 +000011117int
11118main ()
11119{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011120volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011121 ;
11122 return 0;
11123}
11124_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011125if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011126 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011127else
Skip Montanaro6dead952003-09-25 14:50:04 +000011128
Matthias Kloseb9621712010-04-24 17:59:49 +000011129$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011130
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011131
Guido van Rossum627b2d71993-12-24 10:39:16 +000011132fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011133rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011134{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11135$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011136
Guido van Rossumda88dad1995-01-26 00:46:29 +000011137works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011138{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
11139$as_echo_n "checking for working signed char... " >&6; }
11140cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011141/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011142
Martin v. Löwis11437992002-04-12 09:54:03 +000011143int
11144main ()
11145{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011146signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000011147 ;
11148 return 0;
11149}
11150_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011151if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011152 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011153else
Skip Montanaro6dead952003-09-25 14:50:04 +000011154
Matthias Kloseb9621712010-04-24 17:59:49 +000011155$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000011156
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011157
Guido van Rossum7f43da71994-08-01 12:15:30 +000011158fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011159rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011160{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11161$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011162
Guido van Rossumda88dad1995-01-26 00:46:29 +000011163have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
11165$as_echo_n "checking for prototypes... " >&6; }
11166cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011167/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011168int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011169int
11170main ()
11171{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011172return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000011173 ;
11174 return 0;
11175}
11176_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011177if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011178
Matthias Kloseb9621712010-04-24 17:59:49 +000011179$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011180
Matthias Kloseb159a552010-04-25 21:00:44 +000011181 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011182fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011183rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011184{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
11185$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011186
Guido van Rossumda88dad1995-01-26 00:46:29 +000011187works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011188{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
11189$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
11190cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011191/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011192
11193#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000011194int foo(int x, ...) {
11195 va_list va;
11196 va_start(va, x);
11197 va_arg(va, int);
11198 va_arg(va, char *);
11199 va_arg(va, double);
11200 return 0;
11201}
Guido van Rossum7f43da71994-08-01 12:15:30 +000011202
Martin v. Löwis11437992002-04-12 09:54:03 +000011203int
11204main ()
11205{
Guido van Rossum90eea071996-08-30 20:58:57 +000011206return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000011207 ;
11208 return 0;
11209}
11210_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011211if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011212
11213
Matthias Kloseb9621712010-04-24 17:59:49 +000011214$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011215
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011216 works=yes
11217
Guido van Rossum627b2d71993-12-24 10:39:16 +000011218fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011219rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011220{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11221$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011222
Martin v. Löwisd6320502004-08-12 13:45:08 +000011223# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000011224{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
11225$as_echo_n "checking for socketpair... " >&6; }
11226cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011227/* end confdefs.h. */
11228
11229#include <sys/types.h>
11230#include <sys/socket.h>
11231
11232int
11233main ()
11234{
11235void *x=socketpair
11236 ;
11237 return 0;
11238}
11239_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011240if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000011241
Matthias Kloseb9621712010-04-24 17:59:49 +000011242$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000011243
Matthias Kloseb159a552010-04-25 21:00:44 +000011244 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011245$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011246else
Matthias Kloseb9621712010-04-24 17:59:49 +000011247 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11248$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011249
11250fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011251rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011252
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011253# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000011254{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
11255$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
11256cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011257/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011258#include <sys/types.h>
11259#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011260int
11261main ()
11262{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011263struct sockaddr x;
11264x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011265 ;
11266 return 0;
11267}
11268_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011269if ac_fn_c_try_compile "$LINENO"; then :
11270 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11271$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011272
Matthias Kloseb9621712010-04-24 17:59:49 +000011273$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011274
11275else
Matthias Kloseb9621712010-04-24 17:59:49 +000011276 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11277$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011278
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011279fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011280rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011281
Guido van Rossumda88dad1995-01-26 00:46:29 +000011282va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011283{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
11284$as_echo_n "checking whether va_list is an array... " >&6; }
11285cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011286/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011287
11288#ifdef HAVE_STDARG_PROTOTYPES
11289#include <stdarg.h>
11290#else
11291#include <varargs.h>
11292#endif
11293
Martin v. Löwis11437992002-04-12 09:54:03 +000011294int
11295main ()
11296{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011297va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000011298 ;
11299 return 0;
11300}
11301_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011302if ac_fn_c_try_compile "$LINENO"; then :
11303
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011304else
Skip Montanaro6dead952003-09-25 14:50:04 +000011305
Martin v. Löwis11437992002-04-12 09:54:03 +000011306
Matthias Kloseb9621712010-04-24 17:59:49 +000011307$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011308
Guido van Rossumda88dad1995-01-26 00:46:29 +000011309 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011310
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011311fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011312rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011313{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
11314$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011315
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011316# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000011317
11318
Matthias Kloseb9621712010-04-24 17:59:49 +000011319ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Antoine Pitrouf65132d2011-02-25 23:25:17 +000011320if test "x$ac_cv_func_gethostbyname_r" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011321
Matthias Kloseb9621712010-04-24 17:59:49 +000011322 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000011323
Matthias Kloseb9621712010-04-24 17:59:49 +000011324 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
11325$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011326 OLD_CFLAGS=$CFLAGS
11327 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011328 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011329/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011330
11331# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011332
Martin v. Löwis11437992002-04-12 09:54:03 +000011333int
11334main ()
11335{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011336
11337 char *name;
11338 struct hostent *he, *res;
11339 char buffer[2048];
11340 int buflen = 2048;
11341 int h_errnop;
11342
11343 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011344
11345 ;
11346 return 0;
11347}
11348_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011349if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011350
Matthias Kloseb9621712010-04-24 17:59:49 +000011351 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011352
Martin v. Löwis11437992002-04-12 09:54:03 +000011353
Matthias Kloseb9621712010-04-24 17:59:49 +000011354$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011355
Matthias Kloseb9621712010-04-24 17:59:49 +000011356 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11357$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011358
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011359else
Skip Montanaro6dead952003-09-25 14:50:04 +000011360
Matthias Kloseb9621712010-04-24 17:59:49 +000011361 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11362$as_echo "no" >&6; }
11363 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
11364$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
11365 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011366/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011367
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011368# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011369
Martin v. Löwis11437992002-04-12 09:54:03 +000011370int
11371main ()
11372{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011373
11374 char *name;
11375 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000011376 char buffer[2048];
11377 int buflen = 2048;
11378 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011379
Matthias Kloseb159a552010-04-25 21:00:44 +000011380 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011381
11382 ;
11383 return 0;
11384}
11385_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011386if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011387
Matthias Kloseb9621712010-04-24 17:59:49 +000011388 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011389
Martin v. Löwis11437992002-04-12 09:54:03 +000011390
Matthias Kloseb159a552010-04-25 21:00:44 +000011391$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011392
Matthias Kloseb9621712010-04-24 17:59:49 +000011393 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11394$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011395
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011396else
Skip Montanaro6dead952003-09-25 14:50:04 +000011397
Matthias Kloseb9621712010-04-24 17:59:49 +000011398 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11399$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011400 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
11401$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
11402 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11403/* end confdefs.h. */
11404
11405# include <netdb.h>
11406
11407int
11408main ()
11409{
11410
11411 char *name;
11412 struct hostent *he;
11413 struct hostent_data data;
11414
11415 (void) gethostbyname_r(name, he, &data);
11416
11417 ;
11418 return 0;
11419}
11420_ACEOF
11421if ac_fn_c_try_compile "$LINENO"; then :
11422
11423 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
11424
11425
11426$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
11427
11428 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11429$as_echo "yes" >&6; }
11430
11431else
11432
11433 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11434$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011435
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011436fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011437rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
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
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011444 CFLAGS=$OLD_CFLAGS
11445
11446else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011447
Matthias Kloseb9621712010-04-24 17:59:49 +000011448 for ac_func in gethostbyname
11449do :
11450 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Antoine Pitrouf65132d2011-02-25 23:25:17 +000011451if test "x$ac_cv_func_gethostbyname" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011452 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011453#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011454_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011455
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011456fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011457done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011458
Michael W. Hudson54241132001-12-07 15:38:26 +000011459
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011460fi
11461
Michael W. Hudson54241132001-12-07 15:38:26 +000011462
11463
11464
11465
11466
11467
Guido van Rossum627b2d71993-12-24 10:39:16 +000011468# checks for system services
11469# (none yet)
11470
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011471# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000011472ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Antoine Pitrouf65132d2011-02-25 23:25:17 +000011473if test "x$ac_cv_func___fpu_control" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011474
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011475else
Matthias Kloseb9621712010-04-24 17:59:49 +000011476 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
11477$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +000011478if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011479 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011480else
Martin v. Löwis11437992002-04-12 09:54:03 +000011481 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011482LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011483cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011484/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011485
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011486/* Override any GCC internal prototype to avoid an error.
11487 Use char because int might match the return type of a GCC
11488 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011489#ifdef __cplusplus
11490extern "C"
11491#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011492char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011493int
11494main ()
11495{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011496return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011497 ;
11498 return 0;
11499}
11500_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011501if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011502 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011503else
Matthias Kloseb9621712010-04-24 17:59:49 +000011504 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011505fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011506rm -f core conftest.err conftest.$ac_objext \
11507 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011508LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011509fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011510{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
11511$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +000011512if test "x$ac_cv_lib_ieee___fpu_control" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011513 cat >>confdefs.h <<_ACEOF
11514#define HAVE_LIBIEEE 1
11515_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011516
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011517 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011518
Guido van Rossum627b2d71993-12-24 10:39:16 +000011519fi
11520
Michael W. Hudson54241132001-12-07 15:38:26 +000011521
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011522fi
11523
Michael W. Hudson54241132001-12-07 15:38:26 +000011524
Guido van Rossum7f253911997-05-09 02:42:48 +000011525# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000011526{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
11527$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011528
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011529# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011530if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011531 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000011532if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000011533then
11534
Matthias Kloseb9621712010-04-24 17:59:49 +000011535$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011536
Matthias Kloseb9621712010-04-24 17:59:49 +000011537 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11538$as_echo "yes" >&6; }
11539else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11540$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011541fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000011542else
Matthias Kloseb9621712010-04-24 17:59:49 +000011543 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11544$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011545fi
11546
Guido van Rossum7f253911997-05-09 02:42:48 +000011547
Guido van Rossum7f43da71994-08-01 12:15:30 +000011548# check for --with-libm=...
11549
Guido van Rossum563e7081996-09-10 18:20:48 +000011550case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000011551Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000011552*) LIBM=-lm
11553esac
Matthias Kloseb9621712010-04-24 17:59:49 +000011554{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
11555$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011556
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011557# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011558if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011559 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000011560if test "$withval" = no
11561then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000011562 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
11563$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011564elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011565then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000011566 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
11567$as_echo "set LIBM=\"$withval\"" >&6; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +000011568else as_fn_error "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011569fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011570else
Matthias Kloseb9621712010-04-24 17:59:49 +000011571 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
11572$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011573fi
11574
Guido van Rossum7f43da71994-08-01 12:15:30 +000011575
11576# check for --with-libc=...
11577
Matthias Kloseb9621712010-04-24 17:59:49 +000011578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
11579$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011580
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011581# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011582if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011583 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000011584if test "$withval" = no
11585then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000011586 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
11587$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011588elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011589then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000011590 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
11591$as_echo "set LIBC=\"$withval\"" >&6; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +000011592else as_fn_error "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011593fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011594else
Matthias Kloseb9621712010-04-24 17:59:49 +000011595 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
11596$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011597fi
11598
Guido van Rossum7f43da71994-08-01 12:15:30 +000011599
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011600# **************************************************
11601# * Check for various properties of floating point *
11602# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011603
Matthias Kloseb9621712010-04-24 17:59:49 +000011604{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
11605$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +000011606if test "${ac_cv_little_endian_double+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011607 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011608else
11609
Matthias Kloseb9621712010-04-24 17:59:49 +000011610if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011611 ac_cv_little_endian_double=no
11612else
Matthias Kloseb9621712010-04-24 17:59:49 +000011613 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011614/* end confdefs.h. */
11615
11616#include <string.h>
11617int main() {
11618 double x = 9006104071832581.0;
11619 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
11620 return 0;
11621 else
11622 return 1;
11623}
11624
11625_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011626if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011627 ac_cv_little_endian_double=yes
11628else
Matthias Kloseb9621712010-04-24 17:59:49 +000011629 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011630fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011631rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11632 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011633fi
11634
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011635fi
11636
Matthias Kloseb9621712010-04-24 17:59:49 +000011637{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
11638$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011639if test "$ac_cv_little_endian_double" = yes
11640then
11641
Matthias Kloseb9621712010-04-24 17:59:49 +000011642$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011643
11644fi
11645
Matthias Kloseb9621712010-04-24 17:59:49 +000011646{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
11647$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +000011648if test "${ac_cv_big_endian_double+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011649 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011650else
11651
Matthias Kloseb9621712010-04-24 17:59:49 +000011652if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011653 ac_cv_big_endian_double=no
11654else
Matthias Kloseb9621712010-04-24 17:59:49 +000011655 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011656/* end confdefs.h. */
11657
11658#include <string.h>
11659int main() {
11660 double x = 9006104071832581.0;
11661 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
11662 return 0;
11663 else
11664 return 1;
11665}
11666
11667_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011668if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011669 ac_cv_big_endian_double=yes
11670else
Matthias Kloseb9621712010-04-24 17:59:49 +000011671 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011672fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011673rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11674 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011675fi
11676
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011677fi
11678
Matthias Kloseb9621712010-04-24 17:59:49 +000011679{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
11680$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011681if test "$ac_cv_big_endian_double" = yes
11682then
11683
Matthias Kloseb9621712010-04-24 17:59:49 +000011684$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011685
11686fi
11687
11688# Some ARM platforms use a mixed-endian representation for doubles.
11689# While Python doesn't currently have full support for these platforms
11690# (see e.g., issue 1762561), we can at least make sure that float <-> string
11691# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000011692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
11693$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +000011694if test "${ac_cv_mixed_endian_double+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011695 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011696else
11697
Matthias Kloseb9621712010-04-24 17:59:49 +000011698if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011699 ac_cv_mixed_endian_double=no
11700else
Matthias Kloseb9621712010-04-24 17:59:49 +000011701 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011702/* end confdefs.h. */
11703
11704#include <string.h>
11705int main() {
11706 double x = 9006104071832581.0;
11707 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
11708 return 0;
11709 else
11710 return 1;
11711}
11712
11713_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011714if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011715 ac_cv_mixed_endian_double=yes
11716else
Matthias Kloseb9621712010-04-24 17:59:49 +000011717 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011718fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011719rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11720 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011721fi
11722
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011723fi
11724
Matthias Kloseb9621712010-04-24 17:59:49 +000011725{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
11726$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011727if test "$ac_cv_mixed_endian_double" = yes
11728then
11729
Matthias Kloseb9621712010-04-24 17:59:49 +000011730$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011731
11732fi
11733
Mark Dickinson7abf8d42009-04-18 20:17:52 +000011734# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000011735# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000011736# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000011737# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011738# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000011739# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011740
11741# This inline assembler syntax may also work for suncc and icc,
11742# so we try it on all platforms.
11743
Matthias Kloseb9621712010-04-24 17:59:49 +000011744{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
11745$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
11746cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011747/* end confdefs.h. */
11748
11749int
11750main ()
11751{
11752
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011753 unsigned short cw;
11754 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
11755 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011756
11757 ;
11758 return 0;
11759}
11760_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011761if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011762 have_gcc_asm_for_x87=yes
11763else
Matthias Kloseb9621712010-04-24 17:59:49 +000011764 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011765fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011766rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011767{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
11768$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011769if test "$have_gcc_asm_for_x87" = yes
11770then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011771
Matthias Kloseb9621712010-04-24 17:59:49 +000011772$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011773
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011774fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011775
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011776# Detect whether system arithmetic is subject to x87-style double
11777# rounding issues. The result of this test has little meaning on non
11778# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
11779# mode is round-to-nearest and double rounding issues are present, and
11780# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000011781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
11782$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011783# $BASECFLAGS may affect the result
11784ac_save_cc="$CC"
11785CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011786if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011787 ac_cv_x87_double_rounding=no
11788else
Matthias Kloseb9621712010-04-24 17:59:49 +000011789 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011790/* end confdefs.h. */
11791
11792#include <stdlib.h>
11793#include <math.h>
11794int main() {
11795 volatile double x, y, z;
11796 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
11797 x = 0.99999999999999989; /* 1-2**-53 */
11798 y = 1./x;
11799 if (y != 1.)
11800 exit(0);
11801 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
11802 x = 1e16;
11803 y = 2.99999;
11804 z = x + y;
11805 if (z != 1e16+4.)
11806 exit(0);
11807 /* both tests show evidence of double rounding */
11808 exit(1);
11809}
11810
11811_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011812if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011813 ac_cv_x87_double_rounding=no
11814else
Matthias Kloseb9621712010-04-24 17:59:49 +000011815 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011816fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011817rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11818 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011819fi
11820
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011821CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000011822{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
11823$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011824if test "$ac_cv_x87_double_rounding" = yes
11825then
11826
Matthias Kloseb9621712010-04-24 17:59:49 +000011827$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011828
11829fi
11830
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011831# ************************************
11832# * Check for mathematical functions *
11833# ************************************
11834
11835LIBS_SAVE=$LIBS
11836LIBS="$LIBS $LIBM"
11837
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011838for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
11839do :
11840 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11841ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Antoine Pitrouf65132d2011-02-25 23:25:17 +000011842eval as_val=\$$as_ac_var
11843 if test "x$as_val" = x""yes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011844 cat >>confdefs.h <<_ACEOF
11845#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11846_ACEOF
11847
11848fi
11849done
11850
11851for ac_func in hypot lgamma log1p round tgamma
11852do :
11853 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11854ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Antoine Pitrouf65132d2011-02-25 23:25:17 +000011855eval as_val=\$$as_ac_var
11856 if test "x$as_val" = x""yes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011857 cat >>confdefs.h <<_ACEOF
11858#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11859_ACEOF
11860
11861fi
11862done
11863
11864ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
11865"
Antoine Pitrouf65132d2011-02-25 23:25:17 +000011866if test "x$ac_cv_have_decl_isinf" = x""yes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011867 ac_have_decl=1
11868else
11869 ac_have_decl=0
11870fi
11871
11872cat >>confdefs.h <<_ACEOF
11873#define HAVE_DECL_ISINF $ac_have_decl
11874_ACEOF
11875ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
11876"
Antoine Pitrouf65132d2011-02-25 23:25:17 +000011877if test "x$ac_cv_have_decl_isnan" = x""yes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011878 ac_have_decl=1
11879else
11880 ac_have_decl=0
11881fi
11882
11883cat >>confdefs.h <<_ACEOF
11884#define HAVE_DECL_ISNAN $ac_have_decl
11885_ACEOF
11886ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
11887"
Antoine Pitrouf65132d2011-02-25 23:25:17 +000011888if test "x$ac_cv_have_decl_isfinite" = x""yes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011889 ac_have_decl=1
11890else
11891 ac_have_decl=0
11892fi
11893
11894cat >>confdefs.h <<_ACEOF
11895#define HAVE_DECL_ISFINITE $ac_have_decl
11896_ACEOF
11897
11898
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011899# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
11900# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000011901{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
11902$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +000011903if test "${ac_cv_tanh_preserves_zero_sign+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011904 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011905else
11906
Matthias Kloseb9621712010-04-24 17:59:49 +000011907if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011908 ac_cv_tanh_preserves_zero_sign=no
11909else
Matthias Kloseb9621712010-04-24 17:59:49 +000011910 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011911/* end confdefs.h. */
11912
11913#include <math.h>
11914#include <stdlib.h>
11915int main() {
11916 /* return 0 if either negative zeros don't exist
11917 on this platform or if negative zeros exist
11918 and tanh(-0.) == -0. */
11919 if (atan2(0., -1.) == atan2(-0., -1.) ||
11920 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
11921 else exit(1);
11922}
11923
11924_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011925if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011926 ac_cv_tanh_preserves_zero_sign=yes
11927else
Matthias Kloseb9621712010-04-24 17:59:49 +000011928 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011929fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011930rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11931 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011932fi
11933
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011934fi
11935
Matthias Kloseb9621712010-04-24 17:59:49 +000011936{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
11937$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011938if test "$ac_cv_tanh_preserves_zero_sign" = yes
11939then
11940
Matthias Kloseb9621712010-04-24 17:59:49 +000011941$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011942
11943fi
11944
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011945if test "$ac_cv_func_log1p" = yes
11946then
11947 # On some versions of AIX, log1p(-0.) returns 0. instead of
11948 # -0. See issue #9920.
11949 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
11950$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +000011951 if test "${ac_cv_log1p_drops_zero_sign+set}" = set; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011952 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011953else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011954
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011955 if test "$cross_compiling" = yes; then :
11956 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011957else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011958 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11959/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011960
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011961 #include <math.h>
11962 #include <stdlib.h>
11963 int main() {
11964 /* Fail if the signs of log1p(-0.) and -0. can be
11965 distinguished. */
11966 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
11967 return 0;
11968 else
11969 return 1;
11970 }
11971
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011972_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011973if ac_fn_c_try_run "$LINENO"; then :
11974 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011975else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011976 ac_cv_log1p_drops_zero_sign=yes
11977fi
11978rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11979 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011980fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011981
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011982fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011983
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011984 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
11985$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
11986fi
11987if test "$ac_cv_log1p_drops_zero_sign" = yes
11988then
11989
11990$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
11991
11992fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011993
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000011994LIBS=$LIBS_SAVE
11995
Mark Dickinsona614f042009-11-28 12:48:43 +000011996# For multiprocessing module, check that sem_open
11997# actually works. For FreeBSD versions <= 7.2,
11998# the kernel module that provides POSIX semaphores
11999# isn't loaded by default, so an attempt to call
12000# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000012001{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
12002$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +000012003if test "${ac_cv_posix_semaphores_enabled+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012004 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000012005else
Matthias Kloseb9621712010-04-24 17:59:49 +000012006 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000012007 ac_cv_posix_semaphores_enabled=yes
12008else
Matthias Kloseb9621712010-04-24 17:59:49 +000012009 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000012010/* end confdefs.h. */
12011
12012#include <unistd.h>
12013#include <fcntl.h>
12014#include <stdio.h>
12015#include <semaphore.h>
12016#include <sys/stat.h>
12017
12018int main(void) {
12019 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
12020 if (a == SEM_FAILED) {
12021 perror("sem_open");
12022 return 1;
12023 }
12024 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000012025 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000012026 return 0;
12027}
12028
12029_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012030if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000012031 ac_cv_posix_semaphores_enabled=yes
12032else
Matthias Kloseb9621712010-04-24 17:59:49 +000012033 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000012034fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012035rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12036 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000012037fi
12038
12039
Mark Dickinsona614f042009-11-28 12:48:43 +000012040fi
12041
Matthias Kloseb9621712010-04-24 17:59:49 +000012042{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
12043$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000012044if test $ac_cv_posix_semaphores_enabled = no
12045then
12046
Matthias Kloseb9621712010-04-24 17:59:49 +000012047$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000012048
12049fi
12050
Mark Dickinson10683072009-04-18 21:18:19 +000012051# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000012052{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
12053$as_echo_n "checking for broken sem_getvalue... " >&6; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +000012054if test "${ac_cv_broken_sem_getvalue+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012055 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012056else
Matthias Kloseb9621712010-04-24 17:59:49 +000012057 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012058 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000012059else
Matthias Kloseb9621712010-04-24 17:59:49 +000012060 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000012061/* end confdefs.h. */
12062
12063#include <unistd.h>
12064#include <fcntl.h>
12065#include <stdio.h>
12066#include <semaphore.h>
12067#include <sys/stat.h>
12068
12069int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000012070 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000012071 int count;
12072 int res;
12073 if(a==SEM_FAILED){
12074 perror("sem_open");
12075 return 1;
12076
12077 }
12078 res = sem_getvalue(a, &count);
12079 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000012080 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000012081 return res==-1 ? 1 : 0;
12082}
12083
Mark Dickinson10683072009-04-18 21:18:19 +000012084_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012085if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012086 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000012087else
Matthias Kloseb9621712010-04-24 17:59:49 +000012088 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012089fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012090rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12091 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012092fi
12093
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012094
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012095fi
12096
Matthias Kloseb9621712010-04-24 17:59:49 +000012097{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
12098$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012099if test $ac_cv_broken_sem_getvalue = yes
12100then
12101
Matthias Kloseb9621712010-04-24 17:59:49 +000012102$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012103
12104fi
12105
Mark Dickinsonbd792642009-03-18 20:06:12 +000012106# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000012107{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
12108$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012109# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012110if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000012111 enableval=$enable_big_digits; case $enable_big_digits in
12112yes)
12113 enable_big_digits=30 ;;
12114no)
12115 enable_big_digits=15 ;;
1211615|30)
12117 ;;
12118*)
Antoine Pitrouf65132d2011-02-25 23:25:17 +000012119 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 +000012120esac
Matthias Kloseb9621712010-04-24 17:59:49 +000012121{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
12122$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012123
12124cat >>confdefs.h <<_ACEOF
12125#define PYLONG_BITS_IN_DIGIT $enable_big_digits
12126_ACEOF
12127
12128
12129else
Matthias Kloseb9621712010-04-24 17:59:49 +000012130 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
12131$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012132fi
12133
12134
Guido van Rossumef2255b2000-03-10 22:30:29 +000012135# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012136ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Antoine Pitrouf65132d2011-02-25 23:25:17 +000012137if test "x$ac_cv_header_wchar_h" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012138
12139
Matthias Kloseb9621712010-04-24 17:59:49 +000012140$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012141
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012142 wchar_h="yes"
12143
Guido van Rossumef2255b2000-03-10 22:30:29 +000012144else
Martin v. Löwis11437992002-04-12 09:54:03 +000012145 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000012146
12147fi
12148
Michael W. Hudson54241132001-12-07 15:38:26 +000012149
Martin v. Löwis11437992002-04-12 09:54:03 +000012150
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012151# determine wchar_t size
12152if test "$wchar_h" = yes
12153then
Matthias Kloseb9621712010-04-24 17:59:49 +000012154 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012155# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12156# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12157# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000012158{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
12159$as_echo_n "checking size of wchar_t... " >&6; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +000012160if test "${ac_cv_sizeof_wchar_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012161 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012162else
Matthias Kloseb9621712010-04-24 17:59:49 +000012163 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
12164"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012165
Martin v. Löwis11437992002-04-12 09:54:03 +000012166else
Matthias Kloseb9621712010-04-24 17:59:49 +000012167 if test "$ac_cv_type_wchar_t" = yes; then
12168 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12169$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Antoine Pitrouf65132d2011-02-25 23:25:17 +000012170{ as_fn_set_status 77
12171as_fn_error "cannot compute sizeof (wchar_t)
12172See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012173 else
12174 ac_cv_sizeof_wchar_t=0
12175 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012176fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012177
Martin v. Löwis11437992002-04-12 09:54:03 +000012178fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012179{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
12180$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012181
12182
12183
Martin v. Löwis11437992002-04-12 09:54:03 +000012184cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012185#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012186_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012187
Michael W. Hudson54241132001-12-07 15:38:26 +000012188
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012189fi
12190
Matthias Kloseb9621712010-04-24 17:59:49 +000012191{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
12192$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012193have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012194cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012195/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012196
12197#include <tcl.h>
12198#if TCL_UTF_MAX != 6
12199# error "NOT UCS4_TCL"
12200#endif
12201int
12202main ()
12203{
12204
12205 ;
12206 return 0;
12207}
12208_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012209if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012210
12211
Matthias Kloseb9621712010-04-24 17:59:49 +000012212$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012213
12214 have_ucs4_tcl=yes
12215
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012216fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012217rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012218{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
12219$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012220
Skip Montanaro6dead952003-09-25 14:50:04 +000012221# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012222if test "$wchar_h" = yes
12223then
12224 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000012225 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
12226$as_echo_n "checking whether wchar_t is signed... " >&6; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +000012227 if test "${ac_cv_wchar_t_signed+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012228 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012229else
12230
Matthias Kloseb9621712010-04-24 17:59:49 +000012231 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012232 ac_cv_wchar_t_signed=yes
12233else
Matthias Kloseb9621712010-04-24 17:59:49 +000012234 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012235/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012236
12237 #include <wchar.h>
12238 int main()
12239 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000012240 /* Success: exit code 0 */
12241 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012242 }
12243
12244_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012245if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012246 ac_cv_wchar_t_signed=yes
12247else
Matthias Kloseb9621712010-04-24 17:59:49 +000012248 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012249fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012250rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12251 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012252fi
12253
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012254fi
12255
Matthias Kloseb9621712010-04-24 17:59:49 +000012256 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
12257$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012258fi
12259
Matthias Kloseb9621712010-04-24 17:59:49 +000012260{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what type to use for str" >&5
12261$as_echo_n "checking what type to use for str... " >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000012262
12263# Check whether --with-wide-unicode was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012264if test "${with_wide_unicode+set}" = set; then :
Georg Brandl52d168a2008-01-07 18:10:24 +000012265 withval=$with_wide_unicode;
12266if test "$withval" != no
12267then unicode_size="4"
12268else unicode_size="2"
12269fi
12270
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012271else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012272
Georg Brandl52d168a2008-01-07 18:10:24 +000012273case "$have_ucs4_tcl" in
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012274 yes) unicode_size="4";;
Georg Brandl52d168a2008-01-07 18:10:24 +000012275 *) unicode_size="2" ;;
12276esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012277
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012278fi
12279
Martin v. Löwis0036cba2002-04-12 09:58:45 +000012280
12281
Georg Brandl52d168a2008-01-07 18:10:24 +000012282case "$unicode_size" in
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012283 4)
12284 $as_echo "#define Py_UNICODE_SIZE 4" >>confdefs.h
12285
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012286 ABIFLAGS="${ABIFLAGS}u"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012287 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000012288 *) $as_echo "#define Py_UNICODE_SIZE 2" >>confdefs.h
Georg Brandl52d168a2008-01-07 18:10:24 +000012289 ;;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012290esac
12291
Michael W. Hudson54241132001-12-07 15:38:26 +000012292
Martin v. Löwis11437992002-04-12 09:54:03 +000012293
Georg Brandl52d168a2008-01-07 18:10:24 +000012294# wchar_t is only usable if it maps to an unsigned type
12295if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000012296 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000012297then
12298 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012299
Matthias Kloseb9621712010-04-24 17:59:49 +000012300$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012301
Matthias Kloseb9621712010-04-24 17:59:49 +000012302 $as_echo "#define PY_UNICODE_TYPE wchar_t" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012303
Georg Brandl52d168a2008-01-07 18:10:24 +000012304elif test "$ac_cv_sizeof_short" = "$unicode_size"
12305then
12306 PY_UNICODE_TYPE="unsigned short"
Matthias Kloseb9621712010-04-24 17:59:49 +000012307 $as_echo "#define PY_UNICODE_TYPE unsigned short" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012308
Georg Brandl52d168a2008-01-07 18:10:24 +000012309elif test "$ac_cv_sizeof_long" = "$unicode_size"
12310then
12311 PY_UNICODE_TYPE="unsigned long"
Matthias Kloseb9621712010-04-24 17:59:49 +000012312 $as_echo "#define PY_UNICODE_TYPE unsigned long" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012313
Georg Brandl52d168a2008-01-07 18:10:24 +000012314else
12315 PY_UNICODE_TYPE="no type found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012316fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012317{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PY_UNICODE_TYPE" >&5
12318$as_echo "$PY_UNICODE_TYPE" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000012319
12320# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000012321 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12322$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +000012323if test "${ac_cv_c_bigendian+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012324 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000012325else
Matthias Kloseb9621712010-04-24 17:59:49 +000012326 ac_cv_c_bigendian=unknown
12327 # See if we're dealing with a universal compiler.
12328 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12329/* end confdefs.h. */
12330#ifndef __APPLE_CC__
12331 not a universal capable compiler
12332 #endif
12333 typedef int dummy;
12334
Skip Montanaro6dead952003-09-25 14:50:04 +000012335_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012336if ac_fn_c_try_compile "$LINENO"; then :
12337
12338 # Check for potential -arch flags. It is not universal unless
12339 # there are at least two -arch flags with different values.
12340 ac_arch=
12341 ac_prev=
12342 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12343 if test -n "$ac_prev"; then
12344 case $ac_word in
12345 i?86 | x86_64 | ppc | ppc64)
12346 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12347 ac_arch=$ac_word
12348 else
12349 ac_cv_c_bigendian=universal
12350 break
12351 fi
12352 ;;
12353 esac
12354 ac_prev=
12355 elif test "x$ac_word" = "x-arch"; then
12356 ac_prev=arch
12357 fi
12358 done
12359fi
12360rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12361 if test $ac_cv_c_bigendian = unknown; then
12362 # See if sys/param.h defines the BYTE_ORDER macro.
12363 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012364/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012365#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012366 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012367
Martin v. Löwis11437992002-04-12 09:54:03 +000012368int
12369main ()
12370{
Matthias Kloseb9621712010-04-24 17:59:49 +000012371#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12372 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12373 && LITTLE_ENDIAN)
12374 bogus endian macros
12375 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012376
12377 ;
12378 return 0;
12379}
12380_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012381if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012382 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000012383 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012384/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012385#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012386 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012387
Martin v. Löwis11437992002-04-12 09:54:03 +000012388int
12389main ()
12390{
Guido van Rossumef2255b2000-03-10 22:30:29 +000012391#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000012392 not big endian
12393 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012394
12395 ;
12396 return 0;
12397}
12398_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012399if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012400 ac_cv_c_bigendian=yes
12401else
Matthias Kloseb9621712010-04-24 17:59:49 +000012402 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000012403fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012404rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012405fi
12406rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12407 fi
12408 if test $ac_cv_c_bigendian = unknown; then
12409 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12410 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012411/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000012412#include <limits.h>
12413
Martin v. Löwis11437992002-04-12 09:54:03 +000012414int
12415main ()
12416{
Matthias Kloseb9621712010-04-24 17:59:49 +000012417#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12418 bogus endian macros
12419 #endif
12420
Martin v. Löwis11437992002-04-12 09:54:03 +000012421 ;
12422 return 0;
12423}
12424_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012425if ac_fn_c_try_compile "$LINENO"; then :
12426 # It does; now see whether it defined to _BIG_ENDIAN or not.
12427 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12428/* end confdefs.h. */
12429#include <limits.h>
12430
12431int
12432main ()
12433{
12434#ifndef _BIG_ENDIAN
12435 not big endian
12436 #endif
12437
12438 ;
12439 return 0;
12440}
12441_ACEOF
12442if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012443 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012444else
Matthias Kloseb9621712010-04-24 17:59:49 +000012445 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012446fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012447rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12448fi
12449rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12450 fi
12451 if test $ac_cv_c_bigendian = unknown; then
12452 # Compile a test program.
12453 if test "$cross_compiling" = yes; then :
12454 # Try to guess by grepping values from an object file.
12455 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12456/* end confdefs.h. */
12457short int ascii_mm[] =
12458 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12459 short int ascii_ii[] =
12460 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12461 int use_ascii (int i) {
12462 return ascii_mm[i] + ascii_ii[i];
12463 }
12464 short int ebcdic_ii[] =
12465 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12466 short int ebcdic_mm[] =
12467 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12468 int use_ebcdic (int i) {
12469 return ebcdic_mm[i] + ebcdic_ii[i];
12470 }
12471 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012472
Matthias Kloseb9621712010-04-24 17:59:49 +000012473int
12474main ()
12475{
12476return use_ascii (foo) == use_ebcdic (foo);
12477 ;
12478 return 0;
12479}
12480_ACEOF
12481if ac_fn_c_try_compile "$LINENO"; then :
12482 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12483 ac_cv_c_bigendian=yes
12484 fi
12485 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12486 if test "$ac_cv_c_bigendian" = unknown; then
12487 ac_cv_c_bigendian=no
12488 else
12489 # finding both strings is unlikely to happen, but who knows?
12490 ac_cv_c_bigendian=unknown
12491 fi
12492 fi
12493fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012494rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012495else
Matthias Kloseb9621712010-04-24 17:59:49 +000012496 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012497/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012498$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012499int
12500main ()
12501{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012502
Matthias Kloseb9621712010-04-24 17:59:49 +000012503 /* Are we little or big endian? From Harbison&Steele. */
12504 union
12505 {
12506 long int l;
12507 char c[sizeof (long int)];
12508 } u;
12509 u.l = 1;
12510 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012511
12512 ;
12513 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000012514}
Martin v. Löwis11437992002-04-12 09:54:03 +000012515_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012516if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012517 ac_cv_c_bigendian=no
12518else
Matthias Kloseb9621712010-04-24 17:59:49 +000012519 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000012520fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012521rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12522 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000012523fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012524
Matthias Kloseb9621712010-04-24 17:59:49 +000012525 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012526fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012527{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12528$as_echo "$ac_cv_c_bigendian" >&6; }
12529 case $ac_cv_c_bigendian in #(
12530 yes)
12531 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12532;; #(
12533 no)
12534 ;; #(
12535 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012536
Matthias Kloseb9621712010-04-24 17:59:49 +000012537$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012538
Matthias Kloseb9621712010-04-24 17:59:49 +000012539 ;; #(
12540 *)
Antoine Pitrouf65132d2011-02-25 23:25:17 +000012541 as_fn_error "unknown endianness
Antoine Pitrouc2244582011-01-02 19:34:03 +000012542 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000012543 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000012544
Michael W. Hudson54241132001-12-07 15:38:26 +000012545
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012546# ABI version string for Python extension modules. This appears between the
12547# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
12548# from the following attributes which affect the ABI of this Python build (in
12549# this order):
12550#
12551# * The Python implementation (always 'cpython-' for us)
12552# * The major and minor version numbers
12553# * --with-pydebug (adds a 'd')
12554# * --with-pymalloc (adds a 'm')
12555# * --with-wide-unicode (adds a 'u')
12556#
12557# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012558# would get a shared library ABI version tag of 'cpython-32dmu' and shared
12559# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012560
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012561{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
12562$as_echo_n "checking ABIFLAGS... " >&6; }
12563{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
12564$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012565{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
12566$as_echo_n "checking SOABI... " >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012567SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012568{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
12569$as_echo "$SOABI" >&6; }
12570
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012571{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
12572$as_echo_n "checking LDVERSION... " >&6; }
12573LDVERSION='$(VERSION)$(ABIFLAGS)'
12574{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
12575$as_echo "$LDVERSION" >&6; }
12576
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012577# SO is the extension of shared libraries `(including the dot!)
12578# -- usually .so, .sl on HP-UX, .dll on Cygwin
12579{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SO" >&5
12580$as_echo_n "checking SO... " >&6; }
12581if test -z "$SO"
12582then
12583 case $ac_sys_system in
12584 hp*|HP*)
12585 case `uname -m` in
12586 ia64) SO=.so;;
12587 *) SO=.sl;;
12588 esac
12589 ;;
12590 CYGWIN*) SO=.dll;;
Barry Warsaw278266f2010-10-14 17:38:46 +000012591 Linux*|GNU*)
12592 SO=.${SOABI}.so;;
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012593 *) SO=.so;;
12594 esac
12595else
12596 # this might also be a termcap variable, see #610332
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012597 echo
12598 echo '====================================================================='
12599 echo '+ +'
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012600 echo '+ WARNING: You have set SO in your environment. +'
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012601 echo '+ Do you really mean to change the extension for shared libraries? +'
12602 echo '+ Continuing in 10 seconds to let you to ponder. +'
12603 echo '+ +'
12604 echo '====================================================================='
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012605 sleep 10
12606fi
12607{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SO" >&5
12608$as_echo "$SO" >&6; }
12609
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012610# Check whether right shifting a negative integer extends the sign bit
12611# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000012612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
12613$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +000012614if test "${ac_cv_rshift_extends_sign+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012615 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000012616else
Martin v. Löwis11437992002-04-12 09:54:03 +000012617
Matthias Kloseb9621712010-04-24 17:59:49 +000012618if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000012619 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012620else
Matthias Kloseb9621712010-04-24 17:59:49 +000012621 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012622/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012623
12624int main()
12625{
Vladimir Marangozova6180282000-07-12 05:05:06 +000012626 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012627}
12628
Martin v. Löwis11437992002-04-12 09:54:03 +000012629_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012630if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000012631 ac_cv_rshift_extends_sign=yes
12632else
Matthias Kloseb9621712010-04-24 17:59:49 +000012633 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000012634fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012635rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12636 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000012637fi
12638
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012639fi
12640
Matthias Kloseb9621712010-04-24 17:59:49 +000012641{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
12642$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000012643if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012644then
Martin v. Löwis11437992002-04-12 09:54:03 +000012645
Matthias Kloseb9621712010-04-24 17:59:49 +000012646$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012647
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012648fi
12649
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012650# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000012651{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
12652$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +000012653if test "${ac_cv_have_getc_unlocked+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012654 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012655else
Martin v. Löwis11437992002-04-12 09:54:03 +000012656
Matthias Kloseb9621712010-04-24 17:59:49 +000012657cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012658/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012659#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012660int
12661main ()
12662{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012663
12664 FILE *f = fopen("/dev/null", "r");
12665 flockfile(f);
12666 getc_unlocked(f);
12667 funlockfile(f);
12668
Martin v. Löwis11437992002-04-12 09:54:03 +000012669 ;
12670 return 0;
12671}
12672_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012673if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012674 ac_cv_have_getc_unlocked=yes
12675else
Matthias Kloseb9621712010-04-24 17:59:49 +000012676 ac_cv_have_getc_unlocked=no
12677fi
12678rm -f core conftest.err conftest.$ac_objext \
12679 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012680fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012681
Matthias Kloseb9621712010-04-24 17:59:49 +000012682{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
12683$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012684if test "$ac_cv_have_getc_unlocked" = yes
12685then
Martin v. Löwis11437992002-04-12 09:54:03 +000012686
Matthias Kloseb9621712010-04-24 17:59:49 +000012687$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012688
12689fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012690
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012691# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000012692# save the value of LIBS so we don't actually link Python with readline
12693LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012694
Gregory P. Smith18820942008-09-07 06:24:49 +000012695# On some systems we need to link readline to a termcap compatible
12696# library. NOTE: Keep the precedence of listed libraries synchronised
12697# with setup.py.
12698py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012699{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
12700$as_echo_n "checking how to link readline libs... " >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012701for py_libtermcap in "" ncursesw ncurses curses termcap; do
12702 if test -z "$py_libtermcap"; then
12703 READLINE_LIBS="-lreadline"
12704 else
12705 READLINE_LIBS="-lreadline -l$py_libtermcap"
12706 fi
12707 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000012708 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012709/* end confdefs.h. */
12710
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012711/* Override any GCC internal prototype to avoid an error.
12712 Use char because int might match the return type of a GCC
12713 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012714#ifdef __cplusplus
12715extern "C"
12716#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012717char readline ();
12718int
12719main ()
12720{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012721return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012722 ;
12723 return 0;
12724}
12725_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012726if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000012727 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012728fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012729rm -f core conftest.err conftest.$ac_objext \
12730 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000012731 if test $py_cv_lib_readline = yes; then
12732 break
12733 fi
12734done
12735# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
12736#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000012737if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012738 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
12739$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012740else
Matthias Kloseb9621712010-04-24 17:59:49 +000012741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
12742$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012743
Matthias Kloseb9621712010-04-24 17:59:49 +000012744$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012745
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012746fi
12747
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012748# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000012749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
12750$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +000012751if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012752 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012753else
12754 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012755LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012756cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012757/* end confdefs.h. */
12758
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012759/* Override any GCC internal prototype to avoid an error.
12760 Use char because int might match the return type of a GCC
12761 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012762#ifdef __cplusplus
12763extern "C"
12764#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012765char rl_callback_handler_install ();
12766int
12767main ()
12768{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012769return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012770 ;
12771 return 0;
12772}
12773_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012774if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012775 ac_cv_lib_readline_rl_callback_handler_install=yes
12776else
Matthias Kloseb9621712010-04-24 17:59:49 +000012777 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012778fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012779rm -f core conftest.err conftest.$ac_objext \
12780 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012781LIBS=$ac_check_lib_save_LIBS
12782fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012783{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
12784$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +000012785if test "x$ac_cv_lib_readline_rl_callback_handler_install" = x""yes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012786
Matthias Kloseb9621712010-04-24 17:59:49 +000012787$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012788
12789fi
12790
12791
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012792# check for readline 2.2
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. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012795#include <readline/readline.h>
12796_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012797if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012798 have_readline=yes
12799else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012800 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000012801
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012802fi
Antoine Pitrouf65132d2011-02-25 23:25:17 +000012803rm -f conftest.err conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012804if test $have_readline = yes
12805then
Matthias Kloseb9621712010-04-24 17:59:49 +000012806 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012807/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012808#include <readline/readline.h>
12809
12810_ACEOF
12811if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012812 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012813
Matthias Kloseb9621712010-04-24 17:59:49 +000012814$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012815
12816fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012817rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012818
Matthias Kloseb9621712010-04-24 17:59:49 +000012819 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000012820/* end confdefs.h. */
12821#include <readline/readline.h>
12822
12823_ACEOF
12824if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012825 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000012826
Matthias Kloseb9621712010-04-24 17:59:49 +000012827$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000012828
12829fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012830rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000012831
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012832fi
12833
Martin v. Löwis0daad592001-09-30 21:09:59 +000012834# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000012835{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
12836$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +000012837if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012838 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000012839else
Martin v. Löwis11437992002-04-12 09:54:03 +000012840 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012841LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012842cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012843/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012844
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012845/* Override any GCC internal prototype to avoid an error.
12846 Use char because int might match the return type of a GCC
12847 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012848#ifdef __cplusplus
12849extern "C"
12850#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012851char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012852int
12853main ()
12854{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012855return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012856 ;
12857 return 0;
12858}
12859_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012860if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012861 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000012862else
Matthias Kloseb9621712010-04-24 17:59:49 +000012863 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000012864fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012865rm -f core conftest.err conftest.$ac_objext \
12866 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012867LIBS=$ac_check_lib_save_LIBS
12868fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012869{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
12870$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +000012871if test "x$ac_cv_lib_readline_rl_pre_input_hook" = x""yes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012872
Matthias Kloseb9621712010-04-24 17:59:49 +000012873$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000012874
Martin v. Löwis0daad592001-09-30 21:09:59 +000012875fi
12876
Michael W. Hudson54241132001-12-07 15:38:26 +000012877
Thomas Wouters89d996e2007-09-08 17:39:28 +000012878# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000012879{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
12880$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +000012881if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012882 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000012883else
12884 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012885LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012886cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000012887/* end confdefs.h. */
12888
12889/* Override any GCC internal prototype to avoid an error.
12890 Use char because int might match the return type of a GCC
12891 builtin and then its argument prototype would still apply. */
12892#ifdef __cplusplus
12893extern "C"
12894#endif
12895char rl_completion_display_matches_hook ();
12896int
12897main ()
12898{
12899return rl_completion_display_matches_hook ();
12900 ;
12901 return 0;
12902}
12903_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012904if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000012905 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
12906else
Matthias Kloseb9621712010-04-24 17:59:49 +000012907 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000012908fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012909rm -f core conftest.err conftest.$ac_objext \
12910 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000012911LIBS=$ac_check_lib_save_LIBS
12912fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012913{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
12914$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +000012915if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = x""yes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000012916
Matthias Kloseb9621712010-04-24 17:59:49 +000012917$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000012918
12919fi
12920
12921
Martin v. Löwis0daad592001-09-30 21:09:59 +000012922# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000012923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
12924$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +000012925if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012926 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000012927else
Martin v. Löwis11437992002-04-12 09:54:03 +000012928 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012929LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012930cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012931/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012932
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012933/* Override any GCC internal prototype to avoid an error.
12934 Use char because int might match the return type of a GCC
12935 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012936#ifdef __cplusplus
12937extern "C"
12938#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012939char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012940int
12941main ()
12942{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012943return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012944 ;
12945 return 0;
12946}
12947_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012948if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012949 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000012950else
Matthias Kloseb9621712010-04-24 17:59:49 +000012951 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000012952fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012953rm -f core conftest.err conftest.$ac_objext \
12954 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012955LIBS=$ac_check_lib_save_LIBS
12956fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012957{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
12958$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +000012959if test "x$ac_cv_lib_readline_rl_completion_matches" = x""yes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012960
Matthias Kloseb9621712010-04-24 17:59:49 +000012961$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000012962
Guido van Rossum353ae582001-07-10 16:45:32 +000012963fi
12964
Jack Jansendd19cf82001-12-06 22:36:17 +000012965
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012966# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000012967cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012968/* end confdefs.h. */
12969#include <readline/readline.h>
12970_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012971if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012972 have_readline=yes
12973else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012974 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000012975
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012976fi
Antoine Pitrouf65132d2011-02-25 23:25:17 +000012977rm -f conftest.err conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012978if test $have_readline = yes
12979then
Matthias Kloseb9621712010-04-24 17:59:49 +000012980 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012981/* end confdefs.h. */
12982#include <readline/readline.h>
12983
12984_ACEOF
12985if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012986 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012987
Matthias Kloseb9621712010-04-24 17:59:49 +000012988$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012989
12990fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012991rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012992
12993fi
12994
Martin v. Löwis82bca632006-02-10 20:49:30 +000012995# End of readline checks: restore LIBS
12996LIBS=$LIBS_no_readline
12997
Matthias Kloseb9621712010-04-24 17:59:49 +000012998{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
12999$as_echo_n "checking for broken nice()... " >&6; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +000013000if test "${ac_cv_broken_nice+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013001 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000013002else
Martin v. Löwis11437992002-04-12 09:54:03 +000013003
Matthias Kloseb9621712010-04-24 17:59:49 +000013004if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013005 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013006else
Matthias Kloseb9621712010-04-24 17:59:49 +000013007 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013008/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013009
13010int main()
13011{
13012 int val1 = nice(1);
13013 if (val1 != -1 && val1 == nice(2))
13014 exit(0);
13015 exit(1);
13016}
13017
Martin v. Löwis11437992002-04-12 09:54:03 +000013018_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013019if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013020 ac_cv_broken_nice=yes
13021else
Matthias Kloseb9621712010-04-24 17:59:49 +000013022 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013023fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013024rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13025 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013026fi
13027
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013028fi
13029
Matthias Kloseb9621712010-04-24 17:59:49 +000013030{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
13031$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013032if test "$ac_cv_broken_nice" = yes
13033then
Martin v. Löwis11437992002-04-12 09:54:03 +000013034
Matthias Kloseb9621712010-04-24 17:59:49 +000013035$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013036
13037fi
13038
Matthias Kloseb9621712010-04-24 17:59:49 +000013039{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
13040$as_echo_n "checking for broken poll()... " >&6; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +000013041if test "${ac_cv_broken_poll+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013042 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013043else
Matthias Kloseb9621712010-04-24 17:59:49 +000013044 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013045 ac_cv_broken_poll=no
13046else
Matthias Kloseb9621712010-04-24 17:59:49 +000013047 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013048/* end confdefs.h. */
13049
13050#include <poll.h>
13051
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013052int main()
13053{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013054 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013055 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013056
13057 close (42);
13058
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013059 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013060 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013061 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013062 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013063 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013064 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013065 return 1;
13066}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013067
13068_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013069if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013070 ac_cv_broken_poll=yes
13071else
Matthias Kloseb9621712010-04-24 17:59:49 +000013072 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013073fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013074rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13075 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013076fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013077
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013078fi
13079
Matthias Kloseb9621712010-04-24 17:59:49 +000013080{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
13081$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013082if test "$ac_cv_broken_poll" = yes
13083then
13084
Matthias Kloseb9621712010-04-24 17:59:49 +000013085$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013086
13087fi
13088
Brett Cannon43802422005-02-10 20:48:03 +000013089# 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 +000013090# (which is not required by ISO C or UNIX spec) and/or if we support
13091# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000013092ac_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 +000013093#include <$ac_cv_struct_tm>
13094
Matthias Kloseb9621712010-04-24 17:59:49 +000013095"
Antoine Pitrouf65132d2011-02-25 23:25:17 +000013096if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then :
Brett Cannon43802422005-02-10 20:48:03 +000013097
13098cat >>confdefs.h <<_ACEOF
13099#define HAVE_STRUCT_TM_TM_ZONE 1
13100_ACEOF
13101
13102
13103fi
13104
13105if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13106
Matthias Kloseb9621712010-04-24 17:59:49 +000013107$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013108
13109else
Matthias Kloseb9621712010-04-24 17:59:49 +000013110 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13111"
Antoine Pitrouf65132d2011-02-25 23:25:17 +000013112if test "x$ac_cv_have_decl_tzname" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013113 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013114else
Matthias Kloseb9621712010-04-24 17:59:49 +000013115 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013116fi
13117
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013118cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013119#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013120_ACEOF
13121
Matthias Kloseb9621712010-04-24 17:59:49 +000013122 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13123$as_echo_n "checking for tzname... " >&6; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +000013124if test "${ac_cv_var_tzname+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013125 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013126else
Matthias Kloseb9621712010-04-24 17:59:49 +000013127 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013128/* end confdefs.h. */
13129#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013130#if !HAVE_DECL_TZNAME
13131extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000013132#endif
13133
13134int
13135main ()
13136{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013137return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000013138 ;
13139 return 0;
13140}
13141_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013142if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000013143 ac_cv_var_tzname=yes
13144else
Matthias Kloseb9621712010-04-24 17:59:49 +000013145 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000013146fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013147rm -f core conftest.err conftest.$ac_objext \
13148 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013149fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013150{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13151$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000013152 if test $ac_cv_var_tzname = yes; then
13153
Matthias Kloseb9621712010-04-24 17:59:49 +000013154$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013155
13156 fi
13157fi
13158
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013159
Martin v. Löwis1d459062005-03-14 21:23:33 +000013160# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000013161{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
13162$as_echo_n "checking for working tzset()... " >&6; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +000013163if test "${ac_cv_working_tzset+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013164 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013165else
13166
Matthias Kloseb9621712010-04-24 17:59:49 +000013167if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013168 ac_cv_working_tzset=no
13169else
Matthias Kloseb9621712010-04-24 17:59:49 +000013170 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013171/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013172
13173#include <stdlib.h>
13174#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000013175#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000013176
13177#if HAVE_TZNAME
13178extern char *tzname[];
13179#endif
13180
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013181int main()
13182{
Brett Cannon18367812003-09-19 00:59:16 +000013183 /* Note that we need to ensure that not only does tzset(3)
13184 do 'something' with localtime, but it works as documented
13185 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000013186 This includes making sure that tzname is set properly if
13187 tm->tm_zone does not exist since it is the alternative way
13188 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000013189
13190 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000013191 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000013192 */
13193
Martin v. Löwis1d459062005-03-14 21:23:33 +000013194 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000013195 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
13196
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013197 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013198 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013199 if (localtime(&groundhogday)->tm_hour != 0)
13200 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013201#if HAVE_TZNAME
13202 /* For UTC, tzname[1] is sometimes "", sometimes " " */
13203 if (strcmp(tzname[0], "UTC") ||
13204 (tzname[1][0] != 0 && tzname[1][0] != ' '))
13205 exit(1);
13206#endif
Brett Cannon18367812003-09-19 00:59:16 +000013207
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013208 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013209 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013210 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013211 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013212#if HAVE_TZNAME
13213 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
13214 exit(1);
13215#endif
Brett Cannon18367812003-09-19 00:59:16 +000013216
13217 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
13218 tzset();
13219 if (localtime(&groundhogday)->tm_hour != 11)
13220 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013221#if HAVE_TZNAME
13222 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
13223 exit(1);
13224#endif
13225
13226#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000013227 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
13228 exit(1);
13229 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
13230 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013231#endif
Brett Cannon18367812003-09-19 00:59:16 +000013232
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013233 exit(0);
13234}
13235
13236_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013237if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013238 ac_cv_working_tzset=yes
13239else
Matthias Kloseb9621712010-04-24 17:59:49 +000013240 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013241fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013242rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13243 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013244fi
13245
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013246fi
13247
Matthias Kloseb9621712010-04-24 17:59:49 +000013248{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
13249$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013250if test "$ac_cv_working_tzset" = yes
13251then
13252
Matthias Kloseb9621712010-04-24 17:59:49 +000013253$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013254
13255fi
13256
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013257# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013258{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
13259$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +000013260if test "${ac_cv_stat_tv_nsec+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013261 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013262else
Matthias Kloseb9621712010-04-24 17:59:49 +000013263 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013264/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013265#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013266int
13267main ()
13268{
13269
13270struct stat st;
13271st.st_mtim.tv_nsec = 1;
13272
13273 ;
13274 return 0;
13275}
13276_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013277if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000013278 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013279else
Matthias Kloseb9621712010-04-24 17:59:49 +000013280 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013281fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013282rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13283fi
13284
Matthias Kloseb9621712010-04-24 17:59:49 +000013285{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
13286$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013287if test "$ac_cv_stat_tv_nsec" = yes
13288then
13289
Matthias Kloseb9621712010-04-24 17:59:49 +000013290$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013291
13292fi
13293
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013294# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013295{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
13296$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +000013297if test "${ac_cv_stat_tv_nsec2+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013298 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013299else
Matthias Kloseb9621712010-04-24 17:59:49 +000013300 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013301/* end confdefs.h. */
13302#include <sys/stat.h>
13303int
13304main ()
13305{
13306
13307struct stat st;
13308st.st_mtimespec.tv_nsec = 1;
13309
13310 ;
13311 return 0;
13312}
13313_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013314if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013315 ac_cv_stat_tv_nsec2=yes
13316else
Matthias Kloseb9621712010-04-24 17:59:49 +000013317 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013318fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013319rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13320fi
13321
Matthias Kloseb9621712010-04-24 17:59:49 +000013322{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
13323$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013324if test "$ac_cv_stat_tv_nsec2" = yes
13325then
13326
Matthias Kloseb9621712010-04-24 17:59:49 +000013327$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013328
13329fi
13330
Jack Jansen666b1e72001-10-31 12:11:48 +000013331# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000013332{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
13333$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +000013334if test "${ac_cv_mvwdelch_is_expression+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013335 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013336else
Matthias Kloseb9621712010-04-24 17:59:49 +000013337 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013338/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013339#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013340int
13341main ()
13342{
Jack Jansen666b1e72001-10-31 12:11:48 +000013343
13344 int rtn;
13345 rtn = mvwdelch(0,0,0);
13346
Martin v. Löwis11437992002-04-12 09:54:03 +000013347 ;
13348 return 0;
13349}
13350_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013351if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013352 ac_cv_mvwdelch_is_expression=yes
13353else
Matthias Kloseb9621712010-04-24 17:59:49 +000013354 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013355fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013356rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13357fi
13358
Matthias Kloseb9621712010-04-24 17:59:49 +000013359{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
13360$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000013361
13362if test "$ac_cv_mvwdelch_is_expression" = yes
13363then
Martin v. Löwis11437992002-04-12 09:54:03 +000013364
Matthias Kloseb9621712010-04-24 17:59:49 +000013365$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013366
13367fi
13368
Matthias Kloseb9621712010-04-24 17:59:49 +000013369{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
13370$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +000013371if test "${ac_cv_window_has_flags+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013372 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013373else
Matthias Kloseb9621712010-04-24 17:59:49 +000013374 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013375/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013376#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013377int
13378main ()
13379{
Jack Jansen666b1e72001-10-31 12:11:48 +000013380
13381 WINDOW *w;
13382 w->_flags = 0;
13383
Martin v. Löwis11437992002-04-12 09:54:03 +000013384 ;
13385 return 0;
13386}
13387_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013388if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013389 ac_cv_window_has_flags=yes
13390else
Matthias Kloseb9621712010-04-24 17:59:49 +000013391 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013392fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013393rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13394fi
13395
Matthias Kloseb9621712010-04-24 17:59:49 +000013396{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
13397$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013398
Jack Jansen666b1e72001-10-31 12:11:48 +000013399
13400if test "$ac_cv_window_has_flags" = yes
13401then
Martin v. Löwis11437992002-04-12 09:54:03 +000013402
Matthias Kloseb9621712010-04-24 17:59:49 +000013403$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013404
13405fi
13406
Matthias Kloseb9621712010-04-24 17:59:49 +000013407{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
13408$as_echo_n "checking for is_term_resized... " >&6; }
13409cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013410/* end confdefs.h. */
13411#include <curses.h>
13412int
13413main ()
13414{
13415void *x=is_term_resized
13416 ;
13417 return 0;
13418}
13419_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013420if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013421
Matthias Kloseb9621712010-04-24 17:59:49 +000013422$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013423
Matthias Kloseb159a552010-04-25 21:00:44 +000013424 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013425$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013426else
Matthias Kloseb9621712010-04-24 17:59:49 +000013427 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13428$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013429
13430fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013431rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13432
Matthias Kloseb9621712010-04-24 17:59:49 +000013433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
13434$as_echo_n "checking for resize_term... " >&6; }
13435cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013436/* end confdefs.h. */
13437#include <curses.h>
13438int
13439main ()
13440{
13441void *x=resize_term
13442 ;
13443 return 0;
13444}
13445_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013446if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013447
Matthias Kloseb9621712010-04-24 17:59:49 +000013448$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013449
Matthias Kloseb159a552010-04-25 21:00:44 +000013450 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013451$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013452else
Matthias Kloseb9621712010-04-24 17:59:49 +000013453 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13454$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013455
13456fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013457rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13458
Matthias Kloseb9621712010-04-24 17:59:49 +000013459{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
13460$as_echo_n "checking for resizeterm... " >&6; }
13461cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013462/* end confdefs.h. */
13463#include <curses.h>
13464int
13465main ()
13466{
13467void *x=resizeterm
13468 ;
13469 return 0;
13470}
13471_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013472if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013473
Matthias Kloseb9621712010-04-24 17:59:49 +000013474$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013475
Matthias Kloseb159a552010-04-25 21:00:44 +000013476 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013477$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013478else
Matthias Kloseb9621712010-04-24 17:59:49 +000013479 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13480$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013481
13482fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013483rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13484
Matthias Kloseb9621712010-04-24 17:59:49 +000013485{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
13486$as_echo_n "checking for /dev/ptmx... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013487
13488if test -r /dev/ptmx
13489then
Matthias Kloseb9621712010-04-24 17:59:49 +000013490 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13491$as_echo "yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013492
Matthias Kloseb9621712010-04-24 17:59:49 +000013493$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013494
Thomas Wouters89f507f2006-12-13 04:49:30 +000013495else
Matthias Kloseb9621712010-04-24 17:59:49 +000013496 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13497$as_echo "no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013498fi
13499
Matthias Kloseb9621712010-04-24 17:59:49 +000013500{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
13501$as_echo_n "checking for /dev/ptc... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013502
13503if test -r /dev/ptc
13504then
Matthias Kloseb9621712010-04-24 17:59:49 +000013505 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13506$as_echo "yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013507
Matthias Kloseb9621712010-04-24 17:59:49 +000013508$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000013509
Thomas Wouters89f507f2006-12-13 04:49:30 +000013510else
Matthias Kloseb9621712010-04-24 17:59:49 +000013511 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13512$as_echo "no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013513fi
13514
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013515if test "$have_long_long" = yes
13516then
Matthias Kloseb9621712010-04-24 17:59:49 +000013517 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
13518$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +000013519 if test "${ac_cv_have_long_long_format+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013520 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013521else
Matthias Kloseb9621712010-04-24 17:59:49 +000013522 if test "$cross_compiling" = yes; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013523 ac_cv_have_long_long_format=no
13524else
Matthias Kloseb9621712010-04-24 17:59:49 +000013525 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013526/* end confdefs.h. */
13527
13528 #include <stdio.h>
13529 #include <stddef.h>
13530 #include <string.h>
13531
13532 #ifdef HAVE_SYS_TYPES_H
13533 #include <sys/types.h>
13534 #endif
13535
13536 int main()
13537 {
13538 char buffer[256];
13539
13540 if (sprintf(buffer, "%lld", (long long)123) < 0)
13541 return 1;
13542 if (strcmp(buffer, "123"))
13543 return 1;
13544
13545 if (sprintf(buffer, "%lld", (long long)-123) < 0)
13546 return 1;
13547 if (strcmp(buffer, "-123"))
13548 return 1;
13549
13550 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
13551 return 1;
13552 if (strcmp(buffer, "123"))
13553 return 1;
13554
13555 return 0;
13556 }
13557
13558_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013559if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013560 ac_cv_have_long_long_format=yes
13561else
Matthias Kloseb9621712010-04-24 17:59:49 +000013562 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013563fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013564rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13565 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013566fi
13567
13568
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013569fi
13570
Matthias Kloseb9621712010-04-24 17:59:49 +000013571 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
13572$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013573fi
13574
Mark Dickinson89d7d412009-12-31 20:50:59 +000013575if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013576then
13577
Matthias Kloseb9621712010-04-24 17:59:49 +000013578$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013579
13580fi
13581
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000013582if test $ac_sys_system = Darwin
13583then
13584 LIBS="$LIBS -framework CoreFoundation"
13585fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013586
Matthias Kloseb9621712010-04-24 17:59:49 +000013587{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
13588$as_echo_n "checking for %zd printf() format support... " >&6; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +000013589if test "${ac_cv_have_size_t_format+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013590 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013591else
Matthias Kloseb9621712010-04-24 17:59:49 +000013592 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000013593 ac_cv_have_size_t_format="cross -- assuming yes"
13594
Thomas Wouters477c8d52006-05-27 19:21:47 +000013595else
Matthias Kloseb9621712010-04-24 17:59:49 +000013596 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000013597/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013598
Thomas Wouters477c8d52006-05-27 19:21:47 +000013599#include <stdio.h>
13600#include <stddef.h>
13601#include <string.h>
13602
Christian Heimes2c181612007-12-17 20:04:13 +000013603#ifdef HAVE_SYS_TYPES_H
13604#include <sys/types.h>
13605#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000013606
13607#ifdef HAVE_SSIZE_T
13608typedef ssize_t Py_ssize_t;
13609#elif SIZEOF_VOID_P == SIZEOF_LONG
13610typedef long Py_ssize_t;
13611#else
13612typedef int Py_ssize_t;
13613#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000013614
Christian Heimes2c181612007-12-17 20:04:13 +000013615int main()
13616{
13617 char buffer[256];
13618
Thomas Wouters477c8d52006-05-27 19:21:47 +000013619 if(sprintf(buffer, "%zd", (size_t)123) < 0)
13620 return 1;
13621
Thomas Wouters89f507f2006-12-13 04:49:30 +000013622 if (strcmp(buffer, "123"))
13623 return 1;
13624
13625 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
13626 return 1;
13627
13628 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000013629 return 1;
13630
13631 return 0;
13632}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013633
Thomas Wouters477c8d52006-05-27 19:21:47 +000013634_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013635if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013636 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013637else
Matthias Kloseb9621712010-04-24 17:59:49 +000013638 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013639fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013640rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13641 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013642fi
13643
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013644fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013645{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
13646$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000013647if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013648
Matthias Kloseb9621712010-04-24 17:59:49 +000013649$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013650
13651fi
13652
Matthias Kloseb9621712010-04-24 17:59:49 +000013653ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000013654#ifdef HAVE_SYS_TYPES_H
13655#include <sys/types.h>
13656#endif
13657#ifdef HAVE_SYS_SOCKET_H
13658#include <sys/socket.h>
13659#endif
13660
Matthias Kloseb9621712010-04-24 17:59:49 +000013661"
Antoine Pitrouf65132d2011-02-25 23:25:17 +000013662if test "x$ac_cv_type_socklen_t" = x""yes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000013663
Martin v. Löwis11437992002-04-12 09:54:03 +000013664else
Guido van Rossum95713eb2000-05-18 20:53:31 +000013665
Matthias Kloseb9621712010-04-24 17:59:49 +000013666$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000013667
13668fi
13669
Michael W. Hudson54241132001-12-07 15:38:26 +000013670
Matthias Kloseb9621712010-04-24 17:59:49 +000013671{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
13672$as_echo_n "checking for broken mbstowcs... " >&6; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +000013673if test "${ac_cv_broken_mbstowcs+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013674 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013675else
Matthias Kloseb9621712010-04-24 17:59:49 +000013676 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000013677 ac_cv_broken_mbstowcs=no
13678else
Matthias Kloseb9621712010-04-24 17:59:49 +000013679 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000013680/* end confdefs.h. */
13681
13682#include<stdlib.h>
13683int main() {
13684 size_t len = -1;
13685 const char *str = "text";
13686 len = mbstowcs(NULL, str, 0);
13687 return (len != 4);
13688}
13689
13690_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013691if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000013692 ac_cv_broken_mbstowcs=no
13693else
Matthias Kloseb9621712010-04-24 17:59:49 +000013694 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000013695fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013696rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13697 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000013698fi
13699
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013700fi
13701
Matthias Kloseb9621712010-04-24 17:59:49 +000013702{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
13703$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000013704if test "$ac_cv_broken_mbstowcs" = yes
13705then
13706
Matthias Kloseb9621712010-04-24 17:59:49 +000013707$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000013708
13709fi
13710
Antoine Pitrou042b1282010-08-13 21:15:58 +000013711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
13712$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
Antoine Pitrouf65132d2011-02-25 23:25:17 +000013713if test "${ac_cv_computed_gotos+set}" = set; then :
Antoine Pitrou042b1282010-08-13 21:15:58 +000013714 $as_echo_n "(cached) " >&6
13715else
13716 if test "$cross_compiling" = yes; then :
13717 ac_cv_computed_gotos=no
13718else
13719 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13720/* end confdefs.h. */
13721
13722int main(int argc, char **argv)
13723{
13724 static void *targets[1] = { &&LABEL1 };
13725 goto LABEL2;
13726LABEL1:
13727 return 0;
13728LABEL2:
13729 goto *targets[0];
13730 return 1;
13731}
13732
13733_ACEOF
13734if ac_fn_c_try_run "$LINENO"; then :
13735 ac_cv_computed_gotos=yes
13736else
13737 ac_cv_computed_gotos=no
13738fi
13739rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13740 conftest.$ac_objext conftest.beam conftest.$ac_ext
13741fi
13742
13743fi
13744
13745{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
13746$as_echo "$ac_cv_computed_gotos" >&6; }
13747if test "$ac_cv_computed_gotos" = yes
13748then
13749
13750$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
13751
13752fi
13753
Antoine Pitroub52ec782009-01-25 16:34:23 +000013754# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000013755{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
13756$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013757
13758# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013759if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000013760 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000013761if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000013762then
13763
Matthias Kloseb9621712010-04-24 17:59:49 +000013764$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000013765
Matthias Kloseb9621712010-04-24 17:59:49 +000013766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13767$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013768fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000013769if test "$withval" = no
13770then
13771
13772$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
13773
Matthias Kloseb9621712010-04-24 17:59:49 +000013774 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13775$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013776fi
13777
Antoine Pitrou042b1282010-08-13 21:15:58 +000013778else
13779 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
13780$as_echo "no value specified" >&6; }
13781fi
13782
Antoine Pitroub52ec782009-01-25 16:34:23 +000013783
Benjamin Petersond8d835b2010-10-15 23:14:46 +000013784case $ac_sys_system in
13785AIX*)
13786
13787$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
13788 ;;
13789esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000013790
Michael W. Hudson54241132001-12-07 15:38:26 +000013791
Jesus Cea6a792292010-05-03 21:18:48 +000013792case $ac_sys_system in
Antoine Pitrouf65132d2011-02-25 23:25:17 +000013793 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 +000013794esac
13795
Gregory P. Smith138fa432010-12-13 08:00:52 +000013796ac_fn_c_check_func "$LINENO" "pipe2" "ac_cv_func_pipe2"
Antoine Pitrouf65132d2011-02-25 23:25:17 +000013797if test "x$ac_cv_func_pipe2" = x""yes; then :
Gregory P. Smith138fa432010-12-13 08:00:52 +000013798
13799$as_echo "#define HAVE_PIPE2 1" >>confdefs.h
13800
13801fi
Jesus Cea6a792292010-05-03 21:18:48 +000013802
13803
Mark Dickinsonb2153e92010-05-05 22:31:36 +000013804
13805
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000013806for h in `(cd $srcdir;echo Python/thread_*.h)`
13807do
13808 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
13809done
13810
Michael W. Hudson54241132001-12-07 15:38:26 +000013811
Neal Norwitzd24499d2005-12-18 21:36:39 +000013812SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Kloseb9621712010-04-24 17:59:49 +000013813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
13814$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013815for dir in $SRCDIRS; do
13816 if test ! -d $dir; then
13817 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000013818 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013819done
Matthias Kloseb9621712010-04-24 17:59:49 +000013820{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
13821$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000013822
Guido van Rossum627b2d71993-12-24 10:39:16 +000013823# generate output files
Antoine Pitrou20327222009-05-24 20:39:11 +000013824ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000013825
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000013826ac_config_files="$ac_config_files Modules/ld_so_aix"
13827
Martin v. Löwis11437992002-04-12 09:54:03 +000013828cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013829# This file is a shell script that caches the results of configure
13830# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000013831# scripts and configure runs, see configure's option --config-cache.
13832# It is not useful on other systems. If it contains results you don't
13833# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013834#
Martin v. Löwis11437992002-04-12 09:54:03 +000013835# config.status only pays attention to the cache file if you give it
13836# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013837#
Skip Montanaro6dead952003-09-25 14:50:04 +000013838# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000013839# loading this file, other *unset* `ac_cv_foo' will be assigned the
13840# following values.
13841
13842_ACEOF
13843
Guido van Rossumf78abae1997-01-21 22:02:36 +000013844# The following way of writing the cache mishandles newlines in values,
13845# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013846# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013847# Ultrix sh set writes to stderr and can't be redirected directly,
13848# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013849(
13850 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
13851 eval ac_val=\$$ac_var
13852 case $ac_val in #(
13853 *${as_nl}*)
13854 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000013855 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
13856$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013857 esac
13858 case $ac_var in #(
13859 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000013860 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
13861 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013862 esac ;;
13863 esac
13864 done
13865
Martin v. Löwis11437992002-04-12 09:54:03 +000013866 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013867 case $as_nl`(ac_space=' '; set) 2>&1` in #(
13868 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000013869 # `set' does not quote correctly, so add quotes: double-quote
13870 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000013871 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013872 "s/'/'\\\\''/g;
13873 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013874 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000013875 *)
13876 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013877 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000013878 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013879 esac |
13880 sort
13881) |
Martin v. Löwis11437992002-04-12 09:54:03 +000013882 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013883 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000013884 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013885 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000013886 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
13887 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013888 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
13889 :end' >>confcache
13890if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
13891 if test -w "$cache_file"; then
Antoine Pitrouf65132d2011-02-25 23:25:17 +000013892 test "x$cache_file" != "x/dev/null" &&
Matthias Kloseb9621712010-04-24 17:59:49 +000013893 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
13894$as_echo "$as_me: updating cache $cache_file" >&6;}
Antoine Pitrouf65132d2011-02-25 23:25:17 +000013895 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013896 else
Matthias Kloseb9621712010-04-24 17:59:49 +000013897 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
13898$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013899 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013900fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013901rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000013902
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013903test "x$prefix" = xNONE && prefix=$ac_default_prefix
13904# Let make expand exec_prefix.
13905test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000013906
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013907DEFS=-DHAVE_CONFIG_H
13908
Skip Montanaro6dead952003-09-25 14:50:04 +000013909ac_libobjs=
13910ac_ltlibobjs=
13911for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
13912 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013913 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000013914 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013915 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
13916 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000013917 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
13918 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000013919done
13920LIBOBJS=$ac_libobjs
13921
13922LTLIBOBJS=$ac_ltlibobjs
13923
13924
Martin v. Löwis11437992002-04-12 09:54:03 +000013925
Matthias Kloseb9621712010-04-24 17:59:49 +000013926
Antoine Pitrouf65132d2011-02-25 23:25:17 +000013927: ${CONFIG_STATUS=./config.status}
Matthias Kloseb9621712010-04-24 17:59:49 +000013928ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000013929ac_clean_files_save=$ac_clean_files
13930ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013931{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
13932$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
13933as_write_fail=0
13934cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000013935#! $SHELL
13936# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000013937# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013938# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000013939# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000013940
Martin v. Löwis11437992002-04-12 09:54:03 +000013941debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000013942ac_cs_recheck=false
13943ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000013944
Matthias Kloseb9621712010-04-24 17:59:49 +000013945SHELL=\${CONFIG_SHELL-$SHELL}
13946export SHELL
13947_ASEOF
13948cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
13949## -------------------- ##
13950## M4sh Initialization. ##
13951## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000013952
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013953# Be more Bourne compatible
13954DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000013955if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013956 emulate sh
13957 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000013958 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000013959 # is contrary to our usage. Disable this feature.
13960 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013961 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013962else
Matthias Kloseb9621712010-04-24 17:59:49 +000013963 case `(set -o) 2>/dev/null` in #(
13964 *posix*) :
13965 set -o posix ;; #(
13966 *) :
13967 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013968esac
Michael W. Hudson54241132001-12-07 15:38:26 +000013969fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000013970
13971
Matthias Kloseb9621712010-04-24 17:59:49 +000013972as_nl='
13973'
13974export as_nl
13975# Printing a long string crashes Solaris 7 /usr/bin/printf.
13976as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
13977as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
13978as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
13979# Prefer a ksh shell builtin over an external printf program on Solaris,
13980# but without wasting forks for bash or zsh.
13981if test -z "$BASH_VERSION$ZSH_VERSION" \
13982 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
13983 as_echo='print -r --'
13984 as_echo_n='print -rn --'
13985elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
13986 as_echo='printf %s\n'
13987 as_echo_n='printf %s'
13988else
13989 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
13990 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
13991 as_echo_n='/usr/ucb/echo -n'
13992 else
13993 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
13994 as_echo_n_body='eval
13995 arg=$1;
13996 case $arg in #(
13997 *"$as_nl"*)
13998 expr "X$arg" : "X\\(.*\\)$as_nl";
13999 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
14000 esac;
14001 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
14002 '
14003 export as_echo_n_body
14004 as_echo_n='sh -c $as_echo_n_body as_echo'
14005 fi
14006 export as_echo_body
14007 as_echo='sh -c $as_echo_body as_echo'
14008fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014009
14010# The user is always right.
14011if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014012 PATH_SEPARATOR=:
14013 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
14014 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
14015 PATH_SEPARATOR=';'
14016 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014017fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014018
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014019
14020# IFS
14021# We need space, tab and new line, in precisely that order. Quoting is
14022# there to prevent editors from complaining about space-tab.
14023# (If _AS_PATH_WALK were called with IFS unset, it would disable word
14024# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014025IFS=" "" $as_nl"
14026
14027# Find who we are. Look in the path if we contain no directory separator.
Matthias Kloseb9621712010-04-24 17:59:49 +000014028case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014029 *[\\/]* ) as_myself=$0 ;;
14030 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000014031for as_dir in $PATH
14032do
14033 IFS=$as_save_IFS
14034 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000014035 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
14036 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014037IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000014038
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014039 ;;
14040esac
14041# We did not find ourselves, most probably we were run as `sh COMMAND'
14042# in which case we are not to be found in the path.
14043if test "x$as_myself" = x; then
14044 as_myself=$0
14045fi
14046if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014047 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
14048 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014049fi
14050
Matthias Kloseb9621712010-04-24 17:59:49 +000014051# Unset variables that we do not need and which cause bugs (e.g. in
14052# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
14053# suppresses any "Segmentation fault" message there. '((' could
14054# trigger a bug in pdksh 5.2.14.
14055for as_var in BASH_ENV ENV MAIL MAILPATH
14056do eval test x\${$as_var+set} = xset \
14057 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014058done
14059PS1='$ '
14060PS2='> '
14061PS4='+ '
14062
14063# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000014064LC_ALL=C
14065export LC_ALL
14066LANGUAGE=C
14067export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014068
Matthias Kloseb9621712010-04-24 17:59:49 +000014069# CDPATH.
14070(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
14071
14072
Antoine Pitrouf65132d2011-02-25 23:25:17 +000014073# as_fn_error ERROR [LINENO LOG_FD]
14074# ---------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000014075# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
14076# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Antoine Pitrouf65132d2011-02-25 23:25:17 +000014077# script with status $?, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000014078as_fn_error ()
14079{
Antoine Pitrouf65132d2011-02-25 23:25:17 +000014080 as_status=$?; test $as_status -eq 0 && as_status=1
14081 if test "$3"; then
14082 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
14083 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
Matthias Kloseb9621712010-04-24 17:59:49 +000014084 fi
Antoine Pitrouf65132d2011-02-25 23:25:17 +000014085 $as_echo "$as_me: error: $1" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000014086 as_fn_exit $as_status
14087} # as_fn_error
14088
14089
14090# as_fn_set_status STATUS
14091# -----------------------
14092# Set $? to STATUS, without forking.
14093as_fn_set_status ()
14094{
14095 return $1
14096} # as_fn_set_status
14097
14098# as_fn_exit STATUS
14099# -----------------
14100# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
14101as_fn_exit ()
14102{
14103 set +e
14104 as_fn_set_status $1
14105 exit $1
14106} # as_fn_exit
14107
14108# as_fn_unset VAR
14109# ---------------
14110# Portably unset VAR.
14111as_fn_unset ()
14112{
14113 { eval $1=; unset $1;}
14114}
14115as_unset=as_fn_unset
14116# as_fn_append VAR VALUE
14117# ----------------------
14118# Append the text in VALUE to the end of the definition contained in VAR. Take
14119# advantage of any shell optimizations that allow amortized linear growth over
14120# repeated appends, instead of the typical quadratic growth present in naive
14121# implementations.
14122if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
14123 eval 'as_fn_append ()
14124 {
14125 eval $1+=\$2
14126 }'
14127else
14128 as_fn_append ()
14129 {
14130 eval $1=\$$1\$2
14131 }
14132fi # as_fn_append
14133
14134# as_fn_arith ARG...
14135# ------------------
14136# Perform arithmetic evaluation on the ARGs, and store the result in the
14137# global $as_val. Take advantage of shells that can avoid forks. The arguments
14138# must be portable across $(()) and expr.
14139if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
14140 eval 'as_fn_arith ()
14141 {
14142 as_val=$(( $* ))
14143 }'
14144else
14145 as_fn_arith ()
14146 {
14147 as_val=`expr "$@" || test $? -eq 1`
14148 }
14149fi # as_fn_arith
14150
14151
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014152if expr a : '\(a\)' >/dev/null 2>&1 &&
14153 test "X`expr 00001 : '.*\(...\)'`" = X001; then
14154 as_expr=expr
14155else
14156 as_expr=false
14157fi
14158
14159if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
14160 as_basename=basename
14161else
14162 as_basename=false
14163fi
14164
Matthias Kloseb9621712010-04-24 17:59:49 +000014165if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
14166 as_dirname=dirname
14167else
14168 as_dirname=false
14169fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014170
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014171as_me=`$as_basename -- "$0" ||
14172$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
14173 X"$0" : 'X\(//\)$' \| \
14174 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014175$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014176 sed '/^.*\/\([^/][^/]*\)\/*$/{
14177 s//\1/
14178 q
14179 }
14180 /^X\/\(\/\/\)$/{
14181 s//\1/
14182 q
14183 }
14184 /^X\/\(\/\).*/{
14185 s//\1/
14186 q
14187 }
14188 s/.*/./; q'`
14189
Matthias Kloseb9621712010-04-24 17:59:49 +000014190# Avoid depending upon Character Ranges.
14191as_cr_letters='abcdefghijklmnopqrstuvwxyz'
14192as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14193as_cr_Letters=$as_cr_letters$as_cr_LETTERS
14194as_cr_digits='0123456789'
14195as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014196
14197ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000014198case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014199-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014200 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014201 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000014202 xy) ECHO_C='\c';;
14203 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
14204 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014205 esac;;
14206*)
14207 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000014208esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014209
Martin v. Löwis11437992002-04-12 09:54:03 +000014210rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014211if test -d conf$$.dir; then
14212 rm -f conf$$.dir/conf$$.file
14213else
14214 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000014215 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014216fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014217if (echo >conf$$.file) 2>/dev/null; then
14218 if ln -s conf$$.file conf$$ 2>/dev/null; then
14219 as_ln_s='ln -s'
14220 # ... but there are two gotchas:
14221 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
14222 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
14223 # In both cases, we have to default to `cp -p'.
14224 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
14225 as_ln_s='cp -p'
14226 elif ln conf$$.file conf$$ 2>/dev/null; then
14227 as_ln_s=ln
14228 else
Martin v. Löwis11437992002-04-12 09:54:03 +000014229 as_ln_s='cp -p'
Matthias Kloseb9621712010-04-24 17:59:49 +000014230 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014231else
14232 as_ln_s='cp -p'
14233fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014234rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
14235rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000014236
Matthias Kloseb9621712010-04-24 17:59:49 +000014237
14238# as_fn_mkdir_p
14239# -------------
14240# Create "$as_dir" as a directory, including parents if necessary.
14241as_fn_mkdir_p ()
14242{
14243
14244 case $as_dir in #(
14245 -*) as_dir=./$as_dir;;
14246 esac
14247 test -d "$as_dir" || eval $as_mkdir_p || {
14248 as_dirs=
14249 while :; do
14250 case $as_dir in #(
14251 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
14252 *) as_qdir=$as_dir;;
14253 esac
14254 as_dirs="'$as_qdir' $as_dirs"
14255 as_dir=`$as_dirname -- "$as_dir" ||
14256$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
14257 X"$as_dir" : 'X\(//\)[^/]' \| \
14258 X"$as_dir" : 'X\(//\)$' \| \
14259 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
14260$as_echo X"$as_dir" |
14261 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14262 s//\1/
14263 q
14264 }
14265 /^X\(\/\/\)[^/].*/{
14266 s//\1/
14267 q
14268 }
14269 /^X\(\/\/\)$/{
14270 s//\1/
14271 q
14272 }
14273 /^X\(\/\).*/{
14274 s//\1/
14275 q
14276 }
14277 s/.*/./; q'`
14278 test -d "$as_dir" && break
14279 done
14280 test -z "$as_dirs" || eval "mkdir $as_dirs"
Antoine Pitrouf65132d2011-02-25 23:25:17 +000014281 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000014282
14283
14284} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000014285if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014286 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000014287else
Skip Montanarof0d5f792004-08-15 14:08:23 +000014288 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000014289 as_mkdir_p=false
14290fi
14291
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014292if test -x / >/dev/null 2>&1; then
14293 as_test_x='test -x'
14294else
14295 if ls -dL / >/dev/null 2>&1; then
14296 as_ls_L_option=L
14297 else
14298 as_ls_L_option=
14299 fi
14300 as_test_x='
14301 eval sh -c '\''
14302 if test -d "$1"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014303 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014304 else
Matthias Kloseb9621712010-04-24 17:59:49 +000014305 case $1 in #(
14306 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014307 esac;
Matthias Kloseb9621712010-04-24 17:59:49 +000014308 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014309 ???[sx]*):;;*)false;;esac;fi
14310 '\'' sh
14311 '
14312fi
14313as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000014314
14315# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014316as_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 +000014317
14318# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014319as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014320
14321
Martin v. Löwis11437992002-04-12 09:54:03 +000014322exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000014323## ----------------------------------- ##
14324## Main body of $CONFIG_STATUS script. ##
14325## ----------------------------------- ##
14326_ASEOF
14327test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014328
Matthias Kloseb9621712010-04-24 17:59:49 +000014329cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14330# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000014331# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014332# values after options handling.
14333ac_log="
Georg Brandl3ebb6b32011-02-20 10:37:07 +000014334This file was extended by python $as_me 3.3, which was
Antoine Pitrouf65132d2011-02-25 23:25:17 +000014335generated by GNU Autoconf 2.65. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000014336
14337 CONFIG_FILES = $CONFIG_FILES
14338 CONFIG_HEADERS = $CONFIG_HEADERS
14339 CONFIG_LINKS = $CONFIG_LINKS
14340 CONFIG_COMMANDS = $CONFIG_COMMANDS
14341 $ $0 $@
14342
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014343on `(hostname || uname -n) 2>/dev/null | sed 1q`
14344"
14345
Martin v. Löwis11437992002-04-12 09:54:03 +000014346_ACEOF
14347
Matthias Kloseb9621712010-04-24 17:59:49 +000014348case $ac_config_files in *"
14349"*) set x $ac_config_files; shift; ac_config_files=$*;;
14350esac
14351
14352case $ac_config_headers in *"
14353"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
14354esac
14355
14356
14357cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014358# Files that config.status was made for.
Antoine Pitrouf65132d2011-02-25 23:25:17 +000014359config_files="`echo $ac_config_files`"
14360config_headers="`echo $ac_config_headers`"
Martin v. Löwis11437992002-04-12 09:54:03 +000014361
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014362_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014363
Matthias Kloseb9621712010-04-24 17:59:49 +000014364cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014365ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000014366\`$as_me' instantiates files and other configuration actions
14367from templates according to the current configuration. Unless the files
14368and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000014369
Matthias Kloseb9621712010-04-24 17:59:49 +000014370Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000014371
14372 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014373 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000014374 --config print configuration, then exit
14375 -q, --quiet, --silent
14376 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000014377 -d, --debug don't remove temporary files
14378 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000014379 --file=FILE[:TEMPLATE]
14380 instantiate the configuration file FILE
14381 --header=FILE[:TEMPLATE]
14382 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000014383
14384Configuration files:
14385$config_files
14386
14387Configuration headers:
14388$config_headers
14389
Matthias Kloseb9621712010-04-24 17:59:49 +000014390Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014391
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014392_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014393cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14394ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000014395ac_cs_version="\\
Georg Brandl3ebb6b32011-02-20 10:37:07 +000014396python config.status 3.3
Antoine Pitrouf65132d2011-02-25 23:25:17 +000014397configured by $0, generated by GNU Autoconf 2.65,
Matthias Kloseb9621712010-04-24 17:59:49 +000014398 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000014399
Antoine Pitrouf65132d2011-02-25 23:25:17 +000014400Copyright (C) 2009 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000014401This config.status script is free software; the Free Software Foundation
14402gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014403
14404ac_pwd='$ac_pwd'
14405srcdir='$srcdir'
14406INSTALL='$INSTALL'
Matthias Kloseb9621712010-04-24 17:59:49 +000014407test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000014408_ACEOF
14409
Matthias Kloseb9621712010-04-24 17:59:49 +000014410cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14411# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000014412ac_need_defaults=:
14413while test $# != 0
14414do
14415 case $1 in
Antoine Pitrouf65132d2011-02-25 23:25:17 +000014416 --*=*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014417 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14418 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000014419 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000014420 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014421 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000014422 ac_option=$1
14423 ac_optarg=$2
14424 ac_shift=shift
14425 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014426 esac
14427
Skip Montanaro6dead952003-09-25 14:50:04 +000014428 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000014429 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000014430 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14431 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014432 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000014433 $as_echo "$ac_cs_version"; exit ;;
14434 --config | --confi | --conf | --con | --co | --c )
14435 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014436 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000014437 debug=: ;;
14438 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000014439 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014440 case $ac_optarg in
14441 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14442 esac
14443 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014444 ac_need_defaults=false;;
14445 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000014446 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014447 case $ac_optarg in
14448 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14449 esac
14450 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014451 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014452 --he | --h)
14453 # Conflict between --help and --header
Antoine Pitrouf65132d2011-02-25 23:25:17 +000014454 as_fn_error "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000014455Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014456 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000014457 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000014458 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
14459 | -silent | --silent | --silen | --sile | --sil | --si | --s)
14460 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014461
14462 # This is an error.
Antoine Pitrouf65132d2011-02-25 23:25:17 +000014463 -*) as_fn_error "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000014464Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014465
Matthias Kloseb9621712010-04-24 17:59:49 +000014466 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014467 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014468
14469 esac
14470 shift
14471done
14472
Skip Montanaro6dead952003-09-25 14:50:04 +000014473ac_configure_extra_args=
14474
14475if $ac_cs_silent; then
14476 exec 6>/dev/null
14477 ac_configure_extra_args="$ac_configure_extra_args --silent"
14478fi
14479
14480_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014481cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000014482if \$ac_cs_recheck; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014483 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
14484 shift
14485 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
14486 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014487 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000014488 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000014489fi
14490
Martin v. Löwis11437992002-04-12 09:54:03 +000014491_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014492cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014493exec 5>>config.log
14494{
14495 echo
14496 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
14497## Running $as_me. ##
14498_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000014499 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014500} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014501
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014502_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014503cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014504_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014505
Matthias Kloseb9621712010-04-24 17:59:49 +000014506cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014507
14508# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000014509for ac_config_target in $ac_config_targets
14510do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014511 case $ac_config_target in
14512 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
14513 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
14514 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014515 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
14516 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014517 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
14518 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000014519 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000014520 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014521
Antoine Pitrouf65132d2011-02-25 23:25:17 +000014522 *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014523 esac
14524done
14525
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014526
Martin v. Löwis11437992002-04-12 09:54:03 +000014527# If the user did not use the arguments to specify the items to instantiate,
14528# then the envvar interface is used. Set only those that are not.
14529# We use the long form for the default assignment because of an extremely
14530# bizarre bug on SunOS 4.1.3.
14531if $ac_need_defaults; then
14532 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
14533 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
14534fi
14535
Skip Montanaro6dead952003-09-25 14:50:04 +000014536# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014537# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000014538# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014539# Hook for its removal unless debugging.
14540# Note that there is a small window in which the directory will not be cleaned:
14541# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000014542$debug ||
14543{
Antoine Pitrouf65132d2011-02-25 23:25:17 +000014544 tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014545 trap 'exit_status=$?
Antoine Pitrouf65132d2011-02-25 23:25:17 +000014546 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014547' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000014548 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000014549}
Martin v. Löwis11437992002-04-12 09:54:03 +000014550# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000014551
Martin v. Löwis11437992002-04-12 09:54:03 +000014552{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014553 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Antoine Pitrouf65132d2011-02-25 23:25:17 +000014554 test -n "$tmp" && test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000014555} ||
14556{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014557 tmp=./conf$$-$RANDOM
14558 (umask 077 && mkdir "$tmp")
Antoine Pitrouf65132d2011-02-25 23:25:17 +000014559} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000014560
Matthias Kloseb9621712010-04-24 17:59:49 +000014561# Set up the scripts for CONFIG_FILES section.
14562# No need to generate them if there are no CONFIG_FILES.
14563# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014564if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014565
Matthias Kloseb9621712010-04-24 17:59:49 +000014566
14567ac_cr=`echo X | tr X '\015'`
14568# On cygwin, bash can eat \r inside `` if the user requested igncr.
14569# But we know of no other shell where ac_cr would be empty at this
14570# point, so we can use a bashism as a fallback.
14571if test "x$ac_cr" = x; then
14572 eval ac_cr=\$\'\\r\'
14573fi
14574ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
14575if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Antoine Pitrouf65132d2011-02-25 23:25:17 +000014576 ac_cs_awk_cr='\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000014577else
14578 ac_cs_awk_cr=$ac_cr
14579fi
14580
Antoine Pitrouf65132d2011-02-25 23:25:17 +000014581echo 'BEGIN {' >"$tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000014582_ACEOF
14583
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014584
Matthias Kloseb9621712010-04-24 17:59:49 +000014585{
14586 echo "cat >conf$$subs.awk <<_ACEOF" &&
14587 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
14588 echo "_ACEOF"
14589} >conf$$subs.sh ||
Antoine Pitrouf65132d2011-02-25 23:25:17 +000014590 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
14591ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014592ac_delim='%!_!# '
14593for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000014594 . ./conf$$subs.sh ||
Antoine Pitrouf65132d2011-02-25 23:25:17 +000014595 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014596
Matthias Kloseb9621712010-04-24 17:59:49 +000014597 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
14598 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014599 break
14600 elif $ac_last_try; then
Antoine Pitrouf65132d2011-02-25 23:25:17 +000014601 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014602 else
14603 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000014604 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014605done
Matthias Kloseb9621712010-04-24 17:59:49 +000014606rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014607
Matthias Kloseb9621712010-04-24 17:59:49 +000014608cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Antoine Pitrouf65132d2011-02-25 23:25:17 +000014609cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014610_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014611sed -n '
14612h
14613s/^/S["/; s/!.*/"]=/
14614p
14615g
14616s/^[^!]*!//
14617:repl
14618t repl
14619s/'"$ac_delim"'$//
14620t delim
14621:nl
14622h
14623s/\(.\{148\}\)..*/\1/
14624t more1
14625s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
14626p
14627n
14628b repl
14629:more1
14630s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14631p
14632g
14633s/.\{148\}//
14634t nl
14635:delim
14636h
14637s/\(.\{148\}\)..*/\1/
14638t more2
14639s/["\\]/\\&/g; s/^/"/; s/$/"/
14640p
14641b
14642:more2
14643s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14644p
14645g
14646s/.\{148\}//
14647t delim
14648' <conf$$subs.awk | sed '
14649/^[^""]/{
14650 N
14651 s/\n//
14652}
14653' >>$CONFIG_STATUS || ac_write_fail=1
14654rm -f conf$$subs.awk
14655cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14656_ACAWK
Antoine Pitrouf65132d2011-02-25 23:25:17 +000014657cat >>"\$tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000014658 for (key in S) S_is_set[key] = 1
14659 FS = ""
14660
14661}
14662{
14663 line = $ 0
14664 nfields = split(line, field, "@")
14665 substed = 0
14666 len = length(field[1])
14667 for (i = 2; i < nfields; i++) {
14668 key = field[i]
14669 keylen = length(key)
14670 if (S_is_set[key]) {
14671 value = S[key]
14672 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
14673 len += length(value) + length(field[++i])
14674 substed = 1
14675 } else
14676 len += 1 + keylen
14677 }
14678
14679 print line
14680}
14681
14682_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014683_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014684cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14685if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
14686 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
14687else
14688 cat
Antoine Pitrouf65132d2011-02-25 23:25:17 +000014689fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
14690 || as_fn_error "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014691_ACEOF
14692
Antoine Pitrouf65132d2011-02-25 23:25:17 +000014693# VPATH may cause trouble with some makes, so we remove $(srcdir),
14694# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014695# trailing colons and then remove the whole line if VPATH becomes empty
14696# (actually we leave an empty line to preserve line numbers).
14697if test "x$srcdir" = x.; then
Antoine Pitrouf65132d2011-02-25 23:25:17 +000014698 ac_vpsub='/^[ ]*VPATH[ ]*=/{
14699s/:*\$(srcdir):*/:/
14700s/:*\${srcdir}:*/:/
14701s/:*@srcdir@:*/:/
14702s/^\([^=]*=[ ]*\):*/\1/
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014703s/:*$//
14704s/^[^=]*=[ ]*$//
14705}'
14706fi
14707
Matthias Kloseb9621712010-04-24 17:59:49 +000014708cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014709fi # test -n "$CONFIG_FILES"
14710
Matthias Kloseb9621712010-04-24 17:59:49 +000014711# Set up the scripts for CONFIG_HEADERS section.
14712# No need to generate them if there are no CONFIG_HEADERS.
14713# This happens for instance with `./config.status Makefile'.
14714if test -n "$CONFIG_HEADERS"; then
Antoine Pitrouf65132d2011-02-25 23:25:17 +000014715cat >"$tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014716BEGIN {
14717_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014718
Matthias Kloseb9621712010-04-24 17:59:49 +000014719# Transform confdefs.h into an awk script `defines.awk', embedded as
14720# here-document in config.status, that substitutes the proper values into
14721# config.h.in to produce config.h.
14722
14723# Create a delimiter string that does not exist in confdefs.h, to ease
14724# handling of long lines.
14725ac_delim='%!_!# '
14726for ac_last_try in false false :; do
Antoine Pitrouf65132d2011-02-25 23:25:17 +000014727 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
14728 if test -z "$ac_t"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014729 break
14730 elif $ac_last_try; then
Antoine Pitrouf65132d2011-02-25 23:25:17 +000014731 as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000014732 else
14733 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
14734 fi
14735done
14736
14737# For the awk script, D is an array of macro values keyed by name,
14738# likewise P contains macro parameters if any. Preserve backslash
14739# newline sequences.
14740
14741ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
14742sed -n '
14743s/.\{148\}/&'"$ac_delim"'/g
14744t rset
14745:rset
14746s/^[ ]*#[ ]*define[ ][ ]*/ /
14747t def
14748d
14749:def
14750s/\\$//
14751t bsnl
14752s/["\\]/\\&/g
14753s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14754D["\1"]=" \3"/p
14755s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
14756d
14757:bsnl
14758s/["\\]/\\&/g
14759s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14760D["\1"]=" \3\\\\\\n"\\/p
14761t cont
14762s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
14763t cont
14764d
14765:cont
14766n
14767s/.\{148\}/&'"$ac_delim"'/g
14768t clear
14769:clear
14770s/\\$//
14771t bsnlc
14772s/["\\]/\\&/g; s/^/"/; s/$/"/p
14773d
14774:bsnlc
14775s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
14776b cont
14777' <confdefs.h | sed '
14778s/'"$ac_delim"'/"\\\
14779"/g' >>$CONFIG_STATUS || ac_write_fail=1
14780
14781cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14782 for (key in D) D_is_set[key] = 1
14783 FS = ""
14784}
14785/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
14786 line = \$ 0
14787 split(line, arg, " ")
14788 if (arg[1] == "#") {
14789 defundef = arg[2]
14790 mac1 = arg[3]
14791 } else {
14792 defundef = substr(arg[1], 2)
14793 mac1 = arg[2]
14794 }
14795 split(mac1, mac2, "(") #)
14796 macro = mac2[1]
14797 prefix = substr(line, 1, index(line, defundef) - 1)
14798 if (D_is_set[macro]) {
14799 # Preserve the white space surrounding the "#".
14800 print prefix "define", macro P[macro] D[macro]
14801 next
14802 } else {
14803 # Replace #undef with comments. This is necessary, for example,
14804 # in the case of _POSIX_SOURCE, which is predefined and required
14805 # on some systems where configure will not decide to define it.
14806 if (defundef == "undef") {
14807 print "/*", prefix defundef, macro, "*/"
14808 next
14809 }
14810 }
14811}
14812{ print }
14813_ACAWK
14814_ACEOF
14815cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Antoine Pitrouf65132d2011-02-25 23:25:17 +000014816 as_fn_error "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000014817fi # test -n "$CONFIG_HEADERS"
14818
14819
14820eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
14821shift
14822for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014823do
14824 case $ac_tag in
14825 :[FHLC]) ac_mode=$ac_tag; continue;;
14826 esac
14827 case $ac_mode$ac_tag in
14828 :[FHL]*:*);;
Antoine Pitrouf65132d2011-02-25 23:25:17 +000014829 :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014830 :[FH]-) ac_tag=-:-;;
14831 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
14832 esac
14833 ac_save_IFS=$IFS
14834 IFS=:
14835 set x $ac_tag
14836 IFS=$ac_save_IFS
14837 shift
14838 ac_file=$1
14839 shift
14840
14841 case $ac_mode in
14842 :L) ac_source=$1;;
14843 :[FH])
14844 ac_file_inputs=
14845 for ac_f
14846 do
14847 case $ac_f in
Antoine Pitrouf65132d2011-02-25 23:25:17 +000014848 -) ac_f="$tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014849 *) # Look for the file first in the build tree, then in the source tree
14850 # (if the path is not absolute). The absolute path cannot be DOS-style,
14851 # because $ac_f cannot contain `:'.
14852 test -f "$ac_f" ||
14853 case $ac_f in
14854 [\\/$]*) false;;
14855 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
14856 esac ||
Antoine Pitrouf65132d2011-02-25 23:25:17 +000014857 as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014858 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014859 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
14860 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014861 done
14862
14863 # Let's still pretend it is `configure' which instantiates (i.e., don't
14864 # use $as_me), people would be surprised to read:
14865 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014866 configure_input='Generated from '`
14867 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
14868 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014869 if test x"$ac_file" != x-; then
14870 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000014871 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
14872$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014873 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014874 # Neutralize special characters interpreted by sed in replacement strings.
14875 case $configure_input in #(
14876 *\&* | *\|* | *\\* )
14877 ac_sed_conf_input=`$as_echo "$configure_input" |
14878 sed 's/[\\\\&|]/\\\\&/g'`;; #(
14879 *) ac_sed_conf_input=$configure_input;;
14880 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014881
14882 case $ac_tag in
Antoine Pitrouf65132d2011-02-25 23:25:17 +000014883 *:-:* | *:-) cat >"$tmp/stdin" \
14884 || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014885 esac
14886 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014887 esac
14888
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014889 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000014890$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014891 X"$ac_file" : 'X\(//\)[^/]' \| \
14892 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014893 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014894$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014895 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14896 s//\1/
14897 q
14898 }
14899 /^X\(\/\/\)[^/].*/{
14900 s//\1/
14901 q
14902 }
14903 /^X\(\/\/\)$/{
14904 s//\1/
14905 q
14906 }
14907 /^X\(\/\).*/{
14908 s//\1/
14909 q
14910 }
14911 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000014912 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000014913 ac_builddir=.
14914
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014915case "$ac_dir" in
14916.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
14917*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014918 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014919 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000014920 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014921 case $ac_top_builddir_sub in
14922 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
14923 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
14924 esac ;;
14925esac
14926ac_abs_top_builddir=$ac_pwd
14927ac_abs_builddir=$ac_pwd$ac_dir_suffix
14928# for backward compatibility:
14929ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000014930
14931case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014932 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000014933 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014934 ac_top_srcdir=$ac_top_builddir_sub
14935 ac_abs_top_srcdir=$ac_pwd ;;
14936 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000014937 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014938 ac_top_srcdir=$srcdir
14939 ac_abs_top_srcdir=$srcdir ;;
14940 *) # Relative name.
14941 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
14942 ac_top_srcdir=$ac_top_build_prefix$srcdir
14943 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014944esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014945ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000014946
Martin v. Löwis11437992002-04-12 09:54:03 +000014947
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014948 case $ac_mode in
14949 :F)
14950 #
14951 # CONFIG_FILE
14952 #
Martin v. Löwis11437992002-04-12 09:54:03 +000014953
14954 case $INSTALL in
14955 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014956 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014957 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000014958_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014959
Matthias Kloseb9621712010-04-24 17:59:49 +000014960cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014961# If the template does not know about datarootdir, expand it.
14962# FIXME: This hack should be removed a few years after 2.60.
14963ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000014964ac_sed_dataroot='
14965/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014966 p
14967 q
14968}
14969/@datadir@/p
14970/@docdir@/p
14971/@infodir@/p
14972/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000014973/@mandir@/p'
14974case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014975*datarootdir*) ac_datarootdir_seen=yes;;
14976*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014977 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
14978$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014979_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014980cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014981 ac_datarootdir_hack='
14982 s&@datadir@&$datadir&g
14983 s&@docdir@&$docdir&g
14984 s&@infodir@&$infodir&g
14985 s&@localedir@&$localedir&g
14986 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000014987 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014988esac
14989_ACEOF
14990
14991# Neutralize VPATH when `$srcdir' = `.'.
14992# Shell code in configure.ac might set extrasub.
14993# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000014994cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14995ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000014996$extrasub
14997_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014998cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014999:t
15000/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000015001s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015002s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000015003s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015004s&@srcdir@&$ac_srcdir&;t t
15005s&@abs_srcdir@&$ac_abs_srcdir&;t t
15006s&@top_srcdir@&$ac_top_srcdir&;t t
15007s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
15008s&@builddir@&$ac_builddir&;t t
15009s&@abs_builddir@&$ac_abs_builddir&;t t
15010s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
15011s&@INSTALL@&$ac_INSTALL&;t t
15012$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000015013"
Antoine Pitrouf65132d2011-02-25 23:25:17 +000015014eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
15015 || as_fn_error "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015016
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015017test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Antoine Pitrouf65132d2011-02-25 23:25:17 +000015018 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
15019 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000015020 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Antoine Pitrouf65132d2011-02-25 23:25:17 +000015021which seems to be undefined. Please make sure it is defined." >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015022$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Antoine Pitrouf65132d2011-02-25 23:25:17 +000015023which seems to be undefined. Please make sure it is defined." >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000015024
Antoine Pitrouf65132d2011-02-25 23:25:17 +000015025 rm -f "$tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000015026 case $ac_file in
Antoine Pitrouf65132d2011-02-25 23:25:17 +000015027 -) cat "$tmp/out" && rm -f "$tmp/out";;
15028 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000015029 esac \
Antoine Pitrouf65132d2011-02-25 23:25:17 +000015030 || as_fn_error "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015031 ;;
15032 :H)
15033 #
15034 # CONFIG_HEADER
15035 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015036 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015037 {
15038 $as_echo "/* $configure_input */" \
Antoine Pitrouf65132d2011-02-25 23:25:17 +000015039 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
15040 } >"$tmp/config.h" \
15041 || as_fn_error "could not create $ac_file" "$LINENO" 5
15042 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015043 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
15044$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015045 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015046 rm -f "$ac_file"
Antoine Pitrouf65132d2011-02-25 23:25:17 +000015047 mv "$tmp/config.h" "$ac_file" \
15048 || as_fn_error "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015049 fi
15050 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015051 $as_echo "/* $configure_input */" \
Antoine Pitrouf65132d2011-02-25 23:25:17 +000015052 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
15053 || as_fn_error "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015054 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015055 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000015056
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015057
15058 esac
15059
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000015060
15061 case $ac_file$ac_mode in
15062 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
15063
15064 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015065done # for ac_tag
15066
Guido van Rossum627b2d71993-12-24 10:39:16 +000015067
Matthias Kloseb9621712010-04-24 17:59:49 +000015068as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000015069_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015070ac_clean_files=$ac_clean_files_save
15071
Matthias Kloseb9621712010-04-24 17:59:49 +000015072test $ac_write_fail = 0 ||
Antoine Pitrouf65132d2011-02-25 23:25:17 +000015073 as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000015074
Martin v. Löwis11437992002-04-12 09:54:03 +000015075
15076# configure is writing to config.log, and then calls config.status.
15077# config.status does its own redirection, appending to config.log.
15078# Unfortunately, on DOS this fails, as config.log is still kept open
15079# by configure, so config.status won't be able to write to it; its
15080# output is simply discarded. So we exec the FD to /dev/null,
15081# effectively closing config.log, so it can be properly (re)opened and
15082# appended to by config.status. When coming back to configure, we
15083# need to make the FD available again.
15084if test "$no_create" != yes; then
15085 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000015086 ac_config_status_args=
15087 test "$silent" = yes &&
15088 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000015089 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000015090 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000015091 exec 5>>config.log
15092 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
15093 # would make configure fail if this is the last instruction.
Antoine Pitrouf65132d2011-02-25 23:25:17 +000015094 $ac_cs_success || as_fn_exit $?
Matthias Kloseb9621712010-04-24 17:59:49 +000015095fi
15096if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
15097 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
15098$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015099fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000015100
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015101
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015102echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015103if test ! -f Modules/Setup
15104then
15105 cp $srcdir/Modules/Setup.dist Modules/Setup
15106fi
15107
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015108echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015109if test ! -f Modules/Setup.local
15110then
15111 echo "# Edit this file for local setup changes" >Modules/Setup.local
15112fi
15113
15114echo "creating Makefile"
15115$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
15116 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000015117 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000015118mv config.c Modules