blob: 9299296820bb0ece63b9a458c130870cf8143bd2 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Antoine Pitroud4958c22010-10-13 17:01:10 +00002# From configure.in Revision: 85349 .
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Benjamin Petersond7f73e92010-09-05 00:09:07 +00004# Generated by GNU Autoconf 2.65 for python 3.2.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005#
Georg Brandle2e15612009-05-20 18:25:10 +00006# Report bugs to <http://bugs.python.org/>.
Martin v. Löwis1d459062005-03-14 21:23:33 +00007#
Matthias Kloseb9621712010-04-24 17:59:49 +00008#
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000010# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
11# Inc.
Matthias Kloseb9621712010-04-24 17:59:49 +000012#
13#
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014# This configure script is free software; the Free Software Foundation
15# gives unlimited permission to copy, distribute and modify it.
Matthias Kloseb9621712010-04-24 17:59:49 +000016## -------------------- ##
17## M4sh Initialization. ##
18## -------------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +000019
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020# Be more Bourne compatible
21DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000022if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000023 emulate sh
24 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000025 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000026 # is contrary to our usage. Disable this feature.
27 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000029else
Matthias Kloseb9621712010-04-24 17:59:49 +000030 case `(set -o) 2>/dev/null` in #(
31 *posix*) :
32 set -o posix ;; #(
33 *) :
34 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000035esac
Martin v. Löwis11437992002-04-12 09:54:03 +000036fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000037
38
Matthias Kloseb9621712010-04-24 17:59:49 +000039as_nl='
40'
41export as_nl
42# Printing a long string crashes Solaris 7 /usr/bin/printf.
43as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
44as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
45as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
46# Prefer a ksh shell builtin over an external printf program on Solaris,
47# but without wasting forks for bash or zsh.
48if test -z "$BASH_VERSION$ZSH_VERSION" \
49 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
50 as_echo='print -r --'
51 as_echo_n='print -rn --'
52elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
53 as_echo='printf %s\n'
54 as_echo_n='printf %s'
55else
56 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
57 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
58 as_echo_n='/usr/ucb/echo -n'
59 else
60 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
61 as_echo_n_body='eval
62 arg=$1;
63 case $arg in #(
64 *"$as_nl"*)
65 expr "X$arg" : "X\\(.*\\)$as_nl";
66 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
67 esac;
68 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
69 '
70 export as_echo_n_body
71 as_echo_n='sh -c $as_echo_n_body as_echo'
72 fi
73 export as_echo_body
74 as_echo='sh -c $as_echo_body as_echo'
75fi
Martin v. Löwis11437992002-04-12 09:54:03 +000076
77# The user is always right.
78if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000079 PATH_SEPARATOR=:
80 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
81 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
82 PATH_SEPARATOR=';'
83 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000084fi
Martin v. Löwis11437992002-04-12 09:54:03 +000085
Thomas Wouters47b49bf2007-08-30 22:15:33 +000086
87# IFS
88# We need space, tab and new line, in precisely that order. Quoting is
89# there to prevent editors from complaining about space-tab.
90# (If _AS_PATH_WALK were called with IFS unset, it would disable word
91# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000092IFS=" "" $as_nl"
93
94# Find who we are. Look in the path if we contain no directory separator.
Matthias Kloseb9621712010-04-24 17:59:49 +000095case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000096 *[\\/]* ) as_myself=$0 ;;
97 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000098for as_dir in $PATH
99do
100 IFS=$as_save_IFS
101 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +0000102 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
103 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000104IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +0000105
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000106 ;;
107esac
108# We did not find ourselves, most probably we were run as `sh COMMAND'
109# in which case we are not to be found in the path.
110if test "x$as_myself" = x; then
111 as_myself=$0
112fi
113if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000114 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
115 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000116fi
117
Matthias Kloseb9621712010-04-24 17:59:49 +0000118# Unset variables that we do not need and which cause bugs (e.g. in
119# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
120# suppresses any "Segmentation fault" message there. '((' could
121# trigger a bug in pdksh 5.2.14.
122for as_var in BASH_ENV ENV MAIL MAILPATH
123do eval test x\${$as_var+set} = xset \
124 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000125done
126PS1='$ '
127PS2='> '
128PS4='+ '
129
130# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +0000131LC_ALL=C
132export LC_ALL
133LANGUAGE=C
134export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000135
Matthias Kloseb9621712010-04-24 17:59:49 +0000136# CDPATH.
137(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
138
139if test "x$CONFIG_SHELL" = x; then
140 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
141 emulate sh
142 NULLCMD=:
143 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
144 # is contrary to our usage. Disable this feature.
145 alias -g '\${1+\"\$@\"}'='\"\$@\"'
146 setopt NO_GLOB_SUBST
147else
148 case \`(set -o) 2>/dev/null\` in #(
149 *posix*) :
150 set -o posix ;; #(
151 *) :
152 ;;
153esac
154fi
155"
156 as_required="as_fn_return () { (exit \$1); }
157as_fn_success () { as_fn_return 0; }
158as_fn_failure () { as_fn_return 1; }
159as_fn_ret_success () { return 0; }
160as_fn_ret_failure () { return 1; }
161
162exitcode=0
163as_fn_success || { exitcode=1; echo as_fn_success failed.; }
164as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
165as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
166as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
167if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
168
169else
170 exitcode=1; echo positional parameters were not saved.
171fi
172test x\$exitcode = x0 || exit 1"
173 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
174 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
175 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
176 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
177test \$(( 1 + 1 )) = 2 || exit 1"
178 if (eval "$as_required") 2>/dev/null; then :
179 as_have_required=yes
180else
181 as_have_required=no
182fi
183 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
184
185else
186 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
187as_found=false
188for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
189do
190 IFS=$as_save_IFS
191 test -z "$as_dir" && as_dir=.
192 as_found=:
193 case $as_dir in #(
194 /*)
195 for as_base in sh bash ksh sh5; do
196 # Try only shells that exist, to save several forks.
197 as_shell=$as_dir/$as_base
198 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
199 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
200 CONFIG_SHELL=$as_shell as_have_required=yes
201 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
202 break 2
203fi
204fi
205 done;;
206 esac
207 as_found=false
208done
209$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
210 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
211 CONFIG_SHELL=$SHELL as_have_required=yes
212fi; }
213IFS=$as_save_IFS
214
215
216 if test "x$CONFIG_SHELL" != x; then :
217 # We cannot yet assume a decent shell, so we have to provide a
218 # neutralization value for shells without unset; and this also
219 # works around shells that cannot unset nonexistent variables.
220 BASH_ENV=/dev/null
221 ENV=/dev/null
222 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
223 export CONFIG_SHELL
224 exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
225fi
226
227 if test x$as_have_required = xno; then :
228 $as_echo "$0: This script requires a shell more modern than all"
229 $as_echo "$0: the shells that I found on your system."
230 if test x${ZSH_VERSION+set} = xset ; then
231 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
232 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
233 else
234 $as_echo "$0: Please tell bug-autoconf@gnu.org and
235$0: http://bugs.python.org/ about your system, including
236$0: any error possibly output before this message. Then
237$0: install a modern shell, or manually run the script
238$0: under such a shell if you do have one."
239 fi
240 exit 1
241fi
242fi
243fi
244SHELL=${CONFIG_SHELL-/bin/sh}
245export SHELL
246# Unset more variables known to interfere with behavior of common tools.
247CLICOLOR_FORCE= GREP_OPTIONS=
248unset CLICOLOR_FORCE GREP_OPTIONS
249
250## --------------------- ##
251## M4sh Shell Functions. ##
252## --------------------- ##
253# as_fn_unset VAR
254# ---------------
255# Portably unset VAR.
256as_fn_unset ()
257{
258 { eval $1=; unset $1;}
259}
260as_unset=as_fn_unset
261
262# as_fn_set_status STATUS
263# -----------------------
264# Set $? to STATUS, without forking.
265as_fn_set_status ()
266{
267 return $1
268} # as_fn_set_status
269
270# as_fn_exit STATUS
271# -----------------
272# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
273as_fn_exit ()
274{
275 set +e
276 as_fn_set_status $1
277 exit $1
278} # as_fn_exit
279
280# as_fn_mkdir_p
281# -------------
282# Create "$as_dir" as a directory, including parents if necessary.
283as_fn_mkdir_p ()
284{
285
286 case $as_dir in #(
287 -*) as_dir=./$as_dir;;
288 esac
289 test -d "$as_dir" || eval $as_mkdir_p || {
290 as_dirs=
291 while :; do
292 case $as_dir in #(
293 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
294 *) as_qdir=$as_dir;;
295 esac
296 as_dirs="'$as_qdir' $as_dirs"
297 as_dir=`$as_dirname -- "$as_dir" ||
298$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
299 X"$as_dir" : 'X\(//\)[^/]' \| \
300 X"$as_dir" : 'X\(//\)$' \| \
301 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
302$as_echo X"$as_dir" |
303 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
304 s//\1/
305 q
306 }
307 /^X\(\/\/\)[^/].*/{
308 s//\1/
309 q
310 }
311 /^X\(\/\/\)$/{
312 s//\1/
313 q
314 }
315 /^X\(\/\).*/{
316 s//\1/
317 q
318 }
319 s/.*/./; q'`
320 test -d "$as_dir" && break
321 done
322 test -z "$as_dirs" || eval "mkdir $as_dirs"
Benjamin Petersond7f73e92010-09-05 00:09:07 +0000323 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +0000324
325
326} # as_fn_mkdir_p
327# as_fn_append VAR VALUE
328# ----------------------
329# Append the text in VALUE to the end of the definition contained in VAR. Take
330# advantage of any shell optimizations that allow amortized linear growth over
331# repeated appends, instead of the typical quadratic growth present in naive
332# implementations.
333if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
334 eval 'as_fn_append ()
335 {
336 eval $1+=\$2
337 }'
338else
339 as_fn_append ()
340 {
341 eval $1=\$$1\$2
342 }
343fi # as_fn_append
344
345# as_fn_arith ARG...
346# ------------------
347# Perform arithmetic evaluation on the ARGs, and store the result in the
348# global $as_val. Take advantage of shells that can avoid forks. The arguments
349# must be portable across $(()) and expr.
350if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
351 eval 'as_fn_arith ()
352 {
353 as_val=$(( $* ))
354 }'
355else
356 as_fn_arith ()
357 {
358 as_val=`expr "$@" || test $? -eq 1`
359 }
360fi # as_fn_arith
361
362
Benjamin Petersond7f73e92010-09-05 00:09:07 +0000363# as_fn_error ERROR [LINENO LOG_FD]
364# ---------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +0000365# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
366# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Benjamin Petersond7f73e92010-09-05 00:09:07 +0000367# script with status $?, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +0000368as_fn_error ()
369{
Benjamin Petersond7f73e92010-09-05 00:09:07 +0000370 as_status=$?; test $as_status -eq 0 && as_status=1
371 if test "$3"; then
372 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
373 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
Matthias Kloseb9621712010-04-24 17:59:49 +0000374 fi
Benjamin Petersond7f73e92010-09-05 00:09:07 +0000375 $as_echo "$as_me: error: $1" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +0000376 as_fn_exit $as_status
377} # as_fn_error
378
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000379if expr a : '\(a\)' >/dev/null 2>&1 &&
380 test "X`expr 00001 : '.*\(...\)'`" = X001; then
381 as_expr=expr
382else
383 as_expr=false
384fi
385
386if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
387 as_basename=basename
388else
389 as_basename=false
390fi
391
Matthias Kloseb9621712010-04-24 17:59:49 +0000392if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
393 as_dirname=dirname
394else
395 as_dirname=false
396fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000397
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000398as_me=`$as_basename -- "$0" ||
399$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
400 X"$0" : 'X\(//\)$' \| \
401 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000402$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000403 sed '/^.*\/\([^/][^/]*\)\/*$/{
404 s//\1/
405 q
406 }
407 /^X\/\(\/\/\)$/{
408 s//\1/
409 q
410 }
411 /^X\/\(\/\).*/{
412 s//\1/
413 q
414 }
415 s/.*/./; q'`
416
Matthias Kloseb9621712010-04-24 17:59:49 +0000417# Avoid depending upon Character Ranges.
418as_cr_letters='abcdefghijklmnopqrstuvwxyz'
419as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
420as_cr_Letters=$as_cr_letters$as_cr_LETTERS
421as_cr_digits='0123456789'
422as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000423
424
Matthias Kloseb9621712010-04-24 17:59:49 +0000425 as_lineno_1=$LINENO as_lineno_1a=$LINENO
426 as_lineno_2=$LINENO as_lineno_2a=$LINENO
427 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
428 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
429 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000430 sed -n '
431 p
432 /[$]LINENO/=
433 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +0000434 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000435 s/[$]LINENO.*/&-/
436 t lineno
437 b
438 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +0000439 N
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000440 :loop
441 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +0000442 t loop
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000443 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +0000444 ' >$as_me.lineno &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000445 chmod +x "$as_me.lineno" ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000446 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
Martin v. Löwis11437992002-04-12 09:54:03 +0000447
448 # Don't try to exec as it changes $[0], causing all sort of problems
449 # (the dirname of $[0] is not the place where we might find the
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000450 # original and so on. Autoconf is especially sensitive to this).
451 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +0000452 # Exit status is that of the last command.
453 exit
454}
455
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000456ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +0000457case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000458-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000459 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000460 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +0000461 xy) ECHO_C='\c';;
462 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
463 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000464 esac;;
465*)
466 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +0000467esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000468
Martin v. Löwis11437992002-04-12 09:54:03 +0000469rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000470if test -d conf$$.dir; then
471 rm -f conf$$.dir/conf$$.file
472else
473 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +0000474 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000475fi
Matthias Kloseb9621712010-04-24 17:59:49 +0000476if (echo >conf$$.file) 2>/dev/null; then
477 if ln -s conf$$.file conf$$ 2>/dev/null; then
478 as_ln_s='ln -s'
479 # ... but there are two gotchas:
480 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
481 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
482 # In both cases, we have to default to `cp -p'.
483 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
484 as_ln_s='cp -p'
485 elif ln conf$$.file conf$$ 2>/dev/null; then
486 as_ln_s=ln
487 else
Martin v. Löwis11437992002-04-12 09:54:03 +0000488 as_ln_s='cp -p'
Matthias Kloseb9621712010-04-24 17:59:49 +0000489 fi
Martin v. Löwis11437992002-04-12 09:54:03 +0000490else
491 as_ln_s='cp -p'
492fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000493rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
494rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +0000495
Skip Montanaro6dead952003-09-25 14:50:04 +0000496if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000497 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +0000498else
Skip Montanarof0d5f792004-08-15 14:08:23 +0000499 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +0000500 as_mkdir_p=false
501fi
502
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000503if test -x / >/dev/null 2>&1; then
504 as_test_x='test -x'
505else
506 if ls -dL / >/dev/null 2>&1; then
507 as_ls_L_option=L
508 else
509 as_ls_L_option=
510 fi
511 as_test_x='
512 eval sh -c '\''
513 if test -d "$1"; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000514 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000515 else
Matthias Kloseb9621712010-04-24 17:59:49 +0000516 case $1 in #(
517 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000518 esac;
Matthias Kloseb9621712010-04-24 17:59:49 +0000519 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000520 ???[sx]*):;;*)false;;esac;fi
521 '\'' sh
522 '
523fi
524as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +0000525
526# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000527as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000528
529# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000530as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000531
532
Matthias Kloseb9621712010-04-24 17:59:49 +0000533test -n "$DJDIR" || exec 7<&0 </dev/null
534exec 6>&1
Martin v. Löwis11437992002-04-12 09:54:03 +0000535
536# Name of the host.
Benjamin Petersond7f73e92010-09-05 00:09:07 +0000537# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
Martin v. Löwis11437992002-04-12 09:54:03 +0000538# so uname gets run too.
539ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
540
Martin v. Löwis11437992002-04-12 09:54:03 +0000541#
542# Initializations.
543#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000544ac_default_prefix=/usr/local
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000545ac_clean_files=
Skip Montanaro6dead952003-09-25 14:50:04 +0000546ac_config_libobj_dir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000547LIBOBJS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000548cross_compiling=no
549subdirs=
550MFLAGS=
551MAKEFLAGS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000552
Martin v. Löwis11437992002-04-12 09:54:03 +0000553# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000554PACKAGE_NAME='python'
555PACKAGE_TARNAME='python'
Benjamin Peterson46ea4f72009-06-27 21:40:27 +0000556PACKAGE_VERSION='3.2'
557PACKAGE_STRING='python 3.2'
Georg Brandle2e15612009-05-20 18:25:10 +0000558PACKAGE_BUGREPORT='http://bugs.python.org/'
Matthias Kloseb9621712010-04-24 17:59:49 +0000559PACKAGE_URL=''
Martin v. Löwis11437992002-04-12 09:54:03 +0000560
561ac_unique_file="Include/object.h"
562# Factoring default headers for most tests.
563ac_includes_default="\
564#include <stdio.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000565#ifdef HAVE_SYS_TYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000566# include <sys/types.h>
567#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000568#ifdef HAVE_SYS_STAT_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000569# include <sys/stat.h>
570#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000571#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000572# include <stdlib.h>
573# include <stddef.h>
574#else
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000575# ifdef HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000576# include <stdlib.h>
577# endif
578#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000579#ifdef HAVE_STRING_H
580# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000581# include <memory.h>
582# endif
583# include <string.h>
584#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000585#ifdef HAVE_STRINGS_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000586# include <strings.h>
587#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000588#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000589# include <inttypes.h>
Thomas Wouters477c8d52006-05-27 19:21:47 +0000590#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000591#ifdef HAVE_STDINT_H
592# include <stdint.h>
593#endif
594#ifdef HAVE_UNISTD_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000595# include <unistd.h>
596#endif"
597
Matthias Kloseb9621712010-04-24 17:59:49 +0000598ac_subst_vars='LTLIBOBJS
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000599SRCDIRS
Matthias Kloseb9621712010-04-24 17:59:49 +0000600THREADHEADERS
Barry Warsaw35f3a2c2010-09-03 18:30:30 +0000601SOABI
Matthias Kloseb9621712010-04-24 17:59:49 +0000602LIBC
603LIBM
604HAVE_GETHOSTBYNAME
605HAVE_GETHOSTBYNAME_R
606HAVE_GETHOSTBYNAME_R_3_ARG
607HAVE_GETHOSTBYNAME_R_5_ARG
608HAVE_GETHOSTBYNAME_R_6_ARG
609LIBOBJS
610TRUE
611MACHDEP_OBJS
612DYNLOADFILE
613DLINCLDIR
614THREADOBJ
615LDLAST
616USE_THREAD_MODULE
617SIGNAL_OBJS
618USE_SIGNAL_MODULE
619LIBFFI_INCLUDEDIR
620PKG_CONFIG
621SHLIBS
622CFLAGSFORSHARED
623LINKFORSHARED
624CCSHARED
625BLDSHARED
626LDCXXSHARED
627LDSHARED
628SO
629LIBTOOL_CRUFT
630OTHER_LIBTOOL_OPT
631UNIVERSAL_ARCH_FLAGS
632BASECFLAGS
633OPT
634LN
635INSTALL_DATA
636INSTALL_SCRIPT
637INSTALL_PROGRAM
638SVNVERSION
639ARFLAGS
640AR
641RANLIB
Daniel Stutzbacha606faa2010-08-31 19:51:07 +0000642USE_INLINE
Matthias Kloseb9621712010-04-24 17:59:49 +0000643GNULD
644LINKCC
645RUNSHARED
646INSTSONAME
647LDLIBRARYDIR
648BLDLIBRARY
649DLLLIBRARY
650LDLIBRARY
651LIBRARY
652BUILDEXEEXT
653EGREP
654GREP
655CPP
656MAINCC
657CXX
658OBJEXT
659EXEEXT
660ac_ct_CC
661CPPFLAGS
662LDFLAGS
663CFLAGS
664CC
665EXPORT_MACOSX_DEPLOYMENT_TARGET
666CONFIGURE_MACOSX_DEPLOYMENT_TARGET
667SGI_ABI
668MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000669FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000670FRAMEWORKUNIXTOOLSPREFIX
671FRAMEWORKALTINSTALLLAST
672FRAMEWORKALTINSTALLFIRST
673FRAMEWORKINSTALLLAST
674FRAMEWORKINSTALLFIRST
675PYTHONFRAMEWORKINSTALLDIR
676PYTHONFRAMEWORKPREFIX
677PYTHONFRAMEWORKDIR
678PYTHONFRAMEWORKIDENTIFIER
679PYTHONFRAMEWORK
680LIPO_32BIT_FLAGS
681ARCH_RUN_32BIT
682UNIVERSALSDK
683CONFIG_ARGS
684SOVERSION
685VERSION
686target_alias
687host_alias
688build_alias
689LIBS
690ECHO_T
691ECHO_N
692ECHO_C
693DEFS
694mandir
695localedir
696libdir
697psdir
698pdfdir
699dvidir
700htmldir
701infodir
702docdir
703oldincludedir
704includedir
705localstatedir
706sharedstatedir
707sysconfdir
708datadir
709datarootdir
710libexecdir
711sbindir
712bindir
713program_transform_name
714prefix
715exec_prefix
716PACKAGE_URL
717PACKAGE_BUGREPORT
718PACKAGE_STRING
719PACKAGE_VERSION
720PACKAGE_TARNAME
721PACKAGE_NAME
722PATH_SEPARATOR
723SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000724ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000725ac_user_opts='
726enable_option_checking
727enable_universalsdk
728with_universal_archs
729with_framework_name
730enable_framework
731with_gcc
732with_cxx_main
733with_suffix
734enable_shared
735enable_profiling
736with_pydebug
737with_libs
738with_system_expat
739with_system_ffi
740with_dbmliborder
741with_signal_module
742with_dec_threads
743with_threads
744with_thread
745enable_ipv6
746with_doc_strings
747with_tsc
748with_pymalloc
749with_valgrind
Matthias Kloseb9621712010-04-24 17:59:49 +0000750with_fpectl
751with_libm
752with_libc
753enable_big_digits
754with_wide_unicode
755with_computed_gotos
756'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000757 ac_precious_vars='build_alias
758host_alias
759target_alias
760CC
761CFLAGS
762LDFLAGS
763LIBS
764CPPFLAGS
765CPP'
766
Guido van Rossum627b2d71993-12-24 10:39:16 +0000767
Guido van Rossum7f43da71994-08-01 12:15:30 +0000768# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000769ac_init_help=
770ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000771ac_unrecognized_opts=
772ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000773# The variables have the same names as the options, with
774# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000775cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000776exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000777no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000778no_recursion=
779prefix=NONE
780program_prefix=NONE
781program_suffix=NONE
782program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000783silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000784site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000785srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000786verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000787x_includes=NONE
788x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000789
790# Installation directory options.
791# These are left unexpanded so users can "make install exec_prefix=/foo"
792# and all the variables that are supposed to be based on exec_prefix
793# by default will actually change.
794# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000795# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000796bindir='${exec_prefix}/bin'
797sbindir='${exec_prefix}/sbin'
798libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000799datarootdir='${prefix}/share'
800datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000801sysconfdir='${prefix}/etc'
802sharedstatedir='${prefix}/com'
803localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000804includedir='${prefix}/include'
805oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000806docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
807infodir='${datarootdir}/info'
808htmldir='${docdir}'
809dvidir='${docdir}'
810pdfdir='${docdir}'
811psdir='${docdir}'
812libdir='${exec_prefix}/lib'
813localedir='${datarootdir}/locale'
814mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000815
Guido van Rossum7f43da71994-08-01 12:15:30 +0000816ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000817ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000818for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000819do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000820 # If the previous option needs an argument, assign it.
821 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000822 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000823 ac_prev=
824 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000825 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000826
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000827 case $ac_option in
Benjamin Petersond7f73e92010-09-05 00:09:07 +0000828 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
829 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000830 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000831
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000832 # Accept the important Cygnus configure options, so we can diagnose typos.
833
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000834 case $ac_dashdash$ac_option in
835 --)
836 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000837
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000838 -bindir | --bindir | --bindi | --bind | --bin | --bi)
839 ac_prev=bindir ;;
840 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000841 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000842
843 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000844 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000845 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000846 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000847
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000848 -cache-file | --cache-file | --cache-fil | --cache-fi \
849 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
850 ac_prev=cache_file ;;
851 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
852 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000853 cache_file=$ac_optarg ;;
854
855 --config-cache | -C)
856 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000857
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000858 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000859 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000860 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000861 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000862
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000863 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
864 | --dataroo | --dataro | --datar)
865 ac_prev=datarootdir ;;
866 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
867 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
868 datarootdir=$ac_optarg ;;
869
Guido van Rossum7f43da71994-08-01 12:15:30 +0000870 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000871 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000872 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000873 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Benjamin Petersond7f73e92010-09-05 00:09:07 +0000874 as_fn_error "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000875 ac_useropt_orig=$ac_useropt
876 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
877 case $ac_user_opts in
878 *"
879"enable_$ac_useropt"
880"*) ;;
881 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
882 ac_unrecognized_sep=', ';;
883 esac
884 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000885
886 -docdir | --docdir | --docdi | --doc | --do)
887 ac_prev=docdir ;;
888 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
889 docdir=$ac_optarg ;;
890
891 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
892 ac_prev=dvidir ;;
893 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
894 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000895
896 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000897 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000898 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000899 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Benjamin Petersond7f73e92010-09-05 00:09:07 +0000900 as_fn_error "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000901 ac_useropt_orig=$ac_useropt
902 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
903 case $ac_user_opts in
904 *"
905"enable_$ac_useropt"
906"*) ;;
907 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
908 ac_unrecognized_sep=', ';;
909 esac
910 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000911
Guido van Rossum7f43da71994-08-01 12:15:30 +0000912 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
913 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
914 | --exec | --exe | --ex)
915 ac_prev=exec_prefix ;;
916 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
917 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
918 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000919 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000920
921 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000922 # Obsolete; use --with-gas.
923 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000924
Martin v. Löwis11437992002-04-12 09:54:03 +0000925 -help | --help | --hel | --he | -h)
926 ac_init_help=long ;;
927 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
928 ac_init_help=recursive ;;
929 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
930 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000931
932 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000933 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000934 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000935 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000936
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000937 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
938 ac_prev=htmldir ;;
939 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
940 | --ht=*)
941 htmldir=$ac_optarg ;;
942
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000943 -includedir | --includedir | --includedi | --included | --include \
944 | --includ | --inclu | --incl | --inc)
945 ac_prev=includedir ;;
946 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
947 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000948 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000949
950 -infodir | --infodir | --infodi | --infod | --info | --inf)
951 ac_prev=infodir ;;
952 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000953 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000954
955 -libdir | --libdir | --libdi | --libd)
956 ac_prev=libdir ;;
957 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000958 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000959
960 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
961 | --libexe | --libex | --libe)
962 ac_prev=libexecdir ;;
963 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
964 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000965 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000966
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000967 -localedir | --localedir | --localedi | --localed | --locale)
968 ac_prev=localedir ;;
969 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
970 localedir=$ac_optarg ;;
971
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000972 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000973 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000974 ac_prev=localstatedir ;;
975 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000976 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000977 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000978
979 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
980 ac_prev=mandir ;;
981 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000982 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000983
Guido van Rossum7f43da71994-08-01 12:15:30 +0000984 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000985 # Obsolete; use --without-fp.
986 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000987
988 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +0000989 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000990 no_create=yes ;;
991
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000992 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
993 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
994 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000995
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000996 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
997 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
998 | --oldin | --oldi | --old | --ol | --o)
999 ac_prev=oldincludedir ;;
1000 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1001 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1002 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001003 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001004
Guido van Rossum7f43da71994-08-01 12:15:30 +00001005 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1006 ac_prev=prefix ;;
1007 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001008 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001009
1010 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1011 | --program-pre | --program-pr | --program-p)
1012 ac_prev=program_prefix ;;
1013 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1014 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001015 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001016
1017 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1018 | --program-suf | --program-su | --program-s)
1019 ac_prev=program_suffix ;;
1020 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1021 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001022 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001023
1024 -program-transform-name | --program-transform-name \
1025 | --program-transform-nam | --program-transform-na \
1026 | --program-transform-n | --program-transform- \
1027 | --program-transform | --program-transfor \
1028 | --program-transfo | --program-transf \
1029 | --program-trans | --program-tran \
1030 | --progr-tra | --program-tr | --program-t)
1031 ac_prev=program_transform_name ;;
1032 -program-transform-name=* | --program-transform-name=* \
1033 | --program-transform-nam=* | --program-transform-na=* \
1034 | --program-transform-n=* | --program-transform-=* \
1035 | --program-transform=* | --program-transfor=* \
1036 | --program-transfo=* | --program-transf=* \
1037 | --program-trans=* | --program-tran=* \
1038 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001039 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001040
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001041 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1042 ac_prev=pdfdir ;;
1043 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1044 pdfdir=$ac_optarg ;;
1045
1046 -psdir | --psdir | --psdi | --psd | --ps)
1047 ac_prev=psdir ;;
1048 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1049 psdir=$ac_optarg ;;
1050
Guido van Rossum7f43da71994-08-01 12:15:30 +00001051 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1052 | -silent | --silent | --silen | --sile | --sil)
1053 silent=yes ;;
1054
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001055 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1056 ac_prev=sbindir ;;
1057 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1058 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001059 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001060
1061 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1062 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1063 | --sharedst | --shareds | --shared | --share | --shar \
1064 | --sha | --sh)
1065 ac_prev=sharedstatedir ;;
1066 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1067 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1068 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1069 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001070 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001071
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001072 -site | --site | --sit)
1073 ac_prev=site ;;
1074 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001075 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001076
Guido van Rossum7f43da71994-08-01 12:15:30 +00001077 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1078 ac_prev=srcdir ;;
1079 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001080 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001081
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001082 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1083 | --syscon | --sysco | --sysc | --sys | --sy)
1084 ac_prev=sysconfdir ;;
1085 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1086 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001087 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001088
Guido van Rossum7f43da71994-08-01 12:15:30 +00001089 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001090 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001091 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001092 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001093
1094 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1095 verbose=yes ;;
1096
Martin v. Löwis11437992002-04-12 09:54:03 +00001097 -version | --version | --versio | --versi | --vers | -V)
1098 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001099
1100 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001101 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001102 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001103 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Benjamin Petersond7f73e92010-09-05 00:09:07 +00001104 as_fn_error "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001105 ac_useropt_orig=$ac_useropt
1106 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1107 case $ac_user_opts in
1108 *"
1109"with_$ac_useropt"
1110"*) ;;
1111 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1112 ac_unrecognized_sep=', ';;
1113 esac
1114 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001115
1116 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001117 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001118 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001119 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Benjamin Petersond7f73e92010-09-05 00:09:07 +00001120 as_fn_error "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001121 ac_useropt_orig=$ac_useropt
1122 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1123 case $ac_user_opts in
1124 *"
1125"with_$ac_useropt"
1126"*) ;;
1127 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1128 ac_unrecognized_sep=', ';;
1129 esac
1130 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001131
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001132 --x)
1133 # Obsolete; use --with-x.
1134 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001135
1136 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1137 | --x-incl | --x-inc | --x-in | --x-i)
1138 ac_prev=x_includes ;;
1139 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1140 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001141 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001142
1143 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1144 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1145 ac_prev=x_libraries ;;
1146 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1147 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001148 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001149
Benjamin Petersond7f73e92010-09-05 00:09:07 +00001150 -*) as_fn_error "unrecognized option: \`$ac_option'
1151Try \`$0 --help' for more information."
Guido van Rossum7f43da71994-08-01 12:15:30 +00001152 ;;
1153
Martin v. Löwis11437992002-04-12 09:54:03 +00001154 *=*)
1155 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1156 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001157 case $ac_envvar in #(
1158 '' | [0-9]* | *[!_$as_cr_alnum]* )
Benjamin Petersond7f73e92010-09-05 00:09:07 +00001159 as_fn_error "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001160 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001161 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001162 export $ac_envvar ;;
1163
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001164 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001165 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001166 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001167 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001168 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001169 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
Guido van Rossum7f43da71994-08-01 12:15:30 +00001170 ;;
1171
1172 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001173done
1174
Guido van Rossum7f43da71994-08-01 12:15:30 +00001175if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001176 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Benjamin Petersond7f73e92010-09-05 00:09:07 +00001177 as_fn_error "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001178fi
1179
Matthias Kloseb9621712010-04-24 17:59:49 +00001180if test -n "$ac_unrecognized_opts"; then
1181 case $enable_option_checking in
1182 no) ;;
Benjamin Petersond7f73e92010-09-05 00:09:07 +00001183 fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001184 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1185 esac
1186fi
1187
1188# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001189for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1190 datadir sysconfdir sharedstatedir localstatedir includedir \
1191 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1192 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001193do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001194 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001195 # Remove trailing slashes.
1196 case $ac_val in
1197 */ )
1198 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1199 eval $ac_var=\$ac_val;;
1200 esac
1201 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001202 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001203 [\\/$]* | ?:[\\/]* ) continue;;
1204 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001205 esac
Benjamin Petersond7f73e92010-09-05 00:09:07 +00001206 as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001207done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001208
Martin v. Löwis11437992002-04-12 09:54:03 +00001209# There might be people who depend on the old broken behavior: `$host'
1210# used to hold the argument of --host etc.
1211# FIXME: To remove some day.
1212build=$build_alias
1213host=$host_alias
1214target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001215
Martin v. Löwis11437992002-04-12 09:54:03 +00001216# FIXME: To remove some day.
1217if test "x$host_alias" != x; then
1218 if test "x$build_alias" = x; then
1219 cross_compiling=maybe
Benjamin Petersond7f73e92010-09-05 00:09:07 +00001220 $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
1221 If a cross compiler is detected then cross compile mode will be used." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001222 elif test "x$build_alias" != "x$host_alias"; then
1223 cross_compiling=yes
1224 fi
1225fi
1226
1227ac_tool_prefix=
1228test -n "$host_alias" && ac_tool_prefix=$host_alias-
1229
1230test "$silent" = yes && exec 6>/dev/null
1231
Guido van Rossum627b2d71993-12-24 10:39:16 +00001232
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001233ac_pwd=`pwd` && test -n "$ac_pwd" &&
1234ac_ls_di=`ls -di .` &&
1235ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Benjamin Petersond7f73e92010-09-05 00:09:07 +00001236 as_fn_error "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001237test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Benjamin Petersond7f73e92010-09-05 00:09:07 +00001238 as_fn_error "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001239
1240
Guido van Rossum627b2d71993-12-24 10:39:16 +00001241# Find the source files, if location was not specified.
1242if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001243 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001244 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001245 ac_confdir=`$as_dirname -- "$as_myself" ||
1246$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1247 X"$as_myself" : 'X\(//\)[^/]' \| \
1248 X"$as_myself" : 'X\(//\)$' \| \
1249 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1250$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001251 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1252 s//\1/
1253 q
1254 }
1255 /^X\(\/\/\)[^/].*/{
1256 s//\1/
1257 q
1258 }
1259 /^X\(\/\/\)$/{
1260 s//\1/
1261 q
1262 }
1263 /^X\(\/\).*/{
1264 s//\1/
1265 q
1266 }
1267 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001268 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001269 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001270 srcdir=..
1271 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001272else
1273 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001274fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001275if test ! -r "$srcdir/$ac_unique_file"; then
1276 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Benjamin Petersond7f73e92010-09-05 00:09:07 +00001277 as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001278fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001279ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1280ac_abs_confdir=`(
Benjamin Petersond7f73e92010-09-05 00:09:07 +00001281 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001282 pwd)`
1283# When building in place, set srcdir=.
1284if test "$ac_abs_confdir" = "$ac_pwd"; then
1285 srcdir=.
1286fi
1287# Remove unnecessary trailing slashes from srcdir.
1288# Double slashes in file names in object file debugging info
1289# mess up M-x gdb in Emacs.
1290case $srcdir in
1291*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1292esac
1293for ac_var in $ac_precious_vars; do
1294 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1295 eval ac_env_${ac_var}_value=\$${ac_var}
1296 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1297 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1298done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001299
Martin v. Löwis11437992002-04-12 09:54:03 +00001300#
1301# Report the --help message.
1302#
1303if test "$ac_init_help" = "long"; then
1304 # Omit some internal or obsolete options to make the list less imposing.
1305 # This message is too long to be a string in the A/UX 3.1 sh.
1306 cat <<_ACEOF
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001307\`configure' configures python 3.2 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001308
1309Usage: $0 [OPTION]... [VAR=VALUE]...
1310
1311To assign environment variables (e.g., CC, CFLAGS...), specify them as
1312VAR=VALUE. See below for descriptions of some of the useful variables.
1313
1314Defaults for the options are specified in brackets.
1315
1316Configuration:
1317 -h, --help display this help and exit
1318 --help=short display options specific to this package
1319 --help=recursive display the short help of all the included packages
1320 -V, --version display version information and exit
Benjamin Petersond7f73e92010-09-05 00:09:07 +00001321 -q, --quiet, --silent do not print \`checking...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001322 --cache-file=FILE cache test results in FILE [disabled]
1323 -C, --config-cache alias for \`--cache-file=config.cache'
1324 -n, --no-create do not create output files
1325 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1326
Martin v. Löwis11437992002-04-12 09:54:03 +00001327Installation directories:
1328 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001329 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001330 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001331 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001332
1333By default, \`make install' will install all the files in
1334\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1335an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1336for instance \`--prefix=\$HOME'.
1337
1338For better control, use the options below.
1339
1340Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001341 --bindir=DIR user executables [EPREFIX/bin]
1342 --sbindir=DIR system admin executables [EPREFIX/sbin]
1343 --libexecdir=DIR program executables [EPREFIX/libexec]
1344 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1345 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1346 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1347 --libdir=DIR object code libraries [EPREFIX/lib]
1348 --includedir=DIR C header files [PREFIX/include]
1349 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1350 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1351 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1352 --infodir=DIR info documentation [DATAROOTDIR/info]
1353 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1354 --mandir=DIR man documentation [DATAROOTDIR/man]
1355 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1356 --htmldir=DIR html documentation [DOCDIR]
1357 --dvidir=DIR dvi documentation [DOCDIR]
1358 --pdfdir=DIR pdf documentation [DOCDIR]
1359 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001360_ACEOF
1361
1362 cat <<\_ACEOF
1363_ACEOF
1364fi
1365
1366if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001367 case $ac_init_help in
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001368 short | recursive ) echo "Configuration of python 3.2:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001369 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001370 cat <<\_ACEOF
1371
1372Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001373 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001374 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1375 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001376 --enable-universalsdk[=SDKDIR]
Christian Heimes292d3512008-02-03 16:51:08 +00001377 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001378 --enable-framework[=INSTALLDIR]
1379 Build (MacOSX|Darwin) framework
1380 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001381 --enable-profiling enable C-level code profiling
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001382 --enable-ipv6 Enable ipv6 (with ipv4) support
1383 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001384 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001385 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001386
1387Optional Packages:
1388 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1389 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001390 --with-universal-archs=ARCH
1391 select architectures for universal build ("32-bit",
Ronald Oussoren3c064c12009-09-08 07:12:42 +00001392 "64-bit", "3-way", "intel" or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001393 --with-framework-name=FRAMEWORK
1394 specify an alternate name of the framework built
1395 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001396 --without-gcc never use gcc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001397 --with-cxx-main=<compiler>
1398 compile main() and link python executable with C++
1399 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001400 --with-suffix=.exe set executable suffix
1401 --with-pydebug build with Py_DEBUG defined
1402 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001403 --with-system-expat build pyexpat module using an installed expat
1404 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001405 --with-system-ffi build _ctypes module using an installed ffi library
Matthias Klose55708cc2009-04-30 08:06:49 +00001406 --with-dbmliborder=db1:db2:...
1407 order to check db backends for dbm. Valid value is a
1408 colon separated string with the backend names
1409 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001410 --with-signal-module disable/enable signal module
1411 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1412 --with(out)-threads[=DIRECTORY]
1413 disable/enable thread support
1414 --with(out)-thread[=DIRECTORY]
1415 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001416 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001417 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001418 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001419 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001420 --with-fpectl enable SIGFPE catching
1421 --with-libm=STRING math library
1422 --with-libc=STRING C library
Georg Brandl52d168a2008-01-07 18:10:24 +00001423 --with-wide-unicode Use 4-byte Unicode characters (default is 2 bytes)
Antoine Pitrou042b1282010-08-13 21:15:58 +00001424 --with(out)-computed-gotos
1425 Use computed gotos in evaluation loop (enabled by
1426 default on supported compilers)
Martin v. Löwis11437992002-04-12 09:54:03 +00001427
1428Some influential environment variables:
1429 CC C compiler command
1430 CFLAGS C compiler flags
1431 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1432 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001433 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001434 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001435 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001436 CPP C preprocessor
1437
1438Use these variables to override the choices made by `configure' or to help
1439it to find libraries and programs with nonstandard names/locations.
1440
Georg Brandle2e15612009-05-20 18:25:10 +00001441Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001442_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001443ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001444fi
1445
1446if test "$ac_init_help" = "recursive"; then
1447 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001448 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001449 test -d "$ac_dir" ||
1450 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1451 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001452 ac_builddir=.
1453
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001454case "$ac_dir" in
1455.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1456*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001457 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001458 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001459 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001460 case $ac_top_builddir_sub in
1461 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1462 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1463 esac ;;
1464esac
1465ac_abs_top_builddir=$ac_pwd
1466ac_abs_builddir=$ac_pwd$ac_dir_suffix
1467# for backward compatibility:
1468ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001469
1470case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001471 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001472 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001473 ac_top_srcdir=$ac_top_builddir_sub
1474 ac_abs_top_srcdir=$ac_pwd ;;
1475 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001476 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001477 ac_top_srcdir=$srcdir
1478 ac_abs_top_srcdir=$srcdir ;;
1479 *) # Relative name.
1480 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1481 ac_top_srcdir=$ac_top_build_prefix$srcdir
1482 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001483esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001484ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001485
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001486 cd "$ac_dir" || { ac_status=$?; continue; }
1487 # Check for guested configure.
1488 if test -f "$ac_srcdir/configure.gnu"; then
1489 echo &&
1490 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1491 elif test -f "$ac_srcdir/configure"; then
1492 echo &&
1493 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001494 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001495 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001496 fi || ac_status=$?
1497 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001498 done
1499fi
1500
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001501test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001502if $ac_init_version; then
1503 cat <<\_ACEOF
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001504python configure 3.2
Benjamin Petersond7f73e92010-09-05 00:09:07 +00001505generated by GNU Autoconf 2.65
Martin v. Löwis11437992002-04-12 09:54:03 +00001506
Benjamin Petersond7f73e92010-09-05 00:09:07 +00001507Copyright (C) 2009 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001508This configure script is free software; the Free Software Foundation
1509gives unlimited permission to copy, distribute and modify it.
1510_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001511 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001512fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001513
1514## ------------------------ ##
1515## Autoconf initialization. ##
1516## ------------------------ ##
1517
1518# ac_fn_c_try_compile LINENO
1519# --------------------------
1520# Try to compile conftest.$ac_ext, and return whether this succeeded.
1521ac_fn_c_try_compile ()
1522{
1523 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1524 rm -f conftest.$ac_objext
1525 if { { ac_try="$ac_compile"
1526case "(($ac_try" in
1527 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1528 *) ac_try_echo=$ac_try;;
1529esac
1530eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1531$as_echo "$ac_try_echo"; } >&5
1532 (eval "$ac_compile") 2>conftest.err
1533 ac_status=$?
1534 if test -s conftest.err; then
1535 grep -v '^ *+' conftest.err >conftest.er1
1536 cat conftest.er1 >&5
1537 mv -f conftest.er1 conftest.err
1538 fi
1539 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1540 test $ac_status = 0; } && {
1541 test -z "$ac_c_werror_flag" ||
1542 test ! -s conftest.err
1543 } && test -s conftest.$ac_objext; then :
1544 ac_retval=0
1545else
1546 $as_echo "$as_me: failed program was:" >&5
1547sed 's/^/| /' conftest.$ac_ext >&5
1548
1549 ac_retval=1
1550fi
1551 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1552 as_fn_set_status $ac_retval
1553
1554} # ac_fn_c_try_compile
1555
1556# ac_fn_c_try_cpp LINENO
1557# ----------------------
1558# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1559ac_fn_c_try_cpp ()
1560{
1561 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1562 if { { ac_try="$ac_cpp conftest.$ac_ext"
1563case "(($ac_try" in
1564 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1565 *) ac_try_echo=$ac_try;;
1566esac
1567eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1568$as_echo "$ac_try_echo"; } >&5
1569 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1570 ac_status=$?
1571 if test -s conftest.err; then
1572 grep -v '^ *+' conftest.err >conftest.er1
1573 cat conftest.er1 >&5
1574 mv -f conftest.er1 conftest.err
1575 fi
1576 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Benjamin Petersond7f73e92010-09-05 00:09:07 +00001577 test $ac_status = 0; } >/dev/null && {
Matthias Kloseb9621712010-04-24 17:59:49 +00001578 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1579 test ! -s conftest.err
1580 }; then :
1581 ac_retval=0
1582else
1583 $as_echo "$as_me: failed program was:" >&5
1584sed 's/^/| /' conftest.$ac_ext >&5
1585
1586 ac_retval=1
1587fi
1588 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1589 as_fn_set_status $ac_retval
1590
1591} # ac_fn_c_try_cpp
1592
1593# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1594# -------------------------------------------------------
1595# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1596# the include files in INCLUDES and setting the cache variable VAR
1597# accordingly.
1598ac_fn_c_check_header_mongrel ()
1599{
1600 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Benjamin Petersond7f73e92010-09-05 00:09:07 +00001601 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001602 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1603$as_echo_n "checking for $2... " >&6; }
Benjamin Petersond7f73e92010-09-05 00:09:07 +00001604if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001605 $as_echo_n "(cached) " >&6
1606fi
1607eval ac_res=\$$3
1608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1609$as_echo "$ac_res" >&6; }
1610else
1611 # Is the header compilable?
1612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1613$as_echo_n "checking $2 usability... " >&6; }
1614cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1615/* end confdefs.h. */
1616$4
1617#include <$2>
1618_ACEOF
1619if ac_fn_c_try_compile "$LINENO"; then :
1620 ac_header_compiler=yes
1621else
1622 ac_header_compiler=no
1623fi
1624rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1625{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1626$as_echo "$ac_header_compiler" >&6; }
1627
1628# Is the header present?
1629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1630$as_echo_n "checking $2 presence... " >&6; }
1631cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1632/* end confdefs.h. */
1633#include <$2>
1634_ACEOF
1635if ac_fn_c_try_cpp "$LINENO"; then :
1636 ac_header_preproc=yes
1637else
1638 ac_header_preproc=no
1639fi
Benjamin Petersond7f73e92010-09-05 00:09:07 +00001640rm -f conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001641{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1642$as_echo "$ac_header_preproc" >&6; }
1643
1644# So? What about this header?
1645case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1646 yes:no: )
1647 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1648$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1649 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1650$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1651 ;;
1652 no:yes:* )
1653 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1654$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1655 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1656$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1657 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1658$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1659 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1660$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1661 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1662$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Benjamin Petersond7f73e92010-09-05 00:09:07 +00001663( cat <<\_ASBOX
1664## -------------------------------------- ##
Matthias Kloseb9621712010-04-24 17:59:49 +00001665## Report this to http://bugs.python.org/ ##
Benjamin Petersond7f73e92010-09-05 00:09:07 +00001666## -------------------------------------- ##
1667_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +00001668 ) | sed "s/^/$as_me: WARNING: /" >&2
1669 ;;
1670esac
1671 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1672$as_echo_n "checking for $2... " >&6; }
Benjamin Petersond7f73e92010-09-05 00:09:07 +00001673if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001674 $as_echo_n "(cached) " >&6
1675else
1676 eval "$3=\$ac_header_compiler"
1677fi
1678eval ac_res=\$$3
1679 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1680$as_echo "$ac_res" >&6; }
1681fi
1682 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1683
1684} # ac_fn_c_check_header_mongrel
1685
1686# ac_fn_c_try_run LINENO
1687# ----------------------
1688# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1689# that executables *can* be run.
1690ac_fn_c_try_run ()
1691{
1692 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1693 if { { ac_try="$ac_link"
1694case "(($ac_try" in
1695 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1696 *) ac_try_echo=$ac_try;;
1697esac
1698eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1699$as_echo "$ac_try_echo"; } >&5
1700 (eval "$ac_link") 2>&5
1701 ac_status=$?
1702 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1703 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1704 { { case "(($ac_try" in
1705 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1706 *) ac_try_echo=$ac_try;;
1707esac
1708eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1709$as_echo "$ac_try_echo"; } >&5
1710 (eval "$ac_try") 2>&5
1711 ac_status=$?
1712 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1713 test $ac_status = 0; }; }; then :
1714 ac_retval=0
1715else
1716 $as_echo "$as_me: program exited with status $ac_status" >&5
1717 $as_echo "$as_me: failed program was:" >&5
1718sed 's/^/| /' conftest.$ac_ext >&5
1719
1720 ac_retval=$ac_status
1721fi
1722 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1723 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1724 as_fn_set_status $ac_retval
1725
1726} # ac_fn_c_try_run
1727
1728# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1729# -------------------------------------------------------
1730# Tests whether HEADER exists and can be compiled using the include files in
1731# INCLUDES, setting the cache variable VAR accordingly.
1732ac_fn_c_check_header_compile ()
1733{
1734 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1735 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1736$as_echo_n "checking for $2... " >&6; }
Benjamin Petersond7f73e92010-09-05 00:09:07 +00001737if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001738 $as_echo_n "(cached) " >&6
1739else
1740 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1741/* end confdefs.h. */
1742$4
1743#include <$2>
1744_ACEOF
1745if ac_fn_c_try_compile "$LINENO"; then :
1746 eval "$3=yes"
1747else
1748 eval "$3=no"
1749fi
1750rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1751fi
1752eval ac_res=\$$3
1753 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1754$as_echo "$ac_res" >&6; }
1755 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1756
1757} # ac_fn_c_check_header_compile
1758
1759# ac_fn_c_try_link LINENO
1760# -----------------------
1761# Try to link conftest.$ac_ext, and return whether this succeeded.
1762ac_fn_c_try_link ()
1763{
1764 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1765 rm -f conftest.$ac_objext conftest$ac_exeext
1766 if { { ac_try="$ac_link"
1767case "(($ac_try" in
1768 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1769 *) ac_try_echo=$ac_try;;
1770esac
1771eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1772$as_echo "$ac_try_echo"; } >&5
1773 (eval "$ac_link") 2>conftest.err
1774 ac_status=$?
1775 if test -s conftest.err; then
1776 grep -v '^ *+' conftest.err >conftest.er1
1777 cat conftest.er1 >&5
1778 mv -f conftest.er1 conftest.err
1779 fi
1780 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1781 test $ac_status = 0; } && {
1782 test -z "$ac_c_werror_flag" ||
1783 test ! -s conftest.err
1784 } && test -s conftest$ac_exeext && {
1785 test "$cross_compiling" = yes ||
1786 $as_test_x conftest$ac_exeext
1787 }; then :
1788 ac_retval=0
1789else
1790 $as_echo "$as_me: failed program was:" >&5
1791sed 's/^/| /' conftest.$ac_ext >&5
1792
1793 ac_retval=1
1794fi
1795 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1796 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1797 # interfere with the next link command; also delete a directory that is
1798 # left behind by Apple's compiler. We do this before executing the actions.
1799 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1800 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1801 as_fn_set_status $ac_retval
1802
1803} # ac_fn_c_try_link
1804
1805# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1806# -------------------------------------------
1807# Tests whether TYPE exists after having included INCLUDES, setting cache
1808# variable VAR accordingly.
1809ac_fn_c_check_type ()
1810{
1811 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1812 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1813$as_echo_n "checking for $2... " >&6; }
Benjamin Petersond7f73e92010-09-05 00:09:07 +00001814if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001815 $as_echo_n "(cached) " >&6
1816else
1817 eval "$3=no"
1818 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1819/* end confdefs.h. */
1820$4
1821int
1822main ()
1823{
1824if (sizeof ($2))
1825 return 0;
1826 ;
1827 return 0;
1828}
1829_ACEOF
1830if ac_fn_c_try_compile "$LINENO"; then :
1831 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1832/* end confdefs.h. */
1833$4
1834int
1835main ()
1836{
1837if (sizeof (($2)))
1838 return 0;
1839 ;
1840 return 0;
1841}
1842_ACEOF
1843if ac_fn_c_try_compile "$LINENO"; then :
1844
1845else
1846 eval "$3=yes"
1847fi
1848rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1849fi
1850rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1851fi
1852eval ac_res=\$$3
1853 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1854$as_echo "$ac_res" >&6; }
1855 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1856
1857} # ac_fn_c_check_type
1858
1859# ac_fn_c_find_uintX_t LINENO BITS VAR
1860# ------------------------------------
1861# Finds an unsigned integer type with width BITS, setting cache variable VAR
1862# accordingly.
1863ac_fn_c_find_uintX_t ()
1864{
1865 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1866 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1867$as_echo_n "checking for uint$2_t... " >&6; }
Benjamin Petersond7f73e92010-09-05 00:09:07 +00001868if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001869 $as_echo_n "(cached) " >&6
1870else
1871 eval "$3=no"
1872 # Order is important - never check a type that is potentially smaller
1873 # than half of the expected target width.
1874 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1875 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1876 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1877/* end confdefs.h. */
1878$ac_includes_default
1879int
1880main ()
1881{
1882static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
1883test_array [0] = 0
1884
1885 ;
1886 return 0;
1887}
1888_ACEOF
1889if ac_fn_c_try_compile "$LINENO"; then :
1890 case $ac_type in #(
1891 uint$2_t) :
1892 eval "$3=yes" ;; #(
1893 *) :
1894 eval "$3=\$ac_type" ;;
1895esac
1896fi
1897rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Petersond7f73e92010-09-05 00:09:07 +00001898 eval as_val=\$$3
1899 if test "x$as_val" = x""no; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001900
1901else
1902 break
1903fi
1904 done
1905fi
1906eval ac_res=\$$3
1907 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1908$as_echo "$ac_res" >&6; }
1909 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1910
1911} # ac_fn_c_find_uintX_t
1912
1913# ac_fn_c_find_intX_t LINENO BITS VAR
1914# -----------------------------------
1915# Finds a signed integer type with width BITS, setting cache variable VAR
1916# accordingly.
1917ac_fn_c_find_intX_t ()
1918{
1919 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1920 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
1921$as_echo_n "checking for int$2_t... " >&6; }
Benjamin Petersond7f73e92010-09-05 00:09:07 +00001922if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001923 $as_echo_n "(cached) " >&6
1924else
1925 eval "$3=no"
1926 # Order is important - never check a type that is potentially smaller
1927 # than half of the expected target width.
1928 for ac_type in int$2_t 'int' 'long int' \
1929 'long long int' 'short int' 'signed char'; do
1930 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1931/* end confdefs.h. */
1932$ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00001933int
1934main ()
1935{
Benjamin Petersond7f73e92010-09-05 00:09:07 +00001936static int test_array [1 - 2 * !(enum { N = $2 / 2 - 1 };
1937 0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
Matthias Kloseb9621712010-04-24 17:59:49 +00001938test_array [0] = 0
1939
1940 ;
1941 return 0;
1942}
1943_ACEOF
1944if ac_fn_c_try_compile "$LINENO"; then :
1945 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1946/* end confdefs.h. */
1947$ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00001948int
1949main ()
1950{
Benjamin Petersond7f73e92010-09-05 00:09:07 +00001951static int test_array [1 - 2 * !(enum { N = $2 / 2 - 1 };
1952 ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Kloseb9621712010-04-24 17:59:49 +00001953 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
1954test_array [0] = 0
1955
1956 ;
1957 return 0;
1958}
1959_ACEOF
1960if ac_fn_c_try_compile "$LINENO"; then :
1961
1962else
1963 case $ac_type in #(
1964 int$2_t) :
1965 eval "$3=yes" ;; #(
1966 *) :
1967 eval "$3=\$ac_type" ;;
1968esac
1969fi
1970rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1971fi
1972rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Petersond7f73e92010-09-05 00:09:07 +00001973 eval as_val=\$$3
1974 if test "x$as_val" = x""no; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001975
1976else
1977 break
1978fi
1979 done
1980fi
1981eval ac_res=\$$3
1982 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1983$as_echo "$ac_res" >&6; }
1984 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1985
1986} # ac_fn_c_find_intX_t
1987
1988# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1989# --------------------------------------------
1990# Tries to find the compile-time value of EXPR in a program that includes
1991# INCLUDES, setting VAR accordingly. Returns whether the value could be
1992# computed
1993ac_fn_c_compute_int ()
1994{
1995 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1996 if test "$cross_compiling" = yes; then
1997 # Depending upon the size, compute the lo and hi bounds.
1998cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1999/* end confdefs.h. */
2000$4
2001int
2002main ()
2003{
2004static int test_array [1 - 2 * !(($2) >= 0)];
2005test_array [0] = 0
2006
2007 ;
2008 return 0;
2009}
2010_ACEOF
2011if ac_fn_c_try_compile "$LINENO"; then :
2012 ac_lo=0 ac_mid=0
2013 while :; do
2014 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2015/* end confdefs.h. */
2016$4
2017int
2018main ()
2019{
2020static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2021test_array [0] = 0
2022
2023 ;
2024 return 0;
2025}
2026_ACEOF
2027if ac_fn_c_try_compile "$LINENO"; then :
2028 ac_hi=$ac_mid; break
2029else
2030 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2031 if test $ac_lo -le $ac_mid; then
2032 ac_lo= ac_hi=
2033 break
2034 fi
2035 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2036fi
2037rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2038 done
2039else
2040 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2041/* end confdefs.h. */
2042$4
2043int
2044main ()
2045{
2046static int test_array [1 - 2 * !(($2) < 0)];
2047test_array [0] = 0
2048
2049 ;
2050 return 0;
2051}
2052_ACEOF
2053if ac_fn_c_try_compile "$LINENO"; then :
2054 ac_hi=-1 ac_mid=-1
2055 while :; do
2056 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2057/* end confdefs.h. */
2058$4
2059int
2060main ()
2061{
2062static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2063test_array [0] = 0
2064
2065 ;
2066 return 0;
2067}
2068_ACEOF
2069if ac_fn_c_try_compile "$LINENO"; then :
2070 ac_lo=$ac_mid; break
2071else
2072 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2073 if test $ac_mid -le $ac_hi; then
2074 ac_lo= ac_hi=
2075 break
2076 fi
2077 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2078fi
2079rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2080 done
2081else
2082 ac_lo= ac_hi=
2083fi
2084rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2085fi
2086rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2087# Binary search between lo and hi bounds.
2088while test "x$ac_lo" != "x$ac_hi"; do
2089 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2090 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2091/* end confdefs.h. */
2092$4
2093int
2094main ()
2095{
2096static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2097test_array [0] = 0
2098
2099 ;
2100 return 0;
2101}
2102_ACEOF
2103if ac_fn_c_try_compile "$LINENO"; then :
2104 ac_hi=$ac_mid
2105else
2106 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2107fi
2108rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2109done
2110case $ac_lo in #((
2111?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2112'') ac_retval=1 ;;
2113esac
2114 else
2115 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2116/* end confdefs.h. */
2117$4
2118static long int longval () { return $2; }
2119static unsigned long int ulongval () { return $2; }
2120#include <stdio.h>
2121#include <stdlib.h>
2122int
2123main ()
2124{
2125
2126 FILE *f = fopen ("conftest.val", "w");
2127 if (! f)
2128 return 1;
2129 if (($2) < 0)
2130 {
2131 long int i = longval ();
2132 if (i != ($2))
2133 return 1;
2134 fprintf (f, "%ld", i);
2135 }
2136 else
2137 {
2138 unsigned long int i = ulongval ();
2139 if (i != ($2))
2140 return 1;
2141 fprintf (f, "%lu", i);
2142 }
2143 /* Do not output a trailing newline, as this causes \r\n confusion
2144 on some platforms. */
2145 return ferror (f) || fclose (f) != 0;
2146
2147 ;
2148 return 0;
2149}
2150_ACEOF
2151if ac_fn_c_try_run "$LINENO"; then :
2152 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2153else
2154 ac_retval=1
2155fi
2156rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2157 conftest.$ac_objext conftest.beam conftest.$ac_ext
2158rm -f conftest.val
2159
2160 fi
2161 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2162 as_fn_set_status $ac_retval
2163
2164} # ac_fn_c_compute_int
2165
2166# ac_fn_c_check_func LINENO FUNC VAR
2167# ----------------------------------
2168# Tests whether FUNC exists, setting the cache variable VAR accordingly
2169ac_fn_c_check_func ()
2170{
2171 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2172 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2173$as_echo_n "checking for $2... " >&6; }
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002174if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002175 $as_echo_n "(cached) " >&6
2176else
2177 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2178/* end confdefs.h. */
2179/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2180 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2181#define $2 innocuous_$2
2182
2183/* System header to define __stub macros and hopefully few prototypes,
2184 which can conflict with char $2 (); below.
2185 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2186 <limits.h> exists even on freestanding compilers. */
2187
2188#ifdef __STDC__
2189# include <limits.h>
2190#else
2191# include <assert.h>
2192#endif
2193
2194#undef $2
2195
2196/* Override any GCC internal prototype to avoid an error.
2197 Use char because int might match the return type of a GCC
2198 builtin and then its argument prototype would still apply. */
2199#ifdef __cplusplus
2200extern "C"
2201#endif
2202char $2 ();
2203/* The GNU C library defines this for functions which it implements
2204 to always fail with ENOSYS. Some functions are actually named
2205 something starting with __ and the normal name is an alias. */
2206#if defined __stub_$2 || defined __stub___$2
2207choke me
2208#endif
2209
2210int
2211main ()
2212{
2213return $2 ();
2214 ;
2215 return 0;
2216}
2217_ACEOF
2218if ac_fn_c_try_link "$LINENO"; then :
2219 eval "$3=yes"
2220else
2221 eval "$3=no"
2222fi
2223rm -f core conftest.err conftest.$ac_objext \
2224 conftest$ac_exeext conftest.$ac_ext
2225fi
2226eval ac_res=\$$3
2227 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2228$as_echo "$ac_res" >&6; }
2229 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2230
2231} # ac_fn_c_check_func
2232
2233# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2234# ----------------------------------------------------
2235# Tries to find if the field MEMBER exists in type AGGR, after including
2236# INCLUDES, setting cache variable VAR accordingly.
2237ac_fn_c_check_member ()
2238{
2239 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2240 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2241$as_echo_n "checking for $2.$3... " >&6; }
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002242if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002243 $as_echo_n "(cached) " >&6
2244else
2245 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2246/* end confdefs.h. */
2247$5
2248int
2249main ()
2250{
2251static $2 ac_aggr;
2252if (ac_aggr.$3)
2253return 0;
2254 ;
2255 return 0;
2256}
2257_ACEOF
2258if ac_fn_c_try_compile "$LINENO"; then :
2259 eval "$4=yes"
2260else
2261 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2262/* end confdefs.h. */
2263$5
2264int
2265main ()
2266{
2267static $2 ac_aggr;
2268if (sizeof ac_aggr.$3)
2269return 0;
2270 ;
2271 return 0;
2272}
2273_ACEOF
2274if ac_fn_c_try_compile "$LINENO"; then :
2275 eval "$4=yes"
2276else
2277 eval "$4=no"
2278fi
2279rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2280fi
2281rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2282fi
2283eval ac_res=\$$4
2284 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2285$as_echo "$ac_res" >&6; }
2286 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2287
2288} # ac_fn_c_check_member
2289
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002290# ac_fn_c_check_decl LINENO SYMBOL VAR
2291# ------------------------------------
2292# Tests whether SYMBOL is declared, setting cache variable VAR accordingly.
Matthias Kloseb9621712010-04-24 17:59:49 +00002293ac_fn_c_check_decl ()
2294{
2295 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002296 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $2 is declared" >&5
2297$as_echo_n "checking whether $2 is declared... " >&6; }
2298if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002299 $as_echo_n "(cached) " >&6
2300else
2301 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2302/* end confdefs.h. */
2303$4
2304int
2305main ()
2306{
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002307#ifndef $2
2308 (void) $2;
Matthias Kloseb9621712010-04-24 17:59:49 +00002309#endif
2310
2311 ;
2312 return 0;
2313}
2314_ACEOF
2315if ac_fn_c_try_compile "$LINENO"; then :
2316 eval "$3=yes"
2317else
2318 eval "$3=no"
2319fi
2320rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2321fi
2322eval ac_res=\$$3
2323 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2324$as_echo "$ac_res" >&6; }
2325 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2326
2327} # ac_fn_c_check_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002328cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002329This file contains any messages produced by compilers while
2330running configure, to aid debugging if configure makes a mistake.
2331
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00002332It was created by python $as_me 3.2, which was
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002333generated by GNU Autoconf 2.65. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002334
2335 $ $0 $@
2336
2337_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002338exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002339{
2340cat <<_ASUNAME
2341## --------- ##
2342## Platform. ##
2343## --------- ##
2344
2345hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2346uname -m = `(uname -m) 2>/dev/null || echo unknown`
2347uname -r = `(uname -r) 2>/dev/null || echo unknown`
2348uname -s = `(uname -s) 2>/dev/null || echo unknown`
2349uname -v = `(uname -v) 2>/dev/null || echo unknown`
2350
2351/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2352/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2353
2354/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2355/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2356/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002357/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002358/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2359/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2360/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2361
2362_ASUNAME
2363
2364as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2365for as_dir in $PATH
2366do
2367 IFS=$as_save_IFS
2368 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002369 $as_echo "PATH: $as_dir"
2370 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002371IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002372
2373} >&5
2374
2375cat >&5 <<_ACEOF
2376
2377
2378## ----------- ##
2379## Core tests. ##
2380## ----------- ##
2381
2382_ACEOF
2383
2384
2385# Keep a trace of the command line.
2386# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002387# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002388# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002389# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002390ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002391ac_configure_args0=
2392ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002393ac_must_keep_next=false
2394for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002395do
Skip Montanaro6dead952003-09-25 14:50:04 +00002396 for ac_arg
2397 do
2398 case $ac_arg in
2399 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2400 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2401 | -silent | --silent | --silen | --sile | --sil)
2402 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002403 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002404 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002405 esac
2406 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002407 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002408 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002409 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002410 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002411 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002412 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002413 case $ac_arg in
2414 *=* | --config-cache | -C | -disable-* | --disable-* \
2415 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2416 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2417 | -with-* | --with-* | -without-* | --without-* | --x)
2418 case "$ac_configure_args0 " in
2419 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2420 esac
2421 ;;
2422 -* ) ac_must_keep_next=true ;;
2423 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002424 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002425 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002426 ;;
2427 esac
2428 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002429done
Matthias Kloseb9621712010-04-24 17:59:49 +00002430{ ac_configure_args0=; unset ac_configure_args0;}
2431{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002432
2433# When interrupted or exit'd, cleanup temporary files, and complete
2434# config.log. We remove comments because anyway the quotes in there
2435# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002436# WARNING: Use '\'' to represent an apostrophe within the trap.
2437# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
Martin v. Löwis11437992002-04-12 09:54:03 +00002438trap 'exit_status=$?
2439 # Save into config.log some information that might help in debugging.
2440 {
2441 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002442
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002443 cat <<\_ASBOX
2444## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002445## Cache variables. ##
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002446## ---------------- ##
2447_ASBOX
Martin v. Löwis11437992002-04-12 09:54:03 +00002448 echo
2449 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002450(
2451 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2452 eval ac_val=\$$ac_var
2453 case $ac_val in #(
2454 *${as_nl}*)
2455 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002456 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2457$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002458 esac
2459 case $ac_var in #(
2460 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002461 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2462 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002463 esac ;;
2464 esac
2465 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002466 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002467 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2468 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002469 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002470 "s/'\''/'\''\\\\'\'''\''/g;
2471 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2472 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002473 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002474 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002475 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002476 esac |
2477 sort
2478)
Martin v. Löwis11437992002-04-12 09:54:03 +00002479 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002480
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002481 cat <<\_ASBOX
2482## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002483## Output variables. ##
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002484## ----------------- ##
2485_ASBOX
Skip Montanaro6dead952003-09-25 14:50:04 +00002486 echo
2487 for ac_var in $ac_subst_vars
2488 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002489 eval ac_val=\$$ac_var
2490 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002491 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002492 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002493 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002494 done | sort
2495 echo
2496
2497 if test -n "$ac_subst_files"; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002498 cat <<\_ASBOX
2499## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002500## File substitutions. ##
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002501## ------------------- ##
2502_ASBOX
Skip Montanaro6dead952003-09-25 14:50:04 +00002503 echo
2504 for ac_var in $ac_subst_files
2505 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002506 eval ac_val=\$$ac_var
2507 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002508 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002509 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002510 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002511 done | sort
2512 echo
2513 fi
2514
Martin v. Löwis11437992002-04-12 09:54:03 +00002515 if test -s confdefs.h; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002516 cat <<\_ASBOX
2517## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002518## confdefs.h. ##
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002519## ----------- ##
2520_ASBOX
Martin v. Löwis11437992002-04-12 09:54:03 +00002521 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002522 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002523 echo
2524 fi
2525 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002526 $as_echo "$as_me: caught signal $ac_signal"
2527 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002528 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002529 rm -f core *.core core.conftest.* &&
2530 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002531 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002532' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002533for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002534 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002535done
2536ac_signal=0
2537
2538# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002539rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002540
Matthias Kloseb9621712010-04-24 17:59:49 +00002541$as_echo "/* confdefs.h */" > confdefs.h
2542
Martin v. Löwis11437992002-04-12 09:54:03 +00002543# Predefined preprocessor variables.
2544
2545cat >>confdefs.h <<_ACEOF
2546#define PACKAGE_NAME "$PACKAGE_NAME"
2547_ACEOF
2548
Martin v. Löwis11437992002-04-12 09:54:03 +00002549cat >>confdefs.h <<_ACEOF
2550#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2551_ACEOF
2552
Martin v. Löwis11437992002-04-12 09:54:03 +00002553cat >>confdefs.h <<_ACEOF
2554#define PACKAGE_VERSION "$PACKAGE_VERSION"
2555_ACEOF
2556
Martin v. Löwis11437992002-04-12 09:54:03 +00002557cat >>confdefs.h <<_ACEOF
2558#define PACKAGE_STRING "$PACKAGE_STRING"
2559_ACEOF
2560
Martin v. Löwis11437992002-04-12 09:54:03 +00002561cat >>confdefs.h <<_ACEOF
2562#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2563_ACEOF
2564
Matthias Kloseb9621712010-04-24 17:59:49 +00002565cat >>confdefs.h <<_ACEOF
2566#define PACKAGE_URL "$PACKAGE_URL"
2567_ACEOF
2568
Martin v. Löwis11437992002-04-12 09:54:03 +00002569
2570# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002571# Prefer an explicitly selected file to automatically selected ones.
2572ac_site_file1=NONE
2573ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002574if test -n "$CONFIG_SITE"; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002575 ac_site_file1=$CONFIG_SITE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002576elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002577 ac_site_file1=$prefix/share/config.site
2578 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002579else
Matthias Kloseb9621712010-04-24 17:59:49 +00002580 ac_site_file1=$ac_default_prefix/share/config.site
2581 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002582fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002583for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002584do
Matthias Kloseb9621712010-04-24 17:59:49 +00002585 test "x$ac_site_file" = xNONE && continue
2586 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2587 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2588$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002589 sed 's/^/| /' "$ac_site_file" >&5
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002590 . "$ac_site_file"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002591 fi
2592done
2593
2594if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002595 # Some versions of bash will fail to source /dev/null (special files
2596 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2597 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2598 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2599$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002600 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002601 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2602 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002603 esac
2604 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002605else
Matthias Kloseb9621712010-04-24 17:59:49 +00002606 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2607$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002608 >$cache_file
2609fi
2610
2611# Check that the precious variables saved in the cache have kept the same
2612# value.
2613ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002614for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002615 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2616 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002617 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2618 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002619 case $ac_old_set,$ac_new_set in
2620 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002621 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2622$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002623 ac_cache_corrupted=: ;;
2624 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002625 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2626$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002627 ac_cache_corrupted=: ;;
2628 ,);;
2629 *)
2630 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002631 # differences in whitespace do not lead to failure.
2632 ac_old_val_w=`echo x $ac_old_val`
2633 ac_new_val_w=`echo x $ac_new_val`
2634 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2635 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2636$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2637 ac_cache_corrupted=:
2638 else
2639 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2640$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2641 eval $ac_var=\$ac_old_val
2642 fi
2643 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2644$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2645 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2646$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002647 fi;;
2648 esac
2649 # Pass precious variables to config.status.
2650 if test "$ac_new_set" = set; then
2651 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002652 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002653 *) ac_arg=$ac_var=$ac_new_val ;;
2654 esac
2655 case " $ac_configure_args " in
2656 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002657 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002658 esac
2659 fi
2660done
2661if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002662 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2663$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2664 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2665$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002666 as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002667fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002668## -------------------- ##
2669## Main body of script. ##
2670## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002671
Guido van Rossum7f43da71994-08-01 12:15:30 +00002672ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002673ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002674ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2675ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2676ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002677
Guido van Rossum627b2d71993-12-24 10:39:16 +00002678
Michael W. Hudson54241132001-12-07 15:38:26 +00002679
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002680ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002681
2682
Martin v. Löwis11437992002-04-12 09:54:03 +00002683
Benjamin Petersond23f8222009-04-05 19:13:16 +00002684if test "$prefix" != "/"; then
2685 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2686fi
2687
2688
Martin v. Löwis11437992002-04-12 09:54:03 +00002689
2690
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002691# We don't use PACKAGE_ variables, and they cause conflicts
2692# with other autoconf-based packages that include Python.h
2693grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2694rm confdefs.h
2695mv confdefs.h.new confdefs.h
2696
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002697
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00002698VERSION=3.2
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002699
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002700# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002701
2702SOVERSION=1.0
2703
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002704# The later defininition of _XOPEN_SOURCE disables certain features
2705# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2706
Matthias Kloseb9621712010-04-24 17:59:49 +00002707$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002708
2709
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002710# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2711# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2712# them.
2713
Matthias Kloseb9621712010-04-24 17:59:49 +00002714$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002715
2716
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002717# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2718# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2719# them.
2720
Matthias Kloseb9621712010-04-24 17:59:49 +00002721$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002722
2723
Martin v. Löwisd6320502004-08-12 13:45:08 +00002724# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2725# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
2726
Matthias Kloseb9621712010-04-24 17:59:49 +00002727$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00002728
2729
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002730# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2731# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2732# them.
2733
Matthias Kloseb9621712010-04-24 17:59:49 +00002734$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002735
2736
2737
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002738define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002739
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00002740# Arguments passed to configure.
2741
2742CONFIG_ARGS="$ac_configure_args"
2743
Matthias Kloseb9621712010-04-24 17:59:49 +00002744{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
2745$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002746# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002747if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002748 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00002749 case $enableval in
2750 yes)
2751 enableval=/Developer/SDKs/MacOSX10.4u.sdk
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002752 if test ! -d "${enableval}"
2753 then
2754 enableval=/
2755 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002756 ;;
2757 esac
2758 case $enableval in
2759 no)
2760 UNIVERSALSDK=
2761 enable_universalsdk=
2762 ;;
2763 *)
2764 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002765 if test ! -d "${UNIVERSALSDK}"
2766 then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002767 as_fn_error "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002768 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002769 ;;
2770 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002771
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002772
Thomas Wouters477c8d52006-05-27 19:21:47 +00002773else
2774
2775 UNIVERSALSDK=
2776 enable_universalsdk=
2777
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002778fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002779
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002780if test -n "${UNIVERSALSDK}"
2781then
Matthias Kloseb9621712010-04-24 17:59:49 +00002782 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
2783$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002784else
Matthias Kloseb9621712010-04-24 17:59:49 +00002785 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2786$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002787fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002788
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002789
Benjamin Peterson6794aa32008-07-16 20:33:37 +00002790
2791
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002792UNIVERSAL_ARCHS="32-bit"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00002793
Matthias Kloseb9621712010-04-24 17:59:49 +00002794{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
2795$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002796
2797# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002798if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002799 withval=$with_universal_archs;
Matthias Kloseb9621712010-04-24 17:59:49 +00002800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
2801$as_echo "$withval" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002802 UNIVERSAL_ARCHS="$withval"
2803
2804else
2805
Matthias Kloseb9621712010-04-24 17:59:49 +00002806 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 32-bit" >&5
2807$as_echo "32-bit" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002808
2809fi
2810
2811
2812
2813
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002814
2815# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002816if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002817 withval=$with_framework_name;
2818 PYTHONFRAMEWORK=${withval}
2819 PYTHONFRAMEWORKDIR=${withval}.framework
2820 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
2821
2822else
2823
2824 PYTHONFRAMEWORK=Python
2825 PYTHONFRAMEWORKDIR=Python.framework
2826 PYTHONFRAMEWORKIDENTIFIER=org.python.python
2827
2828fi
2829
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002830# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002831if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002832 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00002833 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00002834 yes)
Jack Jansene578a632001-08-15 01:27:14 +00002835 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00002836 esac
2837 case $enableval in
2838 no)
2839 PYTHONFRAMEWORK=
2840 PYTHONFRAMEWORKDIR=no-framework
2841 PYTHONFRAMEWORKPREFIX=
2842 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002843 FRAMEWORKINSTALLFIRST=
2844 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002845 FRAMEWORKALTINSTALLFIRST=
2846 FRAMEWORKALTINSTALLLAST=
2847 if test "x${prefix}" = "xNONE"; then
2848 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2849 else
2850 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2851 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00002852 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00002853 ;;
2854 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002855 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00002856 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00002857 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00002858 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00002859 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
2860 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002861 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002862
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002863 if test "x${prefix}" = "xNONE" ; then
2864 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002865
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002866 else
2867 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2868 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002869
2870 case "${enableval}" in
2871 /System*)
2872 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2873 if test "${prefix}" = "NONE" ; then
2874 # See below
2875 FRAMEWORKUNIXTOOLSPREFIX="/usr"
2876 fi
2877 ;;
2878
2879 /Library*)
2880 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2881 ;;
2882
2883 */Library/Frameworks)
2884 MDIR="`dirname "${enableval}"`"
2885 MDIR="`dirname "${MDIR}"`"
2886 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
2887
2888 if test "${prefix}" = "NONE"; then
2889 # User hasn't specified the
2890 # --prefix option, but wants to install
2891 # the framework in a non-default location,
2892 # ensure that the compatibility links get
2893 # installed relative to that prefix as well
2894 # instead of in /usr/local.
2895 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
2896 fi
2897 ;;
2898
2899 *)
2900 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2901 ;;
2902 esac
2903
Jack Jansen127e56e2001-09-11 14:41:54 +00002904 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00002905
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002906 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00002907 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002908 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002909
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002910 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002911
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002912 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
2913
2914 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
2915
Jack Jansene578a632001-08-15 01:27:14 +00002916 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002917
Guido van Rossum563e7081996-09-10 18:20:48 +00002918else
Martin v. Löwis11437992002-04-12 09:54:03 +00002919
Jack Jansene578a632001-08-15 01:27:14 +00002920 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00002921 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00002922 PYTHONFRAMEWORKPREFIX=
2923 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002924 FRAMEWORKINSTALLFIRST=
2925 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002926 FRAMEWORKALTINSTALLFIRST=
2927 FRAMEWORKALTINSTALLLAST=
2928 if test "x${prefix}" = "xNONE" ; then
2929 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2930 else
2931 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2932 fi
Jack Jansene578a632001-08-15 01:27:14 +00002933 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002934
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002935
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002936fi
2937
Thomas Wouters477c8d52006-05-27 19:21:47 +00002938
2939
Michael W. Hudson54241132001-12-07 15:38:26 +00002940
2941
2942
2943
Jack Jansene578a632001-08-15 01:27:14 +00002944
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002945
2946
2947
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002948
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002949
Jack Jansene578a632001-08-15 01:27:14 +00002950##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00002951## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00002952## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00002953##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002954# Set name for machine-dependent library files
2955
Matthias Kloseb9621712010-04-24 17:59:49 +00002956{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
2957$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002958if test -z "$MACHDEP"
2959then
Guido van Rossum563e7081996-09-10 18:20:48 +00002960 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002961 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00002962 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00002963 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002964 else
Guido van Rossum563e7081996-09-10 18:20:48 +00002965 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002966 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00002967 ac_md_system=`echo $ac_sys_system |
2968 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
2969 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00002970 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00002971 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00002972
Guido van Rossum07397971997-04-29 21:49:50 +00002973 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002974 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002975 darwin*) MACHDEP="darwin";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00002976 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00002977 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002978 esac
2979fi
Guido van Rossum91922671997-10-09 20:24:13 +00002980
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002981# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
2982# disable features if it is defined, without any means to access these
2983# features as extensions. For these systems, we skip the definition of
2984# _XOPEN_SOURCE. Before adding a system to the list to gain access to
2985# some feature, make sure there is no alternative way to access this
2986# feature. Also, when using wildcards, make sure you have verified the
2987# need for not defining _XOPEN_SOURCE on all systems matching the
2988# wildcard, and that the wildcard does not include future systems
2989# (which may remove their limitations).
2990case $ac_sys_system/$ac_sys_release in
2991 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
2992 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00002993 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00002994 # In addition, Stefan Krah confirms that issue #1244610 exists through
2995 # OpenBSD 4.6, but is fixed in 4.7.
2996 OpenBSD/2.* | OpenBSD/3.[0123456789] | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00002997 define_xopen_source=no
2998 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
2999 # also defined. This can be overridden by defining _BSD_SOURCE
3000 # As this has a different meaning on Linux, only define it on OpenBSD
3001
Matthias Kloseb9621712010-04-24 17:59:49 +00003002$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003003
3004 ;;
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003005 OpenBSD/4.[789])
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003006 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3007 # also defined. This can be overridden by defining _BSD_SOURCE
3008 # As this has a different meaning on Linux, only define it on OpenBSD
3009
Matthias Kloseb9621712010-04-24 17:59:49 +00003010$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003011
3012 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003013 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3014 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3015 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003016 NetBSD/1.5 | NetBSD/1.5.* | NetBSD/1.6 | NetBSD/1.6.* | NetBSD/1.6[A-S])
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003017 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003018 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3019 # request to enable features supported by the standard as a request
3020 # to disable features not supported by the standard. The best way
3021 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3022 # entirely and define __EXTENSIONS__ instead.
3023 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003024 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003025 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3026 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003027 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003028 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003029 define_xopen_source=no;;
3030 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003031 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003032 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003033 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003034 # On FreeBSD 4, the math functions C89 does not cover are never defined
3035 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3036 FreeBSD/4.*)
3037 define_xopen_source=no;;
3038 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3039 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3040 # identifies itself as Darwin/7.*
3041 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3042 # disables platform specific features beyond repair.
3043 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3044 # has no effect, don't bother defining them
3045 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003046 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003047 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003048 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003049 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3050 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3051 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003052 AIX/4)
3053 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003054 AIX/5)
3055 if test `uname -r` -eq 1; then
3056 define_xopen_source=no
3057 fi
3058 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003059 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3060 # defining NI_NUMERICHOST.
3061 QNX/6.3.2)
3062 define_xopen_source=no
3063 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003064
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003065esac
3066
3067if test $define_xopen_source = yes
3068then
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003069
Matthias Kloseb9621712010-04-24 17:59:49 +00003070$as_echo "#define _XOPEN_SOURCE 600" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003071
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003072
3073 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3074 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3075 # several APIs are not declared. Since this is also needed in some
3076 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003077
Matthias Kloseb9621712010-04-24 17:59:49 +00003078$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003079
3080
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003081
Matthias Kloseb9621712010-04-24 17:59:49 +00003082$as_echo "#define _POSIX_C_SOURCE 200112L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003083
3084
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003085fi
3086
Guido van Rossum91922671997-10-09 20:24:13 +00003087#
3088# SGI compilers allow the specification of the both the ABI and the
3089# ISA on the command line. Depending on the values of these switches,
3090# different and often incompatable code will be generated.
3091#
3092# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3093# thus supply support for various ABI/ISA combinations. The MACHDEP
3094# variable is also adjusted.
3095#
3096
3097if test ! -z "$SGI_ABI"
3098then
3099 CC="cc $SGI_ABI"
3100 LDFLAGS="$SGI_ABI $LDFLAGS"
3101 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3102fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003103{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3104$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003105
Jack Jansen6b08a402004-06-03 12:41:45 +00003106# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3107# it may influence the way we can build extensions, so distutils
3108# needs to check it
3109
Thomas Wouters477c8d52006-05-27 19:21:47 +00003110
Jack Jansen6b08a402004-06-03 12:41:45 +00003111CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003112EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003113
Matthias Kloseb9621712010-04-24 17:59:49 +00003114{ $as_echo "$as_me:${as_lineno-$LINENO}: checking machine type as reported by uname -m" >&5
3115$as_echo_n "checking machine type as reported by uname -m... " >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00003116ac_sys_machine=`uname -m`
Matthias Kloseb9621712010-04-24 17:59:49 +00003117{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_sys_machine" >&5
3118$as_echo "$ac_sys_machine" >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00003119
Guido van Rossum627b2d71993-12-24 10:39:16 +00003120# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003121
3122# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3123# for debug/optimization stuff. BASECFLAGS is for flags that are required
3124# just to get things to compile and link. Users are free to override OPT
3125# when running configure or make. The build should not break if they do.
3126# BASECFLAGS should generally not be messed with, however.
3127
3128# XXX shouldn't some/most/all of this code be merged with the stuff later
3129# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003130{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3131$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003132
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003133# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003134if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003135 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003136 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003137 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003138 without_gcc=yes;;
3139 yes) CC=gcc
3140 without_gcc=no;;
3141 *) CC=$withval
3142 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003143 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003144else
Martin v. Löwis11437992002-04-12 09:54:03 +00003145
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003146 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003147 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003148 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003149 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003150 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003151fi
3152
Matthias Kloseb9621712010-04-24 17:59:49 +00003153{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3154$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003155
Guido van Rossum8b131c51995-03-09 14:10:13 +00003156# If the user switches compilers, we can't believe the cache
3157if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3158then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00003159 as_fn_error "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003160(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003161fi
3162
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003163# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3164# when the compiler supports them, but we don't always want -O2, and
3165# we set -g later.
3166if test -z "$CFLAGS"; then
3167 CFLAGS=
3168fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003169ac_ext=c
3170ac_cpp='$CPP $CPPFLAGS'
3171ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3172ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3173ac_compiler_gnu=$ac_cv_c_compiler_gnu
3174if test -n "$ac_tool_prefix"; then
3175 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3176set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003177{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3178$as_echo_n "checking for $ac_word... " >&6; }
3179if test "${ac_cv_prog_CC+set}" = set; then :
3180 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003181else
3182 if test -n "$CC"; then
3183 ac_cv_prog_CC="$CC" # Let the user override the test.
3184else
Martin v. Löwis11437992002-04-12 09:54:03 +00003185as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3186for as_dir in $PATH
3187do
3188 IFS=$as_save_IFS
3189 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003190 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003191 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003192 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003193 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003194 break 2
3195 fi
3196done
Matthias Kloseb9621712010-04-24 17:59:49 +00003197 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003198IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003199
Jack Jansendd19cf82001-12-06 22:36:17 +00003200fi
3201fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003202CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003203if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003204 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3205$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003206else
Matthias Kloseb9621712010-04-24 17:59:49 +00003207 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3208$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003209fi
3210
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003211
Martin v. Löwis11437992002-04-12 09:54:03 +00003212fi
3213if test -z "$ac_cv_prog_CC"; then
3214 ac_ct_CC=$CC
3215 # Extract the first word of "gcc", so it can be a program name with args.
3216set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003217{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3218$as_echo_n "checking for $ac_word... " >&6; }
3219if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
3220 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003221else
3222 if test -n "$ac_ct_CC"; then
3223 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3224else
3225as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3226for as_dir in $PATH
3227do
3228 IFS=$as_save_IFS
3229 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003230 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003231 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003232 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003233 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003234 break 2
3235 fi
3236done
Matthias Kloseb9621712010-04-24 17:59:49 +00003237 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003238IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003239
3240fi
3241fi
3242ac_ct_CC=$ac_cv_prog_ac_ct_CC
3243if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003244 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3245$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003246else
Matthias Kloseb9621712010-04-24 17:59:49 +00003247 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3248$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003249fi
3250
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003251 if test "x$ac_ct_CC" = x; then
3252 CC=""
3253 else
3254 case $cross_compiling:$ac_tool_warned in
3255yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003256{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3257$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003258ac_tool_warned=yes ;;
3259esac
3260 CC=$ac_ct_CC
3261 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003262else
3263 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003264fi
3265
Jack Jansendd19cf82001-12-06 22:36:17 +00003266if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003267 if test -n "$ac_tool_prefix"; then
3268 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
Martin v. Löwis11437992002-04-12 09:54:03 +00003269set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003270{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3271$as_echo_n "checking for $ac_word... " >&6; }
3272if test "${ac_cv_prog_CC+set}" = set; then :
3273 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003274else
3275 if test -n "$CC"; then
3276 ac_cv_prog_CC="$CC" # Let the user override the test.
3277else
Martin v. Löwis11437992002-04-12 09:54:03 +00003278as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3279for as_dir in $PATH
3280do
3281 IFS=$as_save_IFS
3282 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003283 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003284 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003285 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003286 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003287 break 2
3288 fi
3289done
Matthias Kloseb9621712010-04-24 17:59:49 +00003290 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003291IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003292
3293fi
3294fi
3295CC=$ac_cv_prog_CC
3296if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003297 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3298$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003299else
Matthias Kloseb9621712010-04-24 17:59:49 +00003300 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3301$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003302fi
3303
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003304
Martin v. Löwis11437992002-04-12 09:54:03 +00003305 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003306fi
3307if test -z "$CC"; then
3308 # Extract the first word of "cc", so it can be a program name with args.
3309set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3311$as_echo_n "checking for $ac_word... " >&6; }
3312if test "${ac_cv_prog_CC+set}" = set; then :
3313 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003314else
3315 if test -n "$CC"; then
3316 ac_cv_prog_CC="$CC" # Let the user override the test.
3317else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003318 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003319as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3320for as_dir in $PATH
3321do
3322 IFS=$as_save_IFS
3323 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003324 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003325 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003326 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3327 ac_prog_rejected=yes
3328 continue
3329 fi
3330 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003331 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003332 break 2
3333 fi
3334done
Matthias Kloseb9621712010-04-24 17:59:49 +00003335 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003336IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003337
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003338if test $ac_prog_rejected = yes; then
3339 # We found a bogon in the path, so make sure we never use it.
3340 set dummy $ac_cv_prog_CC
3341 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003342 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003343 # We chose a different compiler from the bogus one.
3344 # However, it has the same basename, so the bogon will be chosen
3345 # first if we set CC to just the basename; use the full file name.
3346 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003347 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003348 fi
3349fi
3350fi
3351fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003352CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003353if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003354 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3355$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003356else
Matthias Kloseb9621712010-04-24 17:59:49 +00003357 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3358$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003359fi
3360
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003361
Martin v. Löwis11437992002-04-12 09:54:03 +00003362fi
3363if test -z "$CC"; then
3364 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003365 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003366 do
3367 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3368set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003369{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3370$as_echo_n "checking for $ac_word... " >&6; }
3371if test "${ac_cv_prog_CC+set}" = set; then :
3372 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003373else
3374 if test -n "$CC"; then
3375 ac_cv_prog_CC="$CC" # Let the user override the test.
3376else
Martin v. Löwis11437992002-04-12 09:54:03 +00003377as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3378for as_dir in $PATH
3379do
3380 IFS=$as_save_IFS
3381 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003382 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003383 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003384 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003385 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003386 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003387 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003388done
Matthias Kloseb9621712010-04-24 17:59:49 +00003389 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003390IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003391
3392fi
3393fi
3394CC=$ac_cv_prog_CC
3395if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003396 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3397$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003398else
Matthias Kloseb9621712010-04-24 17:59:49 +00003399 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3400$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003401fi
3402
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003403
Martin v. Löwis11437992002-04-12 09:54:03 +00003404 test -n "$CC" && break
3405 done
3406fi
3407if test -z "$CC"; then
3408 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003409 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003410do
3411 # Extract the first word of "$ac_prog", so it can be a program name with args.
3412set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003413{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3414$as_echo_n "checking for $ac_word... " >&6; }
3415if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
3416 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003417else
3418 if test -n "$ac_ct_CC"; then
3419 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3420else
3421as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3422for as_dir in $PATH
3423do
3424 IFS=$as_save_IFS
3425 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003426 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003427 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003428 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003429 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003430 break 2
3431 fi
3432done
Matthias Kloseb9621712010-04-24 17:59:49 +00003433 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003434IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003435
Martin v. Löwis11437992002-04-12 09:54:03 +00003436fi
3437fi
3438ac_ct_CC=$ac_cv_prog_ac_ct_CC
3439if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003440 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3441$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003442else
Matthias Kloseb9621712010-04-24 17:59:49 +00003443 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3444$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003445fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003446
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003447
Martin v. Löwis11437992002-04-12 09:54:03 +00003448 test -n "$ac_ct_CC" && break
3449done
Michael W. Hudson54241132001-12-07 15:38:26 +00003450
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003451 if test "x$ac_ct_CC" = x; then
3452 CC=""
3453 else
3454 case $cross_compiling:$ac_tool_warned in
3455yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003456{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3457$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003458ac_tool_warned=yes ;;
3459esac
3460 CC=$ac_ct_CC
3461 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003462fi
3463
3464fi
3465
3466
Matthias Kloseb9621712010-04-24 17:59:49 +00003467test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3468$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Petersond7f73e92010-09-05 00:09:07 +00003469as_fn_error "no acceptable C compiler found in \$PATH
3470See \`config.log' for more details." "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003471
3472# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003473$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3474set X $ac_compile
3475ac_compiler=$2
3476for ac_option in --version -v -V -qversion; do
3477 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003478case "(($ac_try" in
3479 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3480 *) ac_try_echo=$ac_try;;
3481esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003482eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3483$as_echo "$ac_try_echo"; } >&5
3484 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003485 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003486 if test -s conftest.err; then
3487 sed '10a\
3488... rest of stderr output deleted ...
3489 10q' conftest.err >conftest.er1
3490 cat conftest.er1 >&5
3491 fi
3492 rm -f conftest.er1 conftest.err
3493 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3494 test $ac_status = 0; }
3495done
Martin v. Löwis11437992002-04-12 09:54:03 +00003496
Matthias Kloseb9621712010-04-24 17:59:49 +00003497cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003498/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003499
Martin v. Löwis11437992002-04-12 09:54:03 +00003500int
3501main ()
3502{
3503
3504 ;
3505 return 0;
3506}
3507_ACEOF
3508ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003509ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003510# Try to create an executable without -o first, disregard a.out.
3511# It will help us diagnose broken compilers, and finding out an intuition
3512# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003513{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3514$as_echo_n "checking whether the C compiler works... " >&6; }
3515ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3516
3517# The possible output files:
3518ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3519
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003520ac_rmfiles=
3521for ac_file in $ac_files
3522do
3523 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003524 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003525 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3526 esac
3527done
3528rm -f $ac_rmfiles
3529
Matthias Kloseb9621712010-04-24 17:59:49 +00003530if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003531case "(($ac_try" in
3532 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3533 *) ac_try_echo=$ac_try;;
3534esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003535eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3536$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003537 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003538 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003539 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3540 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003541 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3542# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3543# in a Makefile. We should not override ac_cv_exeext if it was cached,
3544# so that the user can short-circuit this test for compilers unknown to
3545# Autoconf.
3546for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003547do
3548 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003549 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003550 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003551 ;;
3552 [ab].out )
3553 # We found the default executable, but exeext='' is most
3554 # certainly right.
3555 break;;
3556 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003557 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003558 then :; else
3559 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3560 fi
3561 # We set ac_cv_exeext here because the later test for it is not
3562 # safe: cross compilers may not add the suffix if given an `-o'
3563 # argument, so we may need to know it at that point already.
3564 # Even if this section looks crufty: it has the advantage of
3565 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003566 break;;
3567 * )
3568 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003569 esac
3570done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003571test "$ac_cv_exeext" = no && ac_cv_exeext=
3572
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003573else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003574 ac_file=''
3575fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003576if test -z "$ac_file"; then :
3577 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3578$as_echo "no" >&6; }
3579$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003580sed 's/^/| /' conftest.$ac_ext >&5
3581
Matthias Kloseb9621712010-04-24 17:59:49 +00003582{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3583$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Petersond7f73e92010-09-05 00:09:07 +00003584{ as_fn_set_status 77
3585as_fn_error "C compiler cannot create executables
3586See \`config.log' for more details." "$LINENO" 5; }; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003587else
3588 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3589$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003590fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003591{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3592$as_echo_n "checking for C compiler default output file name... " >&6; }
3593{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3594$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003595ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003596
Matthias Kloseb9621712010-04-24 17:59:49 +00003597rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003598ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00003599{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3600$as_echo_n "checking for suffix of executables... " >&6; }
3601if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003602case "(($ac_try" in
3603 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3604 *) ac_try_echo=$ac_try;;
3605esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003606eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3607$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003608 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003609 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003610 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3611 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003612 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3613# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3614# work properly (i.e., refer to `conftest.exe'), while it won't with
3615# `rm'.
3616for ac_file in conftest.exe conftest conftest.*; do
3617 test -f "$ac_file" || continue
3618 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003619 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003620 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3621 break;;
3622 * ) break;;
3623 esac
3624done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003625else
Matthias Kloseb9621712010-04-24 17:59:49 +00003626 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3627$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Petersond7f73e92010-09-05 00:09:07 +00003628as_fn_error "cannot compute suffix of executables: cannot compile and link
3629See \`config.log' for more details." "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003630fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003631rm -f conftest conftest$ac_cv_exeext
3632{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3633$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003634
3635rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003636EXEEXT=$ac_cv_exeext
3637ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003638cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3639/* end confdefs.h. */
3640#include <stdio.h>
3641int
3642main ()
3643{
3644FILE *f = fopen ("conftest.out", "w");
3645 return ferror (f) || fclose (f) != 0;
3646
3647 ;
3648 return 0;
3649}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003650_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003651ac_clean_files="$ac_clean_files conftest.out"
3652# Check that the compiler produces executables we can run. If not, either
3653# the compiler is broken, or we cross compile.
3654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3655$as_echo_n "checking whether we are cross compiling... " >&6; }
3656if test "$cross_compiling" != yes; then
3657 { { ac_try="$ac_link"
3658case "(($ac_try" in
3659 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3660 *) ac_try_echo=$ac_try;;
3661esac
3662eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3663$as_echo "$ac_try_echo"; } >&5
3664 (eval "$ac_link") 2>&5
3665 ac_status=$?
3666 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3667 test $ac_status = 0; }
3668 if { ac_try='./conftest$ac_cv_exeext'
3669 { { case "(($ac_try" in
3670 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3671 *) ac_try_echo=$ac_try;;
3672esac
3673eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3674$as_echo "$ac_try_echo"; } >&5
3675 (eval "$ac_try") 2>&5
3676 ac_status=$?
3677 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3678 test $ac_status = 0; }; }; then
3679 cross_compiling=no
3680 else
3681 if test "$cross_compiling" = maybe; then
3682 cross_compiling=yes
3683 else
3684 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3685$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Petersond7f73e92010-09-05 00:09:07 +00003686as_fn_error "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00003687If you meant to cross compile, use \`--host'.
Benjamin Petersond7f73e92010-09-05 00:09:07 +00003688See \`config.log' for more details." "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003689 fi
3690 fi
3691fi
3692{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3693$as_echo "$cross_compiling" >&6; }
3694
3695rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3696ac_clean_files=$ac_clean_files_save
3697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3698$as_echo_n "checking for suffix of object files... " >&6; }
3699if test "${ac_cv_objext+set}" = set; then :
3700 $as_echo_n "(cached) " >&6
3701else
3702 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003703/* end confdefs.h. */
3704
3705int
3706main ()
3707{
3708
3709 ;
3710 return 0;
3711}
3712_ACEOF
3713rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00003714if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003715case "(($ac_try" in
3716 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3717 *) ac_try_echo=$ac_try;;
3718esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003719eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3720$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003721 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003722 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003723 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3724 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003725 for ac_file in conftest.o conftest.obj conftest.*; do
3726 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00003727 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003728 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003729 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3730 break;;
3731 esac
3732done
3733else
Matthias Kloseb9621712010-04-24 17:59:49 +00003734 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003735sed 's/^/| /' conftest.$ac_ext >&5
3736
Matthias Kloseb9621712010-04-24 17:59:49 +00003737{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3738$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Petersond7f73e92010-09-05 00:09:07 +00003739as_fn_error "cannot compute suffix of object files: cannot compile
3740See \`config.log' for more details." "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003741fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003742rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003743fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003744{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3745$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003746OBJEXT=$ac_cv_objext
3747ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3749$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3750if test "${ac_cv_c_compiler_gnu+set}" = set; then :
3751 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003752else
Matthias Kloseb9621712010-04-24 17:59:49 +00003753 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003754/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003755
Martin v. Löwis11437992002-04-12 09:54:03 +00003756int
3757main ()
3758{
3759#ifndef __GNUC__
3760 choke me
3761#endif
3762
3763 ;
3764 return 0;
3765}
3766_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003767if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00003768 ac_compiler_gnu=yes
3769else
Matthias Kloseb9621712010-04-24 17:59:49 +00003770 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003771fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003772rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003773ac_cv_c_compiler_gnu=$ac_compiler_gnu
3774
3775fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003776{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3777$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3778if test $ac_compiler_gnu = yes; then
3779 GCC=yes
3780else
3781 GCC=
3782fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003783ac_test_CFLAGS=${CFLAGS+set}
3784ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00003785{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3786$as_echo_n "checking whether $CC accepts -g... " >&6; }
3787if test "${ac_cv_prog_cc_g+set}" = set; then :
3788 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003789else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003790 ac_save_c_werror_flag=$ac_c_werror_flag
3791 ac_c_werror_flag=yes
3792 ac_cv_prog_cc_g=no
3793 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00003794 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003795/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003796
Martin v. Löwis11437992002-04-12 09:54:03 +00003797int
3798main ()
3799{
3800
3801 ;
3802 return 0;
3803}
3804_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003805if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00003806 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003807else
Matthias Kloseb9621712010-04-24 17:59:49 +00003808 CFLAGS=""
3809 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003810/* end confdefs.h. */
3811
3812int
3813main ()
3814{
3815
3816 ;
3817 return 0;
3818}
3819_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003820if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003821
Matthias Kloseb9621712010-04-24 17:59:49 +00003822else
3823 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003824 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00003825 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003826/* end confdefs.h. */
3827
3828int
3829main ()
3830{
3831
3832 ;
3833 return 0;
3834}
3835_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003836if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003837 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00003838fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003839rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003840fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003841rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3842fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003843rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3844 ac_c_werror_flag=$ac_save_c_werror_flag
3845fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003846{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3847$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003848if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003849 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003850elif test $ac_cv_prog_cc_g = yes; then
3851 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003852 CFLAGS="-g -O2"
3853 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003854 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003855 fi
3856else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003857 if test "$GCC" = yes; then
3858 CFLAGS="-O2"
3859 else
3860 CFLAGS=
3861 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003862fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003863{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3864$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3865if test "${ac_cv_prog_cc_c89+set}" = set; then :
3866 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003867else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003868 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003869ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00003870cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003871/* end confdefs.h. */
3872#include <stdarg.h>
3873#include <stdio.h>
3874#include <sys/types.h>
3875#include <sys/stat.h>
3876/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3877struct buf { int x; };
3878FILE * (*rcsopen) (struct buf *, struct stat *, int);
3879static char *e (p, i)
3880 char **p;
3881 int i;
3882{
3883 return p[i];
3884}
3885static char *f (char * (*g) (char **, int), char **p, ...)
3886{
3887 char *s;
3888 va_list v;
3889 va_start (v,p);
3890 s = g (p, va_arg (v,int));
3891 va_end (v);
3892 return s;
3893}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003894
3895/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3896 function prototypes and stuff, but not '\xHH' hex character constants.
3897 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003898 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003899 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3900 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003901 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003902int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3903
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003904/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3905 inside strings and character constants. */
3906#define FOO(x) 'x'
3907int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3908
Skip Montanaro6dead952003-09-25 14:50:04 +00003909int test (int i, double x);
3910struct s1 {int (*f) (int a);};
3911struct s2 {int (*f) (double a);};
3912int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3913int argc;
3914char **argv;
3915int
3916main ()
3917{
3918return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3919 ;
3920 return 0;
3921}
3922_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003923for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3924 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003925do
3926 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00003927 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003928 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00003929fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003930rm -f core conftest.err conftest.$ac_objext
3931 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00003932done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003933rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003934CC=$ac_save_CC
3935
3936fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003937# AC_CACHE_VAL
3938case "x$ac_cv_prog_cc_c89" in
3939 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00003940 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3941$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003942 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00003943 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3944$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003945 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003946 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00003947 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3948$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003949esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003950if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00003951
Matthias Kloseb9621712010-04-24 17:59:49 +00003952fi
Skip Montanaro6dead952003-09-25 14:50:04 +00003953
Martin v. Löwis11437992002-04-12 09:54:03 +00003954ac_ext=c
3955ac_cpp='$CPP $CPPFLAGS'
3956ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3957ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3958ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003959
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003960
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003961
3962
Matthias Kloseb9621712010-04-24 17:59:49 +00003963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
3964$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003965
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003966# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003967if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003968 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003969
3970 case $withval in
3971 no) with_cxx_main=no
3972 MAINCC='$(CC)';;
3973 yes) with_cxx_main=yes
3974 MAINCC='$(CXX)';;
3975 *) with_cxx_main=yes
3976 MAINCC=$withval
3977 if test -z "$CXX"
3978 then
3979 CXX=$withval
3980 fi;;
3981 esac
3982else
3983
3984 with_cxx_main=no
3985 MAINCC='$(CC)'
3986
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003987fi
3988
Matthias Kloseb9621712010-04-24 17:59:49 +00003989{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
3990$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003991
3992preset_cxx="$CXX"
3993if test -z "$CXX"
3994then
3995 case "$CC" in
3996 gcc) # Extract the first word of "g++", so it can be a program name with args.
3997set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003998{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3999$as_echo_n "checking for $ac_word... " >&6; }
4000if test "${ac_cv_path_CXX+set}" = set; then :
4001 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004002else
4003 case $CXX in
4004 [\\/]* | ?:[\\/]*)
4005 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4006 ;;
4007 *)
4008 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4009for as_dir in notfound
4010do
4011 IFS=$as_save_IFS
4012 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004013 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004014 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004015 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004016 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004017 break 2
4018 fi
4019done
Matthias Kloseb9621712010-04-24 17:59:49 +00004020 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004021IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004022
4023 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
4024 ;;
4025esac
4026fi
4027CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004028if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004029 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4030$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004031else
Matthias Kloseb9621712010-04-24 17:59:49 +00004032 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4033$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004034fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004035
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004036 ;;
4037 cc) # Extract the first word of "c++", so it can be a program name with args.
4038set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004039{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4040$as_echo_n "checking for $ac_word... " >&6; }
4041if test "${ac_cv_path_CXX+set}" = set; then :
4042 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004043else
4044 case $CXX in
4045 [\\/]* | ?:[\\/]*)
4046 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4047 ;;
4048 *)
4049 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4050for as_dir in notfound
4051do
4052 IFS=$as_save_IFS
4053 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004054 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004055 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004056 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004057 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004058 break 2
4059 fi
4060done
Matthias Kloseb9621712010-04-24 17:59:49 +00004061 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004062IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004063
4064 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
4065 ;;
4066esac
4067fi
4068CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004069if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004070 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4071$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004072else
Matthias Kloseb9621712010-04-24 17:59:49 +00004073 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4074$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004075fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004076
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004077 ;;
4078 esac
4079 if test "$CXX" = "notfound"
4080 then
4081 CXX=""
4082 fi
4083fi
4084if test -z "$CXX"
4085then
4086 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4087do
4088 # Extract the first word of "$ac_prog", so it can be a program name with args.
4089set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4091$as_echo_n "checking for $ac_word... " >&6; }
4092if test "${ac_cv_prog_CXX+set}" = set; then :
4093 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004094else
4095 if test -n "$CXX"; then
4096 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4097else
4098as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4099for as_dir in $PATH
4100do
4101 IFS=$as_save_IFS
4102 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004103 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004104 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004105 ac_cv_prog_CXX="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00004106 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004107 break 2
4108 fi
4109done
Matthias Kloseb9621712010-04-24 17:59:49 +00004110 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004111IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004112
4113fi
4114fi
4115CXX=$ac_cv_prog_CXX
4116if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004117 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4118$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004119else
Matthias Kloseb9621712010-04-24 17:59:49 +00004120 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4121$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004122fi
4123
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004124
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004125 test -n "$CXX" && break
4126done
4127test -n "$CXX" || CXX="notfound"
4128
4129 if test "$CXX" = "notfound"
4130 then
4131 CXX=""
4132 fi
4133fi
4134if test "$preset_cxx" != "$CXX"
4135then
Matthias Kloseb9621712010-04-24 17:59:49 +00004136 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004137
4138 By default, distutils will build C++ extension modules with \"$CXX\".
4139 If this is not intended, then set CXX on the configure command line.
4140 " >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00004141$as_echo "$as_me: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004142
4143 By default, distutils will build C++ extension modules with \"$CXX\".
4144 If this is not intended, then set CXX on the configure command line.
4145 " >&2;}
4146fi
4147
4148
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004149# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004150
4151ac_ext=c
4152ac_cpp='$CPP $CPPFLAGS'
4153ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4154ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4155ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Kloseb9621712010-04-24 17:59:49 +00004156{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4157$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004158# On Suns, sometimes $CPP names a directory.
4159if test -n "$CPP" && test -d "$CPP"; then
4160 CPP=
4161fi
4162if test -z "$CPP"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004163 if test "${ac_cv_prog_CPP+set}" = set; then :
4164 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004165else
Martin v. Löwis11437992002-04-12 09:54:03 +00004166 # Double quotes because CPP needs to be expanded
4167 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4168 do
4169 ac_preproc_ok=false
4170for ac_c_preproc_warn_flag in '' yes
4171do
4172 # Use a header file that comes with gcc, so configuring glibc
4173 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004174 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4175 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004176 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004177 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004178 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004179/* end confdefs.h. */
4180#ifdef __STDC__
4181# include <limits.h>
4182#else
4183# include <assert.h>
4184#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004185 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004186_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004187if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004188
Matthias Kloseb9621712010-04-24 17:59:49 +00004189else
Martin v. Löwis11437992002-04-12 09:54:03 +00004190 # Broken: fails on valid input.
4191continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004192fi
Benjamin Petersond7f73e92010-09-05 00:09:07 +00004193rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004194
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004195 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004196 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004197 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004198/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004199#include <ac_nonexistent.h>
4200_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004201if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004202 # Broken: success on invalid input.
4203continue
4204else
Martin v. Löwis11437992002-04-12 09:54:03 +00004205 # Passes both tests.
4206ac_preproc_ok=:
4207break
4208fi
Benjamin Petersond7f73e92010-09-05 00:09:07 +00004209rm -f conftest.err conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004210
4211done
4212# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Benjamin Petersond7f73e92010-09-05 00:09:07 +00004213rm -f conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004214if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004215 break
4216fi
4217
4218 done
4219 ac_cv_prog_CPP=$CPP
4220
4221fi
4222 CPP=$ac_cv_prog_CPP
4223else
4224 ac_cv_prog_CPP=$CPP
4225fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004226{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4227$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004228ac_preproc_ok=false
4229for ac_c_preproc_warn_flag in '' yes
4230do
4231 # Use a header file that comes with gcc, so configuring glibc
4232 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004233 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4234 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004235 # On the NeXT, cc -E runs the code through the compiler's parser,
4236 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004237 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004238/* end confdefs.h. */
4239#ifdef __STDC__
4240# include <limits.h>
4241#else
4242# include <assert.h>
4243#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004244 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004245_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004246if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004247
Matthias Kloseb9621712010-04-24 17:59:49 +00004248else
Martin v. Löwis11437992002-04-12 09:54:03 +00004249 # Broken: fails on valid input.
4250continue
4251fi
Benjamin Petersond7f73e92010-09-05 00:09:07 +00004252rm -f conftest.err conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004253
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004254 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004255 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004256 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004257/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004258#include <ac_nonexistent.h>
4259_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004260if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004261 # Broken: success on invalid input.
4262continue
4263else
Martin v. Löwis11437992002-04-12 09:54:03 +00004264 # Passes both tests.
4265ac_preproc_ok=:
4266break
4267fi
Benjamin Petersond7f73e92010-09-05 00:09:07 +00004268rm -f conftest.err conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004269
4270done
4271# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Benjamin Petersond7f73e92010-09-05 00:09:07 +00004272rm -f conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004273if $ac_preproc_ok; then :
4274
Martin v. Löwis11437992002-04-12 09:54:03 +00004275else
Matthias Kloseb9621712010-04-24 17:59:49 +00004276 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4277$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Petersond7f73e92010-09-05 00:09:07 +00004278as_fn_error "C preprocessor \"$CPP\" fails sanity check
4279See \`config.log' for more details." "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004280fi
4281
4282ac_ext=c
4283ac_cpp='$CPP $CPPFLAGS'
4284ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4285ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4286ac_compiler_gnu=$ac_cv_c_compiler_gnu
4287
4288
Matthias Kloseb9621712010-04-24 17:59:49 +00004289{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4290$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4291if test "${ac_cv_path_GREP+set}" = set; then :
4292 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004293else
Matthias Kloseb9621712010-04-24 17:59:49 +00004294 if test -z "$GREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004295 ac_path_GREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004296 # Loop through the user's path and test for each of PROGNAME-LIST
4297 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004298for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4299do
4300 IFS=$as_save_IFS
4301 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004302 for ac_prog in grep ggrep; do
4303 for ac_exec_ext in '' $ac_executable_extensions; do
4304 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4305 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
4306# Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004307 # Check for GNU $ac_path_GREP
4308case `"$ac_path_GREP" --version 2>&1` in
4309*GNU*)
4310 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4311*)
4312 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004313 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004314 while :
4315 do
4316 cat "conftest.in" "conftest.in" >"conftest.tmp"
4317 mv "conftest.tmp" "conftest.in"
4318 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00004319 $as_echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004320 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4321 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00004322 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004323 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4324 # Best one so far, save it but keep looking for a better one
4325 ac_cv_path_GREP="$ac_path_GREP"
4326 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00004327 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004328 # 10*(2^10) chars as input seems more than enough
4329 test $ac_count -gt 10 && break
4330 done
4331 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4332esac
4333
Matthias Kloseb9621712010-04-24 17:59:49 +00004334 $ac_path_GREP_found && break 3
4335 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004336 done
Matthias Kloseb9621712010-04-24 17:59:49 +00004337 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004338IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00004339 if test -z "$ac_cv_path_GREP"; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00004340 as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +00004341 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004342else
4343 ac_cv_path_GREP=$GREP
4344fi
4345
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004346fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004347{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4348$as_echo "$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004349 GREP="$ac_cv_path_GREP"
4350
4351
Matthias Kloseb9621712010-04-24 17:59:49 +00004352{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4353$as_echo_n "checking for egrep... " >&6; }
4354if test "${ac_cv_path_EGREP+set}" = set; then :
4355 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004356else
4357 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4358 then ac_cv_path_EGREP="$GREP -E"
4359 else
Matthias Kloseb9621712010-04-24 17:59:49 +00004360 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004361 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004362 # Loop through the user's path and test for each of PROGNAME-LIST
4363 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004364for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4365do
4366 IFS=$as_save_IFS
4367 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004368 for ac_prog in egrep; do
4369 for ac_exec_ext in '' $ac_executable_extensions; do
4370 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4371 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
4372# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004373 # Check for GNU $ac_path_EGREP
4374case `"$ac_path_EGREP" --version 2>&1` in
4375*GNU*)
4376 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4377*)
4378 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004379 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004380 while :
4381 do
4382 cat "conftest.in" "conftest.in" >"conftest.tmp"
4383 mv "conftest.tmp" "conftest.in"
4384 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00004385 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004386 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4387 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00004388 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004389 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4390 # Best one so far, save it but keep looking for a better one
4391 ac_cv_path_EGREP="$ac_path_EGREP"
4392 ac_path_EGREP_max=$ac_count
4393 fi
4394 # 10*(2^10) chars as input seems more than enough
4395 test $ac_count -gt 10 && break
4396 done
4397 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4398esac
4399
Matthias Kloseb9621712010-04-24 17:59:49 +00004400 $ac_path_EGREP_found && break 3
4401 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004402 done
Matthias Kloseb9621712010-04-24 17:59:49 +00004403 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004404IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00004405 if test -z "$ac_cv_path_EGREP"; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00004406 as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +00004407 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004408else
4409 ac_cv_path_EGREP=$EGREP
4410fi
4411
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004412 fi
4413fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004414{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4415$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004416 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00004417
4418
Matthias Kloseb9621712010-04-24 17:59:49 +00004419{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4420$as_echo_n "checking for ANSI C header files... " >&6; }
4421if test "${ac_cv_header_stdc+set}" = set; then :
4422 $as_echo_n "(cached) " >&6
4423else
4424 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004425/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00004426#include <stdlib.h>
4427#include <stdarg.h>
4428#include <string.h>
4429#include <float.h>
4430
4431int
4432main ()
4433{
4434
4435 ;
4436 return 0;
4437}
4438_ACEOF
4439if ac_fn_c_try_compile "$LINENO"; then :
4440 ac_cv_header_stdc=yes
4441else
4442 ac_cv_header_stdc=no
4443fi
4444rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4445
4446if test $ac_cv_header_stdc = yes; then
4447 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4448 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4449/* end confdefs.h. */
4450#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004451
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004452_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004453if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00004454 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004455
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004456else
Matthias Kloseb9621712010-04-24 17:59:49 +00004457 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004458fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00004459rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004460
Matthias Kloseb9621712010-04-24 17:59:49 +00004461fi
4462
4463if test $ac_cv_header_stdc = yes; then
4464 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4465 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4466/* end confdefs.h. */
4467#include <stdlib.h>
4468
4469_ACEOF
4470if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4471 $EGREP "free" >/dev/null 2>&1; then :
4472
4473else
4474 ac_cv_header_stdc=no
4475fi
4476rm -f conftest*
4477
4478fi
4479
4480if test $ac_cv_header_stdc = yes; then
4481 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4482 if test "$cross_compiling" = yes; then :
4483 :
4484else
4485 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4486/* end confdefs.h. */
4487#include <ctype.h>
4488#include <stdlib.h>
4489#if ((' ' & 0x0FF) == 0x020)
4490# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4491# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4492#else
4493# define ISLOWER(c) \
4494 (('a' <= (c) && (c) <= 'i') \
4495 || ('j' <= (c) && (c) <= 'r') \
4496 || ('s' <= (c) && (c) <= 'z'))
4497# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4498#endif
4499
4500#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4501int
4502main ()
4503{
4504 int i;
4505 for (i = 0; i < 256; i++)
4506 if (XOR (islower (i), ISLOWER (i))
4507 || toupper (i) != TOUPPER (i))
4508 return 2;
4509 return 0;
4510}
4511_ACEOF
4512if ac_fn_c_try_run "$LINENO"; then :
4513
4514else
4515 ac_cv_header_stdc=no
4516fi
4517rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4518 conftest.$ac_objext conftest.beam conftest.$ac_ext
4519fi
4520
4521fi
4522fi
4523{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4524$as_echo "$ac_cv_header_stdc" >&6; }
4525if test $ac_cv_header_stdc = yes; then
4526
4527$as_echo "#define STDC_HEADERS 1" >>confdefs.h
4528
4529fi
4530
4531# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4532for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4533 inttypes.h stdint.h unistd.h
4534do :
4535 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4536ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4537"
Benjamin Petersond7f73e92010-09-05 00:09:07 +00004538eval as_val=\$$as_ac_Header
4539 if test "x$as_val" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004540 cat >>confdefs.h <<_ACEOF
4541#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4542_ACEOF
4543
4544fi
4545
4546done
4547
4548
4549
4550 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
4551if test "x$ac_cv_header_minix_config_h" = x""yes; then :
4552 MINIX=yes
4553else
4554 MINIX=
4555fi
4556
4557
4558 if test "$MINIX" = yes; then
4559
4560$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4561
4562
4563$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4564
4565
4566$as_echo "#define _MINIX 1" >>confdefs.h
4567
4568 fi
4569
4570
4571 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4572$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
4573if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
4574 $as_echo_n "(cached) " >&6
4575else
4576 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4577/* end confdefs.h. */
4578
4579# define __EXTENSIONS__ 1
4580 $ac_includes_default
4581int
4582main ()
4583{
4584
4585 ;
4586 return 0;
4587}
4588_ACEOF
4589if ac_fn_c_try_compile "$LINENO"; then :
4590 ac_cv_safe_to_define___extensions__=yes
4591else
4592 ac_cv_safe_to_define___extensions__=no
4593fi
4594rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4595fi
4596{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4597$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4598 test $ac_cv_safe_to_define___extensions__ = yes &&
4599 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4600
4601 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4602
4603 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4604
4605 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4606
4607 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4608
4609
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004610
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004611# Check for unsupported systems
4612case $ac_sys_system/$ac_sys_release in
4613atheos*|Linux*/1*)
4614 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
4615 echo See README for details.
4616 exit 1;;
4617esac
4618
4619
Matthias Kloseb9621712010-04-24 17:59:49 +00004620{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
4621$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004622
4623# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004624if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004625 withval=$with_suffix;
4626 case $withval in
4627 no) EXEEXT=;;
4628 yes) EXEEXT=.exe;;
4629 *) EXEEXT=$withval;;
4630 esac
4631fi
4632
Matthias Kloseb9621712010-04-24 17:59:49 +00004633{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
4634$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004635
4636# Test whether we're running on a non-case-sensitive system, in which
4637# case we give a warning if no ext is given
4638
Matthias Kloseb9621712010-04-24 17:59:49 +00004639{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
4640$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004641if test ! -d CaseSensitiveTestDir; then
4642mkdir CaseSensitiveTestDir
4643fi
4644
4645if test -d casesensitivetestdir
4646then
Matthias Kloseb9621712010-04-24 17:59:49 +00004647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4648$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004649 BUILDEXEEXT=.exe
4650else
Matthias Kloseb9621712010-04-24 17:59:49 +00004651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4652$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004653 BUILDEXEEXT=$EXEEXT
4654fi
4655rmdir CaseSensitiveTestDir
4656
4657case $MACHDEP in
4658bsdos*)
4659 case $CC in
4660 gcc) CC="$CC -D_HAVE_BSDI";;
4661 esac;;
4662esac
4663
4664case $ac_sys_system in
4665hp*|HP*)
4666 case $CC in
4667 cc|*/cc) CC="$CC -Ae";;
4668 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004669esac
4670
4671
4672
Matthias Kloseb9621712010-04-24 17:59:49 +00004673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
4674$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004675if test -z "$LIBRARY"
4676then
4677 LIBRARY='libpython$(VERSION).a'
4678fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004679{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
4680$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004681
4682# LDLIBRARY is the name of the library to link against (as opposed to the
4683# name of the library into which to insert object files). BLDLIBRARY is also
4684# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
4685# is blank as the main program is not linked directly against LDLIBRARY.
4686# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
4687# systems without shared libraries, LDLIBRARY is the same as LIBRARY
4688# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
4689# DLLLIBRARY is the shared (i.e., DLL) library.
4690#
4691# RUNSHARED is used to run shared python without installed libraries
4692#
4693# INSTSONAME is the name of the shared library that will be use to install
4694# on the system - some systems like version suffix, others don't
4695
4696
4697
4698
4699
4700
4701LDLIBRARY="$LIBRARY"
4702BLDLIBRARY='$(LDLIBRARY)'
4703INSTSONAME='$(LDLIBRARY)'
4704DLLLIBRARY=''
4705LDLIBRARYDIR=''
4706RUNSHARED=''
4707
4708# LINKCC is the command that links the python executable -- default is $(CC).
4709# If CXX is set, and if it is needed to link a main function that was
4710# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
4711# python might then depend on the C++ runtime
4712# This is altered for AIX in order to build the export list before
4713# linking.
4714
Matthias Kloseb9621712010-04-24 17:59:49 +00004715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
4716$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004717if test -z "$LINKCC"
4718then
4719 LINKCC='$(PURIFY) $(MAINCC)'
4720 case $ac_sys_system in
4721 AIX*)
4722 exp_extra="\"\""
4723 if test $ac_sys_release -ge 5 -o \
4724 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
4725 exp_extra="."
4726 fi
4727 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004728 QNX*)
4729 # qcc must be used because the other compilers do not
4730 # support -N.
4731 LINKCC=qcc;;
4732 esac
4733fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004734{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
4735$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004736
4737# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
4738# make sure we default having it set to "no": this is used by
4739# distutils.unixccompiler to know if it should add --enable-new-dtags
4740# to linker command lines, and failing to detect GNU ld simply results
4741# in the same bahaviour as before.
4742
Matthias Kloseb9621712010-04-24 17:59:49 +00004743{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
4744$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004745ac_prog=ld
4746if test "$GCC" = yes; then
4747 ac_prog=`$CC -print-prog-name=ld`
4748fi
4749case `"$ac_prog" -V 2>&1 < /dev/null` in
4750 *GNU*)
4751 GNULD=yes;;
4752 *)
4753 GNULD=no;;
4754esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004755{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
4756$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004757
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004758{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
4759$as_echo_n "checking for inline... " >&6; }
4760if test "${ac_cv_c_inline+set}" = set; then :
4761 $as_echo_n "(cached) " >&6
4762else
4763 ac_cv_c_inline=no
4764for ac_kw in inline __inline__ __inline; do
4765 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4766/* end confdefs.h. */
4767#ifndef __cplusplus
4768typedef int foo_t;
4769static $ac_kw foo_t static_foo () {return 0; }
4770$ac_kw foo_t foo () {return 0; }
4771#endif
4772
4773_ACEOF
4774if ac_fn_c_try_compile "$LINENO"; then :
4775 ac_cv_c_inline=$ac_kw
4776fi
4777rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4778 test "$ac_cv_c_inline" != no && break
4779done
4780
4781fi
4782{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
4783$as_echo "$ac_cv_c_inline" >&6; }
4784
4785case $ac_cv_c_inline in
4786 inline | yes) ;;
4787 *)
4788 case $ac_cv_c_inline in
4789 no) ac_val=;;
4790 *) ac_val=$ac_cv_c_inline;;
4791 esac
4792 cat >>confdefs.h <<_ACEOF
4793#ifndef __cplusplus
4794#define inline $ac_val
4795#endif
4796_ACEOF
4797 ;;
4798esac
4799
4800if test "$ac_cv_c_inline" != no ; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00004801
4802$as_echo "#define USE_INLINE 1" >>confdefs.h
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004803
4804
4805fi
4806
4807
Matthias Kloseb9621712010-04-24 17:59:49 +00004808{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
4809$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004810# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004811if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004812 enableval=$enable_shared;
4813fi
4814
4815
4816if test -z "$enable_shared"
4817then
4818 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00004819 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004820 enable_shared="yes";;
4821 *)
4822 enable_shared="no";;
4823 esac
4824fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004825{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
4826$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004827
Matthias Kloseb9621712010-04-24 17:59:49 +00004828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
4829$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004830# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004831if test "${enable_profiling+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004832 enableval=$enable_profiling; ac_save_cc="$CC"
4833 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004834 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004835 ac_enable_profiling="no"
4836else
Matthias Kloseb9621712010-04-24 17:59:49 +00004837 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004838/* end confdefs.h. */
4839int main() { return 0; }
4840_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004841if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004842 ac_enable_profiling="yes"
4843else
Matthias Kloseb9621712010-04-24 17:59:49 +00004844 ac_enable_profiling="no"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004845fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004846rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4847 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004848fi
4849
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004850 CC="$ac_save_cc"
4851fi
4852
Matthias Kloseb9621712010-04-24 17:59:49 +00004853{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_profiling" >&5
4854$as_echo "$ac_enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004855
4856case "$ac_enable_profiling" in
4857 "yes")
4858 BASECFLAGS="-pg $BASECFLAGS"
4859 LDFLAGS="-pg $LDFLAGS"
4860 ;;
4861esac
4862
Matthias Kloseb9621712010-04-24 17:59:49 +00004863{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
4864$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004865
4866# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4867# library that we build, but we do not want to link against it (we
4868# will find it with a -framework option). For this reason there is an
4869# extra variable BLDLIBRARY against which Python and the extension
4870# modules are linked, BLDLIBRARY. This is normally the same as
4871# LDLIBRARY, but empty for MacOSX framework builds.
4872if test "$enable_framework"
4873then
4874 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
4875 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
4876 BLDLIBRARY=''
4877else
4878 BLDLIBRARY='$(LDLIBRARY)'
4879fi
4880
4881# Other platforms follow
4882if test $enable_shared = "yes"; then
4883
Matthias Kloseb9621712010-04-24 17:59:49 +00004884$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004885
4886 case $ac_sys_system in
4887 CYGWIN*)
4888 LDLIBRARY='libpython$(VERSION).dll.a'
4889 DLLLIBRARY='libpython$(VERSION).dll'
4890 ;;
4891 SunOS*)
4892 LDLIBRARY='libpython$(VERSION).so'
4893 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
4894 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4895 INSTSONAME="$LDLIBRARY".$SOVERSION
4896 ;;
4897 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
4898 LDLIBRARY='libpython$(VERSION).so'
4899 BLDLIBRARY='-L. -lpython$(VERSION)'
4900 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4901 case $ac_sys_system in
4902 FreeBSD*)
4903 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4904 ;;
4905 esac
4906 INSTSONAME="$LDLIBRARY".$SOVERSION
4907 ;;
4908 hp*|HP*)
4909 case `uname -m` in
4910 ia64)
4911 LDLIBRARY='libpython$(VERSION).so'
4912 ;;
4913 *)
4914 LDLIBRARY='libpython$(VERSION).sl'
4915 ;;
4916 esac
4917 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
4918 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
4919 ;;
4920 OSF*)
4921 LDLIBRARY='libpython$(VERSION).so'
4922 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
4923 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4924 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004925 Darwin*)
4926 LDLIBRARY='libpython$(VERSION).dylib'
4927 BLDLIBRARY='-L. -lpython$(VERSION)'
4928 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
4929 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00004930 AIX*)
4931 LDLIBRARY='libpython$(VERSION).so'
4932 RUNSHARED=LIBPATH=`pwd`:${LIBPATH}
4933 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004934
4935 esac
4936else # shared is disabled
4937 case $ac_sys_system in
4938 CYGWIN*)
4939 BLDLIBRARY='$(LIBRARY)'
4940 LDLIBRARY='libpython$(VERSION).dll.a'
4941 ;;
4942 esac
4943fi
4944
Matthias Kloseb9621712010-04-24 17:59:49 +00004945{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
4946$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004947
4948if test -n "$ac_tool_prefix"; then
4949 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4950set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004951{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4952$as_echo_n "checking for $ac_word... " >&6; }
4953if test "${ac_cv_prog_RANLIB+set}" = set; then :
4954 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004955else
4956 if test -n "$RANLIB"; then
4957 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4958else
4959as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4960for as_dir in $PATH
4961do
4962 IFS=$as_save_IFS
4963 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004964 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004965 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4966 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00004967 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004968 break 2
4969 fi
4970done
Matthias Kloseb9621712010-04-24 17:59:49 +00004971 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004972IFS=$as_save_IFS
4973
4974fi
4975fi
4976RANLIB=$ac_cv_prog_RANLIB
4977if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004978 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
4979$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004980else
Matthias Kloseb9621712010-04-24 17:59:49 +00004981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4982$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004983fi
4984
4985
4986fi
4987if test -z "$ac_cv_prog_RANLIB"; then
4988 ac_ct_RANLIB=$RANLIB
4989 # Extract the first word of "ranlib", so it can be a program name with args.
4990set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4992$as_echo_n "checking for $ac_word... " >&6; }
4993if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
4994 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004995else
4996 if test -n "$ac_ct_RANLIB"; then
4997 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4998else
4999as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5000for as_dir in $PATH
5001do
5002 IFS=$as_save_IFS
5003 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005004 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005005 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5006 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005007 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005008 break 2
5009 fi
5010done
Matthias Kloseb9621712010-04-24 17:59:49 +00005011 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005012IFS=$as_save_IFS
5013
5014fi
5015fi
5016ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5017if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005018 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5019$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005020else
Matthias Kloseb9621712010-04-24 17:59:49 +00005021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5022$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005023fi
5024
5025 if test "x$ac_ct_RANLIB" = x; then
5026 RANLIB=":"
5027 else
5028 case $cross_compiling:$ac_tool_warned in
5029yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00005030{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5031$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005032ac_tool_warned=yes ;;
5033esac
5034 RANLIB=$ac_ct_RANLIB
5035 fi
5036else
5037 RANLIB="$ac_cv_prog_RANLIB"
5038fi
5039
5040
5041for ac_prog in ar aal
5042do
5043 # Extract the first word of "$ac_prog", so it can be a program name with args.
5044set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005045{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5046$as_echo_n "checking for $ac_word... " >&6; }
5047if test "${ac_cv_prog_AR+set}" = set; then :
5048 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005049else
5050 if test -n "$AR"; then
5051 ac_cv_prog_AR="$AR" # Let the user override the test.
5052else
5053as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5054for as_dir in $PATH
5055do
5056 IFS=$as_save_IFS
5057 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005058 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005059 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5060 ac_cv_prog_AR="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005061 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005062 break 2
5063 fi
5064done
Matthias Kloseb9621712010-04-24 17:59:49 +00005065 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005066IFS=$as_save_IFS
5067
5068fi
5069fi
5070AR=$ac_cv_prog_AR
5071if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005072 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5073$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005074else
Matthias Kloseb9621712010-04-24 17:59:49 +00005075 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5076$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005077fi
5078
5079
5080 test -n "$AR" && break
5081done
5082test -n "$AR" || AR="ar"
5083
5084
5085# tweak ARFLAGS only if the user didn't set it on the command line
5086
5087if test -z "$ARFLAGS"
5088then
5089 ARFLAGS="rc"
5090fi
5091
5092
5093# Extract the first word of "svnversion", so it can be a program name with args.
5094set dummy svnversion; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005095{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5096$as_echo_n "checking for $ac_word... " >&6; }
5097if test "${ac_cv_prog_SVNVERSION+set}" = set; then :
5098 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005099else
5100 if test -n "$SVNVERSION"; then
5101 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
5102else
5103as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5104for as_dir in $PATH
5105do
5106 IFS=$as_save_IFS
5107 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005108 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005109 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5110 ac_cv_prog_SVNVERSION="found"
Matthias Kloseb9621712010-04-24 17:59:49 +00005111 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005112 break 2
5113 fi
5114done
Matthias Kloseb9621712010-04-24 17:59:49 +00005115 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005116IFS=$as_save_IFS
5117
5118 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
5119fi
5120fi
5121SVNVERSION=$ac_cv_prog_SVNVERSION
5122if test -n "$SVNVERSION"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005123 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SVNVERSION" >&5
5124$as_echo "$SVNVERSION" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005125else
Matthias Kloseb9621712010-04-24 17:59:49 +00005126 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5127$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005128fi
5129
5130
5131if test $SVNVERSION = found
5132then
5133 SVNVERSION="svnversion \$(srcdir)"
5134else
5135 SVNVERSION="echo Unversioned directory"
5136fi
5137
5138case $MACHDEP in
5139bsdos*|hp*|HP*)
5140 # install -d does not work on BSDI or HP-UX
5141 if test -z "$INSTALL"
5142 then
5143 INSTALL="${srcdir}/install-sh -c"
5144 fi
5145esac
5146ac_aux_dir=
5147for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
Benjamin Petersond7f73e92010-09-05 00:09:07 +00005148 for ac_t in install-sh install.sh shtool; do
5149 if test -f "$ac_dir/$ac_t"; then
5150 ac_aux_dir=$ac_dir
5151 ac_install_sh="$ac_aux_dir/$ac_t -c"
5152 break 2
5153 fi
5154 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005155done
5156if test -z "$ac_aux_dir"; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00005157 as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005158fi
5159
5160# These three variables are undocumented and unsupported,
5161# and are intended to be withdrawn in a future Autoconf release.
5162# They can cause serious problems if a builder's source tree is in a directory
5163# whose full name contains unusual characters.
5164ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
5165ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
5166ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
5167
5168
5169# Find a good install program. We prefer a C program (faster),
5170# so one script is as good as another. But avoid the broken or
5171# incompatible versions:
5172# SysV /etc/install, /usr/sbin/install
5173# SunOS /usr/etc/install
5174# IRIX /sbin/install
5175# AIX /bin/install
5176# AmigaOS /C/install, which installs bootblocks on floppy discs
5177# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5178# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5179# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5180# OS/2's system install, which has a completely different semantic
5181# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00005182# Reject install programs that cannot install multiple files.
5183{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
5184$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005185if test -z "$INSTALL"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005186if test "${ac_cv_path_install+set}" = set; then :
5187 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005188else
5189 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5190for as_dir in $PATH
5191do
5192 IFS=$as_save_IFS
5193 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005194 # Account for people who put trailing slashes in PATH elements.
5195case $as_dir/ in #((
5196 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005197 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00005198 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005199 /usr/ucb/* ) ;;
5200 *)
5201 # OSF1 and SCO ODT 3.0 have their own names for install.
5202 # Don't use installbsd from OSF since it installs stuff as root
5203 # by default.
5204 for ac_prog in ginstall scoinst install; do
5205 for ac_exec_ext in '' $ac_executable_extensions; do
5206 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
5207 if test $ac_prog = install &&
5208 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5209 # AIX install. It has an incompatible calling convention.
5210 :
5211 elif test $ac_prog = install &&
5212 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5213 # program-specific install script used by HP pwplus--don't use.
5214 :
5215 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005216 rm -rf conftest.one conftest.two conftest.dir
5217 echo one > conftest.one
5218 echo two > conftest.two
5219 mkdir conftest.dir
5220 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5221 test -s conftest.one && test -s conftest.two &&
5222 test -s conftest.dir/conftest.one &&
5223 test -s conftest.dir/conftest.two
5224 then
5225 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5226 break 3
5227 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005228 fi
5229 fi
5230 done
5231 done
5232 ;;
5233esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005234
5235 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005236IFS=$as_save_IFS
5237
Matthias Kloseb9621712010-04-24 17:59:49 +00005238rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005239
5240fi
5241 if test "${ac_cv_path_install+set}" = set; then
5242 INSTALL=$ac_cv_path_install
5243 else
5244 # As a last resort, use the slow shell script. Don't cache a
5245 # value for INSTALL within a source directory, because that will
5246 # break other packages using the cache if that directory is
5247 # removed, or if the value is a relative name.
5248 INSTALL=$ac_install_sh
5249 fi
5250fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005251{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
5252$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005253
5254# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5255# It thinks the first close brace ends the variable substitution.
5256test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5257
5258test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
5259
5260test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5261
5262
5263# Not every filesystem supports hard links
5264
5265if test -z "$LN" ; then
5266 case $ac_sys_system in
5267 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005268 *) LN=ln;;
5269 esac
5270fi
5271
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00005272# For calculating the .so ABI tag.
5273SOABI_QUALIFIERS=""
5274
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005275# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00005276{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
5277$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005278
5279# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005280if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005281 withval=$with_pydebug;
5282if test "$withval" != no
5283then
5284
Matthias Kloseb9621712010-04-24 17:59:49 +00005285$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005286
Matthias Kloseb9621712010-04-24 17:59:49 +00005287 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5288$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005289 Py_DEBUG='true'
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00005290 SOABI_QUALIFIERS="${SOABI_QUALIFIERS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00005291else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5292$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005293fi
5294else
Matthias Kloseb9621712010-04-24 17:59:49 +00005295 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5296$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005297fi
5298
5299
5300# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
5301# merged with this chunk of code?
5302
5303# Optimizer/debugger flags
5304# ------------------------
5305# (The following bit of code is complicated enough - please keep things
5306# indented properly. Just pretend you're editing Python code. ;-)
5307
5308# There are two parallel sets of case statements below, one that checks to
5309# see if OPT was set and one that does BASECFLAGS setting based upon
5310# compiler and platform. BASECFLAGS tweaks need to be made even if the
5311# user set OPT.
5312
5313# tweak OPT based on compiler and platform, only if the user didn't set
5314# it on the command line
5315
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00005316if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005317then
5318 case $GCC in
5319 yes)
5320 if test "$CC" != 'g++' ; then
5321 STRICT_PROTO="-Wstrict-prototypes"
5322 fi
5323 # For gcc 4.x we need to use -fwrapv so lets check if its supported
5324 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
5325 WRAP="-fwrapv"
5326 fi
5327 case $ac_cv_prog_cc_g in
5328 yes)
5329 if test "$Py_DEBUG" = 'true' ; then
5330 # Optimization messes up debuggers, so turn it off for
5331 # debug builds.
Mark Dickinsonb2153e92010-05-05 22:31:36 +00005332 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005333 else
5334 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
5335 fi
5336 ;;
5337 *)
5338 OPT="-O3 -Wall $STRICT_PROTO"
5339 ;;
5340 esac
5341 case $ac_sys_system in
5342 SCO_SV*) OPT="$OPT -m486 -DSCO5"
5343 ;;
5344 esac
5345 ;;
5346
5347 *)
5348 OPT="-O"
5349 ;;
5350 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005351fi
5352
5353
5354
5355# The -arch flags for universal builds on OSX
5356UNIVERSAL_ARCH_FLAGS=
5357
5358
5359# tweak BASECFLAGS based on compiler and platform
5360case $GCC in
5361yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005362 # Python doesn't violate C99 aliasing rules, but older versions of
5363 # GCC produce warnings for legal Python code. Enable
5364 # -fno-strict-aliasing on versions of GCC that support but produce
5365 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00005366 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
5367$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005368 ac_save_cc="$CC"
5369 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005370 save_CFLAGS="$CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +00005371 if test "${ac_cv_no_strict_aliasing+set}" = set; then :
5372 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00005373else
Matthias Kloseb9621712010-04-24 17:59:49 +00005374 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005375/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005376
Matthias Kloseb159a552010-04-25 21:00:44 +00005377
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005378int
5379main ()
5380{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005381
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005382 ;
5383 return 0;
5384}
Matthias Kloseb159a552010-04-25 21:00:44 +00005385
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005386_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005387if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00005388
5389 CC="$ac_save_cc -fstrict-aliasing"
5390 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
5391 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005392/* end confdefs.h. */
5393
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005394 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005395int
5396main ()
5397{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005398double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005399 ;
5400 return 0;
5401}
Matthias Kloseb159a552010-04-25 21:00:44 +00005402
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005403_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005404if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00005405
5406 ac_cv_no_strict_aliasing=no
5407
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005408else
Matthias Kloseb159a552010-04-25 21:00:44 +00005409
5410 ac_cv_no_strict_aliasing=yes
5411
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005412fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005413rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00005414
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005415else
Matthias Kloseb159a552010-04-25 21:00:44 +00005416
5417 ac_cv_no_strict_aliasing=no
5418
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005419fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005420rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00005421fi
5422
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005423 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005424 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00005425 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
5426$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005427 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005428 then
5429 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
5430 fi
5431
5432 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
5433 # support. Without this, treatment of subnormals doesn't follow
5434 # the standard.
5435 case $ac_sys_machine in
5436 alpha*)
5437 BASECFLAGS="$BASECFLAGS -mieee"
5438 ;;
5439 esac
5440
5441 case $ac_sys_system in
5442 SCO_SV*)
5443 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
5444 ;;
5445 # is there any other compiler on Darwin besides gcc?
5446 Darwin*)
5447 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
5448 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussoren666028b2010-04-18 19:07:43 +00005449 if test "${CC}" = gcc
5450 then
Matthias Kloseb9621712010-04-24 17:59:49 +00005451 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
5452$as_echo_n "checking which compiler should be used... " >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00005453 case "${UNIVERSALSDK}" in
5454 */MacOSX10.4u.sdk)
5455 # Build using 10.4 SDK, force usage of gcc when the
5456 # compiler is gcc, otherwise the user will get very
5457 # confusing error messages when building on OSX 10.6
5458 CC=gcc-4.0
5459 CPP=cpp-4.0
5460 ;;
5461 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005462 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5463$as_echo "$CC" >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00005464 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005465
5466
5467 if test "${enable_universalsdk}"; then
5468 UNIVERSAL_ARCH_FLAGS=""
5469 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
5470 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
5471 ARCH_RUN_32BIT=""
Benjamin Peterson99f03762010-04-11 22:15:28 +00005472 LIPO_32BIT_FLAGS=""
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005473 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
5474 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005475 LIPO_32BIT_FLAGS=""
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005476 ARCH_RUN_32BIT="true"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005477
5478 elif test "$UNIVERSAL_ARCHS" = "all" ; then
5479 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005480 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005481 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005482
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005483 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
5484 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005485 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005486 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005487
5488 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
5489 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005490 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005491 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005492
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005493 else
Benjamin Petersond7f73e92010-09-05 00:09:07 +00005494 as_fn_error "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005495
5496 fi
5497
5498
Ronald Oussoren666028b2010-04-18 19:07:43 +00005499 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
5500 if test "${UNIVERSALSDK}" != "/"
5501 then
5502 CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
5503 LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren712979d2010-04-20 19:51:33 +00005504 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005505 fi
5506 fi
5507
5508 # Calculate the right deployment target for this build.
5509 #
5510 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
5511 if test ${cur_target} '>' 10.2; then
5512 cur_target=10.3
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005513 if test ${enable_universalsdk}; then
5514 if test "${UNIVERSAL_ARCHS}" = "all"; then
5515 # Ensure that the default platform for a
5516 # 4-way universal build is OSX 10.5,
5517 # that's the first OS release where
5518 # 4-way builds make sense.
5519 cur_target='10.5'
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005520
5521 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
5522 cur_target='10.5'
5523
5524 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
5525 cur_target='10.5'
5526
5527 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
5528 cur_target='10.5'
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005529 fi
5530 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00005531 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005532 # On Intel macs default to a deployment
5533 # target of 10.4, that's the first OSX
5534 # release with Intel support.
5535 cur_target="10.4"
5536 fi
5537 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005538 fi
5539 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
5540
5541 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
5542 # environment with a value that is the same as what we'll use
5543 # in the Makefile to ensure that we'll get the same compiler
5544 # environment during configure and build time.
5545 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
5546 export MACOSX_DEPLOYMENT_TARGET
5547 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
5548
5549 ;;
5550 OSF*)
5551 BASECFLAGS="$BASECFLAGS -mieee"
5552 ;;
5553 esac
5554 ;;
5555
5556*)
5557 case $ac_sys_system in
5558 OpenUNIX*|UnixWare*)
5559 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
5560 ;;
5561 OSF*)
5562 BASECFLAGS="$BASECFLAGS -ieee -std"
5563 ;;
5564 SCO_SV*)
5565 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
5566 ;;
5567 esac
5568 ;;
5569esac
5570
5571if test "$Py_DEBUG" = 'true'; then
5572 :
5573else
5574 OPT="-DNDEBUG $OPT"
5575fi
5576
5577if test "$ac_arch_flags"
5578then
5579 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
5580fi
5581
5582# disable check for icc since it seems to pass, but generates a warning
5583if test "$CC" = icc
5584then
5585 ac_cv_opt_olimit_ok=no
5586fi
5587
Matthias Kloseb9621712010-04-24 17:59:49 +00005588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -OPT:Olimit=0" >&5
5589$as_echo_n "checking whether $CC accepts -OPT:Olimit=0... " >&6; }
5590if test "${ac_cv_opt_olimit_ok+set}" = set; then :
5591 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005592else
5593 ac_save_cc="$CC"
5594CC="$CC -OPT:Olimit=0"
Matthias Kloseb9621712010-04-24 17:59:49 +00005595cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005596/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005597
5598int
5599main ()
5600{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005601
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005602 ;
5603 return 0;
5604}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005605_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005606if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005607 ac_cv_opt_olimit_ok=yes
5608else
Matthias Kloseb9621712010-04-24 17:59:49 +00005609 ac_cv_opt_olimit_ok=no
Matthias Kloseb159a552010-04-25 21:00:44 +00005610
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005611fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005612rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005613CC="$ac_save_cc"
5614fi
5615
Matthias Kloseb9621712010-04-24 17:59:49 +00005616{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_opt_olimit_ok" >&5
5617$as_echo "$ac_cv_opt_olimit_ok" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005618if test $ac_cv_opt_olimit_ok = yes; then
5619 case $ac_sys_system in
5620 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
5621 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
5622 # environment?
5623 Darwin*)
5624 ;;
5625 *)
5626 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
5627 ;;
5628 esac
5629else
Matthias Kloseb9621712010-04-24 17:59:49 +00005630 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Olimit 1500" >&5
5631$as_echo_n "checking whether $CC accepts -Olimit 1500... " >&6; }
5632 if test "${ac_cv_olimit_ok+set}" = set; then :
5633 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005634else
5635 ac_save_cc="$CC"
5636 CC="$CC -Olimit 1500"
Matthias Kloseb9621712010-04-24 17:59:49 +00005637 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005638/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005639
5640int
5641main ()
5642{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005643
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005644 ;
5645 return 0;
5646}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005647_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005648if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005649 ac_cv_olimit_ok=yes
5650else
Matthias Kloseb9621712010-04-24 17:59:49 +00005651 ac_cv_olimit_ok=no
Matthias Kloseb159a552010-04-25 21:00:44 +00005652
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005653fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005654rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005655 CC="$ac_save_cc"
5656fi
5657
Matthias Kloseb9621712010-04-24 17:59:49 +00005658 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_olimit_ok" >&5
5659$as_echo "$ac_cv_olimit_ok" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005660 if test $ac_cv_olimit_ok = yes; then
5661 BASECFLAGS="$BASECFLAGS -Olimit 1500"
5662 fi
5663fi
5664
5665# Check whether GCC supports PyArg_ParseTuple format
5666if test "$GCC" = "yes"
5667then
Matthias Kloseb9621712010-04-24 17:59:49 +00005668 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5
5669$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005670 save_CFLAGS=$CFLAGS
5671 CFLAGS="$CFLAGS -Werror"
Matthias Kloseb9621712010-04-24 17:59:49 +00005672 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005673/* end confdefs.h. */
5674
5675 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005676int
5677main ()
5678{
5679
5680 ;
5681 return 0;
5682}
Matthias Kloseb159a552010-04-25 21:00:44 +00005683
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005684_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005685if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005686
Matthias Kloseb159a552010-04-25 21:00:44 +00005687
Matthias Kloseb9621712010-04-24 17:59:49 +00005688$as_echo "#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005689
Matthias Kloseb159a552010-04-25 21:00:44 +00005690 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00005691$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00005692
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005693else
Matthias Kloseb159a552010-04-25 21:00:44 +00005694
5695 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00005696$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005697
5698fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005699rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5700 CFLAGS=$save_CFLAGS
5701fi
5702
5703# On some compilers, pthreads are available without further options
5704# (e.g. MacOS X). On some of these systems, the compiler will not
5705# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
5706# So we have to see first whether pthreads are available without
5707# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00005708{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
5709$as_echo_n "checking whether pthreads are available without options... " >&6; }
5710if test "${ac_cv_pthread_is_default+set}" = set; then :
5711 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005712else
Matthias Kloseb9621712010-04-24 17:59:49 +00005713 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005714 ac_cv_pthread_is_default=no
5715else
Matthias Kloseb9621712010-04-24 17:59:49 +00005716 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005717/* end confdefs.h. */
5718
5719#include <pthread.h>
5720
5721void* routine(void* p){return NULL;}
5722
5723int main(){
5724 pthread_t p;
5725 if(pthread_create(&p,NULL,routine,NULL)!=0)
5726 return 1;
5727 (void)pthread_detach(p);
5728 return 0;
5729}
5730
5731_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005732if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005733
5734 ac_cv_pthread_is_default=yes
5735 ac_cv_kthread=no
5736 ac_cv_pthread=no
5737
5738else
Matthias Kloseb9621712010-04-24 17:59:49 +00005739 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005740fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005741rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5742 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005743fi
5744
5745
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005746fi
5747
Matthias Kloseb9621712010-04-24 17:59:49 +00005748{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
5749$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005750
5751
5752if test $ac_cv_pthread_is_default = yes
5753then
5754 ac_cv_kpthread=no
5755else
5756# -Kpthread, if available, provides the right #defines
5757# and linker options to make pthread_create available
5758# Some compilers won't report that they do not support -Kpthread,
5759# so we need to run a program to see whether it really made the
5760# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
5762$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
5763if test "${ac_cv_kpthread+set}" = set; then :
5764 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005765else
5766 ac_save_cc="$CC"
5767CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005768if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005769 ac_cv_kpthread=no
5770else
Matthias Kloseb9621712010-04-24 17:59:49 +00005771 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005772/* end confdefs.h. */
5773
5774#include <pthread.h>
5775
5776void* routine(void* p){return NULL;}
5777
5778int main(){
5779 pthread_t p;
5780 if(pthread_create(&p,NULL,routine,NULL)!=0)
5781 return 1;
5782 (void)pthread_detach(p);
5783 return 0;
5784}
5785
5786_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005787if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005788 ac_cv_kpthread=yes
5789else
Matthias Kloseb9621712010-04-24 17:59:49 +00005790 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005791fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005792rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5793 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005794fi
5795
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005796CC="$ac_save_cc"
5797fi
5798
Matthias Kloseb9621712010-04-24 17:59:49 +00005799{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
5800$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005801fi
5802
5803if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
5804then
5805# -Kthread, if available, provides the right #defines
5806# and linker options to make pthread_create available
5807# Some compilers won't report that they do not support -Kthread,
5808# so we need to run a program to see whether it really made the
5809# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005810{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
5811$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
5812if test "${ac_cv_kthread+set}" = set; then :
5813 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005814else
5815 ac_save_cc="$CC"
5816CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005817if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005818 ac_cv_kthread=no
5819else
Matthias Kloseb9621712010-04-24 17:59:49 +00005820 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005821/* end confdefs.h. */
5822
5823#include <pthread.h>
5824
5825void* routine(void* p){return NULL;}
5826
5827int main(){
5828 pthread_t p;
5829 if(pthread_create(&p,NULL,routine,NULL)!=0)
5830 return 1;
5831 (void)pthread_detach(p);
5832 return 0;
5833}
5834
5835_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005836if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005837 ac_cv_kthread=yes
5838else
Matthias Kloseb9621712010-04-24 17:59:49 +00005839 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005840fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005841rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5842 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005843fi
5844
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005845CC="$ac_save_cc"
5846fi
5847
Matthias Kloseb9621712010-04-24 17:59:49 +00005848{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
5849$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005850fi
5851
5852if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
5853then
5854# -pthread, if available, provides the right #defines
5855# and linker options to make pthread_create available
5856# Some compilers won't report that they do not support -pthread,
5857# so we need to run a program to see whether it really made the
5858# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005859{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
5860$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
5861if test "${ac_cv_thread+set}" = set; then :
5862 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005863else
5864 ac_save_cc="$CC"
5865CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005866if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005867 ac_cv_pthread=no
5868else
Matthias Kloseb9621712010-04-24 17:59:49 +00005869 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005870/* end confdefs.h. */
5871
5872#include <pthread.h>
5873
5874void* routine(void* p){return NULL;}
5875
5876int main(){
5877 pthread_t p;
5878 if(pthread_create(&p,NULL,routine,NULL)!=0)
5879 return 1;
5880 (void)pthread_detach(p);
5881 return 0;
5882}
5883
5884_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005885if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005886 ac_cv_pthread=yes
5887else
Matthias Kloseb9621712010-04-24 17:59:49 +00005888 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005889fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005890rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5891 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005892fi
5893
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005894CC="$ac_save_cc"
5895fi
5896
Matthias Kloseb9621712010-04-24 17:59:49 +00005897{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
5898$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005899fi
5900
5901# If we have set a CC compiler flag for thread support then
5902# check if it works for CXX, too.
5903ac_cv_cxx_thread=no
5904if test ! -z "$CXX"
5905then
Matthias Kloseb9621712010-04-24 17:59:49 +00005906{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
5907$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005908ac_save_cxx="$CXX"
5909
5910if test "$ac_cv_kpthread" = "yes"
5911then
5912 CXX="$CXX -Kpthread"
5913 ac_cv_cxx_thread=yes
5914elif test "$ac_cv_kthread" = "yes"
5915then
5916 CXX="$CXX -Kthread"
5917 ac_cv_cxx_thread=yes
5918elif test "$ac_cv_pthread" = "yes"
5919then
5920 CXX="$CXX -pthread"
5921 ac_cv_cxx_thread=yes
5922fi
5923
5924if test $ac_cv_cxx_thread = yes
5925then
5926 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5927 $CXX -c conftest.$ac_ext 2>&5
5928 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5929 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5930 then
5931 ac_cv_cxx_thread=yes
5932 else
5933 ac_cv_cxx_thread=no
5934 fi
5935 rm -fr conftest*
5936fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005937{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
5938$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005939fi
5940CXX="$ac_save_cxx"
5941
5942
5943# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00005944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5945$as_echo_n "checking for ANSI C header files... " >&6; }
5946if test "${ac_cv_header_stdc+set}" = set; then :
5947 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005948else
Matthias Kloseb9621712010-04-24 17:59:49 +00005949 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005950/* end confdefs.h. */
5951#include <stdlib.h>
5952#include <stdarg.h>
5953#include <string.h>
5954#include <float.h>
5955
5956int
5957main ()
5958{
5959
5960 ;
5961 return 0;
5962}
5963_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005964if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005965 ac_cv_header_stdc=yes
5966else
Matthias Kloseb9621712010-04-24 17:59:49 +00005967 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005968fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005969rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5970
5971if test $ac_cv_header_stdc = yes; then
5972 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00005973 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005974/* end confdefs.h. */
5975#include <string.h>
5976
5977_ACEOF
5978if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005979 $EGREP "memchr" >/dev/null 2>&1; then :
5980
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005981else
5982 ac_cv_header_stdc=no
5983fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005984rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005985
5986fi
5987
5988if test $ac_cv_header_stdc = yes; then
5989 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00005990 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005991/* end confdefs.h. */
5992#include <stdlib.h>
5993
5994_ACEOF
5995if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005996 $EGREP "free" >/dev/null 2>&1; then :
5997
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005998else
5999 ac_cv_header_stdc=no
6000fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006001rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006002
6003fi
6004
6005if test $ac_cv_header_stdc = yes; then
6006 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00006007 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006008 :
6009else
Matthias Kloseb9621712010-04-24 17:59:49 +00006010 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006011/* end confdefs.h. */
6012#include <ctype.h>
6013#include <stdlib.h>
6014#if ((' ' & 0x0FF) == 0x020)
6015# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6016# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6017#else
6018# define ISLOWER(c) \
6019 (('a' <= (c) && (c) <= 'i') \
6020 || ('j' <= (c) && (c) <= 'r') \
6021 || ('s' <= (c) && (c) <= 'z'))
6022# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6023#endif
6024
6025#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6026int
6027main ()
6028{
6029 int i;
6030 for (i = 0; i < 256; i++)
6031 if (XOR (islower (i), ISLOWER (i))
6032 || toupper (i) != TOUPPER (i))
6033 return 2;
6034 return 0;
6035}
6036_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006037if ac_fn_c_try_run "$LINENO"; then :
6038
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006039else
Matthias Kloseb9621712010-04-24 17:59:49 +00006040 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006041fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006042rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6043 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006044fi
6045
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006046fi
6047fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006048{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6049$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006050if test $ac_cv_header_stdc = yes; then
6051
Matthias Kloseb9621712010-04-24 17:59:49 +00006052$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006053
6054fi
6055
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006056for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
6057fcntl.h grp.h \
Christian Heimesbbe741d2008-03-28 10:53:29 +00006058ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Thomas Wouters89f507f2006-12-13 04:49:30 +00006059shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00006060unistd.h utime.h \
Christian Heimes4fbc72b2008-03-22 00:47:35 +00006061sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
6062sys/lock.h sys/mkdev.h sys/modem.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006063sys/param.h sys/poll.h sys/select.h sys/socket.h sys/statvfs.h sys/stat.h \
Benjamin Petersonde9c8692008-07-01 18:23:09 +00006064sys/termio.h sys/time.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006065sys/times.h sys/types.h sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h \
Hye-Shik Chang81268602004-02-02 06:05:24 +00006066sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Ronald Oussoren755740f2010-02-07 19:56:39 +00006067bluetooth/bluetooth.h linux/tipc.h spawn.h util.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006068do :
6069 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6070ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Benjamin Petersond7f73e92010-09-05 00:09:07 +00006071eval as_val=\$$as_ac_Header
6072 if test "x$as_val" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006073 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006074#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006075_ACEOF
6076
6077fi
6078
Guido van Rossum627b2d71993-12-24 10:39:16 +00006079done
6080
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006081ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006082for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00006083 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6084{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
6085$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Benjamin Petersond7f73e92010-09-05 00:09:07 +00006086if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006087 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006088else
Matthias Kloseb9621712010-04-24 17:59:49 +00006089 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006090/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006091#include <sys/types.h>
6092#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00006093
Martin v. Löwis11437992002-04-12 09:54:03 +00006094int
6095main ()
6096{
6097if ((DIR *) 0)
6098return 0;
6099 ;
6100 return 0;
6101}
6102_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006103if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006104 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00006105else
Matthias Kloseb9621712010-04-24 17:59:49 +00006106 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006107fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006108rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006109fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006110eval ac_res=\$$as_ac_Header
6111 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6112$as_echo "$ac_res" >&6; }
Benjamin Petersond7f73e92010-09-05 00:09:07 +00006113eval as_val=\$$as_ac_Header
6114 if test "x$as_val" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006115 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006116#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006117_ACEOF
6118
6119ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00006120fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006121
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006122done
6123# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6124if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006125 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6126$as_echo_n "checking for library containing opendir... " >&6; }
6127if test "${ac_cv_search_opendir+set}" = set; then :
6128 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006129else
Martin v. Löwis11437992002-04-12 09:54:03 +00006130 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006131cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006132/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006133
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006134/* Override any GCC internal prototype to avoid an error.
6135 Use char because int might match the return type of a GCC
6136 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006137#ifdef __cplusplus
6138extern "C"
6139#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006140char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006141int
6142main ()
6143{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006144return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006145 ;
6146 return 0;
6147}
6148_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006149for ac_lib in '' dir; do
6150 if test -z "$ac_lib"; then
6151 ac_res="none required"
6152 else
6153 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006154 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006155 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006156 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006157 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006158fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006159rm -f core conftest.err conftest.$ac_objext \
6160 conftest$ac_exeext
6161 if test "${ac_cv_search_opendir+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006162 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006163fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006164done
Matthias Kloseb9621712010-04-24 17:59:49 +00006165if test "${ac_cv_search_opendir+set}" = set; then :
6166
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006167else
6168 ac_cv_search_opendir=no
6169fi
6170rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006171LIBS=$ac_func_search_save_LIBS
6172fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006173{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6174$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006175ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006176if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006177 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00006178
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006179fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006180
Michael W. Hudson54241132001-12-07 15:38:26 +00006181else
Matthias Kloseb9621712010-04-24 17:59:49 +00006182 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6183$as_echo_n "checking for library containing opendir... " >&6; }
6184if test "${ac_cv_search_opendir+set}" = set; then :
6185 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006186else
6187 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006188cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006189/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006190
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006191/* Override any GCC internal prototype to avoid an error.
6192 Use char because int might match the return type of a GCC
6193 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006194#ifdef __cplusplus
6195extern "C"
6196#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006197char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006198int
6199main ()
6200{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006201return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006202 ;
6203 return 0;
6204}
6205_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006206for ac_lib in '' x; do
6207 if test -z "$ac_lib"; then
6208 ac_res="none required"
6209 else
6210 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006211 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006212 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006213 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006214 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006215fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006216rm -f core conftest.err conftest.$ac_objext \
6217 conftest$ac_exeext
6218 if test "${ac_cv_search_opendir+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006219 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006220fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006221done
Matthias Kloseb9621712010-04-24 17:59:49 +00006222if test "${ac_cv_search_opendir+set}" = set; then :
6223
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006224else
6225 ac_cv_search_opendir=no
6226fi
6227rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006228LIBS=$ac_func_search_save_LIBS
6229fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006230{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6231$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006232ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006233if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006234 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006235
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006236fi
6237
6238fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006239
Matthias Kloseb9621712010-04-24 17:59:49 +00006240{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
6241$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
6242if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then :
6243 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006244else
Matthias Kloseb9621712010-04-24 17:59:49 +00006245 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006246/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006247#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006248int
6249main ()
6250{
6251return makedev(0, 0);
6252 ;
6253 return 0;
6254}
6255_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006256if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006257 ac_cv_header_sys_types_h_makedev=yes
6258else
Matthias Kloseb9621712010-04-24 17:59:49 +00006259 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006260fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006261rm -f core conftest.err conftest.$ac_objext \
6262 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006263
6264fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006265{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
6266$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006267
6268if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006269ac_fn_c_check_header_mongrel "$LINENO" "sys/mkdev.h" "ac_cv_header_sys_mkdev_h" "$ac_includes_default"
6270if test "x$ac_cv_header_sys_mkdev_h" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006271
Matthias Kloseb9621712010-04-24 17:59:49 +00006272$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006273
6274fi
6275
6276
6277
6278 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006279 ac_fn_c_check_header_mongrel "$LINENO" "sys/sysmacros.h" "ac_cv_header_sys_sysmacros_h" "$ac_includes_default"
6280if test "x$ac_cv_header_sys_sysmacros_h" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006281
Matthias Kloseb9621712010-04-24 17:59:49 +00006282$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006283
6284fi
6285
6286
6287 fi
6288fi
6289
Michael W. Hudson54241132001-12-07 15:38:26 +00006290
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006291# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006292for ac_header in term.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006293do :
6294 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006295#ifdef HAVE_CURSES_H
6296#include <curses.h>
6297#endif
6298
Matthias Kloseb9621712010-04-24 17:59:49 +00006299"
6300if test "x$ac_cv_header_term_h" = x""yes; then :
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006301 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006302#define HAVE_TERM_H 1
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006303_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006304
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006305fi
6306
6307done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006308
6309
Martin v. Löwis11017b12006-01-14 18:12:57 +00006310# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00006311for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006312do :
6313 ac_fn_c_check_header_compile "$LINENO" "linux/netlink.h" "ac_cv_header_linux_netlink_h" "
Martin v. Löwis11017b12006-01-14 18:12:57 +00006314#ifdef HAVE_ASM_TYPES_H
6315#include <asm/types.h>
6316#endif
6317#ifdef HAVE_SYS_SOCKET_H
6318#include <sys/socket.h>
6319#endif
6320
Matthias Kloseb9621712010-04-24 17:59:49 +00006321"
6322if test "x$ac_cv_header_linux_netlink_h" = x""yes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00006323 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006324#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006325_ACEOF
6326
6327fi
6328
6329done
6330
6331
Guido van Rossum627b2d71993-12-24 10:39:16 +00006332# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006333was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006334{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
6335$as_echo_n "checking for clock_t in time.h... " >&6; }
6336cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006337/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006338#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006339
6340_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006341if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006342 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00006343 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006344else
Martin v. Löwis11437992002-04-12 09:54:03 +00006345
6346
Matthias Kloseb9621712010-04-24 17:59:49 +00006347$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00006348
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006349
Guido van Rossum627b2d71993-12-24 10:39:16 +00006350fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006351rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006352
Matthias Kloseb9621712010-04-24 17:59:49 +00006353{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
6354$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006355
Neal Norwitz11690112002-07-30 01:08:28 +00006356# Check whether using makedev requires defining _OSF_SOURCE
Matthias Kloseb9621712010-04-24 17:59:49 +00006357{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
6358$as_echo_n "checking for makedev... " >&6; }
6359cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006360/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00006361
Jesus Cea740f53a2010-04-28 11:35:30 +00006362#if defined(MAJOR_IN_MKDEV)
6363#include <sys/mkdev.h>
6364#elif defined(MAJOR_IN_SYSMACROS)
6365#include <sys/sysmacros.h>
6366#else
6367#include <sys/types.h>
6368#endif
6369
Neal Norwitz11690112002-07-30 01:08:28 +00006370int
6371main ()
6372{
Jesus Cea740f53a2010-04-28 11:35:30 +00006373
6374 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00006375 ;
6376 return 0;
6377}
Matthias Kloseb159a552010-04-25 21:00:44 +00006378
Neal Norwitz11690112002-07-30 01:08:28 +00006379_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006380if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006381 ac_cv_has_makedev=yes
6382else
Matthias Kloseb9621712010-04-24 17:59:49 +00006383 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006384fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006385rm -f core conftest.err conftest.$ac_objext \
6386 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006387if test "$ac_cv_has_makedev" = "no"; then
6388 # we didn't link, try if _OSF_SOURCE will allow us to link
Matthias Kloseb9621712010-04-24 17:59:49 +00006389 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006390/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006391
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006392#define _OSF_SOURCE 1
6393#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006394
Neal Norwitz11690112002-07-30 01:08:28 +00006395int
6396main ()
6397{
6398 makedev(0, 0)
6399 ;
6400 return 0;
6401}
6402_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006403if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006404 ac_cv_has_makedev=yes
6405else
Matthias Kloseb9621712010-04-24 17:59:49 +00006406 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006407fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006408rm -f core conftest.err conftest.$ac_objext \
6409 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006410 if test "$ac_cv_has_makedev" = "yes"; then
6411
Matthias Kloseb9621712010-04-24 17:59:49 +00006412$as_echo "#define _OSF_SOURCE 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006413
6414 fi
6415fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006416{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
6417$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006418if test "$ac_cv_has_makedev" = "yes"; then
6419
Matthias Kloseb9621712010-04-24 17:59:49 +00006420$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006421
6422fi
6423
Martin v. Löwis399a6892002-10-04 10:22:02 +00006424# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6425# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6426# defined, but the compiler does not support pragma redefine_extname,
6427# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6428# structures (such as rlimit64) without declaring them. As a
6429# work-around, disable LFS on such configurations
6430
6431use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00006432{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
6433$as_echo_n "checking Solaris LFS bug... " >&6; }
6434cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006435/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006436
6437#define _LARGEFILE_SOURCE 1
6438#define _FILE_OFFSET_BITS 64
6439#include <sys/resource.h>
6440
Martin v. Löwis399a6892002-10-04 10:22:02 +00006441int
6442main ()
6443{
6444struct rlimit foo;
6445 ;
6446 return 0;
6447}
6448_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006449if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00006450 sol_lfs_bug=no
6451else
Matthias Kloseb9621712010-04-24 17:59:49 +00006452 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006453fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006454rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006455{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
6456$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006457if test "$sol_lfs_bug" = "yes"; then
6458 use_lfs=no
6459fi
6460
6461if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006462# Two defines needed to enable largefile support on various platforms
6463# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00006464
Matthias Kloseb9621712010-04-24 17:59:49 +00006465$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006466
6467
Matthias Kloseb9621712010-04-24 17:59:49 +00006468$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00006469
Martin v. Löwis399a6892002-10-04 10:22:02 +00006470fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006471
Guido van Rossum84e7b241996-08-19 21:59:00 +00006472# Add some code to confdefs.h so that the test for off_t works on SCO
6473cat >> confdefs.h <<\EOF
6474#if defined(SCO_DS)
6475#undef _OFF_T
6476#endif
6477EOF
6478
Guido van Rossumef2255b2000-03-10 22:30:29 +00006479# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00006480ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
6481if test "x$ac_cv_type_mode_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006482
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006483else
Martin v. Löwis11437992002-04-12 09:54:03 +00006484
6485cat >>confdefs.h <<_ACEOF
6486#define mode_t int
6487_ACEOF
6488
6489fi
6490
Matthias Kloseb9621712010-04-24 17:59:49 +00006491ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
6492if test "x$ac_cv_type_off_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006493
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006494else
Martin v. Löwis11437992002-04-12 09:54:03 +00006495
6496cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006497#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006498_ACEOF
6499
6500fi
6501
Matthias Kloseb9621712010-04-24 17:59:49 +00006502ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
6503if test "x$ac_cv_type_pid_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006504
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006505else
Martin v. Löwis11437992002-04-12 09:54:03 +00006506
6507cat >>confdefs.h <<_ACEOF
6508#define pid_t int
6509_ACEOF
6510
6511fi
6512
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006513
Martin v. Löwis11437992002-04-12 09:54:03 +00006514cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00006515#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00006516_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006517
Matthias Kloseb9621712010-04-24 17:59:49 +00006518ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
6519if test "x$ac_cv_type_size_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006520
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006521else
Martin v. Löwis11437992002-04-12 09:54:03 +00006522
6523cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006524#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00006525_ACEOF
6526
6527fi
6528
Matthias Kloseb9621712010-04-24 17:59:49 +00006529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
6530$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
6531if test "${ac_cv_type_uid_t+set}" = set; then :
6532 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006533else
Matthias Kloseb9621712010-04-24 17:59:49 +00006534 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006535/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006536#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006537
6538_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006539if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006540 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006541 ac_cv_type_uid_t=yes
6542else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006543 ac_cv_type_uid_t=no
6544fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006545rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006546
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006547fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006548{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
6549$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00006550if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006551
Matthias Kloseb9621712010-04-24 17:59:49 +00006552$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006553
6554
Matthias Kloseb9621712010-04-24 17:59:49 +00006555$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006556
6557fi
6558
Matthias Kloseb9621712010-04-24 17:59:49 +00006559ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
6560case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006561 no|yes) ;; #(
6562 *)
6563
Matthias Kloseb9621712010-04-24 17:59:49 +00006564$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006565
6566
6567cat >>confdefs.h <<_ACEOF
6568#define uint32_t $ac_cv_c_uint32_t
6569_ACEOF
6570;;
6571 esac
6572
Matthias Kloseb9621712010-04-24 17:59:49 +00006573ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
6574case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006575 no|yes) ;; #(
6576 *)
6577
Matthias Kloseb9621712010-04-24 17:59:49 +00006578$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006579
6580
6581cat >>confdefs.h <<_ACEOF
6582#define uint64_t $ac_cv_c_uint64_t
6583_ACEOF
6584;;
6585 esac
6586
Matthias Kloseb9621712010-04-24 17:59:49 +00006587ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
6588case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006589 no|yes) ;; #(
6590 *)
6591
6592cat >>confdefs.h <<_ACEOF
6593#define int32_t $ac_cv_c_int32_t
6594_ACEOF
6595;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00006596esac
6597
Matthias Kloseb9621712010-04-24 17:59:49 +00006598ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
6599case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006600 no|yes) ;; #(
6601 *)
6602
6603cat >>confdefs.h <<_ACEOF
6604#define int64_t $ac_cv_c_int64_t
6605_ACEOF
6606;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006607esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00006608
Matthias Kloseb9621712010-04-24 17:59:49 +00006609ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
6610if test "x$ac_cv_type_ssize_t" = x""yes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006611
Matthias Kloseb9621712010-04-24 17:59:49 +00006612$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00006613
6614fi
6615
Jack Jansendd19cf82001-12-06 22:36:17 +00006616
Michael W. Hudson54241132001-12-07 15:38:26 +00006617# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00006618# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006619# The cast to long int works around a bug in the HP C Compiler
6620# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6621# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6622# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
6624$as_echo_n "checking size of int... " >&6; }
6625if test "${ac_cv_sizeof_int+set}" = set; then :
6626 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006627else
Matthias Kloseb9621712010-04-24 17:59:49 +00006628 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006629
Martin v. Löwis11437992002-04-12 09:54:03 +00006630else
Matthias Kloseb9621712010-04-24 17:59:49 +00006631 if test "$ac_cv_type_int" = yes; then
6632 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6633$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Petersond7f73e92010-09-05 00:09:07 +00006634{ as_fn_set_status 77
6635as_fn_error "cannot compute sizeof (int)
6636See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006637 else
6638 ac_cv_sizeof_int=0
6639 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006640fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006641
Martin v. Löwis11437992002-04-12 09:54:03 +00006642fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006643{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
6644$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006645
6646
6647
Martin v. Löwis11437992002-04-12 09:54:03 +00006648cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006649#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00006650_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006651
6652
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006653# The cast to long int works around a bug in the HP C Compiler
6654# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6655# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6656# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006657{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
6658$as_echo_n "checking size of long... " >&6; }
6659if test "${ac_cv_sizeof_long+set}" = set; then :
6660 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006661else
Matthias Kloseb9621712010-04-24 17:59:49 +00006662 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006663
Martin v. Löwis11437992002-04-12 09:54:03 +00006664else
Matthias Kloseb9621712010-04-24 17:59:49 +00006665 if test "$ac_cv_type_long" = yes; then
6666 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6667$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Petersond7f73e92010-09-05 00:09:07 +00006668{ as_fn_set_status 77
6669as_fn_error "cannot compute sizeof (long)
6670See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006671 else
6672 ac_cv_sizeof_long=0
6673 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006674fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006675
Martin v. Löwis11437992002-04-12 09:54:03 +00006676fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006677{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
6678$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006679
6680
6681
Martin v. Löwis11437992002-04-12 09:54:03 +00006682cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006683#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006684_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006685
6686
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006687# The cast to long int works around a bug in the HP C Compiler
6688# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6689# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6690# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
6692$as_echo_n "checking size of void *... " >&6; }
6693if test "${ac_cv_sizeof_void_p+set}" = set; then :
6694 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006695else
Matthias Kloseb9621712010-04-24 17:59:49 +00006696 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006697
Martin v. Löwis11437992002-04-12 09:54:03 +00006698else
Matthias Kloseb9621712010-04-24 17:59:49 +00006699 if test "$ac_cv_type_void_p" = yes; then
6700 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6701$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Petersond7f73e92010-09-05 00:09:07 +00006702{ as_fn_set_status 77
6703as_fn_error "cannot compute sizeof (void *)
6704See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006705 else
6706 ac_cv_sizeof_void_p=0
6707 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006708fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006709
Martin v. Löwis11437992002-04-12 09:54:03 +00006710fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006711{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
6712$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006713
6714
6715
Martin v. Löwis11437992002-04-12 09:54:03 +00006716cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006717#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00006718_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006719
6720
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006721# The cast to long int works around a bug in the HP C Compiler
6722# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6723# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6724# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
6726$as_echo_n "checking size of short... " >&6; }
6727if test "${ac_cv_sizeof_short+set}" = set; then :
6728 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006729else
Matthias Kloseb9621712010-04-24 17:59:49 +00006730 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006731
Martin v. Löwis11437992002-04-12 09:54:03 +00006732else
Matthias Kloseb9621712010-04-24 17:59:49 +00006733 if test "$ac_cv_type_short" = yes; then
6734 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6735$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Petersond7f73e92010-09-05 00:09:07 +00006736{ as_fn_set_status 77
6737as_fn_error "cannot compute sizeof (short)
6738See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006739 else
6740 ac_cv_sizeof_short=0
6741 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006742fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006743
Martin v. Löwis11437992002-04-12 09:54:03 +00006744fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006745{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
6746$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006747
6748
6749
Martin v. Löwis11437992002-04-12 09:54:03 +00006750cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006751#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00006752_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006753
6754
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006755# The cast to long int works around a bug in the HP C Compiler
6756# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6757# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6758# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006759{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
6760$as_echo_n "checking size of float... " >&6; }
6761if test "${ac_cv_sizeof_float+set}" = set; then :
6762 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006763else
Matthias Kloseb9621712010-04-24 17:59:49 +00006764 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (float))" "ac_cv_sizeof_float" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006765
Martin v. Löwis11437992002-04-12 09:54:03 +00006766else
Matthias Kloseb9621712010-04-24 17:59:49 +00006767 if test "$ac_cv_type_float" = yes; then
6768 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6769$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Petersond7f73e92010-09-05 00:09:07 +00006770{ as_fn_set_status 77
6771as_fn_error "cannot compute sizeof (float)
6772See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006773 else
6774 ac_cv_sizeof_float=0
6775 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006776fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006777
Martin v. Löwis11437992002-04-12 09:54:03 +00006778fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006779{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
6780$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006781
6782
6783
Martin v. Löwis11437992002-04-12 09:54:03 +00006784cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006785#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00006786_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006787
6788
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006789# The cast to long int works around a bug in the HP C Compiler
6790# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6791# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6792# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006793{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
6794$as_echo_n "checking size of double... " >&6; }
6795if test "${ac_cv_sizeof_double+set}" = set; then :
6796 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006797else
Matthias Kloseb9621712010-04-24 17:59:49 +00006798 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (double))" "ac_cv_sizeof_double" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006799
Martin v. Löwis11437992002-04-12 09:54:03 +00006800else
Matthias Kloseb9621712010-04-24 17:59:49 +00006801 if test "$ac_cv_type_double" = yes; then
6802 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6803$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Petersond7f73e92010-09-05 00:09:07 +00006804{ as_fn_set_status 77
6805as_fn_error "cannot compute sizeof (double)
6806See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006807 else
6808 ac_cv_sizeof_double=0
6809 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006810fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006811
Martin v. Löwis11437992002-04-12 09:54:03 +00006812fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006813{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
6814$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006815
6816
6817
Martin v. Löwis11437992002-04-12 09:54:03 +00006818cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006819#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00006820_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006821
6822
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006823# The cast to long int works around a bug in the HP C Compiler
6824# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6825# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6826# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
6828$as_echo_n "checking size of fpos_t... " >&6; }
6829if test "${ac_cv_sizeof_fpos_t+set}" = set; then :
6830 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006831else
Matthias Kloseb9621712010-04-24 17:59:49 +00006832 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (fpos_t))" "ac_cv_sizeof_fpos_t" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006833
Martin v. Löwis11437992002-04-12 09:54:03 +00006834else
Matthias Kloseb9621712010-04-24 17:59:49 +00006835 if test "$ac_cv_type_fpos_t" = yes; then
6836 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6837$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Petersond7f73e92010-09-05 00:09:07 +00006838{ as_fn_set_status 77
6839as_fn_error "cannot compute sizeof (fpos_t)
6840See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006841 else
6842 ac_cv_sizeof_fpos_t=0
6843 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006844fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006845
Martin v. Löwis11437992002-04-12 09:54:03 +00006846fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006847{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
6848$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006849
6850
6851
Martin v. Löwis11437992002-04-12 09:54:03 +00006852cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006853#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00006854_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006855
Michael W. Hudson54241132001-12-07 15:38:26 +00006856
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006857# The cast to long int works around a bug in the HP C Compiler
6858# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6859# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6860# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
6862$as_echo_n "checking size of size_t... " >&6; }
6863if test "${ac_cv_sizeof_size_t+set}" = set; then :
6864 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00006865else
Matthias Kloseb9621712010-04-24 17:59:49 +00006866 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t" "$ac_includes_default"; then :
Martin v. Löwis18e16552006-02-15 17:27:45 +00006867
Martin v. Löwis18e16552006-02-15 17:27:45 +00006868else
Matthias Kloseb9621712010-04-24 17:59:49 +00006869 if test "$ac_cv_type_size_t" = yes; then
6870 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6871$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Petersond7f73e92010-09-05 00:09:07 +00006872{ as_fn_set_status 77
6873as_fn_error "cannot compute sizeof (size_t)
6874See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006875 else
6876 ac_cv_sizeof_size_t=0
6877 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00006878fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006879
Martin v. Löwis18e16552006-02-15 17:27:45 +00006880fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006881{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
6882$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006883
6884
6885
Martin v. Löwis18e16552006-02-15 17:27:45 +00006886cat >>confdefs.h <<_ACEOF
6887#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
6888_ACEOF
6889
6890
Christian Heimes400adb02008-02-01 08:12:03 +00006891# The cast to long int works around a bug in the HP C Compiler
6892# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6893# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6894# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006895{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
6896$as_echo_n "checking size of pid_t... " >&6; }
6897if test "${ac_cv_sizeof_pid_t+set}" = set; then :
6898 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00006899else
Matthias Kloseb9621712010-04-24 17:59:49 +00006900 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pid_t))" "ac_cv_sizeof_pid_t" "$ac_includes_default"; then :
Christian Heimes400adb02008-02-01 08:12:03 +00006901
Christian Heimes400adb02008-02-01 08:12:03 +00006902else
Matthias Kloseb9621712010-04-24 17:59:49 +00006903 if test "$ac_cv_type_pid_t" = yes; then
6904 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6905$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Petersond7f73e92010-09-05 00:09:07 +00006906{ as_fn_set_status 77
6907as_fn_error "cannot compute sizeof (pid_t)
6908See \`config.log' for more details." "$LINENO" 5; }; }
Christian Heimes400adb02008-02-01 08:12:03 +00006909 else
6910 ac_cv_sizeof_pid_t=0
6911 fi
6912fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006913
Christian Heimes400adb02008-02-01 08:12:03 +00006914fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006915{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
6916$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00006917
6918
6919
6920cat >>confdefs.h <<_ACEOF
6921#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
6922_ACEOF
6923
6924
Michael W. Hudson54241132001-12-07 15:38:26 +00006925
Matthias Kloseb9621712010-04-24 17:59:49 +00006926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
6927$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006928have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006929cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006930/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006931
Martin v. Löwis11437992002-04-12 09:54:03 +00006932int
6933main ()
6934{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006935long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00006936 ;
6937 return 0;
6938}
6939_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006940if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006941
6942
Matthias Kloseb9621712010-04-24 17:59:49 +00006943$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006944
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006945 have_long_long=yes
6946
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006947fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006948rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006949{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
6950$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00006951if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006952# The cast to long int works around a bug in the HP C Compiler
6953# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6954# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6955# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006956{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
6957$as_echo_n "checking size of long long... " >&6; }
6958if test "${ac_cv_sizeof_long_long+set}" = set; then :
6959 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006960else
Matthias Kloseb9621712010-04-24 17:59:49 +00006961 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006962
Martin v. Löwis11437992002-04-12 09:54:03 +00006963else
Matthias Kloseb9621712010-04-24 17:59:49 +00006964 if test "$ac_cv_type_long_long" = yes; then
6965 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6966$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Petersond7f73e92010-09-05 00:09:07 +00006967{ as_fn_set_status 77
6968as_fn_error "cannot compute sizeof (long long)
6969See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006970 else
6971 ac_cv_sizeof_long_long=0
6972 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006973fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006974
Martin v. Löwis11437992002-04-12 09:54:03 +00006975fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006976{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
6977$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006978
6979
6980
Martin v. Löwis11437992002-04-12 09:54:03 +00006981cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006982#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006983_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006984
Michael W. Hudson54241132001-12-07 15:38:26 +00006985
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006986fi
6987
Matthias Kloseb9621712010-04-24 17:59:49 +00006988{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
6989$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006990have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006991cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006992/* end confdefs.h. */
6993
6994int
6995main ()
6996{
6997long double x; x = (long double)0;
6998 ;
6999 return 0;
7000}
7001_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007002if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007003
7004
Matthias Kloseb9621712010-04-24 17:59:49 +00007005$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007006
7007 have_long_double=yes
7008
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007009fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007010rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007011{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
7012$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007013if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007014# The cast to long int works around a bug in the HP C Compiler
7015# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7016# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7017# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007018{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
7019$as_echo_n "checking size of long double... " >&6; }
7020if test "${ac_cv_sizeof_long_double+set}" = set; then :
7021 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007022else
Matthias Kloseb9621712010-04-24 17:59:49 +00007023 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long double))" "ac_cv_sizeof_long_double" "$ac_includes_default"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007024
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007025else
Matthias Kloseb9621712010-04-24 17:59:49 +00007026 if test "$ac_cv_type_long_double" = yes; then
7027 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7028$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Petersond7f73e92010-09-05 00:09:07 +00007029{ as_fn_set_status 77
7030as_fn_error "cannot compute sizeof (long double)
7031See \`config.log' for more details." "$LINENO" 5; }; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007032 else
7033 ac_cv_sizeof_long_double=0
7034 fi
7035fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007036
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007037fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007038{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
7039$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007040
7041
7042
7043cat >>confdefs.h <<_ACEOF
7044#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
7045_ACEOF
7046
7047
7048fi
7049
7050
Matthias Kloseb9621712010-04-24 17:59:49 +00007051{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
7052$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007053have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007054cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00007055/* end confdefs.h. */
7056
7057int
7058main ()
7059{
7060_Bool x; x = (_Bool)0;
7061 ;
7062 return 0;
7063}
7064_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007065if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00007066
7067
Matthias Kloseb9621712010-04-24 17:59:49 +00007068$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00007069
7070 have_c99_bool=yes
7071
Thomas Woutersb2137042007-02-01 18:02:27 +00007072fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007073rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007074{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
7075$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007076if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007077# The cast to long int works around a bug in the HP C Compiler
7078# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7079# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7080# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007081{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
7082$as_echo_n "checking size of _Bool... " >&6; }
7083if test "${ac_cv_sizeof__Bool+set}" = set; then :
7084 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00007085else
Matthias Kloseb9621712010-04-24 17:59:49 +00007086 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (_Bool))" "ac_cv_sizeof__Bool" "$ac_includes_default"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00007087
Thomas Woutersb2137042007-02-01 18:02:27 +00007088else
Matthias Kloseb9621712010-04-24 17:59:49 +00007089 if test "$ac_cv_type__Bool" = yes; then
7090 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7091$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Petersond7f73e92010-09-05 00:09:07 +00007092{ as_fn_set_status 77
7093as_fn_error "cannot compute sizeof (_Bool)
7094See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007095 else
7096 ac_cv_sizeof__Bool=0
7097 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00007098fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007099
Thomas Woutersb2137042007-02-01 18:02:27 +00007100fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007101{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
7102$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007103
7104
7105
Thomas Woutersb2137042007-02-01 18:02:27 +00007106cat >>confdefs.h <<_ACEOF
7107#define SIZEOF__BOOL $ac_cv_sizeof__Bool
7108_ACEOF
7109
7110
7111fi
7112
Matthias Kloseb9621712010-04-24 17:59:49 +00007113ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00007114 #include <stdint.h>
7115 #endif
Antoine Pitrou1bf29b72010-10-10 08:10:16 +00007116 #ifdef HAVE_INTTYPES_H
7117 #include <inttypes.h>
7118 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00007119"
7120if test "x$ac_cv_type_uintptr_t" = x""yes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00007121
7122cat >>confdefs.h <<_ACEOF
7123#define HAVE_UINTPTR_T 1
7124_ACEOF
7125
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007126# The cast to long int works around a bug in the HP C Compiler
7127# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7128# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7129# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007130{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
7131$as_echo_n "checking size of uintptr_t... " >&6; }
7132if test "${ac_cv_sizeof_uintptr_t+set}" = set; then :
7133 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007134else
Matthias Kloseb9621712010-04-24 17:59:49 +00007135 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 +00007136
Martin v. Löwis11437992002-04-12 09:54:03 +00007137else
Matthias Kloseb9621712010-04-24 17:59:49 +00007138 if test "$ac_cv_type_uintptr_t" = yes; then
7139 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7140$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Petersond7f73e92010-09-05 00:09:07 +00007141{ as_fn_set_status 77
7142as_fn_error "cannot compute sizeof (uintptr_t)
7143See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007144 else
7145 ac_cv_sizeof_uintptr_t=0
7146 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007147fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007148
Martin v. Löwis11437992002-04-12 09:54:03 +00007149fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007150{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
7151$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007152
7153
7154
Martin v. Löwis11437992002-04-12 09:54:03 +00007155cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007156#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007157_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007158
Michael W. Hudson54241132001-12-07 15:38:26 +00007159
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007160fi
7161
Thomas Wouters89f507f2006-12-13 04:49:30 +00007162
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007163# The cast to long int works around a bug in the HP C Compiler
7164# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7165# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7166# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007167{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
7168$as_echo_n "checking size of off_t... " >&6; }
7169if test "${ac_cv_sizeof_off_t+set}" = set; then :
7170 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007171else
Matthias Kloseb9621712010-04-24 17:59:49 +00007172 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007173#ifdef HAVE_SYS_TYPES_H
7174#include <sys/types.h>
7175#endif
7176
Matthias Kloseb9621712010-04-24 17:59:49 +00007177"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007178
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007179else
Matthias Kloseb9621712010-04-24 17:59:49 +00007180 if test "$ac_cv_type_off_t" = yes; then
7181 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7182$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Petersond7f73e92010-09-05 00:09:07 +00007183{ as_fn_set_status 77
7184as_fn_error "cannot compute sizeof (off_t)
7185See \`config.log' for more details." "$LINENO" 5; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007186 else
7187 ac_cv_sizeof_off_t=0
7188 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007189fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007190
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007191fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007192{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
7193$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007194
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007195
7196
Martin v. Löwis11437992002-04-12 09:54:03 +00007197cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007198#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007199_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007200
Michael W. Hudson54241132001-12-07 15:38:26 +00007201
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007202
Matthias Kloseb9621712010-04-24 17:59:49 +00007203{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
7204$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007205if test "$have_long_long" = yes
7206then
7207if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007208 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007209
Matthias Kloseb9621712010-04-24 17:59:49 +00007210$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007211
Matthias Kloseb9621712010-04-24 17:59:49 +00007212 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7213$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007214else
Matthias Kloseb9621712010-04-24 17:59:49 +00007215 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7216$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007217fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00007218else
Matthias Kloseb9621712010-04-24 17:59:49 +00007219 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7220$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007221fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007222
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007223# The cast to long int works around a bug in the HP C Compiler
7224# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7225# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7226# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007227{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
7228$as_echo_n "checking size of time_t... " >&6; }
7229if test "${ac_cv_sizeof_time_t+set}" = set; then :
7230 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007231else
Matthias Kloseb9621712010-04-24 17:59:49 +00007232 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007233#ifdef HAVE_SYS_TYPES_H
7234#include <sys/types.h>
7235#endif
7236#ifdef HAVE_TIME_H
7237#include <time.h>
7238#endif
7239
Matthias Kloseb9621712010-04-24 17:59:49 +00007240"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007241
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007242else
Matthias Kloseb9621712010-04-24 17:59:49 +00007243 if test "$ac_cv_type_time_t" = yes; then
7244 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7245$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Petersond7f73e92010-09-05 00:09:07 +00007246{ as_fn_set_status 77
7247as_fn_error "cannot compute sizeof (time_t)
7248See \`config.log' for more details." "$LINENO" 5; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007249 else
7250 ac_cv_sizeof_time_t=0
7251 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007252fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007253
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007254fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007255{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
7256$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007257
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007258
7259
Martin v. Löwis11437992002-04-12 09:54:03 +00007260cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007261#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007262_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007263
Michael W. Hudson54241132001-12-07 15:38:26 +00007264
7265
Trent Mick635f6fb2000-08-23 21:33:05 +00007266# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007267ac_save_cc="$CC"
7268if test "$ac_cv_kpthread" = "yes"
7269then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00007270elif test "$ac_cv_kthread" = "yes"
7271then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00007272elif test "$ac_cv_pthread" = "yes"
7273then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007274fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007275
Matthias Kloseb9621712010-04-24 17:59:49 +00007276{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
7277$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007278have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007279cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007280/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007281
7282 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007283int
7284main ()
7285{
Guido van Rossum12580492000-09-24 16:47:19 +00007286pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007287 ;
7288 return 0;
7289}
Matthias Kloseb159a552010-04-25 21:00:44 +00007290
Martin v. Löwis11437992002-04-12 09:54:03 +00007291_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007292if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00007293 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00007294fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007295rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007296{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
7297$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007298if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007299 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007300# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7301# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7302# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007303{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
7304$as_echo_n "checking size of pthread_t... " >&6; }
7305if test "${ac_cv_sizeof_pthread_t+set}" = set; then :
7306 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007307else
Matthias Kloseb9621712010-04-24 17:59:49 +00007308 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007309#ifdef HAVE_PTHREAD_H
7310#include <pthread.h>
7311#endif
7312
Matthias Kloseb9621712010-04-24 17:59:49 +00007313"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007314
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007315else
Matthias Kloseb9621712010-04-24 17:59:49 +00007316 if test "$ac_cv_type_pthread_t" = yes; then
7317 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7318$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Petersond7f73e92010-09-05 00:09:07 +00007319{ as_fn_set_status 77
7320as_fn_error "cannot compute sizeof (pthread_t)
7321See \`config.log' for more details." "$LINENO" 5; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007322 else
7323 ac_cv_sizeof_pthread_t=0
7324 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00007325fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007326
Trent Mick635f6fb2000-08-23 21:33:05 +00007327fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007328{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
7329$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007330
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007331
7332
Martin v. Löwis11437992002-04-12 09:54:03 +00007333cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007334#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007335_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007336
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007337
Trent Mick635f6fb2000-08-23 21:33:05 +00007338fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007339CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00007340
Michael W. Hudson54241132001-12-07 15:38:26 +00007341
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007342case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007343 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007344 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
7345 ;;
7346 Darwin/*)
7347 OTHER_LIBTOOL_OPT=""
7348 ;;
7349esac
7350
7351
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007352ARCH_RUN_32BIT=""
7353
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007354case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007355 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00007356 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
7357 if test "${enable_universalsdk}"; then
7358 :
7359 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007360 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007361 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00007362 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007363 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00007364 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00007365 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007366 if test ${gcc_version} '<' 4.0
7367 then
7368 LIBTOOL_CRUFT="-lcc_dynamic"
7369 else
7370 LIBTOOL_CRUFT=""
7371 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007372 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007373 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007374else
Matthias Kloseb9621712010-04-24 17:59:49 +00007375 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007376/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007377
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007378 #include <unistd.h>
7379 int main(int argc, char*argv[])
7380 {
7381 if (sizeof(long) == 4) {
7382 return 0;
7383 } else {
7384 return 1;
7385 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007386 }
7387
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007388_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007389if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007390 ac_osx_32bit=yes
7391else
Matthias Kloseb9621712010-04-24 17:59:49 +00007392 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007393fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007394rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7395 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007396fi
7397
7398
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007399 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007400 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007401 i386)
7402 MACOSX_DEFAULT_ARCH="i386"
7403 ;;
7404 ppc)
7405 MACOSX_DEFAULT_ARCH="ppc"
7406 ;;
7407 *)
Benjamin Petersond7f73e92010-09-05 00:09:07 +00007408 as_fn_error "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007409 ;;
7410 esac
7411 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007412 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007413 i386)
7414 MACOSX_DEFAULT_ARCH="x86_64"
7415 ;;
7416 ppc)
7417 MACOSX_DEFAULT_ARCH="ppc64"
7418 ;;
7419 *)
Benjamin Petersond7f73e92010-09-05 00:09:07 +00007420 as_fn_error "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007421 ;;
7422 esac
7423
7424 #ARCH_RUN_32BIT="true"
7425 fi
7426
7427 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00007428 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007429 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007430esac
7431
Matthias Kloseb9621712010-04-24 17:59:49 +00007432{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
7433$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007434if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007435then
Skip Montanarodecc6a42003-01-01 20:07:49 +00007436 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00007437 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00007438 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007439
Matthias Kloseb9621712010-04-24 17:59:49 +00007440$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007441
Matthias Kloseb9621712010-04-24 17:59:49 +00007442 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7443$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00007444 if test $enable_shared = "yes"
7445 then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00007446 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 +00007447 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007448else
Matthias Kloseb9621712010-04-24 17:59:49 +00007449 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7450$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007451fi
7452
Matthias Kloseb9621712010-04-24 17:59:49 +00007453{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
7454$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007455case $ac_sys_system/$ac_sys_release in
7456 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007457
Matthias Kloseb9621712010-04-24 17:59:49 +00007458$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007459
Matthias Kloseb9621712010-04-24 17:59:49 +00007460 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
7461$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007462 ;;
7463 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00007464 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7465$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007466 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007467esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007468
Guido van Rossum0a516c91994-09-12 10:58:40 +00007469# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00007470
Michael W. Hudson54241132001-12-07 15:38:26 +00007471
7472
7473
7474
Benjamin Peterson99f03762010-04-11 22:15:28 +00007475
Thomas Wouters477c8d52006-05-27 19:21:47 +00007476
Georg Brandlb1441c72009-01-03 22:33:39 +00007477
Thomas Wouters477c8d52006-05-27 19:21:47 +00007478cat >>confdefs.h <<_ACEOF
7479#define SHLIB_EXT "$SO"
7480_ACEOF
7481
Guido van Rossum0a516c91994-09-12 10:58:40 +00007482# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00007483# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007484# (Shared libraries in this instance are shared modules to be loaded into
7485# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00007486{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
7487$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007488if test -z "$LDSHARED"
7489then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007490 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007491 AIX*)
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00007492 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp -L\$(srcdir)"
Guido van Rossumce608b02001-09-28 15:59:38 +00007493 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007494 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00007495 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00007496 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00007497 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007498 if test "$GCC" = "yes" ; then
7499 LDSHARED='$(CC) -shared'
7500 LDCXXSHARED='$(CXX) -shared'
7501 else
7502 LDSHARED='$(CC) -G'
7503 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00007504 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007505 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007506 if test "$GCC" = "yes" ; then
7507 LDSHARED='$(CC) -shared'
7508 LDCXXSHARED='$(CXX) -shared'
7509 else
7510 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007511 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +00007512 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +00007513 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007514 LDSHARED='$(CC) -bundle'
7515 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00007516 if test "$enable_framework" ; then
7517 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007518 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7519 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007520 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007521 else
7522 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00007523 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00007524 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00007525 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007526 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007527 LDSHARED='$(CC) -bundle'
7528 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00007529 if test "$enable_framework" ; then
7530 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007531 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7532 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007533 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007534 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00007535 # No framework, use the Python app as bundle-loader
7536 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00007537 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007538 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007539 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007540 Darwin/*)
7541 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
7542 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00007543
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007544 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +00007545 then
Thomas Wouters477c8d52006-05-27 19:21:47 +00007546 if test "${enable_universalsdk}"; then
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007547 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007548 fi
Antoine Pitroud4958c22010-10-13 17:01:10 +00007549 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
7550 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
Jack Jansen6b08a402004-06-03 12:41:45 +00007551 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00007552 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00007553 LDSHARED='$(CC) -bundle'
7554 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00007555 if test "$enable_framework" ; then
7556 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007557 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7558 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007559 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007560 else
7561 # No framework, use the Python app as bundle-loader
7562 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
7563 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007564 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007565 fi
7566 fi
7567 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007568 Linux*|GNU*|QNX*)
7569 LDSHARED='$(CC) -shared'
7570 LDCXXSHARED='$(CXX) -shared';;
7571 BSD/OS*/4*)
7572 LDSHARED="gcc -shared"
7573 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007574 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00007575 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00007576 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00007577 LDSHARED='$(CC) -shared'
7578 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00007579 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00007580 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00007581 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007582 OpenBSD*)
7583 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7584 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00007585 LDSHARED='$(CC) -shared $(CCSHARED)'
7586 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007587 else
7588 case `uname -r` in
7589 [01].* | 2.[0-7] | 2.[0-7].*)
7590 LDSHARED="ld -Bshareable ${LDFLAGS}"
7591 ;;
7592 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007593 LDSHARED='$(CC) -shared $(CCSHARED)'
7594 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007595 ;;
7596 esac
7597 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007598 NetBSD*|DragonFly*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007599 LDSHARED="cc -shared"
7600 LDCXXSHARED="c++ -shared";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007601 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007602 if test "$GCC" = "yes" ; then
7603 LDSHARED='$(CC) -shared'
7604 LDCXXSHARED='$(CXX) -shared'
7605 else
7606 LDSHARED='$(CC) -G'
7607 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00007608 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007609 SCO_SV*)
7610 LDSHARED='$(CC) -Wl,-G,-Bexport'
7611 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
7612 CYGWIN*)
7613 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
7614 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007615 *) LDSHARED="ld";;
7616 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007617fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007618{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
7619$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00007620LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007621BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00007622# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007623# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
7625$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007626if test -z "$CCSHARED"
7627then
Guido van Rossum07397971997-04-29 21:49:50 +00007628 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00007629 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007630 then CCSHARED="-fPIC";
7631 elif test `uname -p` = sparc;
7632 then CCSHARED="-xcode=pic32";
7633 else CCSHARED="-Kpic";
7634 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00007635 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00007636 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00007637 else CCSHARED="+z";
7638 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007639 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007640 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007641 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007642 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00007643 if test "$GCC" = "yes"
7644 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00007645 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00007646 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007647 SCO_SV*)
7648 if test "$GCC" = "yes"
7649 then CCSHARED="-fPIC"
7650 else CCSHARED="-Kpic -belf"
7651 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007652 IRIX*/6*) case $CC in
7653 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00007654 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007655 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007656 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007657fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007658{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
7659$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007660# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007661# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
7663$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007664if test -z "$LINKFORSHARED"
7665then
Guido van Rossum07397971997-04-29 21:49:50 +00007666 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007667 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007668 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00007669 LINKFORSHARED="-Wl,-E -Wl,+s";;
7670# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007671 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007672 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007673 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00007674 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00007675 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Jack Jansene578a632001-08-15 01:27:14 +00007676 if test "$enable_framework"
7677 then
Jack Jansenda49e192005-01-07 13:08:22 +00007678 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007679 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007680 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007681 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007682 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00007683 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007684 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00007685 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7686 then
7687 LINKFORSHARED="-Wl,--export-dynamic"
7688 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007689 SunOS/5*) case $CC in
7690 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00007691 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00007692 then
7693 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007694 fi;;
7695 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00007696 CYGWIN*)
7697 if test $enable_shared = "no"
7698 then
7699 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
7700 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00007701 QNX*)
7702 # -Wl,-E causes the symbols to be added to the dynamic
7703 # symbol table so that they can be found when a module
7704 # is loaded. -N 2048K causes the stack size to be set
7705 # to 2048 kilobytes so that the stack doesn't overflow
7706 # when running test_compile.py.
7707 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007708 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007709fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007710{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
7711$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007712
Michael W. Hudson54241132001-12-07 15:38:26 +00007713
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00007714
Matthias Kloseb9621712010-04-24 17:59:49 +00007715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
7716$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007717if test ! "$LIBRARY" = "$LDLIBRARY"
7718then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00007719 case $ac_sys_system in
7720 CYGWIN*)
7721 # Cygwin needs CCSHARED when building extension DLLs
7722 # but not when building the interpreter DLL.
7723 CFLAGSFORSHARED='';;
7724 *)
7725 CFLAGSFORSHARED='$(CCSHARED)'
7726 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007727fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007728{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
7729$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007730
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007731# SHLIBS are libraries (except -lc and -lm) to link to the python shared
7732# library (with --enable-shared).
7733# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007734# symbols, this must be set to $(LIBS) (expanded by make). We do this even
7735# if it is not required, since it creates a dependency of the shared library
7736# to LIBS. This, in turn, means that applications linking the shared libpython
7737# don't need to link LIBS explicitly. The default should be only changed
7738# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007739
Matthias Kloseb9621712010-04-24 17:59:49 +00007740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
7741$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007742case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007743 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007744 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007745esac
Matthias Kloseb9621712010-04-24 17:59:49 +00007746{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
7747$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007748
7749
Guido van Rossum627b2d71993-12-24 10:39:16 +00007750# checks for libraries
Matthias Kloseb9621712010-04-24 17:59:49 +00007751{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
7752$as_echo_n "checking for dlopen in -ldl... " >&6; }
7753if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
7754 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007755else
Martin v. Löwis11437992002-04-12 09:54:03 +00007756 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007757LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007758cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007759/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007760
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007761/* Override any GCC internal prototype to avoid an error.
7762 Use char because int might match the return type of a GCC
7763 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007764#ifdef __cplusplus
7765extern "C"
7766#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007767char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007768int
7769main ()
7770{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007771return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007772 ;
7773 return 0;
7774}
7775_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007776if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007777 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007778else
Matthias Kloseb9621712010-04-24 17:59:49 +00007779 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007780fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007781rm -f core conftest.err conftest.$ac_objext \
7782 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007783LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007784fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007785{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
7786$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
7787if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007788 cat >>confdefs.h <<_ACEOF
7789#define HAVE_LIBDL 1
7790_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007791
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007792 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00007793
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007794fi
7795 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00007796{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
7797$as_echo_n "checking for shl_load in -ldld... " >&6; }
7798if test "${ac_cv_lib_dld_shl_load+set}" = set; then :
7799 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007800else
Martin v. Löwis11437992002-04-12 09:54:03 +00007801 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007802LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007803cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007804/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007805
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007806/* Override any GCC internal prototype to avoid an error.
7807 Use char because int might match the return type of a GCC
7808 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007809#ifdef __cplusplus
7810extern "C"
7811#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007812char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007813int
7814main ()
7815{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007816return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007817 ;
7818 return 0;
7819}
7820_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007821if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007822 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007823else
Matthias Kloseb9621712010-04-24 17:59:49 +00007824 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007825fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007826rm -f core conftest.err conftest.$ac_objext \
7827 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007828LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007829fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007830{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
7831$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
7832if test "x$ac_cv_lib_dld_shl_load" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007833 cat >>confdefs.h <<_ACEOF
7834#define HAVE_LIBDLD 1
7835_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007836
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007837 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007838
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007839fi
7840 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00007841
Georg Brandlb1441c72009-01-03 22:33:39 +00007842# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00007843if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007844 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
7845$as_echo_n "checking for library containing sem_init... " >&6; }
7846if test "${ac_cv_search_sem_init+set}" = set; then :
7847 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007848else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00007849 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007850cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007851/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007852
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007853/* Override any GCC internal prototype to avoid an error.
7854 Use char because int might match the return type of a GCC
7855 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007856#ifdef __cplusplus
7857extern "C"
7858#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007859char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007860int
7861main ()
7862{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007863return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007864 ;
7865 return 0;
7866}
7867_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007868for ac_lib in '' pthread rt posix4; do
7869 if test -z "$ac_lib"; then
7870 ac_res="none required"
7871 else
7872 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007873 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007874 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007875 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007876 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007877fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007878rm -f core conftest.err conftest.$ac_objext \
7879 conftest$ac_exeext
7880 if test "${ac_cv_search_sem_init+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007881 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007882fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007883done
Matthias Kloseb9621712010-04-24 17:59:49 +00007884if test "${ac_cv_search_sem_init+set}" = set; then :
7885
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007886else
7887 ac_cv_search_sem_init=no
7888fi
7889rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00007890LIBS=$ac_func_search_save_LIBS
7891fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007892{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
7893$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007894ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00007895if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007896 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007897
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007898fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00007899 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00007900 # posix4 on Solaris 2.6
7901 # pthread (first!) on Linux
7902fi
7903
Martin v. Löwis19d17342003-06-14 21:03:05 +00007904# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00007905{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
7906$as_echo_n "checking for textdomain in -lintl... " >&6; }
7907if test "${ac_cv_lib_intl_textdomain+set}" = set; then :
7908 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00007909else
7910 ac_check_lib_save_LIBS=$LIBS
7911LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007912cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007913/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00007914
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007915/* Override any GCC internal prototype to avoid an error.
7916 Use char because int might match the return type of a GCC
7917 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00007918#ifdef __cplusplus
7919extern "C"
7920#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00007921char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00007922int
7923main ()
7924{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007925return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00007926 ;
7927 return 0;
7928}
7929_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007930if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00007931 ac_cv_lib_intl_textdomain=yes
7932else
Matthias Kloseb9621712010-04-24 17:59:49 +00007933 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00007934fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007935rm -f core conftest.err conftest.$ac_objext \
7936 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00007937LIBS=$ac_check_lib_save_LIBS
7938fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007939{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
7940$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
7941if test "x$ac_cv_lib_intl_textdomain" = x""yes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00007942
Matthias Kloseb9621712010-04-24 17:59:49 +00007943$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00007944
Brett Cannonc6d936e2009-06-07 20:09:53 +00007945 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00007946fi
7947
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007948
7949# checks for system dependent C++ extensions support
7950case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00007951 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
7952$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
7953 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007954/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007955
7956 #include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007957int
7958main ()
7959{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007960loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00007961 ;
7962 return 0;
7963}
Matthias Kloseb159a552010-04-25 21:00:44 +00007964
Martin v. Löwis11437992002-04-12 09:54:03 +00007965_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007966if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007967
Matthias Kloseb159a552010-04-25 21:00:44 +00007968
Matthias Kloseb9621712010-04-24 17:59:49 +00007969$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007970
Matthias Kloseb159a552010-04-25 21:00:44 +00007971 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007972$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00007973
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007974else
Matthias Kloseb159a552010-04-25 21:00:44 +00007975
7976 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007977$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00007978
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007979fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007980rm -f core conftest.err conftest.$ac_objext \
7981 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007982 *) ;;
7983esac
7984
Guido van Rossum70c7f481998-03-26 18:44:10 +00007985# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00007986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
7987$as_echo_n "checking for t_open in -lnsl... " >&6; }
7988if test "${ac_cv_lib_nsl_t_open+set}" = set; then :
7989 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007990else
Martin v. Löwis11437992002-04-12 09:54:03 +00007991 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007992LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007993cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007994/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007995
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007996/* Override any GCC internal prototype to avoid an error.
7997 Use char because int might match the return type of a GCC
7998 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007999#ifdef __cplusplus
8000extern "C"
8001#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008002char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008003int
8004main ()
8005{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008006return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008007 ;
8008 return 0;
8009}
8010_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008011if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008012 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008013else
Matthias Kloseb9621712010-04-24 17:59:49 +00008014 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008015fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008016rm -f core conftest.err conftest.$ac_objext \
8017 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008018LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008019fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008020{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
8021$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
8022if test "x$ac_cv_lib_nsl_t_open" = x""yes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008023 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008024fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00008025 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00008026{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
8027$as_echo_n "checking for socket in -lsocket... " >&6; }
8028if test "${ac_cv_lib_socket_socket+set}" = set; then :
8029 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008030else
Martin v. Löwis11437992002-04-12 09:54:03 +00008031 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008032LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008033cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008034/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008035
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008036/* Override any GCC internal prototype to avoid an error.
8037 Use char because int might match the return type of a GCC
8038 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008039#ifdef __cplusplus
8040extern "C"
8041#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008042char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008043int
8044main ()
8045{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008046return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008047 ;
8048 return 0;
8049}
8050_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008051if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008052 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008053else
Matthias Kloseb9621712010-04-24 17:59:49 +00008054 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008055fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008056rm -f core conftest.err conftest.$ac_objext \
8057 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008058LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008059fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008060{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
8061$as_echo "$ac_cv_lib_socket_socket" >&6; }
8062if test "x$ac_cv_lib_socket_socket" = x""yes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00008063 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00008064fi
8065 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00008066
Matthias Kloseb9621712010-04-24 17:59:49 +00008067{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
8068$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008069
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008070# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008071if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008072 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00008073{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8074$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00008075LIBS="$withval $LIBS"
8076
8077else
Matthias Kloseb9621712010-04-24 17:59:49 +00008078 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8079$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008080fi
8081
Guido van Rossum7f43da71994-08-01 12:15:30 +00008082
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008083if test -n "$ac_tool_prefix"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008084 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
8085set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8087$as_echo_n "checking for $ac_word... " >&6; }
8088if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
8089 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008090else
8091 case $PKG_CONFIG in
8092 [\\/]* | ?:[\\/]*)
8093 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8094 ;;
8095 *)
8096 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8097for as_dir in $PATH
8098do
8099 IFS=$as_save_IFS
8100 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008101 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Petersond78735d2010-01-01 16:04:23 +00008102 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8103 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008104 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008105 break 2
8106 fi
8107done
Matthias Kloseb9621712010-04-24 17:59:49 +00008108 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008109IFS=$as_save_IFS
8110
8111 ;;
8112esac
8113fi
8114PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8115if test -n "$PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008116 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8117$as_echo "$PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008118else
Matthias Kloseb9621712010-04-24 17:59:49 +00008119 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8120$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008121fi
8122
8123
8124fi
8125if test -z "$ac_cv_path_PKG_CONFIG"; then
8126 ac_pt_PKG_CONFIG=$PKG_CONFIG
8127 # Extract the first word of "pkg-config", so it can be a program name with args.
8128set dummy pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008129{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8130$as_echo_n "checking for $ac_word... " >&6; }
8131if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then :
8132 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008133else
8134 case $ac_pt_PKG_CONFIG in
8135 [\\/]* | ?:[\\/]*)
8136 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
8137 ;;
8138 *)
8139 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8140for as_dir in $PATH
8141do
8142 IFS=$as_save_IFS
8143 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008144 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Petersond78735d2010-01-01 16:04:23 +00008145 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8146 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008147 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008148 break 2
8149 fi
8150done
Matthias Kloseb9621712010-04-24 17:59:49 +00008151 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008152IFS=$as_save_IFS
8153
8154 ;;
8155esac
8156fi
8157ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
8158if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008159 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
8160$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008161else
Matthias Kloseb9621712010-04-24 17:59:49 +00008162 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8163$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008164fi
8165
8166 if test "x$ac_pt_PKG_CONFIG" = x; then
8167 PKG_CONFIG=""
8168 else
8169 case $cross_compiling:$ac_tool_warned in
8170yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00008171{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8172$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Petersond78735d2010-01-01 16:04:23 +00008173ac_tool_warned=yes ;;
8174esac
8175 PKG_CONFIG=$ac_pt_PKG_CONFIG
8176 fi
8177else
8178 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
8179fi
8180
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008181
8182# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00008183{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
8184$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008185
8186# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008187if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008188 withval=$with_system_expat;
8189fi
8190
8191
Matthias Kloseb9621712010-04-24 17:59:49 +00008192{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
8193$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008194
8195# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00008196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
8197$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008198
8199# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008200if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008201 withval=$with_system_ffi;
8202fi
8203
8204
8205if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008206 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
8207else
8208 LIBFFI_INCLUDEDIR=""
8209fi
8210
8211
Matthias Kloseb9621712010-04-24 17:59:49 +00008212{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
8213$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008214
Matthias Klose55708cc2009-04-30 08:06:49 +00008215# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +00008216{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
8217$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008218
8219# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008220if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +00008221 withval=$with_dbmliborder;
8222if test x$with_dbmliborder = xyes
8223then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00008224as_fn_error "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008225else
8226 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
8227 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
8228 then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00008229 as_fn_error "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008230 fi
8231 done
8232fi
8233fi
8234
Matthias Kloseb9621712010-04-24 17:59:49 +00008235{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
8236$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008237
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00008238# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008239
8240
Matthias Kloseb9621712010-04-24 17:59:49 +00008241{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
8242$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008243
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008244# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008245if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008246 withval=$with_signal_module;
8247fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008248
8249
8250if test -z "$with_signal_module"
8251then with_signal_module="yes"
8252fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008253{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
8254$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008255
8256if test "${with_signal_module}" = "yes"; then
8257 USE_SIGNAL_MODULE=""
8258 SIGNAL_OBJS=""
8259else
8260 USE_SIGNAL_MODULE="#"
8261 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
8262fi
8263
Guido van Rossum3d15bd82001-01-10 18:53:48 +00008264# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00008265
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008266USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00008267
Matthias Kloseb9621712010-04-24 17:59:49 +00008268{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dec-threads" >&5
8269$as_echo_n "checking for --with-dec-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008270
Guido van Rossumec2f0731997-01-22 20:54:01 +00008271
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008272# Check whether --with-dec-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008273if test "${with_dec_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008274 withval=$with_dec_threads;
Matthias Kloseb9621712010-04-24 17:59:49 +00008275{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8276$as_echo "$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +00008277LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00008278if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00008279 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00008280fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008281else
Matthias Kloseb9621712010-04-24 17:59:49 +00008282 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8283$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008284fi
8285
Martin v. Löwis11437992002-04-12 09:54:03 +00008286
8287# Templates for things AC_DEFINEd more than once.
8288# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00008289
8290
Martin v. Löwis11437992002-04-12 09:54:03 +00008291
8292
Matthias Kloseb9621712010-04-24 17:59:49 +00008293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
8294$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008295
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008296# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008297if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008298 withval=$with_threads;
8299fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008300
8301
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008302# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00008303
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008304# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008305if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008306 withval=$with_thread; with_threads=$with_thread
8307fi
8308
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008309
8310if test -z "$with_threads"
8311then with_threads="yes"
8312fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008313{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
8314$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008315
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008316
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008317if test "$with_threads" = "no"
8318then
8319 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008320elif test "$ac_cv_pthread_is_default" = yes
8321then
Matthias Kloseb9621712010-04-24 17:59:49 +00008322 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008323
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008324 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +00008325 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008326
8327 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00008328 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008329elif test "$ac_cv_kpthread" = "yes"
8330then
8331 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008332 if test "$ac_cv_cxx_thread" = "yes"; then
8333 CXX="$CXX -Kpthread"
8334 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008335 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00008336
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008337 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008338 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008339elif test "$ac_cv_kthread" = "yes"
8340then
8341 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008342 if test "$ac_cv_cxx_thread" = "yes"; then
8343 CXX="$CXX -Kthread"
8344 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008345 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008346
8347 posix_threads=yes
8348 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008349elif test "$ac_cv_pthread" = "yes"
8350then
8351 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008352 if test "$ac_cv_cxx_thread" = "yes"; then
8353 CXX="$CXX -pthread"
8354 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008355 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008356
8357 posix_threads=yes
8358 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008359else
8360 if test ! -z "$with_threads" -a -d "$with_threads"
8361 then LDFLAGS="$LDFLAGS -L$with_threads"
8362 fi
8363 if test ! -z "$withval" -a -d "$withval"
8364 then LDFLAGS="$LDFLAGS -L$withval"
8365 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008366
8367 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00008368 # define _POSIX_THREADS in unistd.h. Some apparently don't
8369 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +00008370 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
8371$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
8372 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008373/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008374
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008375#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008376#ifdef _POSIX_THREADS
8377yes
8378#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008379
8380_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008381if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008382 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008383 unistd_defines_pthreads=yes
8384else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008385 unistd_defines_pthreads=no
8386fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008387rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008388
Matthias Kloseb9621712010-04-24 17:59:49 +00008389 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
8390$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008391
Matthias Kloseb9621712010-04-24 17:59:49 +00008392 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00008393
Matthias Kloseb9621712010-04-24 17:59:49 +00008394 ac_fn_c_check_header_mongrel "$LINENO" "cthreads.h" "ac_cv_header_cthreads_h" "$ac_includes_default"
8395if test "x$ac_cv_header_cthreads_h" = x""yes; then :
8396 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008397
Matthias Kloseb9621712010-04-24 17:59:49 +00008398 $as_echo "#define C_THREADS 1" >>confdefs.h
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008399
Martin v. Löwis11437992002-04-12 09:54:03 +00008400
Matthias Kloseb9621712010-04-24 17:59:49 +00008401$as_echo "#define HURD_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008402
8403 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008404 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008405else
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008406
Matthias Kloseb9621712010-04-24 17:59:49 +00008407 ac_fn_c_check_header_mongrel "$LINENO" "mach/cthreads.h" "ac_cv_header_mach_cthreads_h" "$ac_includes_default"
8408if test "x$ac_cv_header_mach_cthreads_h" = x""yes; then :
8409 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008410
Matthias Kloseb9621712010-04-24 17:59:49 +00008411 $as_echo "#define C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008412
Martin v. Löwis11437992002-04-12 09:54:03 +00008413
Matthias Kloseb9621712010-04-24 17:59:49 +00008414$as_echo "#define MACH_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008415
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008416 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008417else
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008418
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008419 # Just looking for pthread_create in libpthread is not enough:
8420 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
8421 # So we really have to include pthread.h, and then link.
8422 _libs=$LIBS
8423 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00008424 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
8425$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
8426 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008427/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008428#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00008429
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008430void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00008431int
8432main ()
8433{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008434
8435pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00008436 ;
8437 return 0;
8438}
8439_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008440if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008441
Matthias Kloseb9621712010-04-24 17:59:49 +00008442 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8443$as_echo "yes" >&6; }
8444 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00008445
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008446 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008447 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00008448else
Martin v. Löwis11437992002-04-12 09:54:03 +00008449
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008450 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +00008451 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
8452if test "x$ac_cv_func_pthread_detach" = x""yes; then :
8453 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00008454
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008455 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008456 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00008457else
Guido van Rossumad678af1998-10-02 14:42:15 +00008458
Matthias Kloseb9621712010-04-24 17:59:49 +00008459 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
8460$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
8461if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then :
8462 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008463else
Martin v. Löwis11437992002-04-12 09:54:03 +00008464 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008465LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008466cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008467/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008468
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008469/* Override any GCC internal prototype to avoid an error.
8470 Use char because int might match the return type of a GCC
8471 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008472#ifdef __cplusplus
8473extern "C"
8474#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008475char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008476int
8477main ()
8478{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008479return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008480 ;
8481 return 0;
8482}
8483_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008484if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008485 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00008486else
Matthias Kloseb9621712010-04-24 17:59:49 +00008487 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00008488fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008489rm -f core conftest.err conftest.$ac_objext \
8490 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008491LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008492fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008493{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
8494$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
8495if test "x$ac_cv_lib_pthreads_pthread_create" = x""yes; then :
8496 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00008497
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008498 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008499 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008500 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00008501else
Greg Steinadf63d62000-07-05 10:38:09 +00008502
Matthias Kloseb9621712010-04-24 17:59:49 +00008503 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
8504$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
8505if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then :
8506 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00008507else
Martin v. Löwis11437992002-04-12 09:54:03 +00008508 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008509LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008510cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008511/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008512
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008513/* Override any GCC internal prototype to avoid an error.
8514 Use char because int might match the return type of a GCC
8515 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008516#ifdef __cplusplus
8517extern "C"
8518#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008519char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008520int
8521main ()
8522{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008523return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008524 ;
8525 return 0;
8526}
8527_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008528if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008529 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00008530else
Matthias Kloseb9621712010-04-24 17:59:49 +00008531 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00008532fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008533rm -f core conftest.err conftest.$ac_objext \
8534 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008535LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00008536fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008537{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
8538$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
8539if test "x$ac_cv_lib_c_r_pthread_create" = x""yes; then :
8540 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00008541
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008542 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008543 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008544 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008545else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008546
Matthias Kloseb9621712010-04-24 17:59:49 +00008547 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
8548$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
8549if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then :
8550 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008551else
Martin v. Löwis11437992002-04-12 09:54:03 +00008552 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008553LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008554cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008555/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008556
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008557/* Override any GCC internal prototype to avoid an error.
8558 Use char because int might match the return type of a GCC
8559 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008560#ifdef __cplusplus
8561extern "C"
8562#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008563char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008564int
8565main ()
8566{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008567return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008568 ;
8569 return 0;
8570}
8571_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008572if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008573 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008574else
Matthias Kloseb9621712010-04-24 17:59:49 +00008575 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008576fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008577rm -f core conftest.err conftest.$ac_objext \
8578 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008579LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008580fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008581{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
8582$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
8583if test "x$ac_cv_lib_pthread___pthread_create_system" = x""yes; then :
8584 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008585
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008586 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008587 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008588 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008589else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008590
Matthias Kloseb9621712010-04-24 17:59:49 +00008591 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
8592$as_echo_n "checking for pthread_create in -lcma... " >&6; }
8593if test "${ac_cv_lib_cma_pthread_create+set}" = set; then :
8594 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00008595else
Martin v. Löwis11437992002-04-12 09:54:03 +00008596 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008597LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008598cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008599/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008600
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008601/* Override any GCC internal prototype to avoid an error.
8602 Use char because int might match the return type of a GCC
8603 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008604#ifdef __cplusplus
8605extern "C"
8606#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008607char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008608int
8609main ()
8610{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008611return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008612 ;
8613 return 0;
8614}
8615_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008616if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008617 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00008618else
Matthias Kloseb9621712010-04-24 17:59:49 +00008619 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00008620fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008621rm -f core conftest.err conftest.$ac_objext \
8622 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008623LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008624fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008625{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
8626$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
8627if test "x$ac_cv_lib_cma_pthread_create" = x""yes; then :
8628 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00008629
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008630 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008631 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008632 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00008633else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00008634
Martin v. Löwis130fb172001-07-19 11:00:41 +00008635 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00008636fi
8637
Guido van Rossum627b2d71993-12-24 10:39:16 +00008638
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008639fi
8640
Guido van Rossum0be3e491997-05-22 20:33:33 +00008641fi
8642
Guido van Rossum49545951997-12-02 19:28:29 +00008643fi
8644
Guido van Rossumb93a8621998-05-07 13:27:32 +00008645fi
8646
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008647fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008648rm -f core conftest.err conftest.$ac_objext \
8649 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008650fi
8651
Martin v. Löwis11437992002-04-12 09:54:03 +00008652
8653fi
8654
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008655
Michael W. Hudson54241132001-12-07 15:38:26 +00008656
Matthias Kloseb9621712010-04-24 17:59:49 +00008657 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
8658$as_echo_n "checking for usconfig in -lmpc... " >&6; }
8659if test "${ac_cv_lib_mpc_usconfig+set}" = set; then :
8660 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008661else
Martin v. Löwis11437992002-04-12 09:54:03 +00008662 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008663LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008664cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008665/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008666
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008667/* Override any GCC internal prototype to avoid an error.
8668 Use char because int might match the return type of a GCC
8669 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008670#ifdef __cplusplus
8671extern "C"
8672#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008673char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008674int
8675main ()
8676{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008677return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008678 ;
8679 return 0;
8680}
8681_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008682if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008683 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008684else
Matthias Kloseb9621712010-04-24 17:59:49 +00008685 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008686fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008687rm -f core conftest.err conftest.$ac_objext \
8688 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008689LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008690fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008691{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
8692$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
8693if test "x$ac_cv_lib_mpc_usconfig" = x""yes; then :
8694 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008695
Martin v. Löwis130fb172001-07-19 11:00:41 +00008696 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008697 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008698 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008699fi
8700
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008701
Neal Norwitza978ab02002-11-02 16:58:05 +00008702 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008703 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
8704$as_echo_n "checking for thr_create in -lthread... " >&6; }
8705if test "${ac_cv_lib_thread_thr_create+set}" = set; then :
8706 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008707else
Martin v. Löwis11437992002-04-12 09:54:03 +00008708 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008709LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008710cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008711/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008712
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008713/* Override any GCC internal prototype to avoid an error.
8714 Use char because int might match the return type of a GCC
8715 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008716#ifdef __cplusplus
8717extern "C"
8718#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008719char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008720int
8721main ()
8722{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008723return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008724 ;
8725 return 0;
8726}
8727_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008728if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008729 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008730else
Matthias Kloseb9621712010-04-24 17:59:49 +00008731 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008732fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008733rm -f core conftest.err conftest.$ac_objext \
8734 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008735LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008736fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008737{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
8738$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
8739if test "x$ac_cv_lib_thread_thr_create" = x""yes; then :
8740 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008741
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008742 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008743 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008744 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008745fi
8746
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008747 fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008748
Martin v. Löwis130fb172001-07-19 11:00:41 +00008749 if test "$USE_THREAD_MODULE" != "#"
8750 then
8751 # If the above checks didn't disable threads, (at least) OSF1
8752 # needs this '-threads' argument during linking.
8753 case $ac_sys_system in
8754 OSF1) LDLAST=-threads;;
8755 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +00008756 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008757fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008758
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008759if test "$posix_threads" = "yes"; then
8760 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008761
Matthias Kloseb9621712010-04-24 17:59:49 +00008762$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008763
8764 fi
8765
8766 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
8767 case $ac_sys_system/$ac_sys_release in
8768 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +00008769$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008770
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008771 ;;
8772 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +00008773$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008774
8775 ;;
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00008776 AIX/5)
Matthias Kloseb9621712010-04-24 17:59:49 +00008777$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00008778
8779 ;;
Antoine Pitrou33a29942010-08-30 14:52:00 +00008780 AIX/6)
8781$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
8782
8783 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008784 esac
8785
Matthias Kloseb9621712010-04-24 17:59:49 +00008786 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
8787$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
8788 if test "${ac_cv_pthread_system_supported+set}" = set; then :
8789 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008790else
Matthias Kloseb9621712010-04-24 17:59:49 +00008791 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008792 ac_cv_pthread_system_supported=no
8793else
Matthias Kloseb9621712010-04-24 17:59:49 +00008794 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008795/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008796#include <pthread.h>
8797 void *foo(void *parm) {
8798 return NULL;
8799 }
8800 main() {
8801 pthread_attr_t attr;
8802 pthread_t id;
8803 if (pthread_attr_init(&attr)) exit(-1);
8804 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
8805 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
8806 exit(0);
8807 }
8808_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008809if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008810 ac_cv_pthread_system_supported=yes
8811else
Matthias Kloseb9621712010-04-24 17:59:49 +00008812 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008813fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008814rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8815 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008816fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008817
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008818
Guido van Rossum627b2d71993-12-24 10:39:16 +00008819fi
8820
Matthias Kloseb9621712010-04-24 17:59:49 +00008821 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
8822$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008823 if test "$ac_cv_pthread_system_supported" = "yes"; then
8824
Matthias Kloseb9621712010-04-24 17:59:49 +00008825$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008826
8827 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008828 for ac_func in pthread_sigmask
8829do :
8830 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
8831if test "x$ac_cv_func_pthread_sigmask" = x""yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008832 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008833#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008834_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +00008835 case $ac_sys_system in
8836 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008837
Matthias Kloseb9621712010-04-24 17:59:49 +00008838$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +00008839
8840 ;;
8841 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008842fi
8843done
8844
8845fi
8846
8847
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008848# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +00008849
Matthias Kloseb9621712010-04-24 17:59:49 +00008850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
8851$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008852# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008853if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008854 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008855 no)
Matthias Kloseb9621712010-04-24 17:59:49 +00008856 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8857$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008858 ipv6=no
8859 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00008860 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8861$as_echo "yes" >&6; }
8862 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008863
8864 ipv6=yes
8865 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008866 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008867else
Martin v. Löwis11437992002-04-12 09:54:03 +00008868
Matthias Kloseb9621712010-04-24 17:59:49 +00008869 if test "$cross_compiling" = yes; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008870
Matthias Kloseb9621712010-04-24 17:59:49 +00008871 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8872$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008873 ipv6=no
8874
8875else
Matthias Kloseb9621712010-04-24 17:59:49 +00008876 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008877/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008878 /* AF_INET6 available check */
8879#include <sys/types.h>
8880#include <sys/socket.h>
8881main()
8882{
8883 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
8884 exit(1);
8885 else
8886 exit(0);
8887}
8888
Martin v. Löwis11437992002-04-12 09:54:03 +00008889_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008890if ac_fn_c_try_run "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008891
Matthias Kloseb9621712010-04-24 17:59:49 +00008892 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8893$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008894 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +00008895
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008896else
Matthias Kloseb159a552010-04-25 21:00:44 +00008897
Matthias Kloseb9621712010-04-24 17:59:49 +00008898 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8899$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008900 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +00008901
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008902fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008903rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8904 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008905fi
8906
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008907
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008908if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008909 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
8910$as_echo_n "checking if RFC2553 API is available... " >&6; }
8911 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008912/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008913
8914 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008915#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008916int
8917main ()
8918{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008919struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +00008920 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +00008921 ;
8922 return 0;
8923}
Matthias Kloseb159a552010-04-25 21:00:44 +00008924
Martin v. Löwis11437992002-04-12 09:54:03 +00008925_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008926if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008927
8928 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008929$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008930 ipv6=yes
8931
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008932else
Matthias Kloseb159a552010-04-25 21:00:44 +00008933
8934 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008935$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008936 ipv6=no
8937
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008938fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008939rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008940fi
8941
8942if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008943 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008944
8945fi
8946
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008947fi
8948
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008949
8950ipv6type=unknown
8951ipv6lib=none
8952ipv6trylibc=no
8953
8954if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008955 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
8956$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +00008957 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
8958 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008959 case $i in
8960 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +00008961 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008962/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008963
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008964#include <netinet/in.h>
8965#ifdef IPV6_INRIA_VERSION
8966yes
8967#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008968_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008969if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008970 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00008971 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008972fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008973rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008974
8975 ;;
8976 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +00008977 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008978/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008979
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008980#include <netinet/in.h>
8981#ifdef __KAME__
8982yes
8983#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008984_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008985if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008986 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008987 ipv6type=$i;
8988 ipv6lib=inet6
8989 ipv6libdir=/usr/local/v6/lib
8990 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008991fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008992rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008993
8994 ;;
8995 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +00008996 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008997/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008998
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008999#include <features.h>
9000#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
9001yes
9002#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009003_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009004if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009005 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009006 ipv6type=$i;
9007 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009008fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009009rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009010
9011 ;;
9012 linux-inet6)
9013 if test -d /usr/inet6; then
9014 ipv6type=$i
9015 ipv6lib=inet6
9016 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +00009017 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009018 fi
9019 ;;
9020 solaris)
9021 if test -f /etc/netconfig; then
9022 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
9023 ipv6type=$i
9024 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009025 fi
9026 fi
9027 ;;
9028 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +00009029 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009030/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009031
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009032#include <sys/param.h>
9033#ifdef _TOSHIBA_INET6
9034yes
9035#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009036_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009037if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009038 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009039 ipv6type=$i;
9040 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009041 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009042fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009043rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009044
9045 ;;
9046 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +00009047 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009048/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009049
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009050#include </usr/local/v6/include/sys/v6config.h>
9051#ifdef __V6D__
9052yes
9053#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009054_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009055if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009056 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009057 ipv6type=$i;
9058 ipv6lib=v6;
9059 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +00009060 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009061fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009062rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009063
9064 ;;
9065 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +00009066 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009067/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009068
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009069#include <sys/param.h>
9070#ifdef _ZETA_MINAMI_INET6
9071yes
9072#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009073_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009074if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009075 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009076 ipv6type=$i;
9077 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009078 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009079fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009080rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009081
9082 ;;
9083 esac
9084 if test "$ipv6type" != "unknown"; then
9085 break
9086 fi
9087 done
Matthias Kloseb9621712010-04-24 17:59:49 +00009088 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
9089$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009090fi
9091
9092if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
9093 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
9094 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
9095 echo "using lib$ipv6lib"
9096 else
9097 if test $ipv6trylibc = "yes"; then
9098 echo "using libc"
9099 else
9100 echo 'Fatal: no $ipv6lib library found. cannot continue.'
9101 echo "You need to fetch lib$ipv6lib.a from appropriate"
9102 echo 'ipv6 kit and compile beforehand.'
9103 exit 1
9104 fi
9105 fi
9106fi
9107
Matthias Kloseb9621712010-04-24 17:59:49 +00009108{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
9109$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
9110cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009111/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009112
9113 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009114int
9115main ()
9116{
9117FSIORefNum fRef = 0
9118 ;
9119 return 0;
9120}
Matthias Kloseb159a552010-04-25 21:00:44 +00009121
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009122_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009123if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009124
Matthias Kloseb159a552010-04-25 21:00:44 +00009125
Matthias Kloseb9621712010-04-24 17:59:49 +00009126$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009127
Matthias Kloseb9621712010-04-24 17:59:49 +00009128 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9129$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009130
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009131else
Matthias Kloseb159a552010-04-25 21:00:44 +00009132
Matthias Kloseb9621712010-04-24 17:59:49 +00009133 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9134$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009135
9136fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009137rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9138
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009139# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +00009140{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
9141$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009142
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009143# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009144if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009145 withval=$with_doc_strings;
9146fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009147
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009148
9149if test -z "$with_doc_strings"
9150then with_doc_strings="yes"
9151fi
9152if test "$with_doc_strings" != "no"
9153then
9154
Matthias Kloseb9621712010-04-24 17:59:49 +00009155$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009156
9157fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009158{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
9159$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009160
Antoine Pitrou042b1282010-08-13 21:15:58 +00009161# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +00009162{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
9163$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009164
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009165# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009166if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009167 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009168if test "$withval" != no
9169then
9170
Matthias Kloseb9621712010-04-24 17:59:49 +00009171$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009172
Matthias Kloseb9621712010-04-24 17:59:49 +00009173 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9174$as_echo "yes" >&6; }
9175else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9176$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009177fi
9178else
Matthias Kloseb9621712010-04-24 17:59:49 +00009179 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9180$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009181fi
9182
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009183
9184# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +00009185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
9186$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009187
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009188# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009189if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009190 withval=$with_pymalloc;
9191fi
Michael W. Hudson54241132001-12-07 15:38:26 +00009192
Neil Schemenauera35c6882001-02-27 04:45:05 +00009193
Neil Schemenauer16c22972002-03-22 15:34:49 +00009194if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00009195then
9196 with_pymalloc="yes"
9197 SOABI_QUALIFIERS="${SOABI_QUALIFIERS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +00009198fi
9199if test "$with_pymalloc" != "no"
9200then
Martin v. Löwis11437992002-04-12 09:54:03 +00009201
Matthias Kloseb9621712010-04-24 17:59:49 +00009202$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +00009203
9204fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009205{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
9206$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +00009207
Benjamin Peterson05159c42009-12-03 03:01:27 +00009208# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +00009209{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
9210$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009211
9212# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009213if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009214 withval=$with_valgrind;
9215else
9216 with_valgrind=no
9217fi
9218
Matthias Kloseb9621712010-04-24 17:59:49 +00009219{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
9220$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009221if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009222 ac_fn_c_check_header_mongrel "$LINENO" "valgrind/valgrind.h" "ac_cv_header_valgrind_valgrind_h" "$ac_includes_default"
9223if test "x$ac_cv_header_valgrind_valgrind_h" = x""yes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009224
Matthias Kloseb9621712010-04-24 17:59:49 +00009225$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +00009226
9227else
Benjamin Petersond7f73e92010-09-05 00:09:07 +00009228 as_fn_error "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +00009229
9230fi
9231
9232
Jeffrey Yasskin39370832010-05-03 19:29:34 +00009233 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +00009234fi
9235
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009236# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00009237
Guido van Rossum98935bf2001-09-05 19:13:16 +00009238DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +00009239
Guido van Rossume97ee181999-12-20 21:27:22 +00009240# the dlopen() function means we might want to use dynload_shlib.o. some
9241# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +00009242for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +00009243do :
9244 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
9245if test "x$ac_cv_func_dlopen" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009246 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009247#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009248_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +00009249
Guido van Rossume97ee181999-12-20 21:27:22 +00009250fi
Thomas Wouters3a584202000-08-05 23:28:51 +00009251done
Guido van Rossume97ee181999-12-20 21:27:22 +00009252
Michael W. Hudson54241132001-12-07 15:38:26 +00009253
Guido van Rossume97ee181999-12-20 21:27:22 +00009254# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
9255# loading of modules.
9256
Matthias Kloseb9621712010-04-24 17:59:49 +00009257{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
9258$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009259if test -z "$DYNLOADFILE"
9260then
9261 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00009262 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
9263 if test "$ac_cv_func_dlopen" = yes
9264 then DYNLOADFILE="dynload_shlib.o"
9265 else DYNLOADFILE="dynload_aix.o"
9266 fi
9267 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +00009268 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009269 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
9270 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +00009271 *)
9272 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
9273 # out any dynamic loading
9274 if test "$ac_cv_func_dlopen" = yes
9275 then DYNLOADFILE="dynload_shlib.o"
9276 else DYNLOADFILE="dynload_stub.o"
9277 fi
9278 ;;
9279 esac
9280fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009281{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
9282$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009283if test "$DYNLOADFILE" != "dynload_stub.o"
9284then
Martin v. Löwis11437992002-04-12 09:54:03 +00009285
Matthias Kloseb9621712010-04-24 17:59:49 +00009286$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +00009287
9288fi
9289
Neil Schemenauer4e425612001-06-19 15:44:15 +00009290# MACHDEP_OBJS can be set to platform-specific object files needed by Python
9291
Michael W. Hudson54241132001-12-07 15:38:26 +00009292
Matthias Kloseb9621712010-04-24 17:59:49 +00009293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
9294$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009295if test -z "$MACHDEP_OBJS"
9296then
Jack Jansene578a632001-08-15 01:27:14 +00009297 MACHDEP_OBJS=$extra_machdep_objs
9298else
9299 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +00009300fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009301{ $as_echo "$as_me:${as_lineno-$LINENO}: result: MACHDEP_OBJS" >&5
9302$as_echo "MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009303
Guido van Rossum627b2d71993-12-24 10:39:16 +00009304# checks for library functions
Martin v. Löwis823725e2008-03-24 13:39:54 +00009305for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
9306 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +00009307 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +00009308 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Antoine Pitroub7572f02009-12-02 20:46:48 +00009309 initgroups kill killpg lchmod lchown lstat mbrtowc mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +00009310 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +00009311 putenv readlink realpath \
Benjamin Peterson965ce872009-04-05 21:24:58 +00009312 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
9313 setgid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +00009314 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setuid setvbuf \
Jean-Paul Calderone6ed7ac42010-06-19 19:58:37 +00009315 sigaction siginterrupt sigrelse snprintf strftime strlcpy \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +00009316 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Martin v. Löwis113a0852009-05-29 17:25:39 +00009317 truncate uname unsetenv utimes waitpid wait3 wait4 \
9318 wcscoll wcsftime wcsxfrm _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +00009319do :
9320 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9321ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Benjamin Petersond7f73e92010-09-05 00:09:07 +00009322eval as_val=\$$as_ac_var
9323 if test "x$as_val" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009324 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009325#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009326_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00009327
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009328fi
9329done
9330
Michael W. Hudson54241132001-12-07 15:38:26 +00009331
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009332# For some functions, having a definition is not sufficient, since
9333# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +00009334{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
9335$as_echo_n "checking for chroot... " >&6; }
9336cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009337/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009338#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009339int
9340main ()
9341{
9342void *x=chroot
9343 ;
9344 return 0;
9345}
9346_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009347if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009348
Matthias Kloseb9621712010-04-24 17:59:49 +00009349$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009350
Matthias Kloseb159a552010-04-25 21:00:44 +00009351 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009352$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009353else
Matthias Kloseb9621712010-04-24 17:59:49 +00009354 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9355$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009356
9357fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009358rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009359{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
9360$as_echo_n "checking for link... " >&6; }
9361cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009362/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009363#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009364int
9365main ()
9366{
9367void *x=link
9368 ;
9369 return 0;
9370}
9371_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009372if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009373
Matthias Kloseb9621712010-04-24 17:59:49 +00009374$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009375
Matthias Kloseb159a552010-04-25 21:00:44 +00009376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009377$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009378else
Matthias Kloseb9621712010-04-24 17:59:49 +00009379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9380$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009381
9382fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009383rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009384{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
9385$as_echo_n "checking for symlink... " >&6; }
9386cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009387/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009388#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009389int
9390main ()
9391{
9392void *x=symlink
9393 ;
9394 return 0;
9395}
9396_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009397if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009398
Matthias Kloseb9621712010-04-24 17:59:49 +00009399$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009400
Matthias Kloseb159a552010-04-25 21:00:44 +00009401 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009402$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009403else
Matthias Kloseb9621712010-04-24 17:59:49 +00009404 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9405$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009406
9407fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009408rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009409{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
9410$as_echo_n "checking for fchdir... " >&6; }
9411cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009412/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009413#include <unistd.h>
9414int
9415main ()
9416{
9417void *x=fchdir
9418 ;
9419 return 0;
9420}
9421_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009422if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009423
Matthias Kloseb9621712010-04-24 17:59:49 +00009424$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009425
Matthias Kloseb159a552010-04-25 21:00:44 +00009426 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009427$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009428else
Matthias Kloseb9621712010-04-24 17:59:49 +00009429 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9430$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009431
9432fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009433rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009434{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
9435$as_echo_n "checking for fsync... " >&6; }
9436cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009437/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009438#include <unistd.h>
9439int
9440main ()
9441{
9442void *x=fsync
9443 ;
9444 return 0;
9445}
9446_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009447if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009448
Matthias Kloseb9621712010-04-24 17:59:49 +00009449$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009450
Matthias Kloseb159a552010-04-25 21:00:44 +00009451 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009452$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009453else
Matthias Kloseb9621712010-04-24 17:59:49 +00009454 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9455$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009456
9457fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009458rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009459{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
9460$as_echo_n "checking for fdatasync... " >&6; }
9461cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009462/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009463#include <unistd.h>
9464int
9465main ()
9466{
9467void *x=fdatasync
9468 ;
9469 return 0;
9470}
9471_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009472if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009473
Matthias Kloseb9621712010-04-24 17:59:49 +00009474$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009475
Matthias Kloseb159a552010-04-25 21:00:44 +00009476 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009477$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009478else
Matthias Kloseb9621712010-04-24 17:59:49 +00009479 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9480$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009481
9482fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009483rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009484{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
9485$as_echo_n "checking for epoll... " >&6; }
9486cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009487/* end confdefs.h. */
9488#include <sys/epoll.h>
9489int
9490main ()
9491{
9492void *x=epoll_create
9493 ;
9494 return 0;
9495}
9496_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009497if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009498
Matthias Kloseb9621712010-04-24 17:59:49 +00009499$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009500
Matthias Kloseb159a552010-04-25 21:00:44 +00009501 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009502$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009503else
Matthias Kloseb9621712010-04-24 17:59:49 +00009504 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9505$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009506
9507fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009508rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009509{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
9510$as_echo_n "checking for kqueue... " >&6; }
9511cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009512/* end confdefs.h. */
9513
9514#include <sys/types.h>
9515#include <sys/event.h>
9516
9517int
9518main ()
9519{
9520int x=kqueue()
9521 ;
9522 return 0;
9523}
9524_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009525if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009526
Matthias Kloseb9621712010-04-24 17:59:49 +00009527$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009528
Matthias Kloseb159a552010-04-25 21:00:44 +00009529 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009530$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009531else
Matthias Kloseb9621712010-04-24 17:59:49 +00009532 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9533$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009534
9535fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009536rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +00009537# On some systems (eg. FreeBSD 5), we would find a definition of the
9538# functions ctermid_r, setgroups in the library, but no prototype
9539# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
9540# address to avoid compiler warnings and potential miscompilations
9541# because of the missing prototypes.
9542
Matthias Kloseb9621712010-04-24 17:59:49 +00009543{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
9544$as_echo_n "checking for ctermid_r... " >&6; }
9545cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009546/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +00009547
Martin v. Löwisd5843682002-11-21 20:41:28 +00009548#include <stdio.h>
9549
Martin v. Löwisd5843682002-11-21 20:41:28 +00009550int
9551main ()
9552{
9553void* p = ctermid_r
9554 ;
9555 return 0;
9556}
9557_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009558if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +00009559
Matthias Kloseb9621712010-04-24 17:59:49 +00009560$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +00009561
Matthias Kloseb159a552010-04-25 21:00:44 +00009562 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009563$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009564else
Matthias Kloseb9621712010-04-24 17:59:49 +00009565 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9566$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009567
9568fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009569rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9570
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009571{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
9572$as_echo_n "checking for flock declaration... " >&6; }
9573if test "${ac_cv_flock_decl+set}" = set; then :
9574 $as_echo_n "(cached) " >&6
9575else
9576 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009577/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009578#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009579int
9580main ()
9581{
9582void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009583
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009584 ;
9585 return 0;
9586}
9587_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009588if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009589 ac_cv_flock_decl=yes
9590else
9591 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009592
9593fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009594rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +00009595
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009596fi
9597{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
9598$as_echo "$ac_cv_flock_decl" >&6; }
9599if test "x${ac_cv_flock_decl}" = xyes; then
9600 for ac_func in flock
9601do :
9602 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
9603if test "x$ac_cv_func_flock" = x""yes; then :
9604 cat >>confdefs.h <<_ACEOF
9605#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +00009606_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009607
Antoine Pitroua3000072010-09-07 14:52:42 +00009608else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009609 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +00009610$as_echo_n "checking for flock in -lbsd... " >&6; }
9611if test "${ac_cv_lib_bsd_flock+set}" = set; then :
9612 $as_echo_n "(cached) " >&6
9613else
9614 ac_check_lib_save_LIBS=$LIBS
9615LIBS="-lbsd $LIBS"
9616cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9617/* end confdefs.h. */
9618
9619/* Override any GCC internal prototype to avoid an error.
9620 Use char because int might match the return type of a GCC
9621 builtin and then its argument prototype would still apply. */
9622#ifdef __cplusplus
9623extern "C"
9624#endif
9625char flock ();
9626int
9627main ()
9628{
9629return flock ();
9630 ;
9631 return 0;
9632}
9633_ACEOF
9634if ac_fn_c_try_link "$LINENO"; then :
9635 ac_cv_lib_bsd_flock=yes
9636else
9637 ac_cv_lib_bsd_flock=no
9638fi
9639rm -f core conftest.err conftest.$ac_objext \
9640 conftest$ac_exeext conftest.$ac_ext
9641LIBS=$ac_check_lib_save_LIBS
9642fi
9643{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
9644$as_echo "$ac_cv_lib_bsd_flock" >&6; }
9645if test "x$ac_cv_lib_bsd_flock" = x""yes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009646 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +00009647
9648
9649$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
9650
9651
9652fi
9653
9654
9655fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009656done
9657
Antoine Pitroua3000072010-09-07 14:52:42 +00009658fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009659
Matthias Kloseb9621712010-04-24 17:59:49 +00009660{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
9661$as_echo_n "checking for getpagesize... " >&6; }
9662cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009663/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009664
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009665#include <unistd.h>
9666
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009667int
9668main ()
9669{
9670void* p = getpagesize
9671 ;
9672 return 0;
9673}
9674_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009675if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009676
Matthias Kloseb9621712010-04-24 17:59:49 +00009677$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009678
Matthias Kloseb159a552010-04-25 21:00:44 +00009679 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009680$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009681else
Matthias Kloseb9621712010-04-24 17:59:49 +00009682 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9683$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009684
9685fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009686rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009687
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009688for ac_prog in true
9689do
9690 # Extract the first word of "$ac_prog", so it can be a program name with args.
9691set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00009692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9693$as_echo_n "checking for $ac_word... " >&6; }
9694if test "${ac_cv_prog_TRUE+set}" = set; then :
9695 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009696else
9697 if test -n "$TRUE"; then
9698 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
9699else
9700as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9701for as_dir in $PATH
9702do
9703 IFS=$as_save_IFS
9704 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009705 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009706 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 +00009707 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00009708 $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 +00009709 break 2
9710 fi
9711done
Matthias Kloseb9621712010-04-24 17:59:49 +00009712 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009713IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009714
9715fi
9716fi
9717TRUE=$ac_cv_prog_TRUE
9718if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009719 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
9720$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009721else
Matthias Kloseb9621712010-04-24 17:59:49 +00009722 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9723$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009724fi
9725
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009726
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009727 test -n "$TRUE" && break
9728done
9729test -n "$TRUE" || TRUE="/bin/true"
9730
9731
Matthias Kloseb9621712010-04-24 17:59:49 +00009732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
9733$as_echo_n "checking for inet_aton in -lc... " >&6; }
9734if test "${ac_cv_lib_c_inet_aton+set}" = set; then :
9735 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009736else
9737 ac_check_lib_save_LIBS=$LIBS
9738LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009739cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009740/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009741
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009742/* Override any GCC internal prototype to avoid an error.
9743 Use char because int might match the return type of a GCC
9744 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009745#ifdef __cplusplus
9746extern "C"
9747#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009748char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009749int
9750main ()
9751{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009752return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009753 ;
9754 return 0;
9755}
9756_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009757if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009758 ac_cv_lib_c_inet_aton=yes
9759else
Matthias Kloseb9621712010-04-24 17:59:49 +00009760 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009761fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009762rm -f core conftest.err conftest.$ac_objext \
9763 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009764LIBS=$ac_check_lib_save_LIBS
9765fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009766{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
9767$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
9768if test "x$ac_cv_lib_c_inet_aton" = x""yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009769 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009770else
Matthias Kloseb9621712010-04-24 17:59:49 +00009771 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
9772$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
9773if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then :
9774 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009775else
9776 ac_check_lib_save_LIBS=$LIBS
9777LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009778cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009779/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009780
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009781/* Override any GCC internal prototype to avoid an error.
9782 Use char because int might match the return type of a GCC
9783 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009784#ifdef __cplusplus
9785extern "C"
9786#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009787char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009788int
9789main ()
9790{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009791return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009792 ;
9793 return 0;
9794}
9795_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009796if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009797 ac_cv_lib_resolv_inet_aton=yes
9798else
Matthias Kloseb9621712010-04-24 17:59:49 +00009799 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009800fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009801rm -f core conftest.err conftest.$ac_objext \
9802 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009803LIBS=$ac_check_lib_save_LIBS
9804fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009805{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
9806$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
9807if test "x$ac_cv_lib_resolv_inet_aton" = x""yes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009808 cat >>confdefs.h <<_ACEOF
9809#define HAVE_LIBRESOLV 1
9810_ACEOF
9811
9812 LIBS="-lresolv $LIBS"
9813
9814fi
9815
9816
9817fi
9818
9819
Christian Heimesd0764e22007-12-04 15:00:33 +00009820# On Tru64, chflags seems to be present, but calling it will
9821# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +00009822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
9823$as_echo_n "checking for chflags... " >&6; }
9824if test "${ac_cv_have_chflags+set}" = set; then :
9825 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009826else
Matthias Kloseb9621712010-04-24 17:59:49 +00009827 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009828 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +00009829else
Matthias Kloseb9621712010-04-24 17:59:49 +00009830 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +00009831/* end confdefs.h. */
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009832[
Christian Heimesd0764e22007-12-04 15:00:33 +00009833#include <sys/stat.h>
9834#include <unistd.h>
9835int main(int argc, char*argv[])
9836{
9837 if(chflags(argv[0], 0) != 0)
9838 return 1;
9839 return 0;
9840}
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009841]
Christian Heimesd0764e22007-12-04 15:00:33 +00009842_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009843if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009844 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009845else
Matthias Kloseb9621712010-04-24 17:59:49 +00009846 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009847fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009848rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9849 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009850fi
9851
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009852
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009853fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009854{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
9855$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009856if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009857 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
9858if test "x$ac_cv_func_chflags" = x""yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009859 ac_cv_have_chflags="yes"
9860else
9861 ac_cv_have_chflags="no"
9862fi
9863
9864fi
9865if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009866
Matthias Kloseb9621712010-04-24 17:59:49 +00009867$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009868
9869fi
9870
Matthias Kloseb9621712010-04-24 17:59:49 +00009871{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
9872$as_echo_n "checking for lchflags... " >&6; }
9873if test "${ac_cv_have_lchflags+set}" = set; then :
9874 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009875else
Matthias Kloseb9621712010-04-24 17:59:49 +00009876 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009877 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +00009878else
Matthias Kloseb9621712010-04-24 17:59:49 +00009879 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +00009880/* end confdefs.h. */
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009881[
Christian Heimesd0764e22007-12-04 15:00:33 +00009882#include <sys/stat.h>
9883#include <unistd.h>
9884int main(int argc, char*argv[])
9885{
9886 if(lchflags(argv[0], 0) != 0)
9887 return 1;
9888 return 0;
9889}
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009890]
Christian Heimesd0764e22007-12-04 15:00:33 +00009891_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009892if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009893 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009894else
Matthias Kloseb9621712010-04-24 17:59:49 +00009895 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +00009896fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009897rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9898 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009899fi
9900
9901
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009902fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009903{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
9904$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009905if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009906 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
9907if test "x$ac_cv_func_lchflags" = x""yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009908 ac_cv_have_lchflags="yes"
9909else
9910 ac_cv_have_lchflags="no"
9911fi
9912
9913fi
9914if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009915
Matthias Kloseb9621712010-04-24 17:59:49 +00009916$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009917
9918fi
9919
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009920case $ac_sys_system/$ac_sys_release in
9921Darwin/*)
9922 _CUR_CFLAGS="${CFLAGS}"
9923 _CUR_LDFLAGS="${LDFLAGS}"
9924 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
9925 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
9926 ;;
9927esac
9928
Matthias Kloseb9621712010-04-24 17:59:49 +00009929{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
9930$as_echo_n "checking for inflateCopy in -lz... " >&6; }
9931if test "${ac_cv_lib_z_inflateCopy+set}" = set; then :
9932 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009933else
9934 ac_check_lib_save_LIBS=$LIBS
9935LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009936cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009937/* end confdefs.h. */
9938
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009939/* Override any GCC internal prototype to avoid an error.
9940 Use char because int might match the return type of a GCC
9941 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009942#ifdef __cplusplus
9943extern "C"
9944#endif
9945char inflateCopy ();
9946int
9947main ()
9948{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009949return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009950 ;
9951 return 0;
9952}
9953_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009954if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009955 ac_cv_lib_z_inflateCopy=yes
9956else
Matthias Kloseb9621712010-04-24 17:59:49 +00009957 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009958fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009959rm -f core conftest.err conftest.$ac_objext \
9960 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009961LIBS=$ac_check_lib_save_LIBS
9962fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009963{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
9964$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
9965if test "x$ac_cv_lib_z_inflateCopy" = x""yes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009966
Matthias Kloseb9621712010-04-24 17:59:49 +00009967$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009968
9969fi
9970
9971
9972case $ac_sys_system/$ac_sys_release in
9973Darwin/*)
9974 CFLAGS="${_CUR_CFLAGS}"
9975 LDFLAGS="${_CUR_LDFLAGS}"
9976 ;;
9977esac
9978
Matthias Kloseb9621712010-04-24 17:59:49 +00009979{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
9980$as_echo_n "checking for hstrerror... " >&6; }
9981cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009982/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +00009983
Martin v. Löwise9416172003-05-03 10:12:45 +00009984#include <netdb.h>
9985
Martin v. Löwise9416172003-05-03 10:12:45 +00009986int
9987main ()
9988{
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009989void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +00009990 ;
9991 return 0;
9992}
9993_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009994if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +00009995
Matthias Kloseb9621712010-04-24 17:59:49 +00009996$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +00009997
Matthias Kloseb159a552010-04-25 21:00:44 +00009998 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009999$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010000else
Matthias Kloseb9621712010-04-24 17:59:49 +000010001 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10002$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010003
10004fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010005rm -f core conftest.err conftest.$ac_objext \
10006 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010007
Matthias Kloseb9621712010-04-24 17:59:49 +000010008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
10009$as_echo_n "checking for inet_aton... " >&6; }
10010cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010011/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010012
Martin v. Löwis86d66262006-02-17 08:40:11 +000010013#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010014#include <sys/socket.h>
10015#include <netinet/in.h>
10016#include <arpa/inet.h>
10017
Martin v. Löwise9416172003-05-03 10:12:45 +000010018int
10019main ()
10020{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010021void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010022 ;
10023 return 0;
10024}
10025_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010026if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010027
Matthias Kloseb9621712010-04-24 17:59:49 +000010028$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010029
Matthias Kloseb159a552010-04-25 21:00:44 +000010030 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010031$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010032else
Matthias Kloseb9621712010-04-24 17:59:49 +000010033 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10034$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010035
10036fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010037rm -f core conftest.err conftest.$ac_objext \
10038 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010039
Matthias Kloseb9621712010-04-24 17:59:49 +000010040{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
10041$as_echo_n "checking for inet_pton... " >&6; }
10042cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010043/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010044
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010045#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010046#include <sys/socket.h>
10047#include <netinet/in.h>
10048#include <arpa/inet.h>
10049
Martin v. Löwise9416172003-05-03 10:12:45 +000010050int
10051main ()
10052{
10053void* p = inet_pton
10054 ;
10055 return 0;
10056}
10057_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010058if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010059
Matthias Kloseb9621712010-04-24 17:59:49 +000010060$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010061
Matthias Kloseb159a552010-04-25 21:00:44 +000010062 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010063$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010064else
Matthias Kloseb9621712010-04-24 17:59:49 +000010065 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10066$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010067
10068fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010069rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000010070
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010071# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000010072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
10073$as_echo_n "checking for setgroups... " >&6; }
10074cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010075/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010076
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010077#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010078#ifdef HAVE_GRP_H
10079#include <grp.h>
10080#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000010081
Martin v. Löwisd5843682002-11-21 20:41:28 +000010082int
10083main ()
10084{
10085void* p = setgroups
10086 ;
10087 return 0;
10088}
10089_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010090if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010091
Matthias Kloseb9621712010-04-24 17:59:49 +000010092$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010093
Matthias Kloseb159a552010-04-25 21:00:44 +000010094 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010095$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010096else
Matthias Kloseb9621712010-04-24 17:59:49 +000010097 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10098$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010099
10100fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010101rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010102
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010103# check for openpty and forkpty
10104
10105for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010106do :
10107 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
10108if test "x$ac_cv_func_openpty" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010109 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010110#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010111_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010112
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010113else
Matthias Kloseb9621712010-04-24 17:59:49 +000010114 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
10115$as_echo_n "checking for openpty in -lutil... " >&6; }
10116if test "${ac_cv_lib_util_openpty+set}" = set; then :
10117 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010118else
Martin v. Löwis11437992002-04-12 09:54:03 +000010119 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010120LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010121cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010122/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010123
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010124/* Override any GCC internal prototype to avoid an error.
10125 Use char because int might match the return type of a GCC
10126 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010127#ifdef __cplusplus
10128extern "C"
10129#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010130char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010131int
10132main ()
10133{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010134return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010135 ;
10136 return 0;
10137}
10138_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010139if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010140 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010141else
Matthias Kloseb9621712010-04-24 17:59:49 +000010142 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010143fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010144rm -f core conftest.err conftest.$ac_objext \
10145 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010146LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010147fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010148{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
10149$as_echo "$ac_cv_lib_util_openpty" >&6; }
10150if test "x$ac_cv_lib_util_openpty" = x""yes; then :
10151 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010152 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010153else
Matthias Kloseb9621712010-04-24 17:59:49 +000010154 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
10155$as_echo_n "checking for openpty in -lbsd... " >&6; }
10156if test "${ac_cv_lib_bsd_openpty+set}" = set; then :
10157 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010158else
10159 ac_check_lib_save_LIBS=$LIBS
10160LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010161cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010162/* end confdefs.h. */
10163
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010164/* Override any GCC internal prototype to avoid an error.
10165 Use char because int might match the return type of a GCC
10166 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010167#ifdef __cplusplus
10168extern "C"
10169#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010170char openpty ();
10171int
10172main ()
10173{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010174return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010175 ;
10176 return 0;
10177}
10178_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010179if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010180 ac_cv_lib_bsd_openpty=yes
10181else
Matthias Kloseb9621712010-04-24 17:59:49 +000010182 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010183fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010184rm -f core conftest.err conftest.$ac_objext \
10185 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010186LIBS=$ac_check_lib_save_LIBS
10187fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010188{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
10189$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
10190if test "x$ac_cv_lib_bsd_openpty" = x""yes; then :
10191 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010192 LIBS="$LIBS -lbsd"
10193fi
10194
10195
10196fi
10197
Fred Drake8cef4cf2000-06-28 16:40:38 +000010198
10199fi
10200done
10201
10202for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010203do :
10204 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
10205if test "x$ac_cv_func_forkpty" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010206 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010207#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010208_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010209
Fred Drake8cef4cf2000-06-28 16:40:38 +000010210else
Matthias Kloseb9621712010-04-24 17:59:49 +000010211 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
10212$as_echo_n "checking for forkpty in -lutil... " >&6; }
10213if test "${ac_cv_lib_util_forkpty+set}" = set; then :
10214 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010215else
Martin v. Löwis11437992002-04-12 09:54:03 +000010216 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010217LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010218cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010219/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010220
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010221/* Override any GCC internal prototype to avoid an error.
10222 Use char because int might match the return type of a GCC
10223 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010224#ifdef __cplusplus
10225extern "C"
10226#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010227char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010228int
10229main ()
10230{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010231return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010232 ;
10233 return 0;
10234}
10235_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010236if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010237 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010238else
Matthias Kloseb9621712010-04-24 17:59:49 +000010239 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010240fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010241rm -f core conftest.err conftest.$ac_objext \
10242 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010243LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010244fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010245{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
10246$as_echo "$ac_cv_lib_util_forkpty" >&6; }
10247if test "x$ac_cv_lib_util_forkpty" = x""yes; then :
10248 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010249 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010250else
Matthias Kloseb9621712010-04-24 17:59:49 +000010251 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
10252$as_echo_n "checking for forkpty in -lbsd... " >&6; }
10253if test "${ac_cv_lib_bsd_forkpty+set}" = set; then :
10254 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010255else
10256 ac_check_lib_save_LIBS=$LIBS
10257LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010258cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010259/* end confdefs.h. */
10260
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010261/* Override any GCC internal prototype to avoid an error.
10262 Use char because int might match the return type of a GCC
10263 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010264#ifdef __cplusplus
10265extern "C"
10266#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010267char forkpty ();
10268int
10269main ()
10270{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010271return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010272 ;
10273 return 0;
10274}
10275_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010276if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010277 ac_cv_lib_bsd_forkpty=yes
10278else
Matthias Kloseb9621712010-04-24 17:59:49 +000010279 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010280fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010281rm -f core conftest.err conftest.$ac_objext \
10282 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010283LIBS=$ac_check_lib_save_LIBS
10284fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010285{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
10286$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
10287if test "x$ac_cv_lib_bsd_forkpty" = x""yes; then :
10288 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010289 LIBS="$LIBS -lbsd"
10290fi
10291
10292
10293fi
10294
Fred Drake8cef4cf2000-06-28 16:40:38 +000010295
10296fi
10297done
10298
Jack Jansendd19cf82001-12-06 22:36:17 +000010299
Christian Heimesb186d002008-03-18 15:15:01 +000010300# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000010301for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000010302do :
10303 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
10304if test "x$ac_cv_func_memmove" = x""yes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000010305 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010306#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000010307_ACEOF
10308
10309fi
10310done
10311
10312
Michael W. Hudson54241132001-12-07 15:38:26 +000010313# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000010314for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000010315do :
10316 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10317ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Benjamin Petersond7f73e92010-09-05 00:09:07 +000010318eval as_val=\$$as_ac_var
10319 if test "x$as_val" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010320 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010321#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010322_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000010323
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010324fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000010325done
10326
Michael W. Hudson54241132001-12-07 15:38:26 +000010327
Benjamin Petersond7f73e92010-09-05 00:09:07 +000010328for ac_func in dup2 getcwd strdup
10329do :
10330 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10331ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10332eval as_val=\$$as_ac_var
10333 if test "x$as_val" = x""yes; then :
10334 cat >>confdefs.h <<_ACEOF
10335#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
10336_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000010337
Martin v. Löwis1142de32002-03-29 16:28:31 +000010338else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010339 case " $LIBOBJS " in
Benjamin Petersond7f73e92010-09-05 00:09:07 +000010340 *" $ac_func.$ac_objext "* ) ;;
10341 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010342 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010343esac
10344
Martin v. Löwis1142de32002-03-29 16:28:31 +000010345fi
Benjamin Petersond7f73e92010-09-05 00:09:07 +000010346done
Martin v. Löwis1142de32002-03-29 16:28:31 +000010347
10348
10349for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010350do :
10351 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
10352if test "x$ac_cv_func_getpgrp" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010353 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010354#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010355_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010356 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010357/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010358#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010359int
10360main ()
10361{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010362getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010363 ;
10364 return 0;
10365}
10366_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010367if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010368
Matthias Kloseb9621712010-04-24 17:59:49 +000010369$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010370
Guido van Rossum627b2d71993-12-24 10:39:16 +000010371fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010372rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010373
Guido van Rossum627b2d71993-12-24 10:39:16 +000010374fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010375done
Guido van Rossum627b2d71993-12-24 10:39:16 +000010376
Jack Jansen150753c2003-03-29 22:07:47 +000010377for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010378do :
10379 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
10380if test "x$ac_cv_func_setpgrp" = x""yes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000010381 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010382#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000010383_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010384 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010385/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000010386#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000010387int
10388main ()
10389{
10390setpgrp(0,0);
10391 ;
10392 return 0;
10393}
10394_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010395if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010396
Matthias Kloseb9621712010-04-24 17:59:49 +000010397$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010398
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010399fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010400rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000010401
10402fi
10403done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010404
Thomas Wouters3a584202000-08-05 23:28:51 +000010405for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000010406do :
10407 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
10408if test "x$ac_cv_func_gettimeofday" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010409 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010410#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010411_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010412 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010413/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010414#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010415int
10416main ()
10417{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010418gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010419 ;
10420 return 0;
10421}
10422_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010423if ac_fn_c_try_compile "$LINENO"; then :
10424
Guido van Rossum627b2d71993-12-24 10:39:16 +000010425else
Skip Montanaro6dead952003-09-25 14:50:04 +000010426
Matthias Kloseb9621712010-04-24 17:59:49 +000010427$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010428
Martin v. Löwis11437992002-04-12 09:54:03 +000010429
Guido van Rossum627b2d71993-12-24 10:39:16 +000010430fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010431rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010432
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010433fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010434done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010435
Michael W. Hudson54241132001-12-07 15:38:26 +000010436
Matthias Kloseb9621712010-04-24 17:59:49 +000010437{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
10438$as_echo_n "checking for major... " >&6; }
10439cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010440/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010441
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010442#if defined(MAJOR_IN_MKDEV)
10443#include <sys/mkdev.h>
10444#elif defined(MAJOR_IN_SYSMACROS)
10445#include <sys/sysmacros.h>
10446#else
10447#include <sys/types.h>
10448#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010449
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010450int
10451main ()
10452{
10453
10454 makedev(major(0),minor(0));
10455
10456 ;
10457 return 0;
10458}
10459_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010460if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010461
10462
Matthias Kloseb9621712010-04-24 17:59:49 +000010463$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010464
Matthias Kloseb9621712010-04-24 17:59:49 +000010465 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10466$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010467
10468else
Skip Montanaro6dead952003-09-25 14:50:04 +000010469
Matthias Kloseb9621712010-04-24 17:59:49 +000010470 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10471$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010472
10473fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010474rm -f core conftest.err conftest.$ac_objext \
10475 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010476
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010477# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000010478# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000010479{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
10480$as_echo_n "checking for getaddrinfo... " >&6; }
10481cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010482/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010483
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010484#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010485#include <sys/socket.h>
10486#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010487#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010488
Martin v. Löwis11437992002-04-12 09:54:03 +000010489int
10490main ()
10491{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010492getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000010493 ;
10494 return 0;
10495}
10496_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010497if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010498 have_getaddrinfo=yes
10499else
Matthias Kloseb9621712010-04-24 17:59:49 +000010500 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010501fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010502rm -f core conftest.err conftest.$ac_objext \
10503 conftest$ac_exeext conftest.$ac_ext
10504{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
10505$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010506if test $have_getaddrinfo = yes
10507then
Matthias Kloseb9621712010-04-24 17:59:49 +000010508 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
10509$as_echo_n "checking getaddrinfo bug... " >&6; }
10510 if test "${ac_cv_buggy_getaddrinfo+set}" = set; then :
10511 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010512else
Matthias Kloseb9621712010-04-24 17:59:49 +000010513 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010514 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010515else
Matthias Kloseb9621712010-04-24 17:59:49 +000010516 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010517/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010518
10519#include <sys/types.h>
10520#include <netdb.h>
10521#include <string.h>
10522#include <sys/socket.h>
10523#include <netinet/in.h>
10524
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010525int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010526{
10527 int passive, gaierr, inet4 = 0, inet6 = 0;
10528 struct addrinfo hints, *ai, *aitop;
10529 char straddr[INET6_ADDRSTRLEN], strport[16];
10530
10531 for (passive = 0; passive <= 1; passive++) {
10532 memset(&hints, 0, sizeof(hints));
10533 hints.ai_family = AF_UNSPEC;
10534 hints.ai_flags = passive ? AI_PASSIVE : 0;
10535 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000010536 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010537 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
10538 (void)gai_strerror(gaierr);
10539 goto bad;
10540 }
10541 for (ai = aitop; ai; ai = ai->ai_next) {
10542 if (ai->ai_addr == NULL ||
10543 ai->ai_addrlen == 0 ||
10544 getnameinfo(ai->ai_addr, ai->ai_addrlen,
10545 straddr, sizeof(straddr), strport, sizeof(strport),
10546 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
10547 goto bad;
10548 }
10549 switch (ai->ai_family) {
10550 case AF_INET:
10551 if (strcmp(strport, "54321") != 0) {
10552 goto bad;
10553 }
10554 if (passive) {
10555 if (strcmp(straddr, "0.0.0.0") != 0) {
10556 goto bad;
10557 }
10558 } else {
10559 if (strcmp(straddr, "127.0.0.1") != 0) {
10560 goto bad;
10561 }
10562 }
10563 inet4++;
10564 break;
10565 case AF_INET6:
10566 if (strcmp(strport, "54321") != 0) {
10567 goto bad;
10568 }
10569 if (passive) {
10570 if (strcmp(straddr, "::") != 0) {
10571 goto bad;
10572 }
10573 } else {
10574 if (strcmp(straddr, "::1") != 0) {
10575 goto bad;
10576 }
10577 }
10578 inet6++;
10579 break;
10580 case AF_UNSPEC:
10581 goto bad;
10582 break;
10583 default:
10584 /* another family support? */
10585 break;
10586 }
10587 }
10588 }
10589
10590 if (!(inet4 == 0 || inet4 == 2))
10591 goto bad;
10592 if (!(inet6 == 0 || inet6 == 2))
10593 goto bad;
10594
10595 if (aitop)
10596 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010597 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010598
10599 bad:
10600 if (aitop)
10601 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010602 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010603}
10604
Martin v. Löwis11437992002-04-12 09:54:03 +000010605_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010606if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010607 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010608else
Matthias Kloseb9621712010-04-24 17:59:49 +000010609 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010610fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010611rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10612 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010613fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010614
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010615fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010616
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010617fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010618
Mark Dickinson2df5d282009-12-31 21:22:50 +000010619if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010620then
10621 if test $ipv6 = yes
10622 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010623 echo 'Fatal: You must get working getaddrinfo() function.'
10624 echo ' or you can specify "--disable-ipv6"'.
10625 exit 1
10626 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010627else
Martin v. Löwis11437992002-04-12 09:54:03 +000010628
Matthias Kloseb9621712010-04-24 17:59:49 +000010629$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010630
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010631fi
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010632for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000010633do :
10634 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
10635if test "x$ac_cv_func_getnameinfo" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010636 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010637#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010638_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010639
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010640fi
10641done
10642
Michael W. Hudson54241132001-12-07 15:38:26 +000010643
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010644# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000010645{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
10646$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
10647if test "${ac_cv_header_time+set}" = set; then :
10648 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010649else
Matthias Kloseb9621712010-04-24 17:59:49 +000010650 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010651/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010652#include <sys/types.h>
10653#include <sys/time.h>
10654#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010655
Martin v. Löwis11437992002-04-12 09:54:03 +000010656int
10657main ()
10658{
10659if ((struct tm *) 0)
10660return 0;
10661 ;
10662 return 0;
10663}
10664_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010665if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010666 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000010667else
Matthias Kloseb9621712010-04-24 17:59:49 +000010668 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010669fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010670rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010671fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010672{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
10673$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010674if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010675
Matthias Kloseb9621712010-04-24 17:59:49 +000010676$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010677
10678fi
10679
Matthias Kloseb9621712010-04-24 17:59:49 +000010680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
10681$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
10682if test "${ac_cv_struct_tm+set}" = set; then :
10683 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010684else
Matthias Kloseb9621712010-04-24 17:59:49 +000010685 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010686/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010687#include <sys/types.h>
10688#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010689
Martin v. Löwis11437992002-04-12 09:54:03 +000010690int
10691main ()
10692{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010693struct tm tm;
10694 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000010695 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000010696 ;
10697 return 0;
10698}
10699_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010700if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010701 ac_cv_struct_tm=time.h
10702else
Matthias Kloseb9621712010-04-24 17:59:49 +000010703 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010704fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010705rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010706fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010707{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
10708$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010709if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010710
Matthias Kloseb9621712010-04-24 17:59:49 +000010711$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010712
10713fi
10714
Matthias Kloseb9621712010-04-24 17:59:49 +000010715ac_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 +000010716#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000010717
Matthias Kloseb9621712010-04-24 17:59:49 +000010718"
10719if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010720
10721cat >>confdefs.h <<_ACEOF
10722#define HAVE_STRUCT_TM_TM_ZONE 1
10723_ACEOF
10724
10725
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010726fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010727
Martin v. Löwis11437992002-04-12 09:54:03 +000010728if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
10729
Matthias Kloseb9621712010-04-24 17:59:49 +000010730$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010731
10732else
Matthias Kloseb9621712010-04-24 17:59:49 +000010733 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
10734"
10735if test "x$ac_cv_have_decl_tzname" = x""yes; then :
10736 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010737else
Matthias Kloseb9621712010-04-24 17:59:49 +000010738 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010739fi
10740
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010741cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010742#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010743_ACEOF
10744
Matthias Kloseb9621712010-04-24 17:59:49 +000010745 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
10746$as_echo_n "checking for tzname... " >&6; }
10747if test "${ac_cv_var_tzname+set}" = set; then :
10748 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010749else
Matthias Kloseb9621712010-04-24 17:59:49 +000010750 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010751/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010752#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010753#if !HAVE_DECL_TZNAME
10754extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000010755#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010756
Martin v. Löwis11437992002-04-12 09:54:03 +000010757int
10758main ()
10759{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010760return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000010761 ;
10762 return 0;
10763}
10764_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010765if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010766 ac_cv_var_tzname=yes
10767else
Matthias Kloseb9621712010-04-24 17:59:49 +000010768 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010769fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010770rm -f core conftest.err conftest.$ac_objext \
10771 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000010772fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010773{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
10774$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010775 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010776
Matthias Kloseb9621712010-04-24 17:59:49 +000010777$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010778
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010779 fi
10780fi
10781
Matthias Kloseb9621712010-04-24 17:59:49 +000010782ac_fn_c_check_member "$LINENO" "struct stat" "st_rdev" "ac_cv_member_struct_stat_st_rdev" "$ac_includes_default"
10783if test "x$ac_cv_member_struct_stat_st_rdev" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010784
10785cat >>confdefs.h <<_ACEOF
10786#define HAVE_STRUCT_STAT_ST_RDEV 1
10787_ACEOF
10788
10789
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010790fi
10791
Matthias Kloseb9621712010-04-24 17:59:49 +000010792ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
10793if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000010794
Martin v. Löwis11437992002-04-12 09:54:03 +000010795cat >>confdefs.h <<_ACEOF
10796#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
10797_ACEOF
10798
10799
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010800fi
10801
Matthias Kloseb9621712010-04-24 17:59:49 +000010802ac_fn_c_check_member "$LINENO" "struct stat" "st_flags" "ac_cv_member_struct_stat_st_flags" "$ac_includes_default"
10803if test "x$ac_cv_member_struct_stat_st_flags" = x""yes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000010804
10805cat >>confdefs.h <<_ACEOF
10806#define HAVE_STRUCT_STAT_ST_FLAGS 1
10807_ACEOF
10808
10809
10810fi
10811
Matthias Kloseb9621712010-04-24 17:59:49 +000010812ac_fn_c_check_member "$LINENO" "struct stat" "st_gen" "ac_cv_member_struct_stat_st_gen" "$ac_includes_default"
10813if test "x$ac_cv_member_struct_stat_st_gen" = x""yes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000010814
10815cat >>confdefs.h <<_ACEOF
10816#define HAVE_STRUCT_STAT_ST_GEN 1
10817_ACEOF
10818
10819
10820fi
10821
Matthias Kloseb9621712010-04-24 17:59:49 +000010822ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtime" "ac_cv_member_struct_stat_st_birthtime" "$ac_includes_default"
10823if test "x$ac_cv_member_struct_stat_st_birthtime" = x""yes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000010824
10825cat >>confdefs.h <<_ACEOF
10826#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
10827_ACEOF
10828
10829
10830fi
10831
Matthias Kloseb9621712010-04-24 17:59:49 +000010832ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
10833if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000010834
Martin v. Löwis11437992002-04-12 09:54:03 +000010835cat >>confdefs.h <<_ACEOF
10836#define HAVE_STRUCT_STAT_ST_BLOCKS 1
10837_ACEOF
10838
10839
Matthias Kloseb9621712010-04-24 17:59:49 +000010840$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010841
10842else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010843 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000010844 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010845 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
10846 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010847esac
10848
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010849fi
10850
Michael W. Hudson54241132001-12-07 15:38:26 +000010851
Martin v. Löwis11437992002-04-12 09:54:03 +000010852
Matthias Kloseb9621712010-04-24 17:59:49 +000010853{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
10854$as_echo_n "checking for time.h that defines altzone... " >&6; }
10855if test "${ac_cv_header_time_altzone+set}" = set; then :
10856 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010857else
Matthias Kloseb159a552010-04-25 21:00:44 +000010858
Matthias Kloseb9621712010-04-24 17:59:49 +000010859 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010860/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000010861#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010862int
10863main ()
10864{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010865return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000010866 ;
10867 return 0;
10868}
10869_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010870if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010871 ac_cv_header_time_altzone=yes
10872else
Matthias Kloseb9621712010-04-24 17:59:49 +000010873 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000010874fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010875rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000010876
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010877fi
10878
Matthias Kloseb9621712010-04-24 17:59:49 +000010879{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
10880$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010881if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010882
Matthias Kloseb9621712010-04-24 17:59:49 +000010883$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010884
10885fi
10886
Guido van Rossumda88dad1995-01-26 00:46:29 +000010887was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000010888{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
10889$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
10890cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010891/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000010892
10893#include <sys/types.h>
10894#include <sys/select.h>
10895#include <sys/time.h>
10896
Martin v. Löwis11437992002-04-12 09:54:03 +000010897int
10898main ()
10899{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010900;
Martin v. Löwis11437992002-04-12 09:54:03 +000010901 ;
10902 return 0;
10903}
10904_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010905if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010906
10907
Matthias Kloseb9621712010-04-24 17:59:49 +000010908$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000010909
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010910 was_it_defined=yes
10911
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010912fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010913rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010914{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
10915$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010916
Matthias Kloseb9621712010-04-24 17:59:49 +000010917{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
10918$as_echo_n "checking for addrinfo... " >&6; }
10919if test "${ac_cv_struct_addrinfo+set}" = set; then :
10920 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010921else
Matthias Kloseb9621712010-04-24 17:59:49 +000010922 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010923/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010924#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010925int
10926main ()
10927{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010928struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000010929 ;
10930 return 0;
10931}
10932_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010933if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010934 ac_cv_struct_addrinfo=yes
10935else
Matthias Kloseb9621712010-04-24 17:59:49 +000010936 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010937fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010938rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10939fi
10940
Matthias Kloseb9621712010-04-24 17:59:49 +000010941{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
10942$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010943if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010944
Matthias Kloseb9621712010-04-24 17:59:49 +000010945$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010946
10947fi
10948
Matthias Kloseb9621712010-04-24 17:59:49 +000010949{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
10950$as_echo_n "checking for sockaddr_storage... " >&6; }
10951if test "${ac_cv_struct_sockaddr_storage+set}" = set; then :
10952 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010953else
Matthias Kloseb9621712010-04-24 17:59:49 +000010954 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010955/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010956
10957# include <sys/types.h>
10958# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010959int
10960main ()
10961{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010962struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000010963 ;
10964 return 0;
10965}
10966_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010967if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010968 ac_cv_struct_sockaddr_storage=yes
10969else
Matthias Kloseb9621712010-04-24 17:59:49 +000010970 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010971fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010972rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10973fi
10974
Matthias Kloseb9621712010-04-24 17:59:49 +000010975{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
10976$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010977if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010978
Matthias Kloseb9621712010-04-24 17:59:49 +000010979$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010980
10981fi
10982
Guido van Rossum627b2d71993-12-24 10:39:16 +000010983# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000010984
Matthias Kloseb9621712010-04-24 17:59:49 +000010985{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
10986$as_echo_n "checking whether char is unsigned... " >&6; }
10987if test "${ac_cv_c_char_unsigned+set}" = set; then :
10988 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000010989else
Matthias Kloseb9621712010-04-24 17:59:49 +000010990 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010991/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010992$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000010993int
10994main ()
10995{
10996static int test_array [1 - 2 * !(((char) -1) < 0)];
10997test_array [0] = 0
10998
10999 ;
11000 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000011001}
Martin v. Löwis11437992002-04-12 09:54:03 +000011002_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011003if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000011004 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011005else
Matthias Kloseb9621712010-04-24 17:59:49 +000011006 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011007fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011008rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011009fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011010{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
11011$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011012if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011013 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011014
11015fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000011016
Matthias Kloseb9621712010-04-24 17:59:49 +000011017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
11018$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
11019if test "${ac_cv_c_const+set}" = set; then :
11020 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011021else
Matthias Kloseb9621712010-04-24 17:59:49 +000011022 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011023/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011024
Martin v. Löwis11437992002-04-12 09:54:03 +000011025int
11026main ()
11027{
11028/* FIXME: Include the comments suggested by Paul. */
11029#ifndef __cplusplus
11030 /* Ultrix mips cc rejects this. */
11031 typedef int charset[2];
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011032 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000011033 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011034 char const *const *pcpcc;
11035 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011036 /* NEC SVR4.0.2 mips cc rejects this. */
11037 struct point {int x, y;};
11038 static struct point const zero = {0,0};
11039 /* AIX XL C 1.02.0.0 rejects this.
11040 It does not let you subtract one const X* pointer from another in
11041 an arm of an if-expression whose if-part is not a constant
11042 expression */
11043 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011044 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011045 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011046 ++pcpcc;
11047 ppc = (char**) pcpcc;
11048 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011049 { /* SCO 3.2v4 cc rejects this. */
11050 char *t;
11051 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011052
Martin v. Löwis11437992002-04-12 09:54:03 +000011053 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011054 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011055 }
11056 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
11057 int x[] = {25, 17};
11058 const int *foo = &x[0];
11059 ++foo;
11060 }
11061 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11062 typedef const int *iptr;
11063 iptr p = 0;
11064 ++p;
11065 }
11066 { /* AIX XL C 1.02.0.0 rejects this saying
11067 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11068 struct s { int j; const int *ap[3]; };
11069 struct s *b; b->j = 5;
11070 }
11071 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11072 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011073 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011074 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011075 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000011076#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000011077
Martin v. Löwis11437992002-04-12 09:54:03 +000011078 ;
11079 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000011080}
Martin v. Löwis11437992002-04-12 09:54:03 +000011081_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011082if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011083 ac_cv_c_const=yes
11084else
Matthias Kloseb9621712010-04-24 17:59:49 +000011085 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011086fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011087rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011088fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011089{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
11090$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011091if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011092
Matthias Kloseb9621712010-04-24 17:59:49 +000011093$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011094
11095fi
11096
Michael W. Hudson54241132001-12-07 15:38:26 +000011097
Guido van Rossumda88dad1995-01-26 00:46:29 +000011098works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011099{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
11100$as_echo_n "checking for working volatile... " >&6; }
11101cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011102/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011103
Martin v. Löwis11437992002-04-12 09:54:03 +000011104int
11105main ()
11106{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011107volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011108 ;
11109 return 0;
11110}
11111_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011112if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011113 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011114else
Skip Montanaro6dead952003-09-25 14:50:04 +000011115
Matthias Kloseb9621712010-04-24 17:59:49 +000011116$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011117
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011118
Guido van Rossum627b2d71993-12-24 10:39:16 +000011119fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011120rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011121{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11122$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011123
Guido van Rossumda88dad1995-01-26 00:46:29 +000011124works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
11126$as_echo_n "checking for working signed char... " >&6; }
11127cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011128/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011129
Martin v. Löwis11437992002-04-12 09:54:03 +000011130int
11131main ()
11132{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011133signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000011134 ;
11135 return 0;
11136}
11137_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011138if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011139 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011140else
Skip Montanaro6dead952003-09-25 14:50:04 +000011141
Matthias Kloseb9621712010-04-24 17:59:49 +000011142$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000011143
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011144
Guido van Rossum7f43da71994-08-01 12:15:30 +000011145fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011146rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011147{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11148$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011149
Guido van Rossumda88dad1995-01-26 00:46:29 +000011150have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011151{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
11152$as_echo_n "checking for prototypes... " >&6; }
11153cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011154/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011155int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011156int
11157main ()
11158{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011159return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000011160 ;
11161 return 0;
11162}
11163_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011164if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011165
Matthias Kloseb9621712010-04-24 17:59:49 +000011166$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011167
Matthias Kloseb159a552010-04-25 21:00:44 +000011168 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011169fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011170rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011171{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
11172$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011173
Guido van Rossumda88dad1995-01-26 00:46:29 +000011174works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011175{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
11176$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
11177cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011178/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011179
11180#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000011181int foo(int x, ...) {
11182 va_list va;
11183 va_start(va, x);
11184 va_arg(va, int);
11185 va_arg(va, char *);
11186 va_arg(va, double);
11187 return 0;
11188}
Guido van Rossum7f43da71994-08-01 12:15:30 +000011189
Martin v. Löwis11437992002-04-12 09:54:03 +000011190int
11191main ()
11192{
Guido van Rossum90eea071996-08-30 20:58:57 +000011193return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000011194 ;
11195 return 0;
11196}
11197_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011198if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011199
11200
Matthias Kloseb9621712010-04-24 17:59:49 +000011201$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011202
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011203 works=yes
11204
Guido van Rossum627b2d71993-12-24 10:39:16 +000011205fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011206rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011207{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11208$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011209
Martin v. Löwisd6320502004-08-12 13:45:08 +000011210# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000011211{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
11212$as_echo_n "checking for socketpair... " >&6; }
11213cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011214/* end confdefs.h. */
11215
11216#include <sys/types.h>
11217#include <sys/socket.h>
11218
11219int
11220main ()
11221{
11222void *x=socketpair
11223 ;
11224 return 0;
11225}
11226_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011227if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000011228
Matthias Kloseb9621712010-04-24 17:59:49 +000011229$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000011230
Matthias Kloseb159a552010-04-25 21:00:44 +000011231 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011232$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011233else
Matthias Kloseb9621712010-04-24 17:59:49 +000011234 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11235$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011236
11237fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011238rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011239
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011240# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000011241{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
11242$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
11243cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011244/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011245#include <sys/types.h>
11246#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011247int
11248main ()
11249{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011250struct sockaddr x;
11251x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011252 ;
11253 return 0;
11254}
11255_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011256if ac_fn_c_try_compile "$LINENO"; then :
11257 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11258$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011259
Matthias Kloseb9621712010-04-24 17:59:49 +000011260$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011261
11262else
Matthias Kloseb9621712010-04-24 17:59:49 +000011263 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11264$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011265
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011266fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011267rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011268
Guido van Rossumda88dad1995-01-26 00:46:29 +000011269va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011270{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
11271$as_echo_n "checking whether va_list is an array... " >&6; }
11272cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011273/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011274
11275#ifdef HAVE_STDARG_PROTOTYPES
11276#include <stdarg.h>
11277#else
11278#include <varargs.h>
11279#endif
11280
Martin v. Löwis11437992002-04-12 09:54:03 +000011281int
11282main ()
11283{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011284va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000011285 ;
11286 return 0;
11287}
11288_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011289if ac_fn_c_try_compile "$LINENO"; then :
11290
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011291else
Skip Montanaro6dead952003-09-25 14:50:04 +000011292
Martin v. Löwis11437992002-04-12 09:54:03 +000011293
Matthias Kloseb9621712010-04-24 17:59:49 +000011294$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011295
Guido van Rossumda88dad1995-01-26 00:46:29 +000011296 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011297
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011298fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011299rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011300{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
11301$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011302
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011303# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000011304
11305
Matthias Kloseb9621712010-04-24 17:59:49 +000011306ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
11307if test "x$ac_cv_func_gethostbyname_r" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011308
Matthias Kloseb9621712010-04-24 17:59:49 +000011309 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000011310
Matthias Kloseb9621712010-04-24 17:59:49 +000011311 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
11312$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011313 OLD_CFLAGS=$CFLAGS
11314 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011315 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011316/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011317
11318# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011319
Martin v. Löwis11437992002-04-12 09:54:03 +000011320int
11321main ()
11322{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011323
11324 char *name;
11325 struct hostent *he, *res;
11326 char buffer[2048];
11327 int buflen = 2048;
11328 int h_errnop;
11329
11330 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011331
11332 ;
11333 return 0;
11334}
11335_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011336if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011337
Matthias Kloseb9621712010-04-24 17:59:49 +000011338 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011339
Martin v. Löwis11437992002-04-12 09:54:03 +000011340
Matthias Kloseb9621712010-04-24 17:59:49 +000011341$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011342
Matthias Kloseb9621712010-04-24 17:59:49 +000011343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11344$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011345
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011346else
Skip Montanaro6dead952003-09-25 14:50:04 +000011347
Matthias Kloseb9621712010-04-24 17:59:49 +000011348 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11349$as_echo "no" >&6; }
11350 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
11351$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
11352 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011353/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011354
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011355# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011356
Martin v. Löwis11437992002-04-12 09:54:03 +000011357int
11358main ()
11359{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011360
11361 char *name;
11362 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000011363 char buffer[2048];
11364 int buflen = 2048;
11365 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011366
Matthias Kloseb159a552010-04-25 21:00:44 +000011367 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011368
11369 ;
11370 return 0;
11371}
11372_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011373if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011374
Matthias Kloseb9621712010-04-24 17:59:49 +000011375 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011376
Martin v. Löwis11437992002-04-12 09:54:03 +000011377
Matthias Kloseb159a552010-04-25 21:00:44 +000011378$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011379
Matthias Kloseb9621712010-04-24 17:59:49 +000011380 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11381$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011382
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011383else
Skip Montanaro6dead952003-09-25 14:50:04 +000011384
Matthias Kloseb9621712010-04-24 17:59:49 +000011385 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11386$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011387 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
11388$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
11389 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11390/* end confdefs.h. */
11391
11392# include <netdb.h>
11393
11394int
11395main ()
11396{
11397
11398 char *name;
11399 struct hostent *he;
11400 struct hostent_data data;
11401
11402 (void) gethostbyname_r(name, he, &data);
11403
11404 ;
11405 return 0;
11406}
11407_ACEOF
11408if ac_fn_c_try_compile "$LINENO"; then :
11409
11410 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
11411
11412
11413$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
11414
11415 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11416$as_echo "yes" >&6; }
11417
11418else
11419
11420 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11421$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011422
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011423fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011424rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011425
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011426fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011427rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011428
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011429fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011430rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011431 CFLAGS=$OLD_CFLAGS
11432
11433else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011434
Matthias Kloseb9621712010-04-24 17:59:49 +000011435 for ac_func in gethostbyname
11436do :
11437 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
11438if test "x$ac_cv_func_gethostbyname" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011439 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011440#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011441_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011442
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011443fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011444done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011445
Michael W. Hudson54241132001-12-07 15:38:26 +000011446
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011447fi
11448
Michael W. Hudson54241132001-12-07 15:38:26 +000011449
11450
11451
11452
11453
11454
Guido van Rossum627b2d71993-12-24 10:39:16 +000011455# checks for system services
11456# (none yet)
11457
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011458# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000011459ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
11460if test "x$ac_cv_func___fpu_control" = x""yes; then :
11461
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011462else
Matthias Kloseb9621712010-04-24 17:59:49 +000011463 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
11464$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
11465if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then :
11466 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011467else
Martin v. Löwis11437992002-04-12 09:54:03 +000011468 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011469LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011470cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011471/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011472
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011473/* Override any GCC internal prototype to avoid an error.
11474 Use char because int might match the return type of a GCC
11475 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011476#ifdef __cplusplus
11477extern "C"
11478#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011479char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011480int
11481main ()
11482{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011483return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011484 ;
11485 return 0;
11486}
11487_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011488if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011489 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011490else
Matthias Kloseb9621712010-04-24 17:59:49 +000011491 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011492fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011493rm -f core conftest.err conftest.$ac_objext \
11494 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011495LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011496fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011497{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
11498$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
11499if test "x$ac_cv_lib_ieee___fpu_control" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011500 cat >>confdefs.h <<_ACEOF
11501#define HAVE_LIBIEEE 1
11502_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011503
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011504 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011505
Guido van Rossum627b2d71993-12-24 10:39:16 +000011506fi
11507
Michael W. Hudson54241132001-12-07 15:38:26 +000011508
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011509fi
11510
Michael W. Hudson54241132001-12-07 15:38:26 +000011511
Guido van Rossum7f253911997-05-09 02:42:48 +000011512# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000011513{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
11514$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011515
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011516# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011517if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011518 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000011519if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000011520then
11521
Matthias Kloseb9621712010-04-24 17:59:49 +000011522$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011523
Matthias Kloseb9621712010-04-24 17:59:49 +000011524 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11525$as_echo "yes" >&6; }
11526else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11527$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011528fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000011529else
Matthias Kloseb9621712010-04-24 17:59:49 +000011530 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11531$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011532fi
11533
Guido van Rossum7f253911997-05-09 02:42:48 +000011534
Guido van Rossum7f43da71994-08-01 12:15:30 +000011535# check for --with-libm=...
11536
Guido van Rossum563e7081996-09-10 18:20:48 +000011537case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000011538Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000011539*) LIBM=-lm
11540esac
Matthias Kloseb9621712010-04-24 17:59:49 +000011541{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
11542$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011543
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011544# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011545if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011546 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000011547if test "$withval" = no
11548then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000011549 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
11550$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011551elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011552then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000011553 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
11554$as_echo "set LIBM=\"$withval\"" >&6; }
Benjamin Petersond7f73e92010-09-05 00:09:07 +000011555else as_fn_error "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011556fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011557else
Matthias Kloseb9621712010-04-24 17:59:49 +000011558 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
11559$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011560fi
11561
Guido van Rossum7f43da71994-08-01 12:15:30 +000011562
11563# check for --with-libc=...
11564
Matthias Kloseb9621712010-04-24 17:59:49 +000011565{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
11566$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011567
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011568# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011569if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011570 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000011571if test "$withval" = no
11572then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000011573 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
11574$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011575elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011576then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000011577 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
11578$as_echo "set LIBC=\"$withval\"" >&6; }
Benjamin Petersond7f73e92010-09-05 00:09:07 +000011579else as_fn_error "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011580fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011581else
Matthias Kloseb9621712010-04-24 17:59:49 +000011582 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
11583$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011584fi
11585
Guido van Rossum7f43da71994-08-01 12:15:30 +000011586
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011587# **************************************************
11588# * Check for various properties of floating point *
11589# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011590
Matthias Kloseb9621712010-04-24 17:59:49 +000011591{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
11592$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
11593if test "${ac_cv_little_endian_double+set}" = set; then :
11594 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011595else
11596
Matthias Kloseb9621712010-04-24 17:59:49 +000011597if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011598 ac_cv_little_endian_double=no
11599else
Matthias Kloseb9621712010-04-24 17:59:49 +000011600 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011601/* end confdefs.h. */
11602
11603#include <string.h>
11604int main() {
11605 double x = 9006104071832581.0;
11606 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
11607 return 0;
11608 else
11609 return 1;
11610}
11611
11612_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011613if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011614 ac_cv_little_endian_double=yes
11615else
Matthias Kloseb9621712010-04-24 17:59:49 +000011616 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011617fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011618rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11619 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011620fi
11621
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011622fi
11623
Matthias Kloseb9621712010-04-24 17:59:49 +000011624{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
11625$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011626if test "$ac_cv_little_endian_double" = yes
11627then
11628
Matthias Kloseb9621712010-04-24 17:59:49 +000011629$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011630
11631fi
11632
Matthias Kloseb9621712010-04-24 17:59:49 +000011633{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
11634$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
11635if test "${ac_cv_big_endian_double+set}" = set; then :
11636 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011637else
11638
Matthias Kloseb9621712010-04-24 17:59:49 +000011639if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011640 ac_cv_big_endian_double=no
11641else
Matthias Kloseb9621712010-04-24 17:59:49 +000011642 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011643/* end confdefs.h. */
11644
11645#include <string.h>
11646int main() {
11647 double x = 9006104071832581.0;
11648 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
11649 return 0;
11650 else
11651 return 1;
11652}
11653
11654_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011655if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011656 ac_cv_big_endian_double=yes
11657else
Matthias Kloseb9621712010-04-24 17:59:49 +000011658 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011659fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011660rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11661 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011662fi
11663
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011664fi
11665
Matthias Kloseb9621712010-04-24 17:59:49 +000011666{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
11667$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011668if test "$ac_cv_big_endian_double" = yes
11669then
11670
Matthias Kloseb9621712010-04-24 17:59:49 +000011671$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011672
11673fi
11674
11675# Some ARM platforms use a mixed-endian representation for doubles.
11676# While Python doesn't currently have full support for these platforms
11677# (see e.g., issue 1762561), we can at least make sure that float <-> string
11678# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000011679{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
11680$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
11681if test "${ac_cv_mixed_endian_double+set}" = set; then :
11682 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011683else
11684
Matthias Kloseb9621712010-04-24 17:59:49 +000011685if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011686 ac_cv_mixed_endian_double=no
11687else
Matthias Kloseb9621712010-04-24 17:59:49 +000011688 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011689/* end confdefs.h. */
11690
11691#include <string.h>
11692int main() {
11693 double x = 9006104071832581.0;
11694 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
11695 return 0;
11696 else
11697 return 1;
11698}
11699
11700_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011701if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011702 ac_cv_mixed_endian_double=yes
11703else
Matthias Kloseb9621712010-04-24 17:59:49 +000011704 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011705fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011706rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11707 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011708fi
11709
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011710fi
11711
Matthias Kloseb9621712010-04-24 17:59:49 +000011712{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
11713$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011714if test "$ac_cv_mixed_endian_double" = yes
11715then
11716
Matthias Kloseb9621712010-04-24 17:59:49 +000011717$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011718
11719fi
11720
Mark Dickinson7abf8d42009-04-18 20:17:52 +000011721# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000011722# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000011723# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000011724# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011725# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000011726# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011727
11728# This inline assembler syntax may also work for suncc and icc,
11729# so we try it on all platforms.
11730
Matthias Kloseb9621712010-04-24 17:59:49 +000011731{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
11732$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
11733cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011734/* end confdefs.h. */
11735
11736int
11737main ()
11738{
11739
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011740 unsigned short cw;
11741 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
11742 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011743
11744 ;
11745 return 0;
11746}
11747_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011748if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011749 have_gcc_asm_for_x87=yes
11750else
Matthias Kloseb9621712010-04-24 17:59:49 +000011751 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011752fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011753rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011754{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
11755$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011756if test "$have_gcc_asm_for_x87" = yes
11757then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011758
Matthias Kloseb9621712010-04-24 17:59:49 +000011759$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011760
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011761fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011762
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011763# Detect whether system arithmetic is subject to x87-style double
11764# rounding issues. The result of this test has little meaning on non
11765# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
11766# mode is round-to-nearest and double rounding issues are present, and
11767# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000011768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
11769$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011770# $BASECFLAGS may affect the result
11771ac_save_cc="$CC"
11772CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011773if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011774 ac_cv_x87_double_rounding=no
11775else
Matthias Kloseb9621712010-04-24 17:59:49 +000011776 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011777/* end confdefs.h. */
11778
11779#include <stdlib.h>
11780#include <math.h>
11781int main() {
11782 volatile double x, y, z;
11783 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
11784 x = 0.99999999999999989; /* 1-2**-53 */
11785 y = 1./x;
11786 if (y != 1.)
11787 exit(0);
11788 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
11789 x = 1e16;
11790 y = 2.99999;
11791 z = x + y;
11792 if (z != 1e16+4.)
11793 exit(0);
11794 /* both tests show evidence of double rounding */
11795 exit(1);
11796}
11797
11798_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011799if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011800 ac_cv_x87_double_rounding=no
11801else
Matthias Kloseb9621712010-04-24 17:59:49 +000011802 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011803fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011804rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11805 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011806fi
11807
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011808CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000011809{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
11810$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011811if test "$ac_cv_x87_double_rounding" = yes
11812then
11813
Matthias Kloseb9621712010-04-24 17:59:49 +000011814$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011815
11816fi
11817
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011818# ************************************
11819# * Check for mathematical functions *
11820# ************************************
11821
11822LIBS_SAVE=$LIBS
11823LIBS="$LIBS $LIBM"
11824
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011825# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
11826# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000011827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
11828$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
11829if test "${ac_cv_tanh_preserves_zero_sign+set}" = set; then :
11830 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011831else
11832
Matthias Kloseb9621712010-04-24 17:59:49 +000011833if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011834 ac_cv_tanh_preserves_zero_sign=no
11835else
Matthias Kloseb9621712010-04-24 17:59:49 +000011836 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011837/* end confdefs.h. */
11838
11839#include <math.h>
11840#include <stdlib.h>
11841int main() {
11842 /* return 0 if either negative zeros don't exist
11843 on this platform or if negative zeros exist
11844 and tanh(-0.) == -0. */
11845 if (atan2(0., -1.) == atan2(-0., -1.) ||
11846 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
11847 else exit(1);
11848}
11849
11850_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011851if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011852 ac_cv_tanh_preserves_zero_sign=yes
11853else
Matthias Kloseb9621712010-04-24 17:59:49 +000011854 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011855fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011856rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11857 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011858fi
11859
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011860fi
11861
Matthias Kloseb9621712010-04-24 17:59:49 +000011862{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
11863$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011864if test "$ac_cv_tanh_preserves_zero_sign" = yes
11865then
11866
Matthias Kloseb9621712010-04-24 17:59:49 +000011867$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011868
11869fi
11870
Mark Dickinson9c113362009-09-05 10:36:23 +000011871for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
Matthias Kloseb9621712010-04-24 17:59:49 +000011872do :
11873 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11874ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Benjamin Petersond7f73e92010-09-05 00:09:07 +000011875eval as_val=\$$as_ac_var
11876 if test "x$as_val" = x""yes; then :
Mark Dickinson9c113362009-09-05 10:36:23 +000011877 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011878#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Mark Dickinson9c113362009-09-05 10:36:23 +000011879_ACEOF
11880
11881fi
11882done
11883
Mark Dickinson9c113362009-09-05 10:36:23 +000011884for ac_func in hypot lgamma log1p round tgamma
Matthias Kloseb9621712010-04-24 17:59:49 +000011885do :
11886 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11887ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Benjamin Petersond7f73e92010-09-05 00:09:07 +000011888eval as_val=\$$as_ac_var
11889 if test "x$as_val" = x""yes; then :
Christian Heimes99170a52007-12-19 02:07:34 +000011890 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011891#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimes99170a52007-12-19 02:07:34 +000011892_ACEOF
11893
11894fi
11895done
11896
Matthias Kloseb9621712010-04-24 17:59:49 +000011897ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
11898"
11899if test "x$ac_cv_have_decl_isinf" = x""yes; then :
11900 ac_have_decl=1
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011901else
Matthias Kloseb9621712010-04-24 17:59:49 +000011902 ac_have_decl=0
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011903fi
11904
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011905cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011906#define HAVE_DECL_ISINF $ac_have_decl
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011907_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011908ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
11909"
11910if test "x$ac_cv_have_decl_isnan" = x""yes; then :
11911 ac_have_decl=1
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011912else
Matthias Kloseb9621712010-04-24 17:59:49 +000011913 ac_have_decl=0
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011914fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011915
11916cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011917#define HAVE_DECL_ISNAN $ac_have_decl
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011918_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011919ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
11920"
11921if test "x$ac_cv_have_decl_isfinite" = x""yes; then :
11922 ac_have_decl=1
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011923else
Matthias Kloseb9621712010-04-24 17:59:49 +000011924 ac_have_decl=0
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011925fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011926
11927cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011928#define HAVE_DECL_ISFINITE $ac_have_decl
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011929_ACEOF
11930
11931
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000011932LIBS=$LIBS_SAVE
11933
Mark Dickinsona614f042009-11-28 12:48:43 +000011934# For multiprocessing module, check that sem_open
11935# actually works. For FreeBSD versions <= 7.2,
11936# the kernel module that provides POSIX semaphores
11937# isn't loaded by default, so an attempt to call
11938# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000011939{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
11940$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
11941if test "${ac_cv_posix_semaphores_enabled+set}" = set; then :
11942 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000011943else
Matthias Kloseb9621712010-04-24 17:59:49 +000011944 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000011945 ac_cv_posix_semaphores_enabled=yes
11946else
Matthias Kloseb9621712010-04-24 17:59:49 +000011947 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000011948/* end confdefs.h. */
11949
11950#include <unistd.h>
11951#include <fcntl.h>
11952#include <stdio.h>
11953#include <semaphore.h>
11954#include <sys/stat.h>
11955
11956int main(void) {
11957 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
11958 if (a == SEM_FAILED) {
11959 perror("sem_open");
11960 return 1;
11961 }
11962 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000011963 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000011964 return 0;
11965}
11966
11967_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011968if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000011969 ac_cv_posix_semaphores_enabled=yes
11970else
Matthias Kloseb9621712010-04-24 17:59:49 +000011971 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000011972fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011973rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11974 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000011975fi
11976
11977
Mark Dickinsona614f042009-11-28 12:48:43 +000011978fi
11979
Matthias Kloseb9621712010-04-24 17:59:49 +000011980{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
11981$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000011982if test $ac_cv_posix_semaphores_enabled = no
11983then
11984
Matthias Kloseb9621712010-04-24 17:59:49 +000011985$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000011986
11987fi
11988
Mark Dickinson10683072009-04-18 21:18:19 +000011989# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000011990{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
11991$as_echo_n "checking for broken sem_getvalue... " >&6; }
11992if test "${ac_cv_broken_sem_getvalue+set}" = set; then :
11993 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011994else
Matthias Kloseb9621712010-04-24 17:59:49 +000011995 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011996 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000011997else
Matthias Kloseb9621712010-04-24 17:59:49 +000011998 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000011999/* end confdefs.h. */
12000
12001#include <unistd.h>
12002#include <fcntl.h>
12003#include <stdio.h>
12004#include <semaphore.h>
12005#include <sys/stat.h>
12006
12007int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000012008 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000012009 int count;
12010 int res;
12011 if(a==SEM_FAILED){
12012 perror("sem_open");
12013 return 1;
12014
12015 }
12016 res = sem_getvalue(a, &count);
12017 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000012018 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000012019 return res==-1 ? 1 : 0;
12020}
12021
Mark Dickinson10683072009-04-18 21:18:19 +000012022_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012023if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012024 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000012025else
Matthias Kloseb9621712010-04-24 17:59:49 +000012026 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012027fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012028rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12029 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012030fi
12031
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012032
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012033fi
12034
Matthias Kloseb9621712010-04-24 17:59:49 +000012035{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
12036$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012037if test $ac_cv_broken_sem_getvalue = yes
12038then
12039
Matthias Kloseb9621712010-04-24 17:59:49 +000012040$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012041
12042fi
12043
Mark Dickinsonbd792642009-03-18 20:06:12 +000012044# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000012045{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
12046$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012047# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012048if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000012049 enableval=$enable_big_digits; case $enable_big_digits in
12050yes)
12051 enable_big_digits=30 ;;
12052no)
12053 enable_big_digits=15 ;;
1205415|30)
12055 ;;
12056*)
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012057 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 +000012058esac
Matthias Kloseb9621712010-04-24 17:59:49 +000012059{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
12060$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012061
12062cat >>confdefs.h <<_ACEOF
12063#define PYLONG_BITS_IN_DIGIT $enable_big_digits
12064_ACEOF
12065
12066
12067else
Matthias Kloseb9621712010-04-24 17:59:49 +000012068 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
12069$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012070fi
12071
12072
Guido van Rossumef2255b2000-03-10 22:30:29 +000012073# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012074ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
12075if test "x$ac_cv_header_wchar_h" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012076
12077
Matthias Kloseb9621712010-04-24 17:59:49 +000012078$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012079
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012080 wchar_h="yes"
12081
Guido van Rossumef2255b2000-03-10 22:30:29 +000012082else
Martin v. Löwis11437992002-04-12 09:54:03 +000012083 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000012084
12085fi
12086
Michael W. Hudson54241132001-12-07 15:38:26 +000012087
Martin v. Löwis11437992002-04-12 09:54:03 +000012088
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012089# determine wchar_t size
12090if test "$wchar_h" = yes
12091then
Matthias Kloseb9621712010-04-24 17:59:49 +000012092 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012093# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12094# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12095# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000012096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
12097$as_echo_n "checking size of wchar_t... " >&6; }
12098if test "${ac_cv_sizeof_wchar_t+set}" = set; then :
12099 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012100else
Matthias Kloseb9621712010-04-24 17:59:49 +000012101 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
12102"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012103
Martin v. Löwis11437992002-04-12 09:54:03 +000012104else
Matthias Kloseb9621712010-04-24 17:59:49 +000012105 if test "$ac_cv_type_wchar_t" = yes; then
12106 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12107$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012108{ as_fn_set_status 77
12109as_fn_error "cannot compute sizeof (wchar_t)
12110See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012111 else
12112 ac_cv_sizeof_wchar_t=0
12113 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012114fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012115
Martin v. Löwis11437992002-04-12 09:54:03 +000012116fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012117{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
12118$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012119
12120
12121
Martin v. Löwis11437992002-04-12 09:54:03 +000012122cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012123#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012124_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012125
Michael W. Hudson54241132001-12-07 15:38:26 +000012126
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012127fi
12128
Matthias Kloseb9621712010-04-24 17:59:49 +000012129{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
12130$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012131have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012132cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012133/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012134
12135#include <tcl.h>
12136#if TCL_UTF_MAX != 6
12137# error "NOT UCS4_TCL"
12138#endif
12139int
12140main ()
12141{
12142
12143 ;
12144 return 0;
12145}
12146_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012147if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012148
12149
Matthias Kloseb9621712010-04-24 17:59:49 +000012150$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012151
12152 have_ucs4_tcl=yes
12153
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012154fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012155rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012156{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
12157$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012158
Skip Montanaro6dead952003-09-25 14:50:04 +000012159# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012160if test "$wchar_h" = yes
12161then
12162 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000012163 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
12164$as_echo_n "checking whether wchar_t is signed... " >&6; }
12165 if test "${ac_cv_wchar_t_signed+set}" = set; then :
12166 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012167else
12168
Matthias Kloseb9621712010-04-24 17:59:49 +000012169 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012170 ac_cv_wchar_t_signed=yes
12171else
Matthias Kloseb9621712010-04-24 17:59:49 +000012172 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012173/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012174
12175 #include <wchar.h>
12176 int main()
12177 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000012178 /* Success: exit code 0 */
12179 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012180 }
12181
12182_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012183if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012184 ac_cv_wchar_t_signed=yes
12185else
Matthias Kloseb9621712010-04-24 17:59:49 +000012186 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012187fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012188rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12189 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012190fi
12191
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012192fi
12193
Matthias Kloseb9621712010-04-24 17:59:49 +000012194 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
12195$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012196fi
12197
Matthias Kloseb9621712010-04-24 17:59:49 +000012198{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what type to use for str" >&5
12199$as_echo_n "checking what type to use for str... " >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000012200
12201# Check whether --with-wide-unicode was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012202if test "${with_wide_unicode+set}" = set; then :
Georg Brandl52d168a2008-01-07 18:10:24 +000012203 withval=$with_wide_unicode;
12204if test "$withval" != no
12205then unicode_size="4"
12206else unicode_size="2"
12207fi
12208
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012209else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012210
Georg Brandl52d168a2008-01-07 18:10:24 +000012211case "$have_ucs4_tcl" in
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012212 yes) unicode_size="4";;
Georg Brandl52d168a2008-01-07 18:10:24 +000012213 *) unicode_size="2" ;;
12214esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012215
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012216fi
12217
Martin v. Löwis0036cba2002-04-12 09:58:45 +000012218
12219
Georg Brandl52d168a2008-01-07 18:10:24 +000012220case "$unicode_size" in
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012221 4)
12222 $as_echo "#define Py_UNICODE_SIZE 4" >>confdefs.h
12223
12224 SOABI_QUALIFIERS="${SOABI_QUALIFIERS}u"
12225 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000012226 *) $as_echo "#define Py_UNICODE_SIZE 2" >>confdefs.h
Georg Brandl52d168a2008-01-07 18:10:24 +000012227 ;;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012228esac
12229
Michael W. Hudson54241132001-12-07 15:38:26 +000012230
Martin v. Löwis11437992002-04-12 09:54:03 +000012231
Georg Brandl52d168a2008-01-07 18:10:24 +000012232# wchar_t is only usable if it maps to an unsigned type
12233if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000012234 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000012235then
12236 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012237
Matthias Kloseb9621712010-04-24 17:59:49 +000012238$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012239
Matthias Kloseb9621712010-04-24 17:59:49 +000012240 $as_echo "#define PY_UNICODE_TYPE wchar_t" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012241
Georg Brandl52d168a2008-01-07 18:10:24 +000012242elif test "$ac_cv_sizeof_short" = "$unicode_size"
12243then
12244 PY_UNICODE_TYPE="unsigned short"
Matthias Kloseb9621712010-04-24 17:59:49 +000012245 $as_echo "#define PY_UNICODE_TYPE unsigned short" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012246
Georg Brandl52d168a2008-01-07 18:10:24 +000012247elif test "$ac_cv_sizeof_long" = "$unicode_size"
12248then
12249 PY_UNICODE_TYPE="unsigned long"
Matthias Kloseb9621712010-04-24 17:59:49 +000012250 $as_echo "#define PY_UNICODE_TYPE unsigned long" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012251
Georg Brandl52d168a2008-01-07 18:10:24 +000012252else
12253 PY_UNICODE_TYPE="no type found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012254fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012255{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PY_UNICODE_TYPE" >&5
12256$as_echo "$PY_UNICODE_TYPE" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000012257
12258# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000012259 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12260$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
12261if test "${ac_cv_c_bigendian+set}" = set; then :
12262 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000012263else
Matthias Kloseb9621712010-04-24 17:59:49 +000012264 ac_cv_c_bigendian=unknown
12265 # See if we're dealing with a universal compiler.
12266 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12267/* end confdefs.h. */
12268#ifndef __APPLE_CC__
12269 not a universal capable compiler
12270 #endif
12271 typedef int dummy;
12272
Skip Montanaro6dead952003-09-25 14:50:04 +000012273_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012274if ac_fn_c_try_compile "$LINENO"; then :
12275
12276 # Check for potential -arch flags. It is not universal unless
12277 # there are at least two -arch flags with different values.
12278 ac_arch=
12279 ac_prev=
12280 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12281 if test -n "$ac_prev"; then
12282 case $ac_word in
12283 i?86 | x86_64 | ppc | ppc64)
12284 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12285 ac_arch=$ac_word
12286 else
12287 ac_cv_c_bigendian=universal
12288 break
12289 fi
12290 ;;
12291 esac
12292 ac_prev=
12293 elif test "x$ac_word" = "x-arch"; then
12294 ac_prev=arch
12295 fi
12296 done
12297fi
12298rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12299 if test $ac_cv_c_bigendian = unknown; then
12300 # See if sys/param.h defines the BYTE_ORDER macro.
12301 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012302/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012303#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012304 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012305
Martin v. Löwis11437992002-04-12 09:54:03 +000012306int
12307main ()
12308{
Matthias Kloseb9621712010-04-24 17:59:49 +000012309#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12310 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12311 && LITTLE_ENDIAN)
12312 bogus endian macros
12313 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012314
12315 ;
12316 return 0;
12317}
12318_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012319if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012320 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000012321 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012322/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012323#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012324 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012325
Martin v. Löwis11437992002-04-12 09:54:03 +000012326int
12327main ()
12328{
Guido van Rossumef2255b2000-03-10 22:30:29 +000012329#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000012330 not big endian
12331 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012332
12333 ;
12334 return 0;
12335}
12336_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012337if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012338 ac_cv_c_bigendian=yes
12339else
Matthias Kloseb9621712010-04-24 17:59:49 +000012340 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000012341fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012342rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012343fi
12344rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12345 fi
12346 if test $ac_cv_c_bigendian = unknown; then
12347 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12348 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012349/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000012350#include <limits.h>
12351
Martin v. Löwis11437992002-04-12 09:54:03 +000012352int
12353main ()
12354{
Matthias Kloseb9621712010-04-24 17:59:49 +000012355#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12356 bogus endian macros
12357 #endif
12358
Martin v. Löwis11437992002-04-12 09:54:03 +000012359 ;
12360 return 0;
12361}
12362_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012363if ac_fn_c_try_compile "$LINENO"; then :
12364 # It does; now see whether it defined to _BIG_ENDIAN or not.
12365 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12366/* end confdefs.h. */
12367#include <limits.h>
12368
12369int
12370main ()
12371{
12372#ifndef _BIG_ENDIAN
12373 not big endian
12374 #endif
12375
12376 ;
12377 return 0;
12378}
12379_ACEOF
12380if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012381 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012382else
Matthias Kloseb9621712010-04-24 17:59:49 +000012383 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012384fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012385rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12386fi
12387rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12388 fi
12389 if test $ac_cv_c_bigendian = unknown; then
12390 # Compile a test program.
12391 if test "$cross_compiling" = yes; then :
12392 # Try to guess by grepping values from an object file.
12393 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12394/* end confdefs.h. */
12395short int ascii_mm[] =
12396 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12397 short int ascii_ii[] =
12398 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12399 int use_ascii (int i) {
12400 return ascii_mm[i] + ascii_ii[i];
12401 }
12402 short int ebcdic_ii[] =
12403 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12404 short int ebcdic_mm[] =
12405 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12406 int use_ebcdic (int i) {
12407 return ebcdic_mm[i] + ebcdic_ii[i];
12408 }
12409 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012410
Matthias Kloseb9621712010-04-24 17:59:49 +000012411int
12412main ()
12413{
12414return use_ascii (foo) == use_ebcdic (foo);
12415 ;
12416 return 0;
12417}
12418_ACEOF
12419if ac_fn_c_try_compile "$LINENO"; then :
12420 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12421 ac_cv_c_bigendian=yes
12422 fi
12423 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12424 if test "$ac_cv_c_bigendian" = unknown; then
12425 ac_cv_c_bigendian=no
12426 else
12427 # finding both strings is unlikely to happen, but who knows?
12428 ac_cv_c_bigendian=unknown
12429 fi
12430 fi
12431fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012432rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012433else
Matthias Kloseb9621712010-04-24 17:59:49 +000012434 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012435/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012436$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012437int
12438main ()
12439{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012440
Matthias Kloseb9621712010-04-24 17:59:49 +000012441 /* Are we little or big endian? From Harbison&Steele. */
12442 union
12443 {
12444 long int l;
12445 char c[sizeof (long int)];
12446 } u;
12447 u.l = 1;
12448 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012449
12450 ;
12451 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000012452}
Martin v. Löwis11437992002-04-12 09:54:03 +000012453_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012454if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012455 ac_cv_c_bigendian=no
12456else
Matthias Kloseb9621712010-04-24 17:59:49 +000012457 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000012458fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012459rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12460 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000012461fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012462
Matthias Kloseb9621712010-04-24 17:59:49 +000012463 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012464fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012465{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12466$as_echo "$ac_cv_c_bigendian" >&6; }
12467 case $ac_cv_c_bigendian in #(
12468 yes)
12469 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12470;; #(
12471 no)
12472 ;; #(
12473 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012474
Matthias Kloseb9621712010-04-24 17:59:49 +000012475$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012476
Matthias Kloseb9621712010-04-24 17:59:49 +000012477 ;; #(
12478 *)
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012479 as_fn_error "unknown endianness
12480 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000012481 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000012482
Michael W. Hudson54241132001-12-07 15:38:26 +000012483
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012484# ABI version string for Python extension modules. This appears between the
12485# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
12486# from the following attributes which affect the ABI of this Python build (in
12487# this order):
12488#
12489# * The Python implementation (always 'cpython-' for us)
12490# * The major and minor version numbers
12491# * --with-pydebug (adds a 'd')
12492# * --with-pymalloc (adds a 'm')
12493# * --with-wide-unicode (adds a 'u')
12494#
12495# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012496# would get a shared library ABI version tag of 'cpython-32dmu' and shared
12497# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012498
12499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
12500$as_echo_n "checking SOABI... " >&6; }
12501SOABI='cpython-'`echo $VERSION | tr -d .`${SOABI_QUALIFIERS}
12502{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
12503$as_echo "$SOABI" >&6; }
12504
12505# SO is the extension of shared libraries `(including the dot!)
12506# -- usually .so, .sl on HP-UX, .dll on Cygwin
12507{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SO" >&5
12508$as_echo_n "checking SO... " >&6; }
12509if test -z "$SO"
12510then
12511 case $ac_sys_system in
12512 hp*|HP*)
12513 case `uname -m` in
12514 ia64) SO=.so;;
12515 *) SO=.sl;;
12516 esac
12517 ;;
12518 CYGWIN*) SO=.dll;;
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012519 Linux*) SO=.${SOABI}.so;;
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012520 *) SO=.so;;
12521 esac
12522else
12523 # this might also be a termcap variable, see #610332
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012524 echo
12525 echo '====================================================================='
12526 echo '+ +'
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012527 echo '+ WARNING: You have set SO in your environment. +'
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012528 echo '+ Do you really mean to change the extension for shared libraries? +'
12529 echo '+ Continuing in 10 seconds to let you to ponder. +'
12530 echo '+ +'
12531 echo '====================================================================='
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012532 sleep 10
12533fi
12534{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SO" >&5
12535$as_echo "$SO" >&6; }
12536
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012537# Check whether right shifting a negative integer extends the sign bit
12538# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000012539{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
12540$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
12541if test "${ac_cv_rshift_extends_sign+set}" = set; then :
12542 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000012543else
Martin v. Löwis11437992002-04-12 09:54:03 +000012544
Matthias Kloseb9621712010-04-24 17:59:49 +000012545if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000012546 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012547else
Matthias Kloseb9621712010-04-24 17:59:49 +000012548 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012549/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012550
12551int main()
12552{
Vladimir Marangozova6180282000-07-12 05:05:06 +000012553 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012554}
12555
Martin v. Löwis11437992002-04-12 09:54:03 +000012556_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012557if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000012558 ac_cv_rshift_extends_sign=yes
12559else
Matthias Kloseb9621712010-04-24 17:59:49 +000012560 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000012561fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012562rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12563 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000012564fi
12565
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012566fi
12567
Matthias Kloseb9621712010-04-24 17:59:49 +000012568{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
12569$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000012570if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012571then
Martin v. Löwis11437992002-04-12 09:54:03 +000012572
Matthias Kloseb9621712010-04-24 17:59:49 +000012573$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012574
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012575fi
12576
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012577# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000012578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
12579$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
12580if test "${ac_cv_have_getc_unlocked+set}" = set; then :
12581 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012582else
Martin v. Löwis11437992002-04-12 09:54:03 +000012583
Matthias Kloseb9621712010-04-24 17:59:49 +000012584cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012585/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012586#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012587int
12588main ()
12589{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012590
12591 FILE *f = fopen("/dev/null", "r");
12592 flockfile(f);
12593 getc_unlocked(f);
12594 funlockfile(f);
12595
Martin v. Löwis11437992002-04-12 09:54:03 +000012596 ;
12597 return 0;
12598}
12599_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012600if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012601 ac_cv_have_getc_unlocked=yes
12602else
Matthias Kloseb9621712010-04-24 17:59:49 +000012603 ac_cv_have_getc_unlocked=no
12604fi
12605rm -f core conftest.err conftest.$ac_objext \
12606 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012607fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012608
Matthias Kloseb9621712010-04-24 17:59:49 +000012609{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
12610$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012611if test "$ac_cv_have_getc_unlocked" = yes
12612then
Martin v. Löwis11437992002-04-12 09:54:03 +000012613
Matthias Kloseb9621712010-04-24 17:59:49 +000012614$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012615
12616fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012617
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012618# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000012619# save the value of LIBS so we don't actually link Python with readline
12620LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012621
Gregory P. Smith18820942008-09-07 06:24:49 +000012622# On some systems we need to link readline to a termcap compatible
12623# library. NOTE: Keep the precedence of listed libraries synchronised
12624# with setup.py.
12625py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012626{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
12627$as_echo_n "checking how to link readline libs... " >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012628for py_libtermcap in "" ncursesw ncurses curses termcap; do
12629 if test -z "$py_libtermcap"; then
12630 READLINE_LIBS="-lreadline"
12631 else
12632 READLINE_LIBS="-lreadline -l$py_libtermcap"
12633 fi
12634 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000012635 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012636/* end confdefs.h. */
12637
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012638/* Override any GCC internal prototype to avoid an error.
12639 Use char because int might match the return type of a GCC
12640 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012641#ifdef __cplusplus
12642extern "C"
12643#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012644char readline ();
12645int
12646main ()
12647{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012648return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012649 ;
12650 return 0;
12651}
12652_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012653if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000012654 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012655fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012656rm -f core conftest.err conftest.$ac_objext \
12657 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000012658 if test $py_cv_lib_readline = yes; then
12659 break
12660 fi
12661done
12662# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
12663#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000012664if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012665 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
12666$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012667else
Matthias Kloseb9621712010-04-24 17:59:49 +000012668 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
12669$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012670
Matthias Kloseb9621712010-04-24 17:59:49 +000012671$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012672
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012673fi
12674
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012675# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000012676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
12677$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
12678if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then :
12679 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012680else
12681 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012682LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012683cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012684/* end confdefs.h. */
12685
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012686/* Override any GCC internal prototype to avoid an error.
12687 Use char because int might match the return type of a GCC
12688 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012689#ifdef __cplusplus
12690extern "C"
12691#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012692char rl_callback_handler_install ();
12693int
12694main ()
12695{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012696return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012697 ;
12698 return 0;
12699}
12700_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012701if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012702 ac_cv_lib_readline_rl_callback_handler_install=yes
12703else
Matthias Kloseb9621712010-04-24 17:59:49 +000012704 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012705fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012706rm -f core conftest.err conftest.$ac_objext \
12707 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012708LIBS=$ac_check_lib_save_LIBS
12709fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012710{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
12711$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
12712if test "x$ac_cv_lib_readline_rl_callback_handler_install" = x""yes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012713
Matthias Kloseb9621712010-04-24 17:59:49 +000012714$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012715
12716fi
12717
12718
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012719# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000012720cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012721/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012722#include <readline/readline.h>
12723_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012724if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012725 have_readline=yes
12726else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012727 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000012728
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012729fi
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012730rm -f conftest.err conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012731if test $have_readline = yes
12732then
Matthias Kloseb9621712010-04-24 17:59:49 +000012733 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012734/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012735#include <readline/readline.h>
12736
12737_ACEOF
12738if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012739 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012740
Matthias Kloseb9621712010-04-24 17:59:49 +000012741$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012742
12743fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012744rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012745
Matthias Kloseb9621712010-04-24 17:59:49 +000012746 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000012747/* end confdefs.h. */
12748#include <readline/readline.h>
12749
12750_ACEOF
12751if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012752 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000012753
Matthias Kloseb9621712010-04-24 17:59:49 +000012754$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000012755
12756fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012757rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000012758
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012759fi
12760
Martin v. Löwis0daad592001-09-30 21:09:59 +000012761# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000012762{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
12763$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
12764if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then :
12765 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000012766else
Martin v. Löwis11437992002-04-12 09:54:03 +000012767 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012768LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012769cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012770/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012771
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012772/* Override any GCC internal prototype to avoid an error.
12773 Use char because int might match the return type of a GCC
12774 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012775#ifdef __cplusplus
12776extern "C"
12777#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012778char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012779int
12780main ()
12781{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012782return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012783 ;
12784 return 0;
12785}
12786_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012787if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012788 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000012789else
Matthias Kloseb9621712010-04-24 17:59:49 +000012790 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000012791fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012792rm -f core conftest.err conftest.$ac_objext \
12793 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012794LIBS=$ac_check_lib_save_LIBS
12795fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012796{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
12797$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
12798if test "x$ac_cv_lib_readline_rl_pre_input_hook" = x""yes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012799
Matthias Kloseb9621712010-04-24 17:59:49 +000012800$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000012801
Martin v. Löwis0daad592001-09-30 21:09:59 +000012802fi
12803
Michael W. Hudson54241132001-12-07 15:38:26 +000012804
Thomas Wouters89d996e2007-09-08 17:39:28 +000012805# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000012806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
12807$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
12808if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then :
12809 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000012810else
12811 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012812LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012813cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000012814/* end confdefs.h. */
12815
12816/* Override any GCC internal prototype to avoid an error.
12817 Use char because int might match the return type of a GCC
12818 builtin and then its argument prototype would still apply. */
12819#ifdef __cplusplus
12820extern "C"
12821#endif
12822char rl_completion_display_matches_hook ();
12823int
12824main ()
12825{
12826return rl_completion_display_matches_hook ();
12827 ;
12828 return 0;
12829}
12830_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012831if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000012832 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
12833else
Matthias Kloseb9621712010-04-24 17:59:49 +000012834 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000012835fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012836rm -f core conftest.err conftest.$ac_objext \
12837 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000012838LIBS=$ac_check_lib_save_LIBS
12839fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012840{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
12841$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
12842if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = x""yes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000012843
Matthias Kloseb9621712010-04-24 17:59:49 +000012844$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000012845
12846fi
12847
12848
Martin v. Löwis0daad592001-09-30 21:09:59 +000012849# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000012850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
12851$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
12852if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then :
12853 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000012854else
Martin v. Löwis11437992002-04-12 09:54:03 +000012855 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012856LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012857cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012858/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012859
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012860/* Override any GCC internal prototype to avoid an error.
12861 Use char because int might match the return type of a GCC
12862 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012863#ifdef __cplusplus
12864extern "C"
12865#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012866char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012867int
12868main ()
12869{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012870return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012871 ;
12872 return 0;
12873}
12874_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012875if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012876 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000012877else
Matthias Kloseb9621712010-04-24 17:59:49 +000012878 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000012879fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012880rm -f core conftest.err conftest.$ac_objext \
12881 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012882LIBS=$ac_check_lib_save_LIBS
12883fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012884{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
12885$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
12886if test "x$ac_cv_lib_readline_rl_completion_matches" = x""yes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012887
Matthias Kloseb9621712010-04-24 17:59:49 +000012888$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000012889
Guido van Rossum353ae582001-07-10 16:45:32 +000012890fi
12891
Jack Jansendd19cf82001-12-06 22:36:17 +000012892
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012893# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000012894cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012895/* end confdefs.h. */
12896#include <readline/readline.h>
12897_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012898if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012899 have_readline=yes
12900else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012901 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000012902
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012903fi
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012904rm -f conftest.err conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012905if test $have_readline = yes
12906then
Matthias Kloseb9621712010-04-24 17:59:49 +000012907 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012908/* end confdefs.h. */
12909#include <readline/readline.h>
12910
12911_ACEOF
12912if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012913 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012914
Matthias Kloseb9621712010-04-24 17:59:49 +000012915$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012916
12917fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012918rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012919
12920fi
12921
Martin v. Löwis82bca632006-02-10 20:49:30 +000012922# End of readline checks: restore LIBS
12923LIBS=$LIBS_no_readline
12924
Matthias Kloseb9621712010-04-24 17:59:49 +000012925{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
12926$as_echo_n "checking for broken nice()... " >&6; }
12927if test "${ac_cv_broken_nice+set}" = set; then :
12928 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000012929else
Martin v. Löwis11437992002-04-12 09:54:03 +000012930
Matthias Kloseb9621712010-04-24 17:59:49 +000012931if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000012932 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012933else
Matthias Kloseb9621712010-04-24 17:59:49 +000012934 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012935/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012936
12937int main()
12938{
12939 int val1 = nice(1);
12940 if (val1 != -1 && val1 == nice(2))
12941 exit(0);
12942 exit(1);
12943}
12944
Martin v. Löwis11437992002-04-12 09:54:03 +000012945_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012946if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012947 ac_cv_broken_nice=yes
12948else
Matthias Kloseb9621712010-04-24 17:59:49 +000012949 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012950fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012951rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12952 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012953fi
12954
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012955fi
12956
Matthias Kloseb9621712010-04-24 17:59:49 +000012957{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
12958$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012959if test "$ac_cv_broken_nice" = yes
12960then
Martin v. Löwis11437992002-04-12 09:54:03 +000012961
Matthias Kloseb9621712010-04-24 17:59:49 +000012962$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012963
12964fi
12965
Matthias Kloseb9621712010-04-24 17:59:49 +000012966{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
12967$as_echo_n "checking for broken poll()... " >&6; }
12968if test "${ac_cv_broken_poll+set}" = set; then :
12969 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012970else
Matthias Kloseb9621712010-04-24 17:59:49 +000012971 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012972 ac_cv_broken_poll=no
12973else
Matthias Kloseb9621712010-04-24 17:59:49 +000012974 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012975/* end confdefs.h. */
12976
12977#include <poll.h>
12978
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012979int main()
12980{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012981 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012982 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012983
12984 close (42);
12985
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012986 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012987 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012988 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012989 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012990 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012991 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012992 return 1;
12993}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012994
12995_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012996if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012997 ac_cv_broken_poll=yes
12998else
Matthias Kloseb9621712010-04-24 17:59:49 +000012999 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013000fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013001rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13002 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013003fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013004
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013005fi
13006
Matthias Kloseb9621712010-04-24 17:59:49 +000013007{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
13008$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013009if test "$ac_cv_broken_poll" = yes
13010then
13011
Matthias Kloseb9621712010-04-24 17:59:49 +000013012$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013013
13014fi
13015
Brett Cannon43802422005-02-10 20:48:03 +000013016# 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 +000013017# (which is not required by ISO C or UNIX spec) and/or if we support
13018# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000013019ac_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 +000013020#include <$ac_cv_struct_tm>
13021
Matthias Kloseb9621712010-04-24 17:59:49 +000013022"
13023if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then :
Brett Cannon43802422005-02-10 20:48:03 +000013024
13025cat >>confdefs.h <<_ACEOF
13026#define HAVE_STRUCT_TM_TM_ZONE 1
13027_ACEOF
13028
13029
13030fi
13031
13032if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13033
Matthias Kloseb9621712010-04-24 17:59:49 +000013034$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013035
13036else
Matthias Kloseb9621712010-04-24 17:59:49 +000013037 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13038"
13039if test "x$ac_cv_have_decl_tzname" = x""yes; then :
13040 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013041else
Matthias Kloseb9621712010-04-24 17:59:49 +000013042 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013043fi
13044
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013045cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013046#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013047_ACEOF
13048
Matthias Kloseb9621712010-04-24 17:59:49 +000013049 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13050$as_echo_n "checking for tzname... " >&6; }
13051if test "${ac_cv_var_tzname+set}" = set; then :
13052 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013053else
Matthias Kloseb9621712010-04-24 17:59:49 +000013054 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013055/* end confdefs.h. */
13056#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013057#if !HAVE_DECL_TZNAME
13058extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000013059#endif
13060
13061int
13062main ()
13063{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013064return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000013065 ;
13066 return 0;
13067}
13068_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013069if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000013070 ac_cv_var_tzname=yes
13071else
Matthias Kloseb9621712010-04-24 17:59:49 +000013072 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000013073fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013074rm -f core conftest.err conftest.$ac_objext \
13075 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013076fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013077{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13078$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000013079 if test $ac_cv_var_tzname = yes; then
13080
Matthias Kloseb9621712010-04-24 17:59:49 +000013081$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013082
13083 fi
13084fi
13085
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013086
Martin v. Löwis1d459062005-03-14 21:23:33 +000013087# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000013088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
13089$as_echo_n "checking for working tzset()... " >&6; }
13090if test "${ac_cv_working_tzset+set}" = set; then :
13091 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013092else
13093
Matthias Kloseb9621712010-04-24 17:59:49 +000013094if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013095 ac_cv_working_tzset=no
13096else
Matthias Kloseb9621712010-04-24 17:59:49 +000013097 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013098/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013099
13100#include <stdlib.h>
13101#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000013102#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000013103
13104#if HAVE_TZNAME
13105extern char *tzname[];
13106#endif
13107
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013108int main()
13109{
Brett Cannon18367812003-09-19 00:59:16 +000013110 /* Note that we need to ensure that not only does tzset(3)
13111 do 'something' with localtime, but it works as documented
13112 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000013113 This includes making sure that tzname is set properly if
13114 tm->tm_zone does not exist since it is the alternative way
13115 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000013116
13117 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000013118 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000013119 */
13120
Martin v. Löwis1d459062005-03-14 21:23:33 +000013121 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000013122 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
13123
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013124 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013125 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013126 if (localtime(&groundhogday)->tm_hour != 0)
13127 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013128#if HAVE_TZNAME
13129 /* For UTC, tzname[1] is sometimes "", sometimes " " */
13130 if (strcmp(tzname[0], "UTC") ||
13131 (tzname[1][0] != 0 && tzname[1][0] != ' '))
13132 exit(1);
13133#endif
Brett Cannon18367812003-09-19 00:59:16 +000013134
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013135 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013136 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013137 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013138 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013139#if HAVE_TZNAME
13140 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
13141 exit(1);
13142#endif
Brett Cannon18367812003-09-19 00:59:16 +000013143
13144 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
13145 tzset();
13146 if (localtime(&groundhogday)->tm_hour != 11)
13147 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013148#if HAVE_TZNAME
13149 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
13150 exit(1);
13151#endif
13152
13153#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000013154 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
13155 exit(1);
13156 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
13157 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013158#endif
Brett Cannon18367812003-09-19 00:59:16 +000013159
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013160 exit(0);
13161}
13162
13163_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013164if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013165 ac_cv_working_tzset=yes
13166else
Matthias Kloseb9621712010-04-24 17:59:49 +000013167 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013168fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013169rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13170 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013171fi
13172
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013173fi
13174
Matthias Kloseb9621712010-04-24 17:59:49 +000013175{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
13176$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013177if test "$ac_cv_working_tzset" = yes
13178then
13179
Matthias Kloseb9621712010-04-24 17:59:49 +000013180$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013181
13182fi
13183
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013184# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
13186$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
13187if test "${ac_cv_stat_tv_nsec+set}" = set; then :
13188 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013189else
Matthias Kloseb9621712010-04-24 17:59:49 +000013190 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013191/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013192#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013193int
13194main ()
13195{
13196
13197struct stat st;
13198st.st_mtim.tv_nsec = 1;
13199
13200 ;
13201 return 0;
13202}
13203_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013204if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000013205 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013206else
Matthias Kloseb9621712010-04-24 17:59:49 +000013207 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013208fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013209rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13210fi
13211
Matthias Kloseb9621712010-04-24 17:59:49 +000013212{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
13213$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013214if test "$ac_cv_stat_tv_nsec" = yes
13215then
13216
Matthias Kloseb9621712010-04-24 17:59:49 +000013217$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013218
13219fi
13220
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013221# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
13223$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
13224if test "${ac_cv_stat_tv_nsec2+set}" = set; then :
13225 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013226else
Matthias Kloseb9621712010-04-24 17:59:49 +000013227 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013228/* end confdefs.h. */
13229#include <sys/stat.h>
13230int
13231main ()
13232{
13233
13234struct stat st;
13235st.st_mtimespec.tv_nsec = 1;
13236
13237 ;
13238 return 0;
13239}
13240_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013241if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013242 ac_cv_stat_tv_nsec2=yes
13243else
Matthias Kloseb9621712010-04-24 17:59:49 +000013244 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013245fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013246rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13247fi
13248
Matthias Kloseb9621712010-04-24 17:59:49 +000013249{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
13250$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013251if test "$ac_cv_stat_tv_nsec2" = yes
13252then
13253
Matthias Kloseb9621712010-04-24 17:59:49 +000013254$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013255
13256fi
13257
Jack Jansen666b1e72001-10-31 12:11:48 +000013258# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000013259{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
13260$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
13261if test "${ac_cv_mvwdelch_is_expression+set}" = set; then :
13262 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013263else
Matthias Kloseb9621712010-04-24 17:59:49 +000013264 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013265/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013266#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013267int
13268main ()
13269{
Jack Jansen666b1e72001-10-31 12:11:48 +000013270
13271 int rtn;
13272 rtn = mvwdelch(0,0,0);
13273
Martin v. Löwis11437992002-04-12 09:54:03 +000013274 ;
13275 return 0;
13276}
13277_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013278if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013279 ac_cv_mvwdelch_is_expression=yes
13280else
Matthias Kloseb9621712010-04-24 17:59:49 +000013281 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013282fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013283rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13284fi
13285
Matthias Kloseb9621712010-04-24 17:59:49 +000013286{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
13287$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000013288
13289if test "$ac_cv_mvwdelch_is_expression" = yes
13290then
Martin v. Löwis11437992002-04-12 09:54:03 +000013291
Matthias Kloseb9621712010-04-24 17:59:49 +000013292$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013293
13294fi
13295
Matthias Kloseb9621712010-04-24 17:59:49 +000013296{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
13297$as_echo_n "checking whether WINDOW has _flags... " >&6; }
13298if test "${ac_cv_window_has_flags+set}" = set; then :
13299 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013300else
Matthias Kloseb9621712010-04-24 17:59:49 +000013301 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013302/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013303#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013304int
13305main ()
13306{
Jack Jansen666b1e72001-10-31 12:11:48 +000013307
13308 WINDOW *w;
13309 w->_flags = 0;
13310
Martin v. Löwis11437992002-04-12 09:54:03 +000013311 ;
13312 return 0;
13313}
13314_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013315if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013316 ac_cv_window_has_flags=yes
13317else
Matthias Kloseb9621712010-04-24 17:59:49 +000013318 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013319fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013320rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13321fi
13322
Matthias Kloseb9621712010-04-24 17:59:49 +000013323{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
13324$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013325
Jack Jansen666b1e72001-10-31 12:11:48 +000013326
13327if test "$ac_cv_window_has_flags" = yes
13328then
Martin v. Löwis11437992002-04-12 09:54:03 +000013329
Matthias Kloseb9621712010-04-24 17:59:49 +000013330$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013331
13332fi
13333
Matthias Kloseb9621712010-04-24 17:59:49 +000013334{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
13335$as_echo_n "checking for is_term_resized... " >&6; }
13336cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013337/* end confdefs.h. */
13338#include <curses.h>
13339int
13340main ()
13341{
13342void *x=is_term_resized
13343 ;
13344 return 0;
13345}
13346_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013347if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013348
Matthias Kloseb9621712010-04-24 17:59:49 +000013349$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013350
Matthias Kloseb159a552010-04-25 21:00:44 +000013351 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013352$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013353else
Matthias Kloseb9621712010-04-24 17:59:49 +000013354 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13355$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013356
13357fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013358rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13359
Matthias Kloseb9621712010-04-24 17:59:49 +000013360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
13361$as_echo_n "checking for resize_term... " >&6; }
13362cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013363/* end confdefs.h. */
13364#include <curses.h>
13365int
13366main ()
13367{
13368void *x=resize_term
13369 ;
13370 return 0;
13371}
13372_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013373if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013374
Matthias Kloseb9621712010-04-24 17:59:49 +000013375$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013376
Matthias Kloseb159a552010-04-25 21:00:44 +000013377 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013378$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013379else
Matthias Kloseb9621712010-04-24 17:59:49 +000013380 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13381$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013382
13383fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013384rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13385
Matthias Kloseb9621712010-04-24 17:59:49 +000013386{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
13387$as_echo_n "checking for resizeterm... " >&6; }
13388cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013389/* end confdefs.h. */
13390#include <curses.h>
13391int
13392main ()
13393{
13394void *x=resizeterm
13395 ;
13396 return 0;
13397}
13398_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013399if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013400
Matthias Kloseb9621712010-04-24 17:59:49 +000013401$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013402
Matthias Kloseb159a552010-04-25 21:00:44 +000013403 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013404$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013405else
Matthias Kloseb9621712010-04-24 17:59:49 +000013406 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13407$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013408
13409fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013410rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13411
Matthias Kloseb9621712010-04-24 17:59:49 +000013412{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
13413$as_echo_n "checking for /dev/ptmx... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013414
13415if test -r /dev/ptmx
13416then
Matthias Kloseb9621712010-04-24 17:59:49 +000013417 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13418$as_echo "yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013419
Matthias Kloseb9621712010-04-24 17:59:49 +000013420$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013421
Thomas Wouters89f507f2006-12-13 04:49:30 +000013422else
Matthias Kloseb9621712010-04-24 17:59:49 +000013423 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13424$as_echo "no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013425fi
13426
Matthias Kloseb9621712010-04-24 17:59:49 +000013427{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
13428$as_echo_n "checking for /dev/ptc... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013429
13430if test -r /dev/ptc
13431then
Matthias Kloseb9621712010-04-24 17:59:49 +000013432 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13433$as_echo "yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013434
Matthias Kloseb9621712010-04-24 17:59:49 +000013435$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000013436
Thomas Wouters89f507f2006-12-13 04:49:30 +000013437else
Matthias Kloseb9621712010-04-24 17:59:49 +000013438 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13439$as_echo "no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013440fi
13441
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013442if test "$have_long_long" = yes
13443then
Matthias Kloseb9621712010-04-24 17:59:49 +000013444 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
13445$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
13446 if test "${ac_cv_have_long_long_format+set}" = set; then :
13447 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013448else
Matthias Kloseb9621712010-04-24 17:59:49 +000013449 if test "$cross_compiling" = yes; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013450 ac_cv_have_long_long_format=no
13451else
Matthias Kloseb9621712010-04-24 17:59:49 +000013452 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013453/* end confdefs.h. */
13454
13455 #include <stdio.h>
13456 #include <stddef.h>
13457 #include <string.h>
13458
13459 #ifdef HAVE_SYS_TYPES_H
13460 #include <sys/types.h>
13461 #endif
13462
13463 int main()
13464 {
13465 char buffer[256];
13466
13467 if (sprintf(buffer, "%lld", (long long)123) < 0)
13468 return 1;
13469 if (strcmp(buffer, "123"))
13470 return 1;
13471
13472 if (sprintf(buffer, "%lld", (long long)-123) < 0)
13473 return 1;
13474 if (strcmp(buffer, "-123"))
13475 return 1;
13476
13477 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
13478 return 1;
13479 if (strcmp(buffer, "123"))
13480 return 1;
13481
13482 return 0;
13483 }
13484
13485_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013486if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013487 ac_cv_have_long_long_format=yes
13488else
Matthias Kloseb9621712010-04-24 17:59:49 +000013489 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013490fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013491rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13492 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013493fi
13494
13495
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013496fi
13497
Matthias Kloseb9621712010-04-24 17:59:49 +000013498 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
13499$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013500fi
13501
Mark Dickinson89d7d412009-12-31 20:50:59 +000013502if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013503then
13504
Matthias Kloseb9621712010-04-24 17:59:49 +000013505$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013506
13507fi
13508
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000013509if test $ac_sys_system = Darwin
13510then
13511 LIBS="$LIBS -framework CoreFoundation"
13512fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013513
Matthias Kloseb9621712010-04-24 17:59:49 +000013514{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
13515$as_echo_n "checking for %zd printf() format support... " >&6; }
13516if test "${ac_cv_have_size_t_format+set}" = set; then :
13517 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013518else
Matthias Kloseb9621712010-04-24 17:59:49 +000013519 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000013520 ac_cv_have_size_t_format="cross -- assuming yes"
13521
Thomas Wouters477c8d52006-05-27 19:21:47 +000013522else
Matthias Kloseb9621712010-04-24 17:59:49 +000013523 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000013524/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013525
Thomas Wouters477c8d52006-05-27 19:21:47 +000013526#include <stdio.h>
13527#include <stddef.h>
13528#include <string.h>
13529
Christian Heimes2c181612007-12-17 20:04:13 +000013530#ifdef HAVE_SYS_TYPES_H
13531#include <sys/types.h>
13532#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000013533
13534#ifdef HAVE_SSIZE_T
13535typedef ssize_t Py_ssize_t;
13536#elif SIZEOF_VOID_P == SIZEOF_LONG
13537typedef long Py_ssize_t;
13538#else
13539typedef int Py_ssize_t;
13540#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000013541
Christian Heimes2c181612007-12-17 20:04:13 +000013542int main()
13543{
13544 char buffer[256];
13545
Thomas Wouters477c8d52006-05-27 19:21:47 +000013546 if(sprintf(buffer, "%zd", (size_t)123) < 0)
13547 return 1;
13548
Thomas Wouters89f507f2006-12-13 04:49:30 +000013549 if (strcmp(buffer, "123"))
13550 return 1;
13551
13552 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
13553 return 1;
13554
13555 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000013556 return 1;
13557
13558 return 0;
13559}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013560
Thomas Wouters477c8d52006-05-27 19:21:47 +000013561_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013562if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013563 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013564else
Matthias Kloseb9621712010-04-24 17:59:49 +000013565 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013566fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013567rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13568 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013569fi
13570
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013571fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013572{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
13573$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000013574if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013575
Matthias Kloseb9621712010-04-24 17:59:49 +000013576$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013577
13578fi
13579
Matthias Kloseb9621712010-04-24 17:59:49 +000013580ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000013581#ifdef HAVE_SYS_TYPES_H
13582#include <sys/types.h>
13583#endif
13584#ifdef HAVE_SYS_SOCKET_H
13585#include <sys/socket.h>
13586#endif
13587
Matthias Kloseb9621712010-04-24 17:59:49 +000013588"
13589if test "x$ac_cv_type_socklen_t" = x""yes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000013590
Martin v. Löwis11437992002-04-12 09:54:03 +000013591else
Guido van Rossum95713eb2000-05-18 20:53:31 +000013592
Matthias Kloseb9621712010-04-24 17:59:49 +000013593$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000013594
13595fi
13596
Michael W. Hudson54241132001-12-07 15:38:26 +000013597
Matthias Kloseb9621712010-04-24 17:59:49 +000013598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
13599$as_echo_n "checking for broken mbstowcs... " >&6; }
13600if test "${ac_cv_broken_mbstowcs+set}" = set; then :
13601 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013602else
Matthias Kloseb9621712010-04-24 17:59:49 +000013603 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000013604 ac_cv_broken_mbstowcs=no
13605else
Matthias Kloseb9621712010-04-24 17:59:49 +000013606 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000013607/* end confdefs.h. */
13608
13609#include<stdlib.h>
13610int main() {
13611 size_t len = -1;
13612 const char *str = "text";
13613 len = mbstowcs(NULL, str, 0);
13614 return (len != 4);
13615}
13616
13617_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013618if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000013619 ac_cv_broken_mbstowcs=no
13620else
Matthias Kloseb9621712010-04-24 17:59:49 +000013621 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000013622fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013623rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13624 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000013625fi
13626
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013627fi
13628
Matthias Kloseb9621712010-04-24 17:59:49 +000013629{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
13630$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000013631if test "$ac_cv_broken_mbstowcs" = yes
13632then
13633
Matthias Kloseb9621712010-04-24 17:59:49 +000013634$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000013635
13636fi
13637
Antoine Pitrou042b1282010-08-13 21:15:58 +000013638{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
13639$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
13640if test "${ac_cv_computed_gotos+set}" = set; then :
13641 $as_echo_n "(cached) " >&6
13642else
13643 if test "$cross_compiling" = yes; then :
13644 ac_cv_computed_gotos=no
13645else
13646 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13647/* end confdefs.h. */
13648
13649int main(int argc, char **argv)
13650{
13651 static void *targets[1] = { &&LABEL1 };
13652 goto LABEL2;
13653LABEL1:
13654 return 0;
13655LABEL2:
13656 goto *targets[0];
13657 return 1;
13658}
13659
13660_ACEOF
13661if ac_fn_c_try_run "$LINENO"; then :
13662 ac_cv_computed_gotos=yes
13663else
13664 ac_cv_computed_gotos=no
13665fi
13666rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13667 conftest.$ac_objext conftest.beam conftest.$ac_ext
13668fi
13669
13670fi
13671
13672{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
13673$as_echo "$ac_cv_computed_gotos" >&6; }
13674if test "$ac_cv_computed_gotos" = yes
13675then
13676
13677$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
13678
13679fi
13680
Antoine Pitroub52ec782009-01-25 16:34:23 +000013681# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000013682{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
13683$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013684
13685# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013686if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000013687 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000013688if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000013689then
13690
Matthias Kloseb9621712010-04-24 17:59:49 +000013691$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000013692
Matthias Kloseb9621712010-04-24 17:59:49 +000013693 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13694$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013695fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000013696if test "$withval" = no
13697then
13698
13699$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
13700
Matthias Kloseb9621712010-04-24 17:59:49 +000013701 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13702$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013703fi
13704
Antoine Pitrou042b1282010-08-13 21:15:58 +000013705else
13706 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
13707$as_echo "no value specified" >&6; }
13708fi
13709
Antoine Pitroub52ec782009-01-25 16:34:23 +000013710
13711
Michael W. Hudson54241132001-12-07 15:38:26 +000013712
Jesus Cea6a792292010-05-03 21:18:48 +000013713case $ac_sys_system in
Benjamin Petersond7f73e92010-09-05 00:09:07 +000013714 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 +000013715esac
13716
13717
13718
Mark Dickinsonb2153e92010-05-05 22:31:36 +000013719
13720
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000013721for h in `(cd $srcdir;echo Python/thread_*.h)`
13722do
13723 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
13724done
13725
Michael W. Hudson54241132001-12-07 15:38:26 +000013726
Neal Norwitzd24499d2005-12-18 21:36:39 +000013727SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Kloseb9621712010-04-24 17:59:49 +000013728{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
13729$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013730for dir in $SRCDIRS; do
13731 if test ! -d $dir; then
13732 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000013733 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013734done
Matthias Kloseb9621712010-04-24 17:59:49 +000013735{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
13736$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000013737
Guido van Rossum627b2d71993-12-24 10:39:16 +000013738# generate output files
Antoine Pitrou20327222009-05-24 20:39:11 +000013739ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000013740
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000013741ac_config_files="$ac_config_files Modules/ld_so_aix"
13742
Martin v. Löwis11437992002-04-12 09:54:03 +000013743cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013744# This file is a shell script that caches the results of configure
13745# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000013746# scripts and configure runs, see configure's option --config-cache.
13747# It is not useful on other systems. If it contains results you don't
13748# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013749#
Martin v. Löwis11437992002-04-12 09:54:03 +000013750# config.status only pays attention to the cache file if you give it
13751# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013752#
Skip Montanaro6dead952003-09-25 14:50:04 +000013753# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000013754# loading this file, other *unset* `ac_cv_foo' will be assigned the
13755# following values.
13756
13757_ACEOF
13758
Guido van Rossumf78abae1997-01-21 22:02:36 +000013759# The following way of writing the cache mishandles newlines in values,
13760# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013761# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013762# Ultrix sh set writes to stderr and can't be redirected directly,
13763# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013764(
13765 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
13766 eval ac_val=\$$ac_var
13767 case $ac_val in #(
13768 *${as_nl}*)
13769 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000013770 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
13771$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013772 esac
13773 case $ac_var in #(
13774 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000013775 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
13776 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013777 esac ;;
13778 esac
13779 done
13780
Martin v. Löwis11437992002-04-12 09:54:03 +000013781 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013782 case $as_nl`(ac_space=' '; set) 2>&1` in #(
13783 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000013784 # `set' does not quote correctly, so add quotes: double-quote
13785 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000013786 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013787 "s/'/'\\\\''/g;
13788 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013789 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000013790 *)
13791 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013792 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000013793 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013794 esac |
13795 sort
13796) |
Martin v. Löwis11437992002-04-12 09:54:03 +000013797 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013798 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000013799 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013800 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000013801 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
13802 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013803 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
13804 :end' >>confcache
13805if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
13806 if test -w "$cache_file"; then
13807 test "x$cache_file" != "x/dev/null" &&
Matthias Kloseb9621712010-04-24 17:59:49 +000013808 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
13809$as_echo "$as_me: updating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000013810 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013811 else
Matthias Kloseb9621712010-04-24 17:59:49 +000013812 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
13813$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013814 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013815fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013816rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000013817
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013818test "x$prefix" = xNONE && prefix=$ac_default_prefix
13819# Let make expand exec_prefix.
13820test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000013821
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013822DEFS=-DHAVE_CONFIG_H
13823
Skip Montanaro6dead952003-09-25 14:50:04 +000013824ac_libobjs=
13825ac_ltlibobjs=
13826for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
13827 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013828 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000013829 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013830 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
13831 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000013832 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
13833 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000013834done
13835LIBOBJS=$ac_libobjs
13836
13837LTLIBOBJS=$ac_ltlibobjs
13838
13839
Martin v. Löwis11437992002-04-12 09:54:03 +000013840
Matthias Kloseb9621712010-04-24 17:59:49 +000013841
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013842: ${CONFIG_STATUS=./config.status}
Matthias Kloseb9621712010-04-24 17:59:49 +000013843ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000013844ac_clean_files_save=$ac_clean_files
13845ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013846{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
13847$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
13848as_write_fail=0
13849cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000013850#! $SHELL
13851# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000013852# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013853# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000013854# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000013855
Martin v. Löwis11437992002-04-12 09:54:03 +000013856debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000013857ac_cs_recheck=false
13858ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000013859
Matthias Kloseb9621712010-04-24 17:59:49 +000013860SHELL=\${CONFIG_SHELL-$SHELL}
13861export SHELL
13862_ASEOF
13863cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
13864## -------------------- ##
13865## M4sh Initialization. ##
13866## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000013867
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013868# Be more Bourne compatible
13869DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000013870if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013871 emulate sh
13872 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000013873 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000013874 # is contrary to our usage. Disable this feature.
13875 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013876 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013877else
Matthias Kloseb9621712010-04-24 17:59:49 +000013878 case `(set -o) 2>/dev/null` in #(
13879 *posix*) :
13880 set -o posix ;; #(
13881 *) :
13882 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013883esac
Michael W. Hudson54241132001-12-07 15:38:26 +000013884fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000013885
13886
Matthias Kloseb9621712010-04-24 17:59:49 +000013887as_nl='
13888'
13889export as_nl
13890# Printing a long string crashes Solaris 7 /usr/bin/printf.
13891as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
13892as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
13893as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
13894# Prefer a ksh shell builtin over an external printf program on Solaris,
13895# but without wasting forks for bash or zsh.
13896if test -z "$BASH_VERSION$ZSH_VERSION" \
13897 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
13898 as_echo='print -r --'
13899 as_echo_n='print -rn --'
13900elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
13901 as_echo='printf %s\n'
13902 as_echo_n='printf %s'
13903else
13904 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
13905 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
13906 as_echo_n='/usr/ucb/echo -n'
13907 else
13908 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
13909 as_echo_n_body='eval
13910 arg=$1;
13911 case $arg in #(
13912 *"$as_nl"*)
13913 expr "X$arg" : "X\\(.*\\)$as_nl";
13914 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
13915 esac;
13916 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
13917 '
13918 export as_echo_n_body
13919 as_echo_n='sh -c $as_echo_n_body as_echo'
13920 fi
13921 export as_echo_body
13922 as_echo='sh -c $as_echo_body as_echo'
13923fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013924
13925# The user is always right.
13926if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013927 PATH_SEPARATOR=:
13928 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
13929 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
13930 PATH_SEPARATOR=';'
13931 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013932fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013933
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013934
13935# IFS
13936# We need space, tab and new line, in precisely that order. Quoting is
13937# there to prevent editors from complaining about space-tab.
13938# (If _AS_PATH_WALK were called with IFS unset, it would disable word
13939# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013940IFS=" "" $as_nl"
13941
13942# Find who we are. Look in the path if we contain no directory separator.
Matthias Kloseb9621712010-04-24 17:59:49 +000013943case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013944 *[\\/]* ) as_myself=$0 ;;
13945 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000013946for as_dir in $PATH
13947do
13948 IFS=$as_save_IFS
13949 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000013950 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
13951 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013952IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000013953
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013954 ;;
13955esac
13956# We did not find ourselves, most probably we were run as `sh COMMAND'
13957# in which case we are not to be found in the path.
13958if test "x$as_myself" = x; then
13959 as_myself=$0
13960fi
13961if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013962 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
13963 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013964fi
13965
Matthias Kloseb9621712010-04-24 17:59:49 +000013966# Unset variables that we do not need and which cause bugs (e.g. in
13967# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
13968# suppresses any "Segmentation fault" message there. '((' could
13969# trigger a bug in pdksh 5.2.14.
13970for as_var in BASH_ENV ENV MAIL MAILPATH
13971do eval test x\${$as_var+set} = xset \
13972 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013973done
13974PS1='$ '
13975PS2='> '
13976PS4='+ '
13977
13978# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000013979LC_ALL=C
13980export LC_ALL
13981LANGUAGE=C
13982export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013983
Matthias Kloseb9621712010-04-24 17:59:49 +000013984# CDPATH.
13985(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
13986
13987
Benjamin Petersond7f73e92010-09-05 00:09:07 +000013988# as_fn_error ERROR [LINENO LOG_FD]
13989# ---------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000013990# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
13991# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Benjamin Petersond7f73e92010-09-05 00:09:07 +000013992# script with status $?, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000013993as_fn_error ()
13994{
Benjamin Petersond7f73e92010-09-05 00:09:07 +000013995 as_status=$?; test $as_status -eq 0 && as_status=1
13996 if test "$3"; then
13997 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
13998 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
Matthias Kloseb9621712010-04-24 17:59:49 +000013999 fi
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014000 $as_echo "$as_me: error: $1" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000014001 as_fn_exit $as_status
14002} # as_fn_error
14003
14004
14005# as_fn_set_status STATUS
14006# -----------------------
14007# Set $? to STATUS, without forking.
14008as_fn_set_status ()
14009{
14010 return $1
14011} # as_fn_set_status
14012
14013# as_fn_exit STATUS
14014# -----------------
14015# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
14016as_fn_exit ()
14017{
14018 set +e
14019 as_fn_set_status $1
14020 exit $1
14021} # as_fn_exit
14022
14023# as_fn_unset VAR
14024# ---------------
14025# Portably unset VAR.
14026as_fn_unset ()
14027{
14028 { eval $1=; unset $1;}
14029}
14030as_unset=as_fn_unset
14031# as_fn_append VAR VALUE
14032# ----------------------
14033# Append the text in VALUE to the end of the definition contained in VAR. Take
14034# advantage of any shell optimizations that allow amortized linear growth over
14035# repeated appends, instead of the typical quadratic growth present in naive
14036# implementations.
14037if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
14038 eval 'as_fn_append ()
14039 {
14040 eval $1+=\$2
14041 }'
14042else
14043 as_fn_append ()
14044 {
14045 eval $1=\$$1\$2
14046 }
14047fi # as_fn_append
14048
14049# as_fn_arith ARG...
14050# ------------------
14051# Perform arithmetic evaluation on the ARGs, and store the result in the
14052# global $as_val. Take advantage of shells that can avoid forks. The arguments
14053# must be portable across $(()) and expr.
14054if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
14055 eval 'as_fn_arith ()
14056 {
14057 as_val=$(( $* ))
14058 }'
14059else
14060 as_fn_arith ()
14061 {
14062 as_val=`expr "$@" || test $? -eq 1`
14063 }
14064fi # as_fn_arith
14065
14066
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014067if expr a : '\(a\)' >/dev/null 2>&1 &&
14068 test "X`expr 00001 : '.*\(...\)'`" = X001; then
14069 as_expr=expr
14070else
14071 as_expr=false
14072fi
14073
14074if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
14075 as_basename=basename
14076else
14077 as_basename=false
14078fi
14079
Matthias Kloseb9621712010-04-24 17:59:49 +000014080if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
14081 as_dirname=dirname
14082else
14083 as_dirname=false
14084fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014085
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014086as_me=`$as_basename -- "$0" ||
14087$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
14088 X"$0" : 'X\(//\)$' \| \
14089 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014090$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014091 sed '/^.*\/\([^/][^/]*\)\/*$/{
14092 s//\1/
14093 q
14094 }
14095 /^X\/\(\/\/\)$/{
14096 s//\1/
14097 q
14098 }
14099 /^X\/\(\/\).*/{
14100 s//\1/
14101 q
14102 }
14103 s/.*/./; q'`
14104
Matthias Kloseb9621712010-04-24 17:59:49 +000014105# Avoid depending upon Character Ranges.
14106as_cr_letters='abcdefghijklmnopqrstuvwxyz'
14107as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14108as_cr_Letters=$as_cr_letters$as_cr_LETTERS
14109as_cr_digits='0123456789'
14110as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014111
14112ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000014113case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014114-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014115 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014116 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000014117 xy) ECHO_C='\c';;
14118 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
14119 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014120 esac;;
14121*)
14122 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000014123esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014124
Martin v. Löwis11437992002-04-12 09:54:03 +000014125rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014126if test -d conf$$.dir; then
14127 rm -f conf$$.dir/conf$$.file
14128else
14129 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000014130 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014131fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014132if (echo >conf$$.file) 2>/dev/null; then
14133 if ln -s conf$$.file conf$$ 2>/dev/null; then
14134 as_ln_s='ln -s'
14135 # ... but there are two gotchas:
14136 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
14137 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
14138 # In both cases, we have to default to `cp -p'.
14139 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
14140 as_ln_s='cp -p'
14141 elif ln conf$$.file conf$$ 2>/dev/null; then
14142 as_ln_s=ln
14143 else
Martin v. Löwis11437992002-04-12 09:54:03 +000014144 as_ln_s='cp -p'
Matthias Kloseb9621712010-04-24 17:59:49 +000014145 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014146else
14147 as_ln_s='cp -p'
14148fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014149rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
14150rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000014151
Matthias Kloseb9621712010-04-24 17:59:49 +000014152
14153# as_fn_mkdir_p
14154# -------------
14155# Create "$as_dir" as a directory, including parents if necessary.
14156as_fn_mkdir_p ()
14157{
14158
14159 case $as_dir in #(
14160 -*) as_dir=./$as_dir;;
14161 esac
14162 test -d "$as_dir" || eval $as_mkdir_p || {
14163 as_dirs=
14164 while :; do
14165 case $as_dir in #(
14166 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
14167 *) as_qdir=$as_dir;;
14168 esac
14169 as_dirs="'$as_qdir' $as_dirs"
14170 as_dir=`$as_dirname -- "$as_dir" ||
14171$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
14172 X"$as_dir" : 'X\(//\)[^/]' \| \
14173 X"$as_dir" : 'X\(//\)$' \| \
14174 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
14175$as_echo X"$as_dir" |
14176 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14177 s//\1/
14178 q
14179 }
14180 /^X\(\/\/\)[^/].*/{
14181 s//\1/
14182 q
14183 }
14184 /^X\(\/\/\)$/{
14185 s//\1/
14186 q
14187 }
14188 /^X\(\/\).*/{
14189 s//\1/
14190 q
14191 }
14192 s/.*/./; q'`
14193 test -d "$as_dir" && break
14194 done
14195 test -z "$as_dirs" || eval "mkdir $as_dirs"
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014196 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000014197
14198
14199} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000014200if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014201 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000014202else
Skip Montanarof0d5f792004-08-15 14:08:23 +000014203 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000014204 as_mkdir_p=false
14205fi
14206
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014207if test -x / >/dev/null 2>&1; then
14208 as_test_x='test -x'
14209else
14210 if ls -dL / >/dev/null 2>&1; then
14211 as_ls_L_option=L
14212 else
14213 as_ls_L_option=
14214 fi
14215 as_test_x='
14216 eval sh -c '\''
14217 if test -d "$1"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014218 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014219 else
Matthias Kloseb9621712010-04-24 17:59:49 +000014220 case $1 in #(
14221 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014222 esac;
Matthias Kloseb9621712010-04-24 17:59:49 +000014223 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014224 ???[sx]*):;;*)false;;esac;fi
14225 '\'' sh
14226 '
14227fi
14228as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000014229
14230# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014231as_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 +000014232
14233# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014234as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014235
14236
Martin v. Löwis11437992002-04-12 09:54:03 +000014237exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000014238## ----------------------------------- ##
14239## Main body of $CONFIG_STATUS script. ##
14240## ----------------------------------- ##
14241_ASEOF
14242test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014243
Matthias Kloseb9621712010-04-24 17:59:49 +000014244cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14245# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000014246# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014247# values after options handling.
14248ac_log="
Benjamin Peterson46ea4f72009-06-27 21:40:27 +000014249This file was extended by python $as_me 3.2, which was
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014250generated by GNU Autoconf 2.65. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000014251
14252 CONFIG_FILES = $CONFIG_FILES
14253 CONFIG_HEADERS = $CONFIG_HEADERS
14254 CONFIG_LINKS = $CONFIG_LINKS
14255 CONFIG_COMMANDS = $CONFIG_COMMANDS
14256 $ $0 $@
14257
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014258on `(hostname || uname -n) 2>/dev/null | sed 1q`
14259"
14260
Martin v. Löwis11437992002-04-12 09:54:03 +000014261_ACEOF
14262
Matthias Kloseb9621712010-04-24 17:59:49 +000014263case $ac_config_files in *"
14264"*) set x $ac_config_files; shift; ac_config_files=$*;;
14265esac
14266
14267case $ac_config_headers in *"
14268"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
14269esac
14270
14271
14272cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014273# Files that config.status was made for.
Antoine Pitroua3000072010-09-07 14:52:42 +000014274config_files="`echo $ac_config_files`"
14275config_headers="`echo $ac_config_headers`"
Martin v. Löwis11437992002-04-12 09:54:03 +000014276
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014277_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014278
Matthias Kloseb9621712010-04-24 17:59:49 +000014279cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014280ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000014281\`$as_me' instantiates files and other configuration actions
14282from templates according to the current configuration. Unless the files
14283and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000014284
Matthias Kloseb9621712010-04-24 17:59:49 +000014285Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000014286
14287 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014288 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000014289 --config print configuration, then exit
14290 -q, --quiet, --silent
14291 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000014292 -d, --debug don't remove temporary files
14293 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000014294 --file=FILE[:TEMPLATE]
14295 instantiate the configuration file FILE
14296 --header=FILE[:TEMPLATE]
14297 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000014298
14299Configuration files:
14300$config_files
14301
14302Configuration headers:
14303$config_headers
14304
Matthias Kloseb9621712010-04-24 17:59:49 +000014305Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014306
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014307_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014308cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14309ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000014310ac_cs_version="\\
Benjamin Peterson46ea4f72009-06-27 21:40:27 +000014311python config.status 3.2
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014312configured by $0, generated by GNU Autoconf 2.65,
Matthias Kloseb9621712010-04-24 17:59:49 +000014313 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000014314
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014315Copyright (C) 2009 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000014316This config.status script is free software; the Free Software Foundation
14317gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014318
14319ac_pwd='$ac_pwd'
14320srcdir='$srcdir'
14321INSTALL='$INSTALL'
Matthias Kloseb9621712010-04-24 17:59:49 +000014322test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000014323_ACEOF
14324
Matthias Kloseb9621712010-04-24 17:59:49 +000014325cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14326# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000014327ac_need_defaults=:
14328while test $# != 0
14329do
14330 case $1 in
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014331 --*=*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014332 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14333 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000014334 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000014335 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014336 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000014337 ac_option=$1
14338 ac_optarg=$2
14339 ac_shift=shift
14340 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014341 esac
14342
Skip Montanaro6dead952003-09-25 14:50:04 +000014343 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000014344 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000014345 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14346 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014347 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000014348 $as_echo "$ac_cs_version"; exit ;;
14349 --config | --confi | --conf | --con | --co | --c )
14350 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014351 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000014352 debug=: ;;
14353 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000014354 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014355 case $ac_optarg in
14356 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14357 esac
14358 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014359 ac_need_defaults=false;;
14360 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000014361 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014362 case $ac_optarg in
14363 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14364 esac
14365 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014366 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014367 --he | --h)
14368 # Conflict between --help and --header
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014369 as_fn_error "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000014370Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014371 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000014372 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000014373 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
14374 | -silent | --silent | --silen | --sile | --sil | --si | --s)
14375 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014376
14377 # This is an error.
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014378 -*) as_fn_error "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000014379Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014380
Matthias Kloseb9621712010-04-24 17:59:49 +000014381 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014382 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014383
14384 esac
14385 shift
14386done
14387
Skip Montanaro6dead952003-09-25 14:50:04 +000014388ac_configure_extra_args=
14389
14390if $ac_cs_silent; then
14391 exec 6>/dev/null
14392 ac_configure_extra_args="$ac_configure_extra_args --silent"
14393fi
14394
14395_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014396cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000014397if \$ac_cs_recheck; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014398 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
14399 shift
14400 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
14401 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014402 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000014403 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000014404fi
14405
Martin v. Löwis11437992002-04-12 09:54:03 +000014406_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014407cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014408exec 5>>config.log
14409{
14410 echo
14411 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
14412## Running $as_me. ##
14413_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000014414 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014415} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014416
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014417_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014418cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014419_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014420
Matthias Kloseb9621712010-04-24 17:59:49 +000014421cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014422
14423# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000014424for ac_config_target in $ac_config_targets
14425do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014426 case $ac_config_target in
14427 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
14428 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
14429 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014430 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
14431 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014432 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
14433 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000014434 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000014435 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014436
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014437 *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014438 esac
14439done
14440
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014441
Martin v. Löwis11437992002-04-12 09:54:03 +000014442# If the user did not use the arguments to specify the items to instantiate,
14443# then the envvar interface is used. Set only those that are not.
14444# We use the long form for the default assignment because of an extremely
14445# bizarre bug on SunOS 4.1.3.
14446if $ac_need_defaults; then
14447 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
14448 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
14449fi
14450
Skip Montanaro6dead952003-09-25 14:50:04 +000014451# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014452# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000014453# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014454# Hook for its removal unless debugging.
14455# Note that there is a small window in which the directory will not be cleaned:
14456# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000014457$debug ||
14458{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014459 tmp=
14460 trap 'exit_status=$?
14461 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
14462' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000014463 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000014464}
Martin v. Löwis11437992002-04-12 09:54:03 +000014465# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000014466
Martin v. Löwis11437992002-04-12 09:54:03 +000014467{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014468 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000014469 test -n "$tmp" && test -d "$tmp"
14470} ||
14471{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014472 tmp=./conf$$-$RANDOM
14473 (umask 077 && mkdir "$tmp")
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014474} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000014475
Matthias Kloseb9621712010-04-24 17:59:49 +000014476# Set up the scripts for CONFIG_FILES section.
14477# No need to generate them if there are no CONFIG_FILES.
14478# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014479if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014480
Matthias Kloseb9621712010-04-24 17:59:49 +000014481
14482ac_cr=`echo X | tr X '\015'`
14483# On cygwin, bash can eat \r inside `` if the user requested igncr.
14484# But we know of no other shell where ac_cr would be empty at this
14485# point, so we can use a bashism as a fallback.
14486if test "x$ac_cr" = x; then
14487 eval ac_cr=\$\'\\r\'
14488fi
14489ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
14490if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014491 ac_cs_awk_cr='\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000014492else
14493 ac_cs_awk_cr=$ac_cr
14494fi
14495
14496echo 'BEGIN {' >"$tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000014497_ACEOF
14498
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014499
Matthias Kloseb9621712010-04-24 17:59:49 +000014500{
14501 echo "cat >conf$$subs.awk <<_ACEOF" &&
14502 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
14503 echo "_ACEOF"
14504} >conf$$subs.sh ||
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014505 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
14506ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014507ac_delim='%!_!# '
14508for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000014509 . ./conf$$subs.sh ||
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014510 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014511
Matthias Kloseb9621712010-04-24 17:59:49 +000014512 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
14513 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014514 break
14515 elif $ac_last_try; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014516 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014517 else
14518 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000014519 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014520done
Matthias Kloseb9621712010-04-24 17:59:49 +000014521rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014522
Matthias Kloseb9621712010-04-24 17:59:49 +000014523cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14524cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014525_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014526sed -n '
14527h
14528s/^/S["/; s/!.*/"]=/
14529p
14530g
14531s/^[^!]*!//
14532:repl
14533t repl
14534s/'"$ac_delim"'$//
14535t delim
14536:nl
14537h
14538s/\(.\{148\}\)..*/\1/
14539t more1
14540s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
14541p
14542n
14543b repl
14544:more1
14545s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14546p
14547g
14548s/.\{148\}//
14549t nl
14550:delim
14551h
14552s/\(.\{148\}\)..*/\1/
14553t more2
14554s/["\\]/\\&/g; s/^/"/; s/$/"/
14555p
14556b
14557:more2
14558s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14559p
14560g
14561s/.\{148\}//
14562t delim
14563' <conf$$subs.awk | sed '
14564/^[^""]/{
14565 N
14566 s/\n//
14567}
14568' >>$CONFIG_STATUS || ac_write_fail=1
14569rm -f conf$$subs.awk
14570cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14571_ACAWK
14572cat >>"\$tmp/subs1.awk" <<_ACAWK &&
14573 for (key in S) S_is_set[key] = 1
14574 FS = ""
14575
14576}
14577{
14578 line = $ 0
14579 nfields = split(line, field, "@")
14580 substed = 0
14581 len = length(field[1])
14582 for (i = 2; i < nfields; i++) {
14583 key = field[i]
14584 keylen = length(key)
14585 if (S_is_set[key]) {
14586 value = S[key]
14587 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
14588 len += length(value) + length(field[++i])
14589 substed = 1
14590 } else
14591 len += 1 + keylen
14592 }
14593
14594 print line
14595}
14596
14597_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014598_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014599cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14600if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
14601 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
14602else
14603 cat
14604fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014605 || as_fn_error "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014606_ACEOF
14607
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014608# VPATH may cause trouble with some makes, so we remove $(srcdir),
14609# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014610# trailing colons and then remove the whole line if VPATH becomes empty
14611# (actually we leave an empty line to preserve line numbers).
14612if test "x$srcdir" = x.; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014613 ac_vpsub='/^[ ]*VPATH[ ]*=/{
14614s/:*\$(srcdir):*/:/
14615s/:*\${srcdir}:*/:/
14616s/:*@srcdir@:*/:/
14617s/^\([^=]*=[ ]*\):*/\1/
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014618s/:*$//
14619s/^[^=]*=[ ]*$//
14620}'
14621fi
14622
Matthias Kloseb9621712010-04-24 17:59:49 +000014623cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014624fi # test -n "$CONFIG_FILES"
14625
Matthias Kloseb9621712010-04-24 17:59:49 +000014626# Set up the scripts for CONFIG_HEADERS section.
14627# No need to generate them if there are no CONFIG_HEADERS.
14628# This happens for instance with `./config.status Makefile'.
14629if test -n "$CONFIG_HEADERS"; then
14630cat >"$tmp/defines.awk" <<\_ACAWK ||
14631BEGIN {
14632_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014633
Matthias Kloseb9621712010-04-24 17:59:49 +000014634# Transform confdefs.h into an awk script `defines.awk', embedded as
14635# here-document in config.status, that substitutes the proper values into
14636# config.h.in to produce config.h.
14637
14638# Create a delimiter string that does not exist in confdefs.h, to ease
14639# handling of long lines.
14640ac_delim='%!_!# '
14641for ac_last_try in false false :; do
14642 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
14643 if test -z "$ac_t"; then
14644 break
14645 elif $ac_last_try; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014646 as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000014647 else
14648 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
14649 fi
14650done
14651
14652# For the awk script, D is an array of macro values keyed by name,
14653# likewise P contains macro parameters if any. Preserve backslash
14654# newline sequences.
14655
14656ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
14657sed -n '
14658s/.\{148\}/&'"$ac_delim"'/g
14659t rset
14660:rset
14661s/^[ ]*#[ ]*define[ ][ ]*/ /
14662t def
14663d
14664:def
14665s/\\$//
14666t bsnl
14667s/["\\]/\\&/g
14668s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14669D["\1"]=" \3"/p
14670s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
14671d
14672:bsnl
14673s/["\\]/\\&/g
14674s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14675D["\1"]=" \3\\\\\\n"\\/p
14676t cont
14677s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
14678t cont
14679d
14680:cont
14681n
14682s/.\{148\}/&'"$ac_delim"'/g
14683t clear
14684:clear
14685s/\\$//
14686t bsnlc
14687s/["\\]/\\&/g; s/^/"/; s/$/"/p
14688d
14689:bsnlc
14690s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
14691b cont
14692' <confdefs.h | sed '
14693s/'"$ac_delim"'/"\\\
14694"/g' >>$CONFIG_STATUS || ac_write_fail=1
14695
14696cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14697 for (key in D) D_is_set[key] = 1
14698 FS = ""
14699}
14700/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
14701 line = \$ 0
14702 split(line, arg, " ")
14703 if (arg[1] == "#") {
14704 defundef = arg[2]
14705 mac1 = arg[3]
14706 } else {
14707 defundef = substr(arg[1], 2)
14708 mac1 = arg[2]
14709 }
14710 split(mac1, mac2, "(") #)
14711 macro = mac2[1]
14712 prefix = substr(line, 1, index(line, defundef) - 1)
14713 if (D_is_set[macro]) {
14714 # Preserve the white space surrounding the "#".
14715 print prefix "define", macro P[macro] D[macro]
14716 next
14717 } else {
14718 # Replace #undef with comments. This is necessary, for example,
14719 # in the case of _POSIX_SOURCE, which is predefined and required
14720 # on some systems where configure will not decide to define it.
14721 if (defundef == "undef") {
14722 print "/*", prefix defundef, macro, "*/"
14723 next
14724 }
14725 }
14726}
14727{ print }
14728_ACAWK
14729_ACEOF
14730cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014731 as_fn_error "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000014732fi # test -n "$CONFIG_HEADERS"
14733
14734
14735eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
14736shift
14737for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014738do
14739 case $ac_tag in
14740 :[FHLC]) ac_mode=$ac_tag; continue;;
14741 esac
14742 case $ac_mode$ac_tag in
14743 :[FHL]*:*);;
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014744 :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014745 :[FH]-) ac_tag=-:-;;
14746 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
14747 esac
14748 ac_save_IFS=$IFS
14749 IFS=:
14750 set x $ac_tag
14751 IFS=$ac_save_IFS
14752 shift
14753 ac_file=$1
14754 shift
14755
14756 case $ac_mode in
14757 :L) ac_source=$1;;
14758 :[FH])
14759 ac_file_inputs=
14760 for ac_f
14761 do
14762 case $ac_f in
14763 -) ac_f="$tmp/stdin";;
14764 *) # Look for the file first in the build tree, then in the source tree
14765 # (if the path is not absolute). The absolute path cannot be DOS-style,
14766 # because $ac_f cannot contain `:'.
14767 test -f "$ac_f" ||
14768 case $ac_f in
14769 [\\/$]*) false;;
14770 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
14771 esac ||
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014772 as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014773 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014774 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
14775 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014776 done
14777
14778 # Let's still pretend it is `configure' which instantiates (i.e., don't
14779 # use $as_me), people would be surprised to read:
14780 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014781 configure_input='Generated from '`
14782 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
14783 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014784 if test x"$ac_file" != x-; then
14785 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000014786 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
14787$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014788 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014789 # Neutralize special characters interpreted by sed in replacement strings.
14790 case $configure_input in #(
14791 *\&* | *\|* | *\\* )
14792 ac_sed_conf_input=`$as_echo "$configure_input" |
14793 sed 's/[\\\\&|]/\\\\&/g'`;; #(
14794 *) ac_sed_conf_input=$configure_input;;
14795 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014796
14797 case $ac_tag in
Matthias Kloseb9621712010-04-24 17:59:49 +000014798 *:-:* | *:-) cat >"$tmp/stdin" \
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014799 || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014800 esac
14801 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014802 esac
14803
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014804 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000014805$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014806 X"$ac_file" : 'X\(//\)[^/]' \| \
14807 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014808 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014809$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014810 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14811 s//\1/
14812 q
14813 }
14814 /^X\(\/\/\)[^/].*/{
14815 s//\1/
14816 q
14817 }
14818 /^X\(\/\/\)$/{
14819 s//\1/
14820 q
14821 }
14822 /^X\(\/\).*/{
14823 s//\1/
14824 q
14825 }
14826 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000014827 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000014828 ac_builddir=.
14829
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014830case "$ac_dir" in
14831.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
14832*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014833 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014834 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000014835 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014836 case $ac_top_builddir_sub in
14837 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
14838 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
14839 esac ;;
14840esac
14841ac_abs_top_builddir=$ac_pwd
14842ac_abs_builddir=$ac_pwd$ac_dir_suffix
14843# for backward compatibility:
14844ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000014845
14846case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014847 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000014848 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014849 ac_top_srcdir=$ac_top_builddir_sub
14850 ac_abs_top_srcdir=$ac_pwd ;;
14851 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000014852 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014853 ac_top_srcdir=$srcdir
14854 ac_abs_top_srcdir=$srcdir ;;
14855 *) # Relative name.
14856 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
14857 ac_top_srcdir=$ac_top_build_prefix$srcdir
14858 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014859esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014860ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000014861
Martin v. Löwis11437992002-04-12 09:54:03 +000014862
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014863 case $ac_mode in
14864 :F)
14865 #
14866 # CONFIG_FILE
14867 #
Martin v. Löwis11437992002-04-12 09:54:03 +000014868
14869 case $INSTALL in
14870 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014871 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014872 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000014873_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014874
Matthias Kloseb9621712010-04-24 17:59:49 +000014875cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014876# If the template does not know about datarootdir, expand it.
14877# FIXME: This hack should be removed a few years after 2.60.
14878ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000014879ac_sed_dataroot='
14880/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014881 p
14882 q
14883}
14884/@datadir@/p
14885/@docdir@/p
14886/@infodir@/p
14887/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000014888/@mandir@/p'
14889case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014890*datarootdir*) ac_datarootdir_seen=yes;;
14891*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014892 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
14893$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014894_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014895cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014896 ac_datarootdir_hack='
14897 s&@datadir@&$datadir&g
14898 s&@docdir@&$docdir&g
14899 s&@infodir@&$infodir&g
14900 s&@localedir@&$localedir&g
14901 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000014902 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014903esac
14904_ACEOF
14905
14906# Neutralize VPATH when `$srcdir' = `.'.
14907# Shell code in configure.ac might set extrasub.
14908# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000014909cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14910ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000014911$extrasub
14912_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014913cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014914:t
14915/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000014916s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014917s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000014918s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014919s&@srcdir@&$ac_srcdir&;t t
14920s&@abs_srcdir@&$ac_abs_srcdir&;t t
14921s&@top_srcdir@&$ac_top_srcdir&;t t
14922s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
14923s&@builddir@&$ac_builddir&;t t
14924s&@abs_builddir@&$ac_abs_builddir&;t t
14925s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
14926s&@INSTALL@&$ac_INSTALL&;t t
14927$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000014928"
14929eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014930 || as_fn_error "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014931
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014932test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
14933 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
14934 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000014935 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014936which seems to be undefined. Please make sure it is defined." >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014937$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014938which seems to be undefined. Please make sure it is defined." >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014939
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014940 rm -f "$tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000014941 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +000014942 -) cat "$tmp/out" && rm -f "$tmp/out";;
14943 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
14944 esac \
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014945 || as_fn_error "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014946 ;;
14947 :H)
14948 #
14949 # CONFIG_HEADER
14950 #
Martin v. Löwis11437992002-04-12 09:54:03 +000014951 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014952 {
14953 $as_echo "/* $configure_input */" \
14954 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
14955 } >"$tmp/config.h" \
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014956 || as_fn_error "could not create $ac_file" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000014957 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
14958 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
14959$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000014960 else
Matthias Kloseb9621712010-04-24 17:59:49 +000014961 rm -f "$ac_file"
14962 mv "$tmp/config.h" "$ac_file" \
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014963 || as_fn_error "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000014964 fi
14965 else
Matthias Kloseb9621712010-04-24 17:59:49 +000014966 $as_echo "/* $configure_input */" \
14967 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014968 || as_fn_error "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000014969 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014970 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000014971
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014972
14973 esac
14974
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000014975
14976 case $ac_file$ac_mode in
14977 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
14978
14979 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014980done # for ac_tag
14981
Guido van Rossum627b2d71993-12-24 10:39:16 +000014982
Matthias Kloseb9621712010-04-24 17:59:49 +000014983as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000014984_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014985ac_clean_files=$ac_clean_files_save
14986
Matthias Kloseb9621712010-04-24 17:59:49 +000014987test $ac_write_fail = 0 ||
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014988 as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000014989
Martin v. Löwis11437992002-04-12 09:54:03 +000014990
14991# configure is writing to config.log, and then calls config.status.
14992# config.status does its own redirection, appending to config.log.
14993# Unfortunately, on DOS this fails, as config.log is still kept open
14994# by configure, so config.status won't be able to write to it; its
14995# output is simply discarded. So we exec the FD to /dev/null,
14996# effectively closing config.log, so it can be properly (re)opened and
14997# appended to by config.status. When coming back to configure, we
14998# need to make the FD available again.
14999if test "$no_create" != yes; then
15000 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000015001 ac_config_status_args=
15002 test "$silent" = yes &&
15003 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000015004 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000015005 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000015006 exec 5>>config.log
15007 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
15008 # would make configure fail if this is the last instruction.
Benjamin Petersond7f73e92010-09-05 00:09:07 +000015009 $ac_cs_success || as_fn_exit $?
Matthias Kloseb9621712010-04-24 17:59:49 +000015010fi
15011if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
15012 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
15013$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015014fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000015015
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015016
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015017echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015018if test ! -f Modules/Setup
15019then
15020 cp $srcdir/Modules/Setup.dist Modules/Setup
15021fi
15022
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015023echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015024if test ! -f Modules/Setup.local
15025then
15026 echo "# Edit this file for local setup changes" >Modules/Setup.local
15027fi
15028
15029echo "creating Makefile"
15030$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
15031 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000015032 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000015033mv config.c Modules