blob: 9135d4a45d19bdd5f74e4e34c45b4ada2cf2afc5 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Benjamin Peterson076ed002010-10-31 17:11:02 +00002# From configure.in Revision: 86042 .
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Benjamin Peterson79263252010-10-31 16:50:44 +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 Peterson79263252010-10-31 16:50:44 +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 Peterson79263252010-10-31 16:50:44 +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 Peterson79263252010-10-31 16:50:44 +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 Peterson79263252010-10-31 16:50:44 +0000367# script with status $?, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +0000368as_fn_error ()
369{
Benjamin Peterson79263252010-10-31 16:50:44 +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 Peterson79263252010-10-31 16:50:44 +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 Peterson79263252010-10-31 16:50:44 +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
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000634ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000635LN
636INSTALL_DATA
637INSTALL_SCRIPT
638INSTALL_PROGRAM
639SVNVERSION
640ARFLAGS
641AR
642RANLIB
Daniel Stutzbacha606faa2010-08-31 19:51:07 +0000643USE_INLINE
Matthias Kloseb9621712010-04-24 17:59:49 +0000644GNULD
645LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000646LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000647RUNSHARED
648INSTSONAME
649LDLIBRARYDIR
650BLDLIBRARY
651DLLLIBRARY
652LDLIBRARY
653LIBRARY
654BUILDEXEEXT
655EGREP
656GREP
657CPP
658MAINCC
659CXX
660OBJEXT
661EXEEXT
662ac_ct_CC
663CPPFLAGS
664LDFLAGS
665CFLAGS
666CC
667EXPORT_MACOSX_DEPLOYMENT_TARGET
668CONFIGURE_MACOSX_DEPLOYMENT_TARGET
669SGI_ABI
670MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000671FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000672FRAMEWORKUNIXTOOLSPREFIX
673FRAMEWORKALTINSTALLLAST
674FRAMEWORKALTINSTALLFIRST
675FRAMEWORKINSTALLLAST
676FRAMEWORKINSTALLFIRST
677PYTHONFRAMEWORKINSTALLDIR
678PYTHONFRAMEWORKPREFIX
679PYTHONFRAMEWORKDIR
680PYTHONFRAMEWORKIDENTIFIER
681PYTHONFRAMEWORK
682LIPO_32BIT_FLAGS
683ARCH_RUN_32BIT
684UNIVERSALSDK
685CONFIG_ARGS
686SOVERSION
687VERSION
688target_alias
689host_alias
690build_alias
691LIBS
692ECHO_T
693ECHO_N
694ECHO_C
695DEFS
696mandir
697localedir
698libdir
699psdir
700pdfdir
701dvidir
702htmldir
703infodir
704docdir
705oldincludedir
706includedir
707localstatedir
708sharedstatedir
709sysconfdir
710datadir
711datarootdir
712libexecdir
713sbindir
714bindir
715program_transform_name
716prefix
717exec_prefix
718PACKAGE_URL
719PACKAGE_BUGREPORT
720PACKAGE_STRING
721PACKAGE_VERSION
722PACKAGE_TARNAME
723PACKAGE_NAME
724PATH_SEPARATOR
725SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000726ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000727ac_user_opts='
728enable_option_checking
729enable_universalsdk
730with_universal_archs
731with_framework_name
732enable_framework
733with_gcc
734with_cxx_main
735with_suffix
736enable_shared
737enable_profiling
738with_pydebug
739with_libs
740with_system_expat
741with_system_ffi
Benjamin Peterson076ed002010-10-31 17:11:02 +0000742enable_loadable_sqlite_extensions
Matthias Kloseb9621712010-04-24 17:59:49 +0000743with_dbmliborder
744with_signal_module
745with_dec_threads
746with_threads
747with_thread
748enable_ipv6
749with_doc_strings
750with_tsc
751with_pymalloc
752with_valgrind
Matthias Kloseb9621712010-04-24 17:59:49 +0000753with_fpectl
754with_libm
755with_libc
756enable_big_digits
757with_wide_unicode
758with_computed_gotos
759'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000760 ac_precious_vars='build_alias
761host_alias
762target_alias
763CC
764CFLAGS
765LDFLAGS
766LIBS
767CPPFLAGS
768CPP'
769
Guido van Rossum627b2d71993-12-24 10:39:16 +0000770
Guido van Rossum7f43da71994-08-01 12:15:30 +0000771# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000772ac_init_help=
773ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000774ac_unrecognized_opts=
775ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000776# The variables have the same names as the options, with
777# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000778cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000779exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000780no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000781no_recursion=
782prefix=NONE
783program_prefix=NONE
784program_suffix=NONE
785program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000786silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000787site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000788srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000789verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000790x_includes=NONE
791x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000792
793# Installation directory options.
794# These are left unexpanded so users can "make install exec_prefix=/foo"
795# and all the variables that are supposed to be based on exec_prefix
796# by default will actually change.
797# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000798# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000799bindir='${exec_prefix}/bin'
800sbindir='${exec_prefix}/sbin'
801libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000802datarootdir='${prefix}/share'
803datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000804sysconfdir='${prefix}/etc'
805sharedstatedir='${prefix}/com'
806localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000807includedir='${prefix}/include'
808oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000809docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
810infodir='${datarootdir}/info'
811htmldir='${docdir}'
812dvidir='${docdir}'
813pdfdir='${docdir}'
814psdir='${docdir}'
815libdir='${exec_prefix}/lib'
816localedir='${datarootdir}/locale'
817mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000818
Guido van Rossum7f43da71994-08-01 12:15:30 +0000819ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000820ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000821for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000822do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000823 # If the previous option needs an argument, assign it.
824 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000825 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000826 ac_prev=
827 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000828 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000829
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000830 case $ac_option in
Benjamin Peterson79263252010-10-31 16:50:44 +0000831 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
832 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000833 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000834
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000835 # Accept the important Cygnus configure options, so we can diagnose typos.
836
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000837 case $ac_dashdash$ac_option in
838 --)
839 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000840
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000841 -bindir | --bindir | --bindi | --bind | --bin | --bi)
842 ac_prev=bindir ;;
843 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000844 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000845
846 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000847 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000848 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000849 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000850
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000851 -cache-file | --cache-file | --cache-fil | --cache-fi \
852 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
853 ac_prev=cache_file ;;
854 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
855 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000856 cache_file=$ac_optarg ;;
857
858 --config-cache | -C)
859 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000860
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000861 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000862 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000863 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000864 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000865
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000866 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
867 | --dataroo | --dataro | --datar)
868 ac_prev=datarootdir ;;
869 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
870 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
871 datarootdir=$ac_optarg ;;
872
Guido van Rossum7f43da71994-08-01 12:15:30 +0000873 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000874 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000875 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000876 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Benjamin Peterson79263252010-10-31 16:50:44 +0000877 as_fn_error "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000878 ac_useropt_orig=$ac_useropt
879 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
880 case $ac_user_opts in
881 *"
882"enable_$ac_useropt"
883"*) ;;
884 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
885 ac_unrecognized_sep=', ';;
886 esac
887 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000888
889 -docdir | --docdir | --docdi | --doc | --do)
890 ac_prev=docdir ;;
891 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
892 docdir=$ac_optarg ;;
893
894 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
895 ac_prev=dvidir ;;
896 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
897 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000898
899 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000900 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000901 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000902 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Benjamin Peterson79263252010-10-31 16:50:44 +0000903 as_fn_error "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000904 ac_useropt_orig=$ac_useropt
905 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
906 case $ac_user_opts in
907 *"
908"enable_$ac_useropt"
909"*) ;;
910 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
911 ac_unrecognized_sep=', ';;
912 esac
913 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000914
Guido van Rossum7f43da71994-08-01 12:15:30 +0000915 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
916 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
917 | --exec | --exe | --ex)
918 ac_prev=exec_prefix ;;
919 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
920 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
921 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000922 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000923
924 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000925 # Obsolete; use --with-gas.
926 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000927
Martin v. Löwis11437992002-04-12 09:54:03 +0000928 -help | --help | --hel | --he | -h)
929 ac_init_help=long ;;
930 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
931 ac_init_help=recursive ;;
932 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
933 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000934
935 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000936 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000937 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000938 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000939
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000940 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
941 ac_prev=htmldir ;;
942 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
943 | --ht=*)
944 htmldir=$ac_optarg ;;
945
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000946 -includedir | --includedir | --includedi | --included | --include \
947 | --includ | --inclu | --incl | --inc)
948 ac_prev=includedir ;;
949 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
950 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000951 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000952
953 -infodir | --infodir | --infodi | --infod | --info | --inf)
954 ac_prev=infodir ;;
955 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000956 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000957
958 -libdir | --libdir | --libdi | --libd)
959 ac_prev=libdir ;;
960 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000961 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000962
963 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
964 | --libexe | --libex | --libe)
965 ac_prev=libexecdir ;;
966 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
967 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000968 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000969
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000970 -localedir | --localedir | --localedi | --localed | --locale)
971 ac_prev=localedir ;;
972 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
973 localedir=$ac_optarg ;;
974
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000975 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000976 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000977 ac_prev=localstatedir ;;
978 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000979 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000980 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000981
982 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
983 ac_prev=mandir ;;
984 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000985 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000986
Guido van Rossum7f43da71994-08-01 12:15:30 +0000987 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000988 # Obsolete; use --without-fp.
989 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000990
991 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +0000992 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000993 no_create=yes ;;
994
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000995 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
996 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
997 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000998
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000999 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1000 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1001 | --oldin | --oldi | --old | --ol | --o)
1002 ac_prev=oldincludedir ;;
1003 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1004 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1005 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001006 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001007
Guido van Rossum7f43da71994-08-01 12:15:30 +00001008 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1009 ac_prev=prefix ;;
1010 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001011 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001012
1013 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1014 | --program-pre | --program-pr | --program-p)
1015 ac_prev=program_prefix ;;
1016 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1017 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001018 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001019
1020 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1021 | --program-suf | --program-su | --program-s)
1022 ac_prev=program_suffix ;;
1023 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1024 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001025 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001026
1027 -program-transform-name | --program-transform-name \
1028 | --program-transform-nam | --program-transform-na \
1029 | --program-transform-n | --program-transform- \
1030 | --program-transform | --program-transfor \
1031 | --program-transfo | --program-transf \
1032 | --program-trans | --program-tran \
1033 | --progr-tra | --program-tr | --program-t)
1034 ac_prev=program_transform_name ;;
1035 -program-transform-name=* | --program-transform-name=* \
1036 | --program-transform-nam=* | --program-transform-na=* \
1037 | --program-transform-n=* | --program-transform-=* \
1038 | --program-transform=* | --program-transfor=* \
1039 | --program-transfo=* | --program-transf=* \
1040 | --program-trans=* | --program-tran=* \
1041 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001042 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001043
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001044 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1045 ac_prev=pdfdir ;;
1046 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1047 pdfdir=$ac_optarg ;;
1048
1049 -psdir | --psdir | --psdi | --psd | --ps)
1050 ac_prev=psdir ;;
1051 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1052 psdir=$ac_optarg ;;
1053
Guido van Rossum7f43da71994-08-01 12:15:30 +00001054 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1055 | -silent | --silent | --silen | --sile | --sil)
1056 silent=yes ;;
1057
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001058 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1059 ac_prev=sbindir ;;
1060 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1061 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001062 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001063
1064 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1065 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1066 | --sharedst | --shareds | --shared | --share | --shar \
1067 | --sha | --sh)
1068 ac_prev=sharedstatedir ;;
1069 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1070 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1071 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1072 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001073 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001074
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001075 -site | --site | --sit)
1076 ac_prev=site ;;
1077 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001078 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001079
Guido van Rossum7f43da71994-08-01 12:15:30 +00001080 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1081 ac_prev=srcdir ;;
1082 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001083 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001084
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001085 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1086 | --syscon | --sysco | --sysc | --sys | --sy)
1087 ac_prev=sysconfdir ;;
1088 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1089 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001090 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001091
Guido van Rossum7f43da71994-08-01 12:15:30 +00001092 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001093 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001094 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001095 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001096
1097 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1098 verbose=yes ;;
1099
Martin v. Löwis11437992002-04-12 09:54:03 +00001100 -version | --version | --versio | --versi | --vers | -V)
1101 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001102
1103 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001104 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001105 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001106 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Benjamin Peterson79263252010-10-31 16:50:44 +00001107 as_fn_error "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001108 ac_useropt_orig=$ac_useropt
1109 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1110 case $ac_user_opts in
1111 *"
1112"with_$ac_useropt"
1113"*) ;;
1114 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1115 ac_unrecognized_sep=', ';;
1116 esac
1117 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001118
1119 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001120 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001121 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001122 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Benjamin Peterson79263252010-10-31 16:50:44 +00001123 as_fn_error "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001124 ac_useropt_orig=$ac_useropt
1125 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1126 case $ac_user_opts in
1127 *"
1128"with_$ac_useropt"
1129"*) ;;
1130 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1131 ac_unrecognized_sep=', ';;
1132 esac
1133 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001134
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001135 --x)
1136 # Obsolete; use --with-x.
1137 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001138
1139 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1140 | --x-incl | --x-inc | --x-in | --x-i)
1141 ac_prev=x_includes ;;
1142 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1143 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001144 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001145
1146 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1147 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1148 ac_prev=x_libraries ;;
1149 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1150 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001151 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001152
Benjamin Peterson79263252010-10-31 16:50:44 +00001153 -*) as_fn_error "unrecognized option: \`$ac_option'
1154Try \`$0 --help' for more information."
Guido van Rossum7f43da71994-08-01 12:15:30 +00001155 ;;
1156
Martin v. Löwis11437992002-04-12 09:54:03 +00001157 *=*)
1158 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1159 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001160 case $ac_envvar in #(
1161 '' | [0-9]* | *[!_$as_cr_alnum]* )
Benjamin Peterson79263252010-10-31 16:50:44 +00001162 as_fn_error "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001163 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001164 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001165 export $ac_envvar ;;
1166
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001167 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001168 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001169 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001170 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001171 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001172 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
Guido van Rossum7f43da71994-08-01 12:15:30 +00001173 ;;
1174
1175 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001176done
1177
Guido van Rossum7f43da71994-08-01 12:15:30 +00001178if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001179 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Benjamin Peterson79263252010-10-31 16:50:44 +00001180 as_fn_error "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001181fi
1182
Matthias Kloseb9621712010-04-24 17:59:49 +00001183if test -n "$ac_unrecognized_opts"; then
1184 case $enable_option_checking in
1185 no) ;;
Benjamin Peterson79263252010-10-31 16:50:44 +00001186 fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001187 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1188 esac
1189fi
1190
1191# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001192for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1193 datadir sysconfdir sharedstatedir localstatedir includedir \
1194 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1195 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001196do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001197 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001198 # Remove trailing slashes.
1199 case $ac_val in
1200 */ )
1201 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1202 eval $ac_var=\$ac_val;;
1203 esac
1204 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001205 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001206 [\\/$]* | ?:[\\/]* ) continue;;
1207 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001208 esac
Benjamin Peterson79263252010-10-31 16:50:44 +00001209 as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001210done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001211
Martin v. Löwis11437992002-04-12 09:54:03 +00001212# There might be people who depend on the old broken behavior: `$host'
1213# used to hold the argument of --host etc.
1214# FIXME: To remove some day.
1215build=$build_alias
1216host=$host_alias
1217target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001218
Martin v. Löwis11437992002-04-12 09:54:03 +00001219# FIXME: To remove some day.
1220if test "x$host_alias" != x; then
1221 if test "x$build_alias" = x; then
1222 cross_compiling=maybe
Benjamin Peterson79263252010-10-31 16:50:44 +00001223 $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
1224 If a cross compiler is detected then cross compile mode will be used." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001225 elif test "x$build_alias" != "x$host_alias"; then
1226 cross_compiling=yes
1227 fi
1228fi
1229
1230ac_tool_prefix=
1231test -n "$host_alias" && ac_tool_prefix=$host_alias-
1232
1233test "$silent" = yes && exec 6>/dev/null
1234
Guido van Rossum627b2d71993-12-24 10:39:16 +00001235
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001236ac_pwd=`pwd` && test -n "$ac_pwd" &&
1237ac_ls_di=`ls -di .` &&
1238ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Benjamin Peterson79263252010-10-31 16:50:44 +00001239 as_fn_error "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001240test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Benjamin Peterson79263252010-10-31 16:50:44 +00001241 as_fn_error "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001242
1243
Guido van Rossum627b2d71993-12-24 10:39:16 +00001244# Find the source files, if location was not specified.
1245if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001246 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001247 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001248 ac_confdir=`$as_dirname -- "$as_myself" ||
1249$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1250 X"$as_myself" : 'X\(//\)[^/]' \| \
1251 X"$as_myself" : 'X\(//\)$' \| \
1252 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1253$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001254 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1255 s//\1/
1256 q
1257 }
1258 /^X\(\/\/\)[^/].*/{
1259 s//\1/
1260 q
1261 }
1262 /^X\(\/\/\)$/{
1263 s//\1/
1264 q
1265 }
1266 /^X\(\/\).*/{
1267 s//\1/
1268 q
1269 }
1270 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001271 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001272 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001273 srcdir=..
1274 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001275else
1276 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001277fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001278if test ! -r "$srcdir/$ac_unique_file"; then
1279 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Benjamin Peterson79263252010-10-31 16:50:44 +00001280 as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001281fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001282ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1283ac_abs_confdir=`(
Benjamin Peterson79263252010-10-31 16:50:44 +00001284 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001285 pwd)`
1286# When building in place, set srcdir=.
1287if test "$ac_abs_confdir" = "$ac_pwd"; then
1288 srcdir=.
1289fi
1290# Remove unnecessary trailing slashes from srcdir.
1291# Double slashes in file names in object file debugging info
1292# mess up M-x gdb in Emacs.
1293case $srcdir in
1294*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1295esac
1296for ac_var in $ac_precious_vars; do
1297 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1298 eval ac_env_${ac_var}_value=\$${ac_var}
1299 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1300 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1301done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001302
Martin v. Löwis11437992002-04-12 09:54:03 +00001303#
1304# Report the --help message.
1305#
1306if test "$ac_init_help" = "long"; then
1307 # Omit some internal or obsolete options to make the list less imposing.
1308 # This message is too long to be a string in the A/UX 3.1 sh.
1309 cat <<_ACEOF
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001310\`configure' configures python 3.2 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001311
1312Usage: $0 [OPTION]... [VAR=VALUE]...
1313
1314To assign environment variables (e.g., CC, CFLAGS...), specify them as
1315VAR=VALUE. See below for descriptions of some of the useful variables.
1316
1317Defaults for the options are specified in brackets.
1318
1319Configuration:
1320 -h, --help display this help and exit
1321 --help=short display options specific to this package
1322 --help=recursive display the short help of all the included packages
1323 -V, --version display version information and exit
Benjamin Peterson79263252010-10-31 16:50:44 +00001324 -q, --quiet, --silent do not print \`checking...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001325 --cache-file=FILE cache test results in FILE [disabled]
1326 -C, --config-cache alias for \`--cache-file=config.cache'
1327 -n, --no-create do not create output files
1328 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1329
Martin v. Löwis11437992002-04-12 09:54:03 +00001330Installation directories:
1331 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001332 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001333 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001334 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001335
1336By default, \`make install' will install all the files in
1337\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1338an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1339for instance \`--prefix=\$HOME'.
1340
1341For better control, use the options below.
1342
1343Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001344 --bindir=DIR user executables [EPREFIX/bin]
1345 --sbindir=DIR system admin executables [EPREFIX/sbin]
1346 --libexecdir=DIR program executables [EPREFIX/libexec]
1347 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1348 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1349 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1350 --libdir=DIR object code libraries [EPREFIX/lib]
1351 --includedir=DIR C header files [PREFIX/include]
1352 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1353 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1354 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1355 --infodir=DIR info documentation [DATAROOTDIR/info]
1356 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1357 --mandir=DIR man documentation [DATAROOTDIR/man]
1358 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1359 --htmldir=DIR html documentation [DOCDIR]
1360 --dvidir=DIR dvi documentation [DOCDIR]
1361 --pdfdir=DIR pdf documentation [DOCDIR]
1362 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001363_ACEOF
1364
1365 cat <<\_ACEOF
1366_ACEOF
1367fi
1368
1369if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001370 case $ac_init_help in
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001371 short | recursive ) echo "Configuration of python 3.2:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001372 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001373 cat <<\_ACEOF
1374
1375Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001376 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001377 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1378 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001379 --enable-universalsdk[=SDKDIR]
Christian Heimes292d3512008-02-03 16:51:08 +00001380 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001381 --enable-framework[=INSTALLDIR]
1382 Build (MacOSX|Darwin) framework
1383 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001384 --enable-profiling enable C-level code profiling
Benjamin Peterson076ed002010-10-31 17:11:02 +00001385 --enable-loadable-sqlite-extensions
1386 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001387 --enable-ipv6 Enable ipv6 (with ipv4) support
1388 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001389 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001390 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001391
1392Optional Packages:
1393 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1394 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001395 --with-universal-archs=ARCH
1396 select architectures for universal build ("32-bit",
Ronald Oussoren3c064c12009-09-08 07:12:42 +00001397 "64-bit", "3-way", "intel" or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001398 --with-framework-name=FRAMEWORK
1399 specify an alternate name of the framework built
1400 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001401 --without-gcc never use gcc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001402 --with-cxx-main=<compiler>
1403 compile main() and link python executable with C++
1404 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001405 --with-suffix=.exe set executable suffix
1406 --with-pydebug build with Py_DEBUG defined
1407 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001408 --with-system-expat build pyexpat module using an installed expat
1409 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001410 --with-system-ffi build _ctypes module using an installed ffi library
Matthias Klose55708cc2009-04-30 08:06:49 +00001411 --with-dbmliborder=db1:db2:...
1412 order to check db backends for dbm. Valid value is a
1413 colon separated string with the backend names
1414 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001415 --with-signal-module disable/enable signal module
1416 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1417 --with(out)-threads[=DIRECTORY]
1418 disable/enable thread support
1419 --with(out)-thread[=DIRECTORY]
1420 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001421 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001422 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001423 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001424 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001425 --with-fpectl enable SIGFPE catching
1426 --with-libm=STRING math library
1427 --with-libc=STRING C library
Georg Brandl52d168a2008-01-07 18:10:24 +00001428 --with-wide-unicode Use 4-byte Unicode characters (default is 2 bytes)
Antoine Pitrou042b1282010-08-13 21:15:58 +00001429 --with(out)-computed-gotos
1430 Use computed gotos in evaluation loop (enabled by
1431 default on supported compilers)
Martin v. Löwis11437992002-04-12 09:54:03 +00001432
1433Some influential environment variables:
1434 CC C compiler command
1435 CFLAGS C compiler flags
1436 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1437 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001438 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001439 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001440 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001441 CPP C preprocessor
1442
1443Use these variables to override the choices made by `configure' or to help
1444it to find libraries and programs with nonstandard names/locations.
1445
Georg Brandle2e15612009-05-20 18:25:10 +00001446Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001447_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001448ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001449fi
1450
1451if test "$ac_init_help" = "recursive"; then
1452 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001453 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001454 test -d "$ac_dir" ||
1455 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1456 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001457 ac_builddir=.
1458
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001459case "$ac_dir" in
1460.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1461*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001462 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001463 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001464 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001465 case $ac_top_builddir_sub in
1466 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1467 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1468 esac ;;
1469esac
1470ac_abs_top_builddir=$ac_pwd
1471ac_abs_builddir=$ac_pwd$ac_dir_suffix
1472# for backward compatibility:
1473ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001474
1475case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001476 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001477 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001478 ac_top_srcdir=$ac_top_builddir_sub
1479 ac_abs_top_srcdir=$ac_pwd ;;
1480 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001481 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001482 ac_top_srcdir=$srcdir
1483 ac_abs_top_srcdir=$srcdir ;;
1484 *) # Relative name.
1485 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1486 ac_top_srcdir=$ac_top_build_prefix$srcdir
1487 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001488esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001489ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001490
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001491 cd "$ac_dir" || { ac_status=$?; continue; }
1492 # Check for guested configure.
1493 if test -f "$ac_srcdir/configure.gnu"; then
1494 echo &&
1495 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1496 elif test -f "$ac_srcdir/configure"; then
1497 echo &&
1498 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001499 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001500 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001501 fi || ac_status=$?
1502 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001503 done
1504fi
1505
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001506test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001507if $ac_init_version; then
1508 cat <<\_ACEOF
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001509python configure 3.2
Benjamin Peterson79263252010-10-31 16:50:44 +00001510generated by GNU Autoconf 2.65
Martin v. Löwis11437992002-04-12 09:54:03 +00001511
Benjamin Peterson79263252010-10-31 16:50:44 +00001512Copyright (C) 2009 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001513This configure script is free software; the Free Software Foundation
1514gives unlimited permission to copy, distribute and modify it.
1515_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001516 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001517fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001518
1519## ------------------------ ##
1520## Autoconf initialization. ##
1521## ------------------------ ##
1522
1523# ac_fn_c_try_compile LINENO
1524# --------------------------
1525# Try to compile conftest.$ac_ext, and return whether this succeeded.
1526ac_fn_c_try_compile ()
1527{
1528 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1529 rm -f conftest.$ac_objext
1530 if { { ac_try="$ac_compile"
1531case "(($ac_try" in
1532 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1533 *) ac_try_echo=$ac_try;;
1534esac
1535eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1536$as_echo "$ac_try_echo"; } >&5
1537 (eval "$ac_compile") 2>conftest.err
1538 ac_status=$?
1539 if test -s conftest.err; then
1540 grep -v '^ *+' conftest.err >conftest.er1
1541 cat conftest.er1 >&5
1542 mv -f conftest.er1 conftest.err
1543 fi
1544 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1545 test $ac_status = 0; } && {
1546 test -z "$ac_c_werror_flag" ||
1547 test ! -s conftest.err
1548 } && test -s conftest.$ac_objext; then :
1549 ac_retval=0
1550else
1551 $as_echo "$as_me: failed program was:" >&5
1552sed 's/^/| /' conftest.$ac_ext >&5
1553
1554 ac_retval=1
1555fi
1556 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1557 as_fn_set_status $ac_retval
1558
1559} # ac_fn_c_try_compile
1560
1561# ac_fn_c_try_cpp LINENO
1562# ----------------------
1563# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1564ac_fn_c_try_cpp ()
1565{
1566 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1567 if { { ac_try="$ac_cpp conftest.$ac_ext"
1568case "(($ac_try" in
1569 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1570 *) ac_try_echo=$ac_try;;
1571esac
1572eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1573$as_echo "$ac_try_echo"; } >&5
1574 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1575 ac_status=$?
1576 if test -s conftest.err; then
1577 grep -v '^ *+' conftest.err >conftest.er1
1578 cat conftest.er1 >&5
1579 mv -f conftest.er1 conftest.err
1580 fi
1581 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Benjamin Peterson79263252010-10-31 16:50:44 +00001582 test $ac_status = 0; } >/dev/null && {
Matthias Kloseb9621712010-04-24 17:59:49 +00001583 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1584 test ! -s conftest.err
1585 }; then :
1586 ac_retval=0
1587else
1588 $as_echo "$as_me: failed program was:" >&5
1589sed 's/^/| /' conftest.$ac_ext >&5
1590
1591 ac_retval=1
1592fi
1593 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1594 as_fn_set_status $ac_retval
1595
1596} # ac_fn_c_try_cpp
1597
1598# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1599# -------------------------------------------------------
1600# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1601# the include files in INCLUDES and setting the cache variable VAR
1602# accordingly.
1603ac_fn_c_check_header_mongrel ()
1604{
1605 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Benjamin Peterson79263252010-10-31 16:50:44 +00001606 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001607 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1608$as_echo_n "checking for $2... " >&6; }
Benjamin Peterson79263252010-10-31 16:50:44 +00001609if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001610 $as_echo_n "(cached) " >&6
1611fi
1612eval ac_res=\$$3
1613 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1614$as_echo "$ac_res" >&6; }
1615else
1616 # Is the header compilable?
1617{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1618$as_echo_n "checking $2 usability... " >&6; }
1619cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1620/* end confdefs.h. */
1621$4
1622#include <$2>
1623_ACEOF
1624if ac_fn_c_try_compile "$LINENO"; then :
1625 ac_header_compiler=yes
1626else
1627 ac_header_compiler=no
1628fi
1629rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1630{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1631$as_echo "$ac_header_compiler" >&6; }
1632
1633# Is the header present?
1634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1635$as_echo_n "checking $2 presence... " >&6; }
1636cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1637/* end confdefs.h. */
1638#include <$2>
1639_ACEOF
1640if ac_fn_c_try_cpp "$LINENO"; then :
1641 ac_header_preproc=yes
1642else
1643 ac_header_preproc=no
1644fi
Benjamin Peterson79263252010-10-31 16:50:44 +00001645rm -f conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001646{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1647$as_echo "$ac_header_preproc" >&6; }
1648
1649# So? What about this header?
1650case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1651 yes:no: )
1652 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1653$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1654 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1655$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1656 ;;
1657 no:yes:* )
1658 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1659$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1660 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1661$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1662 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1663$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1664 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1665$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1666 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1667$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Benjamin Peterson79263252010-10-31 16:50:44 +00001668( cat <<\_ASBOX
1669## -------------------------------------- ##
Matthias Kloseb9621712010-04-24 17:59:49 +00001670## Report this to http://bugs.python.org/ ##
Benjamin Peterson79263252010-10-31 16:50:44 +00001671## -------------------------------------- ##
1672_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +00001673 ) | sed "s/^/$as_me: WARNING: /" >&2
1674 ;;
1675esac
1676 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1677$as_echo_n "checking for $2... " >&6; }
Benjamin Peterson79263252010-10-31 16:50:44 +00001678if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001679 $as_echo_n "(cached) " >&6
1680else
1681 eval "$3=\$ac_header_compiler"
1682fi
1683eval ac_res=\$$3
1684 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1685$as_echo "$ac_res" >&6; }
1686fi
1687 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1688
1689} # ac_fn_c_check_header_mongrel
1690
1691# ac_fn_c_try_run LINENO
1692# ----------------------
1693# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1694# that executables *can* be run.
1695ac_fn_c_try_run ()
1696{
1697 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1698 if { { ac_try="$ac_link"
1699case "(($ac_try" in
1700 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1701 *) ac_try_echo=$ac_try;;
1702esac
1703eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1704$as_echo "$ac_try_echo"; } >&5
1705 (eval "$ac_link") 2>&5
1706 ac_status=$?
1707 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1708 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1709 { { case "(($ac_try" in
1710 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1711 *) ac_try_echo=$ac_try;;
1712esac
1713eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1714$as_echo "$ac_try_echo"; } >&5
1715 (eval "$ac_try") 2>&5
1716 ac_status=$?
1717 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1718 test $ac_status = 0; }; }; then :
1719 ac_retval=0
1720else
1721 $as_echo "$as_me: program exited with status $ac_status" >&5
1722 $as_echo "$as_me: failed program was:" >&5
1723sed 's/^/| /' conftest.$ac_ext >&5
1724
1725 ac_retval=$ac_status
1726fi
1727 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1728 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1729 as_fn_set_status $ac_retval
1730
1731} # ac_fn_c_try_run
1732
1733# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1734# -------------------------------------------------------
1735# Tests whether HEADER exists and can be compiled using the include files in
1736# INCLUDES, setting the cache variable VAR accordingly.
1737ac_fn_c_check_header_compile ()
1738{
1739 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1740 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1741$as_echo_n "checking for $2... " >&6; }
Benjamin Peterson79263252010-10-31 16:50:44 +00001742if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001743 $as_echo_n "(cached) " >&6
1744else
1745 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1746/* end confdefs.h. */
1747$4
1748#include <$2>
1749_ACEOF
1750if ac_fn_c_try_compile "$LINENO"; then :
1751 eval "$3=yes"
1752else
1753 eval "$3=no"
1754fi
1755rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1756fi
1757eval ac_res=\$$3
1758 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1759$as_echo "$ac_res" >&6; }
1760 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1761
1762} # ac_fn_c_check_header_compile
1763
1764# ac_fn_c_try_link LINENO
1765# -----------------------
1766# Try to link conftest.$ac_ext, and return whether this succeeded.
1767ac_fn_c_try_link ()
1768{
1769 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1770 rm -f conftest.$ac_objext conftest$ac_exeext
1771 if { { ac_try="$ac_link"
1772case "(($ac_try" in
1773 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1774 *) ac_try_echo=$ac_try;;
1775esac
1776eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1777$as_echo "$ac_try_echo"; } >&5
1778 (eval "$ac_link") 2>conftest.err
1779 ac_status=$?
1780 if test -s conftest.err; then
1781 grep -v '^ *+' conftest.err >conftest.er1
1782 cat conftest.er1 >&5
1783 mv -f conftest.er1 conftest.err
1784 fi
1785 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1786 test $ac_status = 0; } && {
1787 test -z "$ac_c_werror_flag" ||
1788 test ! -s conftest.err
1789 } && test -s conftest$ac_exeext && {
1790 test "$cross_compiling" = yes ||
1791 $as_test_x conftest$ac_exeext
1792 }; then :
1793 ac_retval=0
1794else
1795 $as_echo "$as_me: failed program was:" >&5
1796sed 's/^/| /' conftest.$ac_ext >&5
1797
1798 ac_retval=1
1799fi
1800 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1801 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1802 # interfere with the next link command; also delete a directory that is
1803 # left behind by Apple's compiler. We do this before executing the actions.
1804 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1805 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1806 as_fn_set_status $ac_retval
1807
1808} # ac_fn_c_try_link
1809
1810# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1811# -------------------------------------------
1812# Tests whether TYPE exists after having included INCLUDES, setting cache
1813# variable VAR accordingly.
1814ac_fn_c_check_type ()
1815{
1816 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1817 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1818$as_echo_n "checking for $2... " >&6; }
Benjamin Peterson79263252010-10-31 16:50:44 +00001819if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001820 $as_echo_n "(cached) " >&6
1821else
1822 eval "$3=no"
1823 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1824/* end confdefs.h. */
1825$4
1826int
1827main ()
1828{
1829if (sizeof ($2))
1830 return 0;
1831 ;
1832 return 0;
1833}
1834_ACEOF
1835if ac_fn_c_try_compile "$LINENO"; then :
1836 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1837/* end confdefs.h. */
1838$4
1839int
1840main ()
1841{
1842if (sizeof (($2)))
1843 return 0;
1844 ;
1845 return 0;
1846}
1847_ACEOF
1848if ac_fn_c_try_compile "$LINENO"; then :
1849
1850else
1851 eval "$3=yes"
1852fi
1853rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1854fi
1855rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1856fi
1857eval ac_res=\$$3
1858 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1859$as_echo "$ac_res" >&6; }
1860 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1861
1862} # ac_fn_c_check_type
1863
1864# ac_fn_c_find_uintX_t LINENO BITS VAR
1865# ------------------------------------
1866# Finds an unsigned integer type with width BITS, setting cache variable VAR
1867# accordingly.
1868ac_fn_c_find_uintX_t ()
1869{
1870 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1871 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1872$as_echo_n "checking for uint$2_t... " >&6; }
Benjamin Peterson79263252010-10-31 16:50:44 +00001873if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001874 $as_echo_n "(cached) " >&6
1875else
1876 eval "$3=no"
1877 # Order is important - never check a type that is potentially smaller
1878 # than half of the expected target width.
1879 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1880 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1881 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1882/* end confdefs.h. */
1883$ac_includes_default
1884int
1885main ()
1886{
1887static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
1888test_array [0] = 0
1889
1890 ;
1891 return 0;
1892}
1893_ACEOF
1894if ac_fn_c_try_compile "$LINENO"; then :
1895 case $ac_type in #(
1896 uint$2_t) :
1897 eval "$3=yes" ;; #(
1898 *) :
1899 eval "$3=\$ac_type" ;;
1900esac
1901fi
1902rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson79263252010-10-31 16:50:44 +00001903 eval as_val=\$$3
1904 if test "x$as_val" = x""no; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001905
1906else
1907 break
1908fi
1909 done
1910fi
1911eval ac_res=\$$3
1912 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1913$as_echo "$ac_res" >&6; }
1914 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1915
1916} # ac_fn_c_find_uintX_t
1917
1918# ac_fn_c_find_intX_t LINENO BITS VAR
1919# -----------------------------------
1920# Finds a signed integer type with width BITS, setting cache variable VAR
1921# accordingly.
1922ac_fn_c_find_intX_t ()
1923{
1924 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1925 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
1926$as_echo_n "checking for int$2_t... " >&6; }
Benjamin Peterson79263252010-10-31 16:50:44 +00001927if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001928 $as_echo_n "(cached) " >&6
1929else
1930 eval "$3=no"
1931 # Order is important - never check a type that is potentially smaller
1932 # than half of the expected target width.
1933 for ac_type in int$2_t 'int' 'long int' \
1934 'long long int' 'short int' 'signed char'; do
1935 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1936/* end confdefs.h. */
1937$ac_includes_default
Barry Warsaw278266f2010-10-14 17:38:46 +00001938 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00001939int
1940main ()
1941{
Barry Warsaw278266f2010-10-14 17:38:46 +00001942static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
Matthias Kloseb9621712010-04-24 17:59:49 +00001943test_array [0] = 0
1944
1945 ;
1946 return 0;
1947}
1948_ACEOF
1949if ac_fn_c_try_compile "$LINENO"; then :
1950 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1951/* end confdefs.h. */
1952$ac_includes_default
Barry Warsaw278266f2010-10-14 17:38:46 +00001953 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00001954int
1955main ()
1956{
Barry Warsaw278266f2010-10-14 17:38:46 +00001957static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Kloseb9621712010-04-24 17:59:49 +00001958 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
1959test_array [0] = 0
1960
1961 ;
1962 return 0;
1963}
1964_ACEOF
1965if ac_fn_c_try_compile "$LINENO"; then :
1966
1967else
1968 case $ac_type in #(
1969 int$2_t) :
1970 eval "$3=yes" ;; #(
1971 *) :
1972 eval "$3=\$ac_type" ;;
1973esac
1974fi
1975rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1976fi
1977rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson79263252010-10-31 16:50:44 +00001978 eval as_val=\$$3
1979 if test "x$as_val" = x""no; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001980
1981else
1982 break
1983fi
1984 done
1985fi
1986eval ac_res=\$$3
1987 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1988$as_echo "$ac_res" >&6; }
1989 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1990
1991} # ac_fn_c_find_intX_t
1992
1993# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1994# --------------------------------------------
1995# Tries to find the compile-time value of EXPR in a program that includes
1996# INCLUDES, setting VAR accordingly. Returns whether the value could be
1997# computed
1998ac_fn_c_compute_int ()
1999{
2000 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2001 if test "$cross_compiling" = yes; then
2002 # Depending upon the size, compute the lo and hi bounds.
2003cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2004/* end confdefs.h. */
2005$4
2006int
2007main ()
2008{
2009static int test_array [1 - 2 * !(($2) >= 0)];
2010test_array [0] = 0
2011
2012 ;
2013 return 0;
2014}
2015_ACEOF
2016if ac_fn_c_try_compile "$LINENO"; then :
2017 ac_lo=0 ac_mid=0
2018 while :; do
2019 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2020/* end confdefs.h. */
2021$4
2022int
2023main ()
2024{
2025static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2026test_array [0] = 0
2027
2028 ;
2029 return 0;
2030}
2031_ACEOF
2032if ac_fn_c_try_compile "$LINENO"; then :
2033 ac_hi=$ac_mid; break
2034else
2035 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2036 if test $ac_lo -le $ac_mid; then
2037 ac_lo= ac_hi=
2038 break
2039 fi
2040 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2041fi
2042rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2043 done
2044else
2045 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2046/* end confdefs.h. */
2047$4
2048int
2049main ()
2050{
2051static int test_array [1 - 2 * !(($2) < 0)];
2052test_array [0] = 0
2053
2054 ;
2055 return 0;
2056}
2057_ACEOF
2058if ac_fn_c_try_compile "$LINENO"; then :
2059 ac_hi=-1 ac_mid=-1
2060 while :; do
2061 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2062/* end confdefs.h. */
2063$4
2064int
2065main ()
2066{
2067static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2068test_array [0] = 0
2069
2070 ;
2071 return 0;
2072}
2073_ACEOF
2074if ac_fn_c_try_compile "$LINENO"; then :
2075 ac_lo=$ac_mid; break
2076else
2077 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2078 if test $ac_mid -le $ac_hi; then
2079 ac_lo= ac_hi=
2080 break
2081 fi
2082 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2083fi
2084rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2085 done
2086else
2087 ac_lo= ac_hi=
2088fi
2089rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2090fi
2091rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2092# Binary search between lo and hi bounds.
2093while test "x$ac_lo" != "x$ac_hi"; do
2094 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2095 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2096/* end confdefs.h. */
2097$4
2098int
2099main ()
2100{
2101static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2102test_array [0] = 0
2103
2104 ;
2105 return 0;
2106}
2107_ACEOF
2108if ac_fn_c_try_compile "$LINENO"; then :
2109 ac_hi=$ac_mid
2110else
2111 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2112fi
2113rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2114done
2115case $ac_lo in #((
2116?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2117'') ac_retval=1 ;;
2118esac
2119 else
2120 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2121/* end confdefs.h. */
2122$4
2123static long int longval () { return $2; }
2124static unsigned long int ulongval () { return $2; }
2125#include <stdio.h>
2126#include <stdlib.h>
2127int
2128main ()
2129{
2130
2131 FILE *f = fopen ("conftest.val", "w");
2132 if (! f)
2133 return 1;
2134 if (($2) < 0)
2135 {
2136 long int i = longval ();
2137 if (i != ($2))
2138 return 1;
2139 fprintf (f, "%ld", i);
2140 }
2141 else
2142 {
2143 unsigned long int i = ulongval ();
2144 if (i != ($2))
2145 return 1;
2146 fprintf (f, "%lu", i);
2147 }
2148 /* Do not output a trailing newline, as this causes \r\n confusion
2149 on some platforms. */
2150 return ferror (f) || fclose (f) != 0;
2151
2152 ;
2153 return 0;
2154}
2155_ACEOF
2156if ac_fn_c_try_run "$LINENO"; then :
2157 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2158else
2159 ac_retval=1
2160fi
2161rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2162 conftest.$ac_objext conftest.beam conftest.$ac_ext
2163rm -f conftest.val
2164
2165 fi
2166 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2167 as_fn_set_status $ac_retval
2168
2169} # ac_fn_c_compute_int
2170
2171# ac_fn_c_check_func LINENO FUNC VAR
2172# ----------------------------------
2173# Tests whether FUNC exists, setting the cache variable VAR accordingly
2174ac_fn_c_check_func ()
2175{
2176 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2177 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2178$as_echo_n "checking for $2... " >&6; }
Benjamin Peterson79263252010-10-31 16:50:44 +00002179if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002180 $as_echo_n "(cached) " >&6
2181else
2182 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2183/* end confdefs.h. */
2184/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2185 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2186#define $2 innocuous_$2
2187
2188/* System header to define __stub macros and hopefully few prototypes,
2189 which can conflict with char $2 (); below.
2190 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2191 <limits.h> exists even on freestanding compilers. */
2192
2193#ifdef __STDC__
2194# include <limits.h>
2195#else
2196# include <assert.h>
2197#endif
2198
2199#undef $2
2200
2201/* Override any GCC internal prototype to avoid an error.
2202 Use char because int might match the return type of a GCC
2203 builtin and then its argument prototype would still apply. */
2204#ifdef __cplusplus
2205extern "C"
2206#endif
2207char $2 ();
2208/* The GNU C library defines this for functions which it implements
2209 to always fail with ENOSYS. Some functions are actually named
2210 something starting with __ and the normal name is an alias. */
2211#if defined __stub_$2 || defined __stub___$2
2212choke me
2213#endif
2214
2215int
2216main ()
2217{
2218return $2 ();
2219 ;
2220 return 0;
2221}
2222_ACEOF
2223if ac_fn_c_try_link "$LINENO"; then :
2224 eval "$3=yes"
2225else
2226 eval "$3=no"
2227fi
2228rm -f core conftest.err conftest.$ac_objext \
2229 conftest$ac_exeext conftest.$ac_ext
2230fi
2231eval ac_res=\$$3
2232 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2233$as_echo "$ac_res" >&6; }
2234 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2235
2236} # ac_fn_c_check_func
2237
2238# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2239# ----------------------------------------------------
2240# Tries to find if the field MEMBER exists in type AGGR, after including
2241# INCLUDES, setting cache variable VAR accordingly.
2242ac_fn_c_check_member ()
2243{
2244 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2245 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2246$as_echo_n "checking for $2.$3... " >&6; }
Benjamin Peterson79263252010-10-31 16:50:44 +00002247if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002248 $as_echo_n "(cached) " >&6
2249else
2250 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2251/* end confdefs.h. */
2252$5
2253int
2254main ()
2255{
2256static $2 ac_aggr;
2257if (ac_aggr.$3)
2258return 0;
2259 ;
2260 return 0;
2261}
2262_ACEOF
2263if ac_fn_c_try_compile "$LINENO"; then :
2264 eval "$4=yes"
2265else
2266 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2267/* end confdefs.h. */
2268$5
2269int
2270main ()
2271{
2272static $2 ac_aggr;
2273if (sizeof ac_aggr.$3)
2274return 0;
2275 ;
2276 return 0;
2277}
2278_ACEOF
2279if ac_fn_c_try_compile "$LINENO"; then :
2280 eval "$4=yes"
2281else
2282 eval "$4=no"
2283fi
2284rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2285fi
2286rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2287fi
2288eval ac_res=\$$4
2289 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2290$as_echo "$ac_res" >&6; }
2291 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2292
2293} # ac_fn_c_check_member
2294
Benjamin Peterson79263252010-10-31 16:50:44 +00002295# ac_fn_c_check_decl LINENO SYMBOL VAR
2296# ------------------------------------
2297# Tests whether SYMBOL is declared, setting cache variable VAR accordingly.
Matthias Kloseb9621712010-04-24 17:59:49 +00002298ac_fn_c_check_decl ()
2299{
2300 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Benjamin Peterson79263252010-10-31 16:50:44 +00002301 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $2 is declared" >&5
2302$as_echo_n "checking whether $2 is declared... " >&6; }
2303if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002304 $as_echo_n "(cached) " >&6
2305else
2306 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2307/* end confdefs.h. */
2308$4
2309int
2310main ()
2311{
Benjamin Peterson79263252010-10-31 16:50:44 +00002312#ifndef $2
2313 (void) $2;
Matthias Kloseb9621712010-04-24 17:59:49 +00002314#endif
2315
2316 ;
2317 return 0;
2318}
2319_ACEOF
2320if ac_fn_c_try_compile "$LINENO"; then :
2321 eval "$3=yes"
2322else
2323 eval "$3=no"
2324fi
2325rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2326fi
2327eval ac_res=\$$3
2328 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2329$as_echo "$ac_res" >&6; }
2330 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2331
2332} # ac_fn_c_check_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002333cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002334This file contains any messages produced by compilers while
2335running configure, to aid debugging if configure makes a mistake.
2336
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00002337It was created by python $as_me 3.2, which was
Benjamin Peterson79263252010-10-31 16:50:44 +00002338generated by GNU Autoconf 2.65. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002339
2340 $ $0 $@
2341
2342_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002343exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002344{
2345cat <<_ASUNAME
2346## --------- ##
2347## Platform. ##
2348## --------- ##
2349
2350hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2351uname -m = `(uname -m) 2>/dev/null || echo unknown`
2352uname -r = `(uname -r) 2>/dev/null || echo unknown`
2353uname -s = `(uname -s) 2>/dev/null || echo unknown`
2354uname -v = `(uname -v) 2>/dev/null || echo unknown`
2355
2356/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2357/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2358
2359/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2360/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2361/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002362/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002363/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2364/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2365/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2366
2367_ASUNAME
2368
2369as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2370for as_dir in $PATH
2371do
2372 IFS=$as_save_IFS
2373 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002374 $as_echo "PATH: $as_dir"
2375 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002376IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002377
2378} >&5
2379
2380cat >&5 <<_ACEOF
2381
2382
2383## ----------- ##
2384## Core tests. ##
2385## ----------- ##
2386
2387_ACEOF
2388
2389
2390# Keep a trace of the command line.
2391# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002392# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002393# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002394# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002395ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002396ac_configure_args0=
2397ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002398ac_must_keep_next=false
2399for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002400do
Skip Montanaro6dead952003-09-25 14:50:04 +00002401 for ac_arg
2402 do
2403 case $ac_arg in
2404 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2405 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2406 | -silent | --silent | --silen | --sile | --sil)
2407 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002408 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002409 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002410 esac
2411 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002412 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002413 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002414 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002415 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002416 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002417 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002418 case $ac_arg in
2419 *=* | --config-cache | -C | -disable-* | --disable-* \
2420 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2421 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2422 | -with-* | --with-* | -without-* | --without-* | --x)
2423 case "$ac_configure_args0 " in
2424 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2425 esac
2426 ;;
2427 -* ) ac_must_keep_next=true ;;
2428 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002429 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002430 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002431 ;;
2432 esac
2433 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002434done
Matthias Kloseb9621712010-04-24 17:59:49 +00002435{ ac_configure_args0=; unset ac_configure_args0;}
2436{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002437
2438# When interrupted or exit'd, cleanup temporary files, and complete
2439# config.log. We remove comments because anyway the quotes in there
2440# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002441# WARNING: Use '\'' to represent an apostrophe within the trap.
2442# 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 +00002443trap 'exit_status=$?
2444 # Save into config.log some information that might help in debugging.
2445 {
2446 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002447
Benjamin Peterson79263252010-10-31 16:50:44 +00002448 cat <<\_ASBOX
2449## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002450## Cache variables. ##
Benjamin Peterson79263252010-10-31 16:50:44 +00002451## ---------------- ##
2452_ASBOX
Martin v. Löwis11437992002-04-12 09:54:03 +00002453 echo
2454 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002455(
2456 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2457 eval ac_val=\$$ac_var
2458 case $ac_val in #(
2459 *${as_nl}*)
2460 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002461 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2462$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002463 esac
2464 case $ac_var in #(
2465 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002466 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2467 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002468 esac ;;
2469 esac
2470 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002471 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002472 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2473 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002474 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002475 "s/'\''/'\''\\\\'\'''\''/g;
2476 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2477 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002478 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002479 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002480 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002481 esac |
2482 sort
2483)
Martin v. Löwis11437992002-04-12 09:54:03 +00002484 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002485
Benjamin Peterson79263252010-10-31 16:50:44 +00002486 cat <<\_ASBOX
2487## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002488## Output variables. ##
Benjamin Peterson79263252010-10-31 16:50:44 +00002489## ----------------- ##
2490_ASBOX
Skip Montanaro6dead952003-09-25 14:50:04 +00002491 echo
2492 for ac_var in $ac_subst_vars
2493 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002494 eval ac_val=\$$ac_var
2495 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002496 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002497 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002498 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002499 done | sort
2500 echo
2501
2502 if test -n "$ac_subst_files"; then
Benjamin Peterson79263252010-10-31 16:50:44 +00002503 cat <<\_ASBOX
2504## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002505## File substitutions. ##
Benjamin Peterson79263252010-10-31 16:50:44 +00002506## ------------------- ##
2507_ASBOX
Skip Montanaro6dead952003-09-25 14:50:04 +00002508 echo
2509 for ac_var in $ac_subst_files
2510 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002511 eval ac_val=\$$ac_var
2512 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002513 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002514 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002515 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002516 done | sort
2517 echo
2518 fi
2519
Martin v. Löwis11437992002-04-12 09:54:03 +00002520 if test -s confdefs.h; then
Benjamin Peterson79263252010-10-31 16:50:44 +00002521 cat <<\_ASBOX
2522## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002523## confdefs.h. ##
Benjamin Peterson79263252010-10-31 16:50:44 +00002524## ----------- ##
2525_ASBOX
Martin v. Löwis11437992002-04-12 09:54:03 +00002526 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002527 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002528 echo
2529 fi
2530 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002531 $as_echo "$as_me: caught signal $ac_signal"
2532 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002533 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002534 rm -f core *.core core.conftest.* &&
2535 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002536 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002537' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002538for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002539 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002540done
2541ac_signal=0
2542
2543# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002544rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002545
Matthias Kloseb9621712010-04-24 17:59:49 +00002546$as_echo "/* confdefs.h */" > confdefs.h
2547
Martin v. Löwis11437992002-04-12 09:54:03 +00002548# Predefined preprocessor variables.
2549
2550cat >>confdefs.h <<_ACEOF
2551#define PACKAGE_NAME "$PACKAGE_NAME"
2552_ACEOF
2553
Martin v. Löwis11437992002-04-12 09:54:03 +00002554cat >>confdefs.h <<_ACEOF
2555#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2556_ACEOF
2557
Martin v. Löwis11437992002-04-12 09:54:03 +00002558cat >>confdefs.h <<_ACEOF
2559#define PACKAGE_VERSION "$PACKAGE_VERSION"
2560_ACEOF
2561
Martin v. Löwis11437992002-04-12 09:54:03 +00002562cat >>confdefs.h <<_ACEOF
2563#define PACKAGE_STRING "$PACKAGE_STRING"
2564_ACEOF
2565
Martin v. Löwis11437992002-04-12 09:54:03 +00002566cat >>confdefs.h <<_ACEOF
2567#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2568_ACEOF
2569
Matthias Kloseb9621712010-04-24 17:59:49 +00002570cat >>confdefs.h <<_ACEOF
2571#define PACKAGE_URL "$PACKAGE_URL"
2572_ACEOF
2573
Martin v. Löwis11437992002-04-12 09:54:03 +00002574
2575# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002576# Prefer an explicitly selected file to automatically selected ones.
2577ac_site_file1=NONE
2578ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002579if test -n "$CONFIG_SITE"; then
Benjamin Peterson79263252010-10-31 16:50:44 +00002580 ac_site_file1=$CONFIG_SITE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002581elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002582 ac_site_file1=$prefix/share/config.site
2583 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002584else
Matthias Kloseb9621712010-04-24 17:59:49 +00002585 ac_site_file1=$ac_default_prefix/share/config.site
2586 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002587fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002588for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002589do
Matthias Kloseb9621712010-04-24 17:59:49 +00002590 test "x$ac_site_file" = xNONE && continue
2591 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2592 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2593$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002594 sed 's/^/| /' "$ac_site_file" >&5
Benjamin Peterson79263252010-10-31 16:50:44 +00002595 . "$ac_site_file"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002596 fi
2597done
2598
2599if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002600 # Some versions of bash will fail to source /dev/null (special files
2601 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2602 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2603 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2604$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002605 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002606 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2607 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002608 esac
2609 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002610else
Matthias Kloseb9621712010-04-24 17:59:49 +00002611 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2612$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002613 >$cache_file
2614fi
2615
2616# Check that the precious variables saved in the cache have kept the same
2617# value.
2618ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002619for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002620 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2621 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002622 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2623 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002624 case $ac_old_set,$ac_new_set in
2625 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002626 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2627$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 +00002628 ac_cache_corrupted=: ;;
2629 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002630 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2631$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002632 ac_cache_corrupted=: ;;
2633 ,);;
2634 *)
2635 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002636 # differences in whitespace do not lead to failure.
2637 ac_old_val_w=`echo x $ac_old_val`
2638 ac_new_val_w=`echo x $ac_new_val`
2639 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2640 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2641$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2642 ac_cache_corrupted=:
2643 else
2644 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2645$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2646 eval $ac_var=\$ac_old_val
2647 fi
2648 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2649$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2650 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2651$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002652 fi;;
2653 esac
2654 # Pass precious variables to config.status.
2655 if test "$ac_new_set" = set; then
2656 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002657 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002658 *) ac_arg=$ac_var=$ac_new_val ;;
2659 esac
2660 case " $ac_configure_args " in
2661 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002662 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002663 esac
2664 fi
2665done
2666if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002667 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2668$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2669 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2670$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Benjamin Peterson79263252010-10-31 16:50:44 +00002671 as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002672fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002673## -------------------- ##
2674## Main body of script. ##
2675## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002676
Guido van Rossum7f43da71994-08-01 12:15:30 +00002677ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002678ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002679ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2680ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2681ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002682
Guido van Rossum627b2d71993-12-24 10:39:16 +00002683
Michael W. Hudson54241132001-12-07 15:38:26 +00002684
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002685ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002686
2687
Martin v. Löwis11437992002-04-12 09:54:03 +00002688
Benjamin Petersond23f8222009-04-05 19:13:16 +00002689if test "$prefix" != "/"; then
2690 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2691fi
2692
2693
Martin v. Löwis11437992002-04-12 09:54:03 +00002694
2695
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002696# We don't use PACKAGE_ variables, and they cause conflicts
2697# with other autoconf-based packages that include Python.h
2698grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2699rm confdefs.h
2700mv confdefs.h.new confdefs.h
2701
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002702
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00002703VERSION=3.2
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002704
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002705# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002706
2707SOVERSION=1.0
2708
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002709# The later defininition of _XOPEN_SOURCE disables certain features
2710# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2711
Matthias Kloseb9621712010-04-24 17:59:49 +00002712$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002713
2714
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002715# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2716# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2717# them.
2718
Matthias Kloseb9621712010-04-24 17:59:49 +00002719$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002720
2721
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002722# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2723# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2724# them.
2725
Matthias Kloseb9621712010-04-24 17:59:49 +00002726$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002727
2728
Martin v. Löwisd6320502004-08-12 13:45:08 +00002729# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2730# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
2731
Matthias Kloseb9621712010-04-24 17:59:49 +00002732$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00002733
2734
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002735# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2736# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2737# them.
2738
Matthias Kloseb9621712010-04-24 17:59:49 +00002739$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002740
2741
2742
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002743define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002744
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00002745# Arguments passed to configure.
2746
2747CONFIG_ARGS="$ac_configure_args"
2748
Matthias Kloseb9621712010-04-24 17:59:49 +00002749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
2750$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002751# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002752if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002753 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00002754 case $enableval in
2755 yes)
2756 enableval=/Developer/SDKs/MacOSX10.4u.sdk
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002757 if test ! -d "${enableval}"
2758 then
2759 enableval=/
2760 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002761 ;;
2762 esac
2763 case $enableval in
2764 no)
2765 UNIVERSALSDK=
2766 enable_universalsdk=
2767 ;;
2768 *)
2769 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002770 if test ! -d "${UNIVERSALSDK}"
2771 then
Benjamin Peterson79263252010-10-31 16:50:44 +00002772 as_fn_error "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002773 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002774 ;;
2775 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002776
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002777
Thomas Wouters477c8d52006-05-27 19:21:47 +00002778else
2779
2780 UNIVERSALSDK=
2781 enable_universalsdk=
2782
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002783fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002784
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002785if test -n "${UNIVERSALSDK}"
2786then
Matthias Kloseb9621712010-04-24 17:59:49 +00002787 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
2788$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002789else
Matthias Kloseb9621712010-04-24 17:59:49 +00002790 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2791$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002792fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002793
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002794
Benjamin Peterson6794aa32008-07-16 20:33:37 +00002795
2796
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002797UNIVERSAL_ARCHS="32-bit"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00002798
Matthias Kloseb9621712010-04-24 17:59:49 +00002799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
2800$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002801
2802# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002803if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002804 withval=$with_universal_archs;
Matthias Kloseb9621712010-04-24 17:59:49 +00002805 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
2806$as_echo "$withval" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002807 UNIVERSAL_ARCHS="$withval"
2808
2809else
2810
Matthias Kloseb9621712010-04-24 17:59:49 +00002811 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 32-bit" >&5
2812$as_echo "32-bit" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002813
2814fi
2815
2816
2817
2818
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002819
2820# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002821if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002822 withval=$with_framework_name;
2823 PYTHONFRAMEWORK=${withval}
2824 PYTHONFRAMEWORKDIR=${withval}.framework
2825 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
2826
2827else
2828
2829 PYTHONFRAMEWORK=Python
2830 PYTHONFRAMEWORKDIR=Python.framework
2831 PYTHONFRAMEWORKIDENTIFIER=org.python.python
2832
2833fi
2834
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002835# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002836if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002837 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00002838 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00002839 yes)
Jack Jansene578a632001-08-15 01:27:14 +00002840 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00002841 esac
2842 case $enableval in
2843 no)
2844 PYTHONFRAMEWORK=
2845 PYTHONFRAMEWORKDIR=no-framework
2846 PYTHONFRAMEWORKPREFIX=
2847 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002848 FRAMEWORKINSTALLFIRST=
2849 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002850 FRAMEWORKALTINSTALLFIRST=
2851 FRAMEWORKALTINSTALLLAST=
2852 if test "x${prefix}" = "xNONE"; then
2853 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2854 else
2855 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2856 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00002857 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00002858 ;;
2859 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002860 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00002861 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00002862 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00002863 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00002864 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
2865 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002866 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002867
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002868 if test "x${prefix}" = "xNONE" ; then
2869 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002870
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002871 else
2872 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2873 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002874
2875 case "${enableval}" in
2876 /System*)
2877 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2878 if test "${prefix}" = "NONE" ; then
2879 # See below
2880 FRAMEWORKUNIXTOOLSPREFIX="/usr"
2881 fi
2882 ;;
2883
2884 /Library*)
2885 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2886 ;;
2887
2888 */Library/Frameworks)
2889 MDIR="`dirname "${enableval}"`"
2890 MDIR="`dirname "${MDIR}"`"
2891 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
2892
2893 if test "${prefix}" = "NONE"; then
2894 # User hasn't specified the
2895 # --prefix option, but wants to install
2896 # the framework in a non-default location,
2897 # ensure that the compatibility links get
2898 # installed relative to that prefix as well
2899 # instead of in /usr/local.
2900 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
2901 fi
2902 ;;
2903
2904 *)
2905 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2906 ;;
2907 esac
2908
Jack Jansen127e56e2001-09-11 14:41:54 +00002909 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00002910
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002911 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00002912 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002913 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002914
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002915 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002916
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002917 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
2918
2919 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
2920
Jack Jansene578a632001-08-15 01:27:14 +00002921 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002922
Guido van Rossum563e7081996-09-10 18:20:48 +00002923else
Martin v. Löwis11437992002-04-12 09:54:03 +00002924
Jack Jansene578a632001-08-15 01:27:14 +00002925 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00002926 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00002927 PYTHONFRAMEWORKPREFIX=
2928 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002929 FRAMEWORKINSTALLFIRST=
2930 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002931 FRAMEWORKALTINSTALLFIRST=
2932 FRAMEWORKALTINSTALLLAST=
2933 if test "x${prefix}" = "xNONE" ; then
2934 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2935 else
2936 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2937 fi
Jack Jansene578a632001-08-15 01:27:14 +00002938 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002939
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002940
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002941fi
2942
Thomas Wouters477c8d52006-05-27 19:21:47 +00002943
2944
Michael W. Hudson54241132001-12-07 15:38:26 +00002945
2946
2947
2948
Jack Jansene578a632001-08-15 01:27:14 +00002949
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002950
2951
2952
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002953
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002954
Jack Jansene578a632001-08-15 01:27:14 +00002955##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00002956## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00002957## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00002958##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002959# Set name for machine-dependent library files
2960
Matthias Kloseb9621712010-04-24 17:59:49 +00002961{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
2962$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002963if test -z "$MACHDEP"
2964then
Guido van Rossum563e7081996-09-10 18:20:48 +00002965 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002966 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00002967 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00002968 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002969 else
Guido van Rossum563e7081996-09-10 18:20:48 +00002970 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002971 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00002972 ac_md_system=`echo $ac_sys_system |
2973 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
2974 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00002975 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00002976 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00002977
Guido van Rossum07397971997-04-29 21:49:50 +00002978 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002979 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002980 darwin*) MACHDEP="darwin";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00002981 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00002982 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002983 esac
2984fi
Guido van Rossum91922671997-10-09 20:24:13 +00002985
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002986# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
2987# disable features if it is defined, without any means to access these
2988# features as extensions. For these systems, we skip the definition of
2989# _XOPEN_SOURCE. Before adding a system to the list to gain access to
2990# some feature, make sure there is no alternative way to access this
2991# feature. Also, when using wildcards, make sure you have verified the
2992# need for not defining _XOPEN_SOURCE on all systems matching the
2993# wildcard, and that the wildcard does not include future systems
2994# (which may remove their limitations).
2995case $ac_sys_system/$ac_sys_release in
2996 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
2997 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00002998 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00002999 # In addition, Stefan Krah confirms that issue #1244610 exists through
3000 # OpenBSD 4.6, but is fixed in 4.7.
3001 OpenBSD/2.* | OpenBSD/3.[0123456789] | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003002 define_xopen_source=no
3003 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3004 # also defined. This can be overridden by defining _BSD_SOURCE
3005 # As this has a different meaning on Linux, only define it on OpenBSD
3006
Matthias Kloseb9621712010-04-24 17:59:49 +00003007$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003008
3009 ;;
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003010 OpenBSD/4.[789])
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003011 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3012 # also defined. This can be overridden by defining _BSD_SOURCE
3013 # As this has a different meaning on Linux, only define it on OpenBSD
3014
Matthias Kloseb9621712010-04-24 17:59:49 +00003015$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003016
3017 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003018 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3019 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3020 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003021 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 +00003022 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003023 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3024 # request to enable features supported by the standard as a request
3025 # to disable features not supported by the standard. The best way
3026 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3027 # entirely and define __EXTENSIONS__ instead.
3028 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003029 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003030 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3031 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003032 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003033 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003034 define_xopen_source=no;;
3035 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003036 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003037 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003038 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003039 # On FreeBSD 4, the math functions C89 does not cover are never defined
3040 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3041 FreeBSD/4.*)
3042 define_xopen_source=no;;
3043 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3044 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3045 # identifies itself as Darwin/7.*
3046 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3047 # disables platform specific features beyond repair.
3048 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3049 # has no effect, don't bother defining them
3050 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003051 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003052 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003053 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003054 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3055 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3056 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003057 AIX/4)
3058 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003059 AIX/5)
3060 if test `uname -r` -eq 1; then
3061 define_xopen_source=no
3062 fi
3063 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003064 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3065 # defining NI_NUMERICHOST.
3066 QNX/6.3.2)
3067 define_xopen_source=no
3068 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003069
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003070esac
3071
3072if test $define_xopen_source = yes
3073then
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003074
Matthias Kloseb9621712010-04-24 17:59:49 +00003075$as_echo "#define _XOPEN_SOURCE 600" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003076
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003077
3078 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3079 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3080 # several APIs are not declared. Since this is also needed in some
3081 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003082
Matthias Kloseb9621712010-04-24 17:59:49 +00003083$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003084
3085
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003086
Matthias Kloseb9621712010-04-24 17:59:49 +00003087$as_echo "#define _POSIX_C_SOURCE 200112L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003088
3089
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003090fi
3091
Guido van Rossum91922671997-10-09 20:24:13 +00003092#
3093# SGI compilers allow the specification of the both the ABI and the
3094# ISA on the command line. Depending on the values of these switches,
3095# different and often incompatable code will be generated.
3096#
3097# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3098# thus supply support for various ABI/ISA combinations. The MACHDEP
3099# variable is also adjusted.
3100#
3101
3102if test ! -z "$SGI_ABI"
3103then
3104 CC="cc $SGI_ABI"
3105 LDFLAGS="$SGI_ABI $LDFLAGS"
3106 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3107fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003108{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3109$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003110
Jack Jansen6b08a402004-06-03 12:41:45 +00003111# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3112# it may influence the way we can build extensions, so distutils
3113# needs to check it
3114
Thomas Wouters477c8d52006-05-27 19:21:47 +00003115
Jack Jansen6b08a402004-06-03 12:41:45 +00003116CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003117EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003118
Matthias Kloseb9621712010-04-24 17:59:49 +00003119{ $as_echo "$as_me:${as_lineno-$LINENO}: checking machine type as reported by uname -m" >&5
3120$as_echo_n "checking machine type as reported by uname -m... " >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00003121ac_sys_machine=`uname -m`
Matthias Kloseb9621712010-04-24 17:59:49 +00003122{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_sys_machine" >&5
3123$as_echo "$ac_sys_machine" >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00003124
Guido van Rossum627b2d71993-12-24 10:39:16 +00003125# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003126
3127# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3128# for debug/optimization stuff. BASECFLAGS is for flags that are required
3129# just to get things to compile and link. Users are free to override OPT
3130# when running configure or make. The build should not break if they do.
3131# BASECFLAGS should generally not be messed with, however.
3132
3133# XXX shouldn't some/most/all of this code be merged with the stuff later
3134# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003135{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3136$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003137
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003138# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003139if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003140 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003141 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003142 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003143 without_gcc=yes;;
3144 yes) CC=gcc
3145 without_gcc=no;;
3146 *) CC=$withval
3147 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003148 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003149else
Martin v. Löwis11437992002-04-12 09:54:03 +00003150
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003151 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003152 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003153 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003154 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003155 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003156fi
3157
Matthias Kloseb9621712010-04-24 17:59:49 +00003158{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3159$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003160
Guido van Rossum8b131c51995-03-09 14:10:13 +00003161# If the user switches compilers, we can't believe the cache
3162if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3163then
Benjamin Peterson79263252010-10-31 16:50:44 +00003164 as_fn_error "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003165(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003166fi
3167
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003168# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3169# when the compiler supports them, but we don't always want -O2, and
3170# we set -g later.
3171if test -z "$CFLAGS"; then
3172 CFLAGS=
3173fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003174ac_ext=c
3175ac_cpp='$CPP $CPPFLAGS'
3176ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3177ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3178ac_compiler_gnu=$ac_cv_c_compiler_gnu
3179if test -n "$ac_tool_prefix"; then
3180 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3181set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3183$as_echo_n "checking for $ac_word... " >&6; }
3184if test "${ac_cv_prog_CC+set}" = set; then :
3185 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003186else
3187 if test -n "$CC"; then
3188 ac_cv_prog_CC="$CC" # Let the user override the test.
3189else
Martin v. Löwis11437992002-04-12 09:54:03 +00003190as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3191for as_dir in $PATH
3192do
3193 IFS=$as_save_IFS
3194 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003195 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003196 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 +00003197 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003198 $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 +00003199 break 2
3200 fi
3201done
Matthias Kloseb9621712010-04-24 17:59:49 +00003202 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003203IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003204
Jack Jansendd19cf82001-12-06 22:36:17 +00003205fi
3206fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003207CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003208if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003209 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3210$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003211else
Matthias Kloseb9621712010-04-24 17:59:49 +00003212 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3213$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003214fi
3215
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003216
Martin v. Löwis11437992002-04-12 09:54:03 +00003217fi
3218if test -z "$ac_cv_prog_CC"; then
3219 ac_ct_CC=$CC
3220 # Extract the first word of "gcc", so it can be a program name with args.
3221set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3223$as_echo_n "checking for $ac_word... " >&6; }
3224if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
3225 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003226else
3227 if test -n "$ac_ct_CC"; then
3228 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3229else
3230as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3231for as_dir in $PATH
3232do
3233 IFS=$as_save_IFS
3234 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003235 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003236 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 +00003237 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003238 $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 +00003239 break 2
3240 fi
3241done
Matthias Kloseb9621712010-04-24 17:59:49 +00003242 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003243IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003244
3245fi
3246fi
3247ac_ct_CC=$ac_cv_prog_ac_ct_CC
3248if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003249 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3250$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003251else
Matthias Kloseb9621712010-04-24 17:59:49 +00003252 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3253$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003254fi
3255
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003256 if test "x$ac_ct_CC" = x; then
3257 CC=""
3258 else
3259 case $cross_compiling:$ac_tool_warned in
3260yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003261{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3262$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003263ac_tool_warned=yes ;;
3264esac
3265 CC=$ac_ct_CC
3266 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003267else
3268 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003269fi
3270
Jack Jansendd19cf82001-12-06 22:36:17 +00003271if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003272 if test -n "$ac_tool_prefix"; then
3273 # 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 +00003274set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003275{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3276$as_echo_n "checking for $ac_word... " >&6; }
3277if test "${ac_cv_prog_CC+set}" = set; then :
3278 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003279else
3280 if test -n "$CC"; then
3281 ac_cv_prog_CC="$CC" # Let the user override the test.
3282else
Martin v. Löwis11437992002-04-12 09:54:03 +00003283as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3284for as_dir in $PATH
3285do
3286 IFS=$as_save_IFS
3287 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003288 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003289 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 +00003290 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003291 $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 +00003292 break 2
3293 fi
3294done
Matthias Kloseb9621712010-04-24 17:59:49 +00003295 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003296IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003297
3298fi
3299fi
3300CC=$ac_cv_prog_CC
3301if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003302 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3303$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003304else
Matthias Kloseb9621712010-04-24 17:59:49 +00003305 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3306$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003307fi
3308
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003309
Martin v. Löwis11437992002-04-12 09:54:03 +00003310 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003311fi
3312if test -z "$CC"; then
3313 # Extract the first word of "cc", so it can be a program name with args.
3314set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003315{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3316$as_echo_n "checking for $ac_word... " >&6; }
3317if test "${ac_cv_prog_CC+set}" = set; then :
3318 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003319else
3320 if test -n "$CC"; then
3321 ac_cv_prog_CC="$CC" # Let the user override the test.
3322else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003323 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003324as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3325for as_dir in $PATH
3326do
3327 IFS=$as_save_IFS
3328 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003329 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003330 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 +00003331 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3332 ac_prog_rejected=yes
3333 continue
3334 fi
3335 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003336 $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 +00003337 break 2
3338 fi
3339done
Matthias Kloseb9621712010-04-24 17:59:49 +00003340 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003341IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003342
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003343if test $ac_prog_rejected = yes; then
3344 # We found a bogon in the path, so make sure we never use it.
3345 set dummy $ac_cv_prog_CC
3346 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003347 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003348 # We chose a different compiler from the bogus one.
3349 # However, it has the same basename, so the bogon will be chosen
3350 # first if we set CC to just the basename; use the full file name.
3351 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003352 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003353 fi
3354fi
3355fi
3356fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003357CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003358if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003359 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3360$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003361else
Matthias Kloseb9621712010-04-24 17:59:49 +00003362 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3363$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003364fi
3365
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003366
Martin v. Löwis11437992002-04-12 09:54:03 +00003367fi
3368if test -z "$CC"; then
3369 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003370 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003371 do
3372 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3373set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003374{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3375$as_echo_n "checking for $ac_word... " >&6; }
3376if test "${ac_cv_prog_CC+set}" = set; then :
3377 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003378else
3379 if test -n "$CC"; then
3380 ac_cv_prog_CC="$CC" # Let the user override the test.
3381else
Martin v. Löwis11437992002-04-12 09:54:03 +00003382as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3383for as_dir in $PATH
3384do
3385 IFS=$as_save_IFS
3386 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003387 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003388 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 +00003389 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003390 $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 +00003391 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003392 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003393done
Matthias Kloseb9621712010-04-24 17:59:49 +00003394 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003395IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003396
3397fi
3398fi
3399CC=$ac_cv_prog_CC
3400if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003401 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3402$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003403else
Matthias Kloseb9621712010-04-24 17:59:49 +00003404 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3405$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003406fi
3407
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003408
Martin v. Löwis11437992002-04-12 09:54:03 +00003409 test -n "$CC" && break
3410 done
3411fi
3412if test -z "$CC"; then
3413 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003414 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003415do
3416 # Extract the first word of "$ac_prog", so it can be a program name with args.
3417set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003418{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3419$as_echo_n "checking for $ac_word... " >&6; }
3420if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
3421 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003422else
3423 if test -n "$ac_ct_CC"; then
3424 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3425else
3426as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3427for as_dir in $PATH
3428do
3429 IFS=$as_save_IFS
3430 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003431 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003432 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 +00003433 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003434 $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 +00003435 break 2
3436 fi
3437done
Matthias Kloseb9621712010-04-24 17:59:49 +00003438 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003439IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003440
Martin v. Löwis11437992002-04-12 09:54:03 +00003441fi
3442fi
3443ac_ct_CC=$ac_cv_prog_ac_ct_CC
3444if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003445 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3446$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003447else
Matthias Kloseb9621712010-04-24 17:59:49 +00003448 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3449$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003450fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003451
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003452
Martin v. Löwis11437992002-04-12 09:54:03 +00003453 test -n "$ac_ct_CC" && break
3454done
Michael W. Hudson54241132001-12-07 15:38:26 +00003455
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003456 if test "x$ac_ct_CC" = x; then
3457 CC=""
3458 else
3459 case $cross_compiling:$ac_tool_warned in
3460yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003461{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3462$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003463ac_tool_warned=yes ;;
3464esac
3465 CC=$ac_ct_CC
3466 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003467fi
3468
3469fi
3470
3471
Matthias Kloseb9621712010-04-24 17:59:49 +00003472test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3473$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson79263252010-10-31 16:50:44 +00003474as_fn_error "no acceptable C compiler found in \$PATH
3475See \`config.log' for more details." "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003476
3477# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003478$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3479set X $ac_compile
3480ac_compiler=$2
3481for ac_option in --version -v -V -qversion; do
3482 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003483case "(($ac_try" in
3484 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3485 *) ac_try_echo=$ac_try;;
3486esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003487eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3488$as_echo "$ac_try_echo"; } >&5
3489 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003490 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003491 if test -s conftest.err; then
3492 sed '10a\
3493... rest of stderr output deleted ...
3494 10q' conftest.err >conftest.er1
3495 cat conftest.er1 >&5
3496 fi
3497 rm -f conftest.er1 conftest.err
3498 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3499 test $ac_status = 0; }
3500done
Martin v. Löwis11437992002-04-12 09:54:03 +00003501
Matthias Kloseb9621712010-04-24 17:59:49 +00003502cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003503/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003504
Martin v. Löwis11437992002-04-12 09:54:03 +00003505int
3506main ()
3507{
3508
3509 ;
3510 return 0;
3511}
3512_ACEOF
3513ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003514ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003515# Try to create an executable without -o first, disregard a.out.
3516# It will help us diagnose broken compilers, and finding out an intuition
3517# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3519$as_echo_n "checking whether the C compiler works... " >&6; }
3520ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3521
3522# The possible output files:
3523ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3524
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003525ac_rmfiles=
3526for ac_file in $ac_files
3527do
3528 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003529 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003530 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3531 esac
3532done
3533rm -f $ac_rmfiles
3534
Matthias Kloseb9621712010-04-24 17:59:49 +00003535if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003536case "(($ac_try" in
3537 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3538 *) ac_try_echo=$ac_try;;
3539esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003540eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3541$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003542 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003543 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003544 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3545 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003546 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3547# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3548# in a Makefile. We should not override ac_cv_exeext if it was cached,
3549# so that the user can short-circuit this test for compilers unknown to
3550# Autoconf.
3551for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003552do
3553 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003554 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003555 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003556 ;;
3557 [ab].out )
3558 # We found the default executable, but exeext='' is most
3559 # certainly right.
3560 break;;
3561 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003562 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003563 then :; else
3564 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3565 fi
3566 # We set ac_cv_exeext here because the later test for it is not
3567 # safe: cross compilers may not add the suffix if given an `-o'
3568 # argument, so we may need to know it at that point already.
3569 # Even if this section looks crufty: it has the advantage of
3570 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003571 break;;
3572 * )
3573 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003574 esac
3575done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003576test "$ac_cv_exeext" = no && ac_cv_exeext=
3577
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003578else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003579 ac_file=''
3580fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003581if test -z "$ac_file"; then :
3582 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3583$as_echo "no" >&6; }
3584$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003585sed 's/^/| /' conftest.$ac_ext >&5
3586
Matthias Kloseb9621712010-04-24 17:59:49 +00003587{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3588$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson79263252010-10-31 16:50:44 +00003589{ as_fn_set_status 77
3590as_fn_error "C compiler cannot create executables
3591See \`config.log' for more details." "$LINENO" 5; }; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003592else
3593 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3594$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003595fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3597$as_echo_n "checking for C compiler default output file name... " >&6; }
3598{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3599$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003600ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003601
Matthias Kloseb9621712010-04-24 17:59:49 +00003602rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003603ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00003604{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3605$as_echo_n "checking for suffix of executables... " >&6; }
3606if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003607case "(($ac_try" in
3608 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3609 *) ac_try_echo=$ac_try;;
3610esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003611eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3612$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003613 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003614 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003615 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3616 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003617 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3618# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3619# work properly (i.e., refer to `conftest.exe'), while it won't with
3620# `rm'.
3621for ac_file in conftest.exe conftest conftest.*; do
3622 test -f "$ac_file" || continue
3623 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003624 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003625 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3626 break;;
3627 * ) break;;
3628 esac
3629done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003630else
Matthias Kloseb9621712010-04-24 17:59:49 +00003631 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3632$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson79263252010-10-31 16:50:44 +00003633as_fn_error "cannot compute suffix of executables: cannot compile and link
3634See \`config.log' for more details." "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003635fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003636rm -f conftest conftest$ac_cv_exeext
3637{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3638$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003639
3640rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003641EXEEXT=$ac_cv_exeext
3642ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003643cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3644/* end confdefs.h. */
3645#include <stdio.h>
3646int
3647main ()
3648{
3649FILE *f = fopen ("conftest.out", "w");
3650 return ferror (f) || fclose (f) != 0;
3651
3652 ;
3653 return 0;
3654}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003655_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003656ac_clean_files="$ac_clean_files conftest.out"
3657# Check that the compiler produces executables we can run. If not, either
3658# the compiler is broken, or we cross compile.
3659{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3660$as_echo_n "checking whether we are cross compiling... " >&6; }
3661if test "$cross_compiling" != yes; then
3662 { { ac_try="$ac_link"
3663case "(($ac_try" in
3664 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3665 *) ac_try_echo=$ac_try;;
3666esac
3667eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3668$as_echo "$ac_try_echo"; } >&5
3669 (eval "$ac_link") 2>&5
3670 ac_status=$?
3671 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3672 test $ac_status = 0; }
3673 if { ac_try='./conftest$ac_cv_exeext'
3674 { { case "(($ac_try" in
3675 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3676 *) ac_try_echo=$ac_try;;
3677esac
3678eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3679$as_echo "$ac_try_echo"; } >&5
3680 (eval "$ac_try") 2>&5
3681 ac_status=$?
3682 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3683 test $ac_status = 0; }; }; then
3684 cross_compiling=no
3685 else
3686 if test "$cross_compiling" = maybe; then
3687 cross_compiling=yes
3688 else
3689 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3690$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson79263252010-10-31 16:50:44 +00003691as_fn_error "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00003692If you meant to cross compile, use \`--host'.
Benjamin Peterson79263252010-10-31 16:50:44 +00003693See \`config.log' for more details." "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003694 fi
3695 fi
3696fi
3697{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3698$as_echo "$cross_compiling" >&6; }
3699
3700rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3701ac_clean_files=$ac_clean_files_save
3702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3703$as_echo_n "checking for suffix of object files... " >&6; }
3704if test "${ac_cv_objext+set}" = set; then :
3705 $as_echo_n "(cached) " >&6
3706else
3707 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003708/* end confdefs.h. */
3709
3710int
3711main ()
3712{
3713
3714 ;
3715 return 0;
3716}
3717_ACEOF
3718rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00003719if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003720case "(($ac_try" in
3721 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3722 *) ac_try_echo=$ac_try;;
3723esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003724eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3725$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003726 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003727 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003728 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3729 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003730 for ac_file in conftest.o conftest.obj conftest.*; do
3731 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00003732 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003733 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003734 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3735 break;;
3736 esac
3737done
3738else
Matthias Kloseb9621712010-04-24 17:59:49 +00003739 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003740sed 's/^/| /' conftest.$ac_ext >&5
3741
Matthias Kloseb9621712010-04-24 17:59:49 +00003742{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3743$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson79263252010-10-31 16:50:44 +00003744as_fn_error "cannot compute suffix of object files: cannot compile
3745See \`config.log' for more details." "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003746fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003747rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003748fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003749{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3750$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003751OBJEXT=$ac_cv_objext
3752ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003753{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3754$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3755if test "${ac_cv_c_compiler_gnu+set}" = set; then :
3756 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003757else
Matthias Kloseb9621712010-04-24 17:59:49 +00003758 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003759/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003760
Martin v. Löwis11437992002-04-12 09:54:03 +00003761int
3762main ()
3763{
3764#ifndef __GNUC__
3765 choke me
3766#endif
3767
3768 ;
3769 return 0;
3770}
3771_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003772if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00003773 ac_compiler_gnu=yes
3774else
Matthias Kloseb9621712010-04-24 17:59:49 +00003775 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003776fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003777rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003778ac_cv_c_compiler_gnu=$ac_compiler_gnu
3779
3780fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003781{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3782$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3783if test $ac_compiler_gnu = yes; then
3784 GCC=yes
3785else
3786 GCC=
3787fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003788ac_test_CFLAGS=${CFLAGS+set}
3789ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00003790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3791$as_echo_n "checking whether $CC accepts -g... " >&6; }
3792if test "${ac_cv_prog_cc_g+set}" = set; then :
3793 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003794else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003795 ac_save_c_werror_flag=$ac_c_werror_flag
3796 ac_c_werror_flag=yes
3797 ac_cv_prog_cc_g=no
3798 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00003799 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003800/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003801
Martin v. Löwis11437992002-04-12 09:54:03 +00003802int
3803main ()
3804{
3805
3806 ;
3807 return 0;
3808}
3809_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003810if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00003811 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003812else
Matthias Kloseb9621712010-04-24 17:59:49 +00003813 CFLAGS=""
3814 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003815/* end confdefs.h. */
3816
3817int
3818main ()
3819{
3820
3821 ;
3822 return 0;
3823}
3824_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003825if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003826
Matthias Kloseb9621712010-04-24 17:59:49 +00003827else
3828 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003829 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00003830 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003831/* end confdefs.h. */
3832
3833int
3834main ()
3835{
3836
3837 ;
3838 return 0;
3839}
3840_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003841if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003842 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00003843fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003844rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003845fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003846rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3847fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003848rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3849 ac_c_werror_flag=$ac_save_c_werror_flag
3850fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003851{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3852$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003853if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003854 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003855elif test $ac_cv_prog_cc_g = yes; then
3856 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003857 CFLAGS="-g -O2"
3858 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003859 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003860 fi
3861else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003862 if test "$GCC" = yes; then
3863 CFLAGS="-O2"
3864 else
3865 CFLAGS=
3866 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003867fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003868{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3869$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3870if test "${ac_cv_prog_cc_c89+set}" = set; then :
3871 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003872else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003873 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003874ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00003875cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003876/* end confdefs.h. */
3877#include <stdarg.h>
3878#include <stdio.h>
3879#include <sys/types.h>
3880#include <sys/stat.h>
3881/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3882struct buf { int x; };
3883FILE * (*rcsopen) (struct buf *, struct stat *, int);
3884static char *e (p, i)
3885 char **p;
3886 int i;
3887{
3888 return p[i];
3889}
3890static char *f (char * (*g) (char **, int), char **p, ...)
3891{
3892 char *s;
3893 va_list v;
3894 va_start (v,p);
3895 s = g (p, va_arg (v,int));
3896 va_end (v);
3897 return s;
3898}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003899
3900/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3901 function prototypes and stuff, but not '\xHH' hex character constants.
3902 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003903 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003904 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3905 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003906 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003907int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3908
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003909/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3910 inside strings and character constants. */
3911#define FOO(x) 'x'
3912int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3913
Skip Montanaro6dead952003-09-25 14:50:04 +00003914int test (int i, double x);
3915struct s1 {int (*f) (int a);};
3916struct s2 {int (*f) (double a);};
3917int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3918int argc;
3919char **argv;
3920int
3921main ()
3922{
3923return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3924 ;
3925 return 0;
3926}
3927_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003928for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3929 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003930do
3931 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00003932 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003933 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00003934fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003935rm -f core conftest.err conftest.$ac_objext
3936 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00003937done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003938rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003939CC=$ac_save_CC
3940
3941fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003942# AC_CACHE_VAL
3943case "x$ac_cv_prog_cc_c89" in
3944 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00003945 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3946$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003947 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00003948 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3949$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003950 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003951 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00003952 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3953$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003954esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003955if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00003956
Matthias Kloseb9621712010-04-24 17:59:49 +00003957fi
Skip Montanaro6dead952003-09-25 14:50:04 +00003958
Martin v. Löwis11437992002-04-12 09:54:03 +00003959ac_ext=c
3960ac_cpp='$CPP $CPPFLAGS'
3961ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3962ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3963ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003964
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003965
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003966
3967
Matthias Kloseb9621712010-04-24 17:59:49 +00003968{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
3969$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003970
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003971# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003972if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003973 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003974
3975 case $withval in
3976 no) with_cxx_main=no
3977 MAINCC='$(CC)';;
3978 yes) with_cxx_main=yes
3979 MAINCC='$(CXX)';;
3980 *) with_cxx_main=yes
3981 MAINCC=$withval
3982 if test -z "$CXX"
3983 then
3984 CXX=$withval
3985 fi;;
3986 esac
3987else
3988
3989 with_cxx_main=no
3990 MAINCC='$(CC)'
3991
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003992fi
3993
Matthias Kloseb9621712010-04-24 17:59:49 +00003994{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
3995$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003996
3997preset_cxx="$CXX"
3998if test -z "$CXX"
3999then
4000 case "$CC" in
4001 gcc) # Extract the first word of "g++", so it can be a program name with args.
4002set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004003{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4004$as_echo_n "checking for $ac_word... " >&6; }
4005if test "${ac_cv_path_CXX+set}" = set; then :
4006 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004007else
4008 case $CXX in
4009 [\\/]* | ?:[\\/]*)
4010 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4011 ;;
4012 *)
4013 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4014for as_dir in notfound
4015do
4016 IFS=$as_save_IFS
4017 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004018 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004019 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 +00004020 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004021 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004022 break 2
4023 fi
4024done
Matthias Kloseb9621712010-04-24 17:59:49 +00004025 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004026IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004027
4028 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
4029 ;;
4030esac
4031fi
4032CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004033if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4035$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004036else
Matthias Kloseb9621712010-04-24 17:59:49 +00004037 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4038$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004039fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004040
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004041 ;;
4042 cc) # Extract the first word of "c++", so it can be a program name with args.
4043set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4045$as_echo_n "checking for $ac_word... " >&6; }
4046if test "${ac_cv_path_CXX+set}" = set; then :
4047 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004048else
4049 case $CXX in
4050 [\\/]* | ?:[\\/]*)
4051 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4052 ;;
4053 *)
4054 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4055for as_dir in notfound
4056do
4057 IFS=$as_save_IFS
4058 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004059 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004060 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 +00004061 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004062 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004063 break 2
4064 fi
4065done
Matthias Kloseb9621712010-04-24 17:59:49 +00004066 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004067IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004068
4069 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
4070 ;;
4071esac
4072fi
4073CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004074if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004075 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4076$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004077else
Matthias Kloseb9621712010-04-24 17:59:49 +00004078 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4079$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004080fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004081
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004082 ;;
4083 esac
4084 if test "$CXX" = "notfound"
4085 then
4086 CXX=""
4087 fi
4088fi
4089if test -z "$CXX"
4090then
4091 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4092do
4093 # Extract the first word of "$ac_prog", so it can be a program name with args.
4094set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004095{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4096$as_echo_n "checking for $ac_word... " >&6; }
4097if test "${ac_cv_prog_CXX+set}" = set; then :
4098 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004099else
4100 if test -n "$CXX"; then
4101 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4102else
4103as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4104for as_dir in $PATH
4105do
4106 IFS=$as_save_IFS
4107 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004108 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004109 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 +00004110 ac_cv_prog_CXX="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00004111 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004112 break 2
4113 fi
4114done
Matthias Kloseb9621712010-04-24 17:59:49 +00004115 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004116IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004117
4118fi
4119fi
4120CXX=$ac_cv_prog_CXX
4121if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004122 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4123$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004124else
Matthias Kloseb9621712010-04-24 17:59:49 +00004125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4126$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004127fi
4128
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004129
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004130 test -n "$CXX" && break
4131done
4132test -n "$CXX" || CXX="notfound"
4133
4134 if test "$CXX" = "notfound"
4135 then
4136 CXX=""
4137 fi
4138fi
4139if test "$preset_cxx" != "$CXX"
4140then
Matthias Kloseb9621712010-04-24 17:59:49 +00004141 { $as_echo "$as_me:${as_lineno-$LINENO}: 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 " >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00004146$as_echo "$as_me: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004147
4148 By default, distutils will build C++ extension modules with \"$CXX\".
4149 If this is not intended, then set CXX on the configure command line.
4150 " >&2;}
4151fi
4152
4153
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004154# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004155
4156ac_ext=c
4157ac_cpp='$CPP $CPPFLAGS'
4158ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4159ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4160ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Kloseb9621712010-04-24 17:59:49 +00004161{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4162$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004163# On Suns, sometimes $CPP names a directory.
4164if test -n "$CPP" && test -d "$CPP"; then
4165 CPP=
4166fi
4167if test -z "$CPP"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004168 if test "${ac_cv_prog_CPP+set}" = set; then :
4169 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004170else
Martin v. Löwis11437992002-04-12 09:54:03 +00004171 # Double quotes because CPP needs to be expanded
4172 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4173 do
4174 ac_preproc_ok=false
4175for ac_c_preproc_warn_flag in '' yes
4176do
4177 # Use a header file that comes with gcc, so configuring glibc
4178 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004179 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4180 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004181 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004182 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004183 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004184/* end confdefs.h. */
4185#ifdef __STDC__
4186# include <limits.h>
4187#else
4188# include <assert.h>
4189#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004190 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004191_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004192if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004193
Matthias Kloseb9621712010-04-24 17:59:49 +00004194else
Martin v. Löwis11437992002-04-12 09:54:03 +00004195 # Broken: fails on valid input.
4196continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004197fi
Benjamin Peterson79263252010-10-31 16:50:44 +00004198rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004199
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004200 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004201 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004202 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004203/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004204#include <ac_nonexistent.h>
4205_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004206if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004207 # Broken: success on invalid input.
4208continue
4209else
Martin v. Löwis11437992002-04-12 09:54:03 +00004210 # Passes both tests.
4211ac_preproc_ok=:
4212break
4213fi
Benjamin Peterson79263252010-10-31 16:50:44 +00004214rm -f conftest.err conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004215
4216done
4217# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Benjamin Peterson79263252010-10-31 16:50:44 +00004218rm -f conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004219if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004220 break
4221fi
4222
4223 done
4224 ac_cv_prog_CPP=$CPP
4225
4226fi
4227 CPP=$ac_cv_prog_CPP
4228else
4229 ac_cv_prog_CPP=$CPP
4230fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004231{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4232$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004233ac_preproc_ok=false
4234for ac_c_preproc_warn_flag in '' yes
4235do
4236 # Use a header file that comes with gcc, so configuring glibc
4237 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004238 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4239 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004240 # On the NeXT, cc -E runs the code through the compiler's parser,
4241 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004242 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004243/* end confdefs.h. */
4244#ifdef __STDC__
4245# include <limits.h>
4246#else
4247# include <assert.h>
4248#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004249 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004250_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004251if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004252
Matthias Kloseb9621712010-04-24 17:59:49 +00004253else
Martin v. Löwis11437992002-04-12 09:54:03 +00004254 # Broken: fails on valid input.
4255continue
4256fi
Benjamin Peterson79263252010-10-31 16:50:44 +00004257rm -f conftest.err conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004258
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004259 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004260 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004261 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004262/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004263#include <ac_nonexistent.h>
4264_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004265if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004266 # Broken: success on invalid input.
4267continue
4268else
Martin v. Löwis11437992002-04-12 09:54:03 +00004269 # Passes both tests.
4270ac_preproc_ok=:
4271break
4272fi
Benjamin Peterson79263252010-10-31 16:50:44 +00004273rm -f conftest.err conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004274
4275done
4276# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Benjamin Peterson79263252010-10-31 16:50:44 +00004277rm -f conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004278if $ac_preproc_ok; then :
4279
Martin v. Löwis11437992002-04-12 09:54:03 +00004280else
Matthias Kloseb9621712010-04-24 17:59:49 +00004281 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4282$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson79263252010-10-31 16:50:44 +00004283as_fn_error "C preprocessor \"$CPP\" fails sanity check
4284See \`config.log' for more details." "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004285fi
4286
4287ac_ext=c
4288ac_cpp='$CPP $CPPFLAGS'
4289ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4290ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4291ac_compiler_gnu=$ac_cv_c_compiler_gnu
4292
4293
Matthias Kloseb9621712010-04-24 17:59:49 +00004294{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4295$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4296if test "${ac_cv_path_GREP+set}" = set; then :
4297 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004298else
Matthias Kloseb9621712010-04-24 17:59:49 +00004299 if test -z "$GREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004300 ac_path_GREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004301 # Loop through the user's path and test for each of PROGNAME-LIST
4302 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004303for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4304do
4305 IFS=$as_save_IFS
4306 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004307 for ac_prog in grep ggrep; do
4308 for ac_exec_ext in '' $ac_executable_extensions; do
4309 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4310 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
4311# Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004312 # Check for GNU $ac_path_GREP
4313case `"$ac_path_GREP" --version 2>&1` in
4314*GNU*)
4315 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4316*)
4317 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004318 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004319 while :
4320 do
4321 cat "conftest.in" "conftest.in" >"conftest.tmp"
4322 mv "conftest.tmp" "conftest.in"
4323 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00004324 $as_echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004325 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4326 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00004327 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004328 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4329 # Best one so far, save it but keep looking for a better one
4330 ac_cv_path_GREP="$ac_path_GREP"
4331 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00004332 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004333 # 10*(2^10) chars as input seems more than enough
4334 test $ac_count -gt 10 && break
4335 done
4336 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4337esac
4338
Matthias Kloseb9621712010-04-24 17:59:49 +00004339 $ac_path_GREP_found && break 3
4340 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004341 done
Matthias Kloseb9621712010-04-24 17:59:49 +00004342 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004343IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00004344 if test -z "$ac_cv_path_GREP"; then
Benjamin Peterson79263252010-10-31 16:50:44 +00004345 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 +00004346 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004347else
4348 ac_cv_path_GREP=$GREP
4349fi
4350
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004351fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004352{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4353$as_echo "$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004354 GREP="$ac_cv_path_GREP"
4355
4356
Matthias Kloseb9621712010-04-24 17:59:49 +00004357{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4358$as_echo_n "checking for egrep... " >&6; }
4359if test "${ac_cv_path_EGREP+set}" = set; then :
4360 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004361else
4362 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4363 then ac_cv_path_EGREP="$GREP -E"
4364 else
Matthias Kloseb9621712010-04-24 17:59:49 +00004365 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004366 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004367 # Loop through the user's path and test for each of PROGNAME-LIST
4368 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004369for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4370do
4371 IFS=$as_save_IFS
4372 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004373 for ac_prog in egrep; do
4374 for ac_exec_ext in '' $ac_executable_extensions; do
4375 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4376 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
4377# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004378 # Check for GNU $ac_path_EGREP
4379case `"$ac_path_EGREP" --version 2>&1` in
4380*GNU*)
4381 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4382*)
4383 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004384 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004385 while :
4386 do
4387 cat "conftest.in" "conftest.in" >"conftest.tmp"
4388 mv "conftest.tmp" "conftest.in"
4389 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00004390 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004391 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4392 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00004393 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004394 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4395 # Best one so far, save it but keep looking for a better one
4396 ac_cv_path_EGREP="$ac_path_EGREP"
4397 ac_path_EGREP_max=$ac_count
4398 fi
4399 # 10*(2^10) chars as input seems more than enough
4400 test $ac_count -gt 10 && break
4401 done
4402 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4403esac
4404
Matthias Kloseb9621712010-04-24 17:59:49 +00004405 $ac_path_EGREP_found && break 3
4406 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004407 done
Matthias Kloseb9621712010-04-24 17:59:49 +00004408 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004409IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00004410 if test -z "$ac_cv_path_EGREP"; then
Benjamin Peterson79263252010-10-31 16:50:44 +00004411 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 +00004412 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004413else
4414 ac_cv_path_EGREP=$EGREP
4415fi
4416
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004417 fi
4418fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004419{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4420$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004421 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00004422
4423
Matthias Kloseb9621712010-04-24 17:59:49 +00004424{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4425$as_echo_n "checking for ANSI C header files... " >&6; }
4426if test "${ac_cv_header_stdc+set}" = set; then :
4427 $as_echo_n "(cached) " >&6
4428else
4429 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004430/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00004431#include <stdlib.h>
4432#include <stdarg.h>
4433#include <string.h>
4434#include <float.h>
4435
4436int
4437main ()
4438{
4439
4440 ;
4441 return 0;
4442}
4443_ACEOF
4444if ac_fn_c_try_compile "$LINENO"; then :
4445 ac_cv_header_stdc=yes
4446else
4447 ac_cv_header_stdc=no
4448fi
4449rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4450
4451if test $ac_cv_header_stdc = yes; then
4452 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4453 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4454/* end confdefs.h. */
4455#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004456
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004457_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004458if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00004459 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004460
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004461else
Matthias Kloseb9621712010-04-24 17:59:49 +00004462 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004463fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00004464rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004465
Matthias Kloseb9621712010-04-24 17:59:49 +00004466fi
4467
4468if test $ac_cv_header_stdc = yes; then
4469 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4470 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4471/* end confdefs.h. */
4472#include <stdlib.h>
4473
4474_ACEOF
4475if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4476 $EGREP "free" >/dev/null 2>&1; then :
4477
4478else
4479 ac_cv_header_stdc=no
4480fi
4481rm -f conftest*
4482
4483fi
4484
4485if test $ac_cv_header_stdc = yes; then
4486 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4487 if test "$cross_compiling" = yes; then :
4488 :
4489else
4490 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4491/* end confdefs.h. */
4492#include <ctype.h>
4493#include <stdlib.h>
4494#if ((' ' & 0x0FF) == 0x020)
4495# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4496# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4497#else
4498# define ISLOWER(c) \
4499 (('a' <= (c) && (c) <= 'i') \
4500 || ('j' <= (c) && (c) <= 'r') \
4501 || ('s' <= (c) && (c) <= 'z'))
4502# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4503#endif
4504
4505#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4506int
4507main ()
4508{
4509 int i;
4510 for (i = 0; i < 256; i++)
4511 if (XOR (islower (i), ISLOWER (i))
4512 || toupper (i) != TOUPPER (i))
4513 return 2;
4514 return 0;
4515}
4516_ACEOF
4517if ac_fn_c_try_run "$LINENO"; then :
4518
4519else
4520 ac_cv_header_stdc=no
4521fi
4522rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4523 conftest.$ac_objext conftest.beam conftest.$ac_ext
4524fi
4525
4526fi
4527fi
4528{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4529$as_echo "$ac_cv_header_stdc" >&6; }
4530if test $ac_cv_header_stdc = yes; then
4531
4532$as_echo "#define STDC_HEADERS 1" >>confdefs.h
4533
4534fi
4535
4536# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4537for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4538 inttypes.h stdint.h unistd.h
4539do :
4540 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4541ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4542"
Benjamin Peterson79263252010-10-31 16:50:44 +00004543eval as_val=\$$as_ac_Header
4544 if test "x$as_val" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004545 cat >>confdefs.h <<_ACEOF
4546#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4547_ACEOF
4548
4549fi
4550
4551done
4552
4553
4554
4555 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
4556if test "x$ac_cv_header_minix_config_h" = x""yes; then :
4557 MINIX=yes
4558else
4559 MINIX=
4560fi
4561
4562
4563 if test "$MINIX" = yes; then
4564
4565$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4566
4567
4568$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4569
4570
4571$as_echo "#define _MINIX 1" >>confdefs.h
4572
4573 fi
4574
4575
4576 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4577$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
4578if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
4579 $as_echo_n "(cached) " >&6
4580else
4581 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4582/* end confdefs.h. */
4583
4584# define __EXTENSIONS__ 1
4585 $ac_includes_default
4586int
4587main ()
4588{
4589
4590 ;
4591 return 0;
4592}
4593_ACEOF
4594if ac_fn_c_try_compile "$LINENO"; then :
4595 ac_cv_safe_to_define___extensions__=yes
4596else
4597 ac_cv_safe_to_define___extensions__=no
4598fi
4599rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4600fi
4601{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4602$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4603 test $ac_cv_safe_to_define___extensions__ = yes &&
4604 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4605
4606 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4607
4608 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4609
4610 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4611
4612 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4613
4614
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004615
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004616# Check for unsupported systems
4617case $ac_sys_system/$ac_sys_release in
4618atheos*|Linux*/1*)
4619 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
4620 echo See README for details.
4621 exit 1;;
4622esac
4623
4624
Matthias Kloseb9621712010-04-24 17:59:49 +00004625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
4626$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004627
4628# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004629if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004630 withval=$with_suffix;
4631 case $withval in
4632 no) EXEEXT=;;
4633 yes) EXEEXT=.exe;;
4634 *) EXEEXT=$withval;;
4635 esac
4636fi
4637
Matthias Kloseb9621712010-04-24 17:59:49 +00004638{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
4639$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004640
4641# Test whether we're running on a non-case-sensitive system, in which
4642# case we give a warning if no ext is given
4643
Matthias Kloseb9621712010-04-24 17:59:49 +00004644{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
4645$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004646if test ! -d CaseSensitiveTestDir; then
4647mkdir CaseSensitiveTestDir
4648fi
4649
4650if test -d casesensitivetestdir
4651then
Matthias Kloseb9621712010-04-24 17:59:49 +00004652 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4653$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004654 BUILDEXEEXT=.exe
4655else
Matthias Kloseb9621712010-04-24 17:59:49 +00004656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4657$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004658 BUILDEXEEXT=$EXEEXT
4659fi
4660rmdir CaseSensitiveTestDir
4661
4662case $MACHDEP in
4663bsdos*)
4664 case $CC in
4665 gcc) CC="$CC -D_HAVE_BSDI";;
4666 esac;;
4667esac
4668
4669case $ac_sys_system in
4670hp*|HP*)
4671 case $CC in
4672 cc|*/cc) CC="$CC -Ae";;
4673 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004674esac
4675
4676
4677
Matthias Kloseb9621712010-04-24 17:59:49 +00004678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
4679$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004680if test -z "$LIBRARY"
4681then
Barry Warsawf040d7d2010-10-18 17:09:07 +00004682 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004683fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004684{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
4685$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004686
4687# LDLIBRARY is the name of the library to link against (as opposed to the
4688# name of the library into which to insert object files). BLDLIBRARY is also
4689# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
4690# is blank as the main program is not linked directly against LDLIBRARY.
4691# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
4692# systems without shared libraries, LDLIBRARY is the same as LIBRARY
4693# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
4694# DLLLIBRARY is the shared (i.e., DLL) library.
4695#
4696# RUNSHARED is used to run shared python without installed libraries
4697#
4698# INSTSONAME is the name of the shared library that will be use to install
4699# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004700#
4701# LDVERSION is the shared library version number, normally the Python version
4702# with the ABI build flags appended.
4703
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004704
4705
4706
4707
4708
4709
4710LDLIBRARY="$LIBRARY"
4711BLDLIBRARY='$(LDLIBRARY)'
4712INSTSONAME='$(LDLIBRARY)'
4713DLLLIBRARY=''
4714LDLIBRARYDIR=''
4715RUNSHARED=''
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004716LDVERSION="$(VERSION)"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004717
4718# LINKCC is the command that links the python executable -- default is $(CC).
4719# If CXX is set, and if it is needed to link a main function that was
4720# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
4721# python might then depend on the C++ runtime
4722# This is altered for AIX in order to build the export list before
4723# linking.
4724
Matthias Kloseb9621712010-04-24 17:59:49 +00004725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
4726$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004727if test -z "$LINKCC"
4728then
4729 LINKCC='$(PURIFY) $(MAINCC)'
4730 case $ac_sys_system in
4731 AIX*)
4732 exp_extra="\"\""
4733 if test $ac_sys_release -ge 5 -o \
4734 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
4735 exp_extra="."
4736 fi
4737 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004738 QNX*)
4739 # qcc must be used because the other compilers do not
4740 # support -N.
4741 LINKCC=qcc;;
4742 esac
4743fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004744{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
4745$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004746
4747# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
4748# make sure we default having it set to "no": this is used by
4749# distutils.unixccompiler to know if it should add --enable-new-dtags
4750# to linker command lines, and failing to detect GNU ld simply results
4751# in the same bahaviour as before.
4752
Matthias Kloseb9621712010-04-24 17:59:49 +00004753{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
4754$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004755ac_prog=ld
4756if test "$GCC" = yes; then
4757 ac_prog=`$CC -print-prog-name=ld`
4758fi
4759case `"$ac_prog" -V 2>&1 < /dev/null` in
4760 *GNU*)
4761 GNULD=yes;;
4762 *)
4763 GNULD=no;;
4764esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004765{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
4766$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004767
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
4769$as_echo_n "checking for inline... " >&6; }
4770if test "${ac_cv_c_inline+set}" = set; then :
4771 $as_echo_n "(cached) " >&6
4772else
4773 ac_cv_c_inline=no
4774for ac_kw in inline __inline__ __inline; do
4775 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4776/* end confdefs.h. */
4777#ifndef __cplusplus
4778typedef int foo_t;
4779static $ac_kw foo_t static_foo () {return 0; }
4780$ac_kw foo_t foo () {return 0; }
4781#endif
4782
4783_ACEOF
4784if ac_fn_c_try_compile "$LINENO"; then :
4785 ac_cv_c_inline=$ac_kw
4786fi
4787rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4788 test "$ac_cv_c_inline" != no && break
4789done
4790
4791fi
4792{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
4793$as_echo "$ac_cv_c_inline" >&6; }
4794
4795case $ac_cv_c_inline in
4796 inline | yes) ;;
4797 *)
4798 case $ac_cv_c_inline in
4799 no) ac_val=;;
4800 *) ac_val=$ac_cv_c_inline;;
4801 esac
4802 cat >>confdefs.h <<_ACEOF
4803#ifndef __cplusplus
4804#define inline $ac_val
4805#endif
4806_ACEOF
4807 ;;
4808esac
4809
4810if test "$ac_cv_c_inline" != no ; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00004811
4812$as_echo "#define USE_INLINE 1" >>confdefs.h
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004813
4814
4815fi
4816
4817
Matthias Kloseb9621712010-04-24 17:59:49 +00004818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
4819$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004820# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004821if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004822 enableval=$enable_shared;
4823fi
4824
4825
4826if test -z "$enable_shared"
4827then
4828 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00004829 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004830 enable_shared="yes";;
4831 *)
4832 enable_shared="no";;
4833 esac
4834fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004835{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
4836$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004837
Matthias Kloseb9621712010-04-24 17:59:49 +00004838{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
4839$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004840# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004841if test "${enable_profiling+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004842 enableval=$enable_profiling; ac_save_cc="$CC"
4843 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004844 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004845 ac_enable_profiling="no"
4846else
Matthias Kloseb9621712010-04-24 17:59:49 +00004847 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004848/* end confdefs.h. */
4849int main() { return 0; }
4850_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004851if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004852 ac_enable_profiling="yes"
4853else
Matthias Kloseb9621712010-04-24 17:59:49 +00004854 ac_enable_profiling="no"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004855fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004856rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4857 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004858fi
4859
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004860 CC="$ac_save_cc"
4861fi
4862
Matthias Kloseb9621712010-04-24 17:59:49 +00004863{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_profiling" >&5
4864$as_echo "$ac_enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004865
4866case "$ac_enable_profiling" in
4867 "yes")
4868 BASECFLAGS="-pg $BASECFLAGS"
4869 LDFLAGS="-pg $LDFLAGS"
4870 ;;
4871esac
4872
Matthias Kloseb9621712010-04-24 17:59:49 +00004873{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
4874$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004875
4876# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4877# library that we build, but we do not want to link against it (we
4878# will find it with a -framework option). For this reason there is an
4879# extra variable BLDLIBRARY against which Python and the extension
4880# modules are linked, BLDLIBRARY. This is normally the same as
4881# LDLIBRARY, but empty for MacOSX framework builds.
4882if test "$enable_framework"
4883then
4884 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
4885 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
4886 BLDLIBRARY=''
4887else
4888 BLDLIBRARY='$(LDLIBRARY)'
4889fi
4890
4891# Other platforms follow
4892if test $enable_shared = "yes"; then
4893
Matthias Kloseb9621712010-04-24 17:59:49 +00004894$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004895
4896 case $ac_sys_system in
4897 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004898 LDLIBRARY='libpython$(LDVERSION).dll.a'
4899 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004900 ;;
4901 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004902 LDLIBRARY='libpython$(LDVERSION).so'
4903 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004904 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4905 INSTSONAME="$LDLIBRARY".$SOVERSION
4906 ;;
4907 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004908 LDLIBRARY='libpython$(LDVERSION).so'
4909 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004910 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4911 case $ac_sys_system in
4912 FreeBSD*)
4913 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4914 ;;
4915 esac
4916 INSTSONAME="$LDLIBRARY".$SOVERSION
4917 ;;
4918 hp*|HP*)
4919 case `uname -m` in
4920 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004921 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004922 ;;
4923 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004924 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004925 ;;
4926 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004927 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004928 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
4929 ;;
4930 OSF*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004931 LDLIBRARY='libpython$(LDVERSION).so'
4932 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004933 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4934 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004935 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004936 LDLIBRARY='libpython$(LDVERSION).dylib'
4937 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004938 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
4939 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00004940 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004941 LDLIBRARY='libpython$(LDVERSION).so'
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00004942 RUNSHARED=LIBPATH=`pwd`:${LIBPATH}
4943 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004944
4945 esac
4946else # shared is disabled
4947 case $ac_sys_system in
4948 CYGWIN*)
4949 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004950 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004951 ;;
4952 esac
4953fi
4954
Matthias Kloseb9621712010-04-24 17:59:49 +00004955{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
4956$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004957
4958if test -n "$ac_tool_prefix"; then
4959 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4960set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004961{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4962$as_echo_n "checking for $ac_word... " >&6; }
4963if test "${ac_cv_prog_RANLIB+set}" = set; then :
4964 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004965else
4966 if test -n "$RANLIB"; then
4967 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4968else
4969as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4970for as_dir in $PATH
4971do
4972 IFS=$as_save_IFS
4973 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004974 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004975 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4976 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00004977 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004978 break 2
4979 fi
4980done
Matthias Kloseb9621712010-04-24 17:59:49 +00004981 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004982IFS=$as_save_IFS
4983
4984fi
4985fi
4986RANLIB=$ac_cv_prog_RANLIB
4987if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004988 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
4989$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004990else
Matthias Kloseb9621712010-04-24 17:59:49 +00004991 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4992$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004993fi
4994
4995
4996fi
4997if test -z "$ac_cv_prog_RANLIB"; then
4998 ac_ct_RANLIB=$RANLIB
4999 # Extract the first word of "ranlib", so it can be a program name with args.
5000set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005001{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5002$as_echo_n "checking for $ac_word... " >&6; }
5003if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
5004 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005005else
5006 if test -n "$ac_ct_RANLIB"; then
5007 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5008else
5009as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5010for as_dir in $PATH
5011do
5012 IFS=$as_save_IFS
5013 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005014 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005015 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5016 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005017 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005018 break 2
5019 fi
5020done
Matthias Kloseb9621712010-04-24 17:59:49 +00005021 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005022IFS=$as_save_IFS
5023
5024fi
5025fi
5026ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5027if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5029$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005030else
Matthias Kloseb9621712010-04-24 17:59:49 +00005031 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5032$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005033fi
5034
5035 if test "x$ac_ct_RANLIB" = x; then
5036 RANLIB=":"
5037 else
5038 case $cross_compiling:$ac_tool_warned in
5039yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00005040{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5041$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005042ac_tool_warned=yes ;;
5043esac
5044 RANLIB=$ac_ct_RANLIB
5045 fi
5046else
5047 RANLIB="$ac_cv_prog_RANLIB"
5048fi
5049
5050
5051for ac_prog in ar aal
5052do
5053 # Extract the first word of "$ac_prog", so it can be a program name with args.
5054set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005055{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5056$as_echo_n "checking for $ac_word... " >&6; }
5057if test "${ac_cv_prog_AR+set}" = set; then :
5058 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005059else
5060 if test -n "$AR"; then
5061 ac_cv_prog_AR="$AR" # Let the user override the test.
5062else
5063as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5064for as_dir in $PATH
5065do
5066 IFS=$as_save_IFS
5067 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005068 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005069 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5070 ac_cv_prog_AR="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005071 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005072 break 2
5073 fi
5074done
Matthias Kloseb9621712010-04-24 17:59:49 +00005075 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005076IFS=$as_save_IFS
5077
5078fi
5079fi
5080AR=$ac_cv_prog_AR
5081if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005082 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5083$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005084else
Matthias Kloseb9621712010-04-24 17:59:49 +00005085 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5086$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005087fi
5088
5089
5090 test -n "$AR" && break
5091done
5092test -n "$AR" || AR="ar"
5093
5094
5095# tweak ARFLAGS only if the user didn't set it on the command line
5096
5097if test -z "$ARFLAGS"
5098then
5099 ARFLAGS="rc"
5100fi
5101
5102
5103# Extract the first word of "svnversion", so it can be a program name with args.
5104set dummy svnversion; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005105{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5106$as_echo_n "checking for $ac_word... " >&6; }
5107if test "${ac_cv_prog_SVNVERSION+set}" = set; then :
5108 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005109else
5110 if test -n "$SVNVERSION"; then
5111 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
5112else
5113as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5114for as_dir in $PATH
5115do
5116 IFS=$as_save_IFS
5117 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005118 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005119 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5120 ac_cv_prog_SVNVERSION="found"
Matthias Kloseb9621712010-04-24 17:59:49 +00005121 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005122 break 2
5123 fi
5124done
Matthias Kloseb9621712010-04-24 17:59:49 +00005125 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005126IFS=$as_save_IFS
5127
5128 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
5129fi
5130fi
5131SVNVERSION=$ac_cv_prog_SVNVERSION
5132if test -n "$SVNVERSION"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005133 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SVNVERSION" >&5
5134$as_echo "$SVNVERSION" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005135else
Matthias Kloseb9621712010-04-24 17:59:49 +00005136 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5137$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005138fi
5139
5140
5141if test $SVNVERSION = found
5142then
5143 SVNVERSION="svnversion \$(srcdir)"
5144else
5145 SVNVERSION="echo Unversioned directory"
5146fi
5147
5148case $MACHDEP in
5149bsdos*|hp*|HP*)
5150 # install -d does not work on BSDI or HP-UX
5151 if test -z "$INSTALL"
5152 then
5153 INSTALL="${srcdir}/install-sh -c"
5154 fi
5155esac
5156ac_aux_dir=
5157for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
Benjamin Peterson79263252010-10-31 16:50:44 +00005158 for ac_t in install-sh install.sh shtool; do
5159 if test -f "$ac_dir/$ac_t"; then
5160 ac_aux_dir=$ac_dir
5161 ac_install_sh="$ac_aux_dir/$ac_t -c"
5162 break 2
5163 fi
5164 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005165done
5166if test -z "$ac_aux_dir"; then
Benjamin Peterson79263252010-10-31 16:50:44 +00005167 as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005168fi
5169
5170# These three variables are undocumented and unsupported,
5171# and are intended to be withdrawn in a future Autoconf release.
5172# They can cause serious problems if a builder's source tree is in a directory
5173# whose full name contains unusual characters.
5174ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
5175ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
5176ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
5177
5178
5179# Find a good install program. We prefer a C program (faster),
5180# so one script is as good as another. But avoid the broken or
5181# incompatible versions:
5182# SysV /etc/install, /usr/sbin/install
5183# SunOS /usr/etc/install
5184# IRIX /sbin/install
5185# AIX /bin/install
5186# AmigaOS /C/install, which installs bootblocks on floppy discs
5187# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5188# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5189# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5190# OS/2's system install, which has a completely different semantic
5191# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00005192# Reject install programs that cannot install multiple files.
5193{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
5194$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005195if test -z "$INSTALL"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005196if test "${ac_cv_path_install+set}" = set; then :
5197 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005198else
5199 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5200for as_dir in $PATH
5201do
5202 IFS=$as_save_IFS
5203 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005204 # Account for people who put trailing slashes in PATH elements.
5205case $as_dir/ in #((
5206 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005207 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00005208 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005209 /usr/ucb/* ) ;;
5210 *)
5211 # OSF1 and SCO ODT 3.0 have their own names for install.
5212 # Don't use installbsd from OSF since it installs stuff as root
5213 # by default.
5214 for ac_prog in ginstall scoinst install; do
5215 for ac_exec_ext in '' $ac_executable_extensions; do
5216 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
5217 if test $ac_prog = install &&
5218 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5219 # AIX install. It has an incompatible calling convention.
5220 :
5221 elif test $ac_prog = install &&
5222 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5223 # program-specific install script used by HP pwplus--don't use.
5224 :
5225 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005226 rm -rf conftest.one conftest.two conftest.dir
5227 echo one > conftest.one
5228 echo two > conftest.two
5229 mkdir conftest.dir
5230 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5231 test -s conftest.one && test -s conftest.two &&
5232 test -s conftest.dir/conftest.one &&
5233 test -s conftest.dir/conftest.two
5234 then
5235 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5236 break 3
5237 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005238 fi
5239 fi
5240 done
5241 done
5242 ;;
5243esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005244
5245 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005246IFS=$as_save_IFS
5247
Matthias Kloseb9621712010-04-24 17:59:49 +00005248rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005249
5250fi
5251 if test "${ac_cv_path_install+set}" = set; then
5252 INSTALL=$ac_cv_path_install
5253 else
5254 # As a last resort, use the slow shell script. Don't cache a
5255 # value for INSTALL within a source directory, because that will
5256 # break other packages using the cache if that directory is
5257 # removed, or if the value is a relative name.
5258 INSTALL=$ac_install_sh
5259 fi
5260fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005261{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
5262$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005263
5264# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5265# It thinks the first close brace ends the variable substitution.
5266test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5267
5268test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
5269
5270test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5271
5272
5273# Not every filesystem supports hard links
5274
5275if test -z "$LN" ; then
5276 case $ac_sys_system in
5277 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005278 *) LN=ln;;
5279 esac
5280fi
5281
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00005282# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005283
5284ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00005285
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005286# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00005287{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
5288$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005289
5290# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005291if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005292 withval=$with_pydebug;
5293if test "$withval" != no
5294then
5295
Matthias Kloseb9621712010-04-24 17:59:49 +00005296$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005297
Matthias Kloseb9621712010-04-24 17:59:49 +00005298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5299$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005300 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005301 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00005302else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5303$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005304fi
5305else
Matthias Kloseb9621712010-04-24 17:59:49 +00005306 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5307$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005308fi
5309
5310
5311# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
5312# merged with this chunk of code?
5313
5314# Optimizer/debugger flags
5315# ------------------------
5316# (The following bit of code is complicated enough - please keep things
5317# indented properly. Just pretend you're editing Python code. ;-)
5318
5319# There are two parallel sets of case statements below, one that checks to
5320# see if OPT was set and one that does BASECFLAGS setting based upon
5321# compiler and platform. BASECFLAGS tweaks need to be made even if the
5322# user set OPT.
5323
5324# tweak OPT based on compiler and platform, only if the user didn't set
5325# it on the command line
5326
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00005327if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005328then
5329 case $GCC in
5330 yes)
5331 if test "$CC" != 'g++' ; then
5332 STRICT_PROTO="-Wstrict-prototypes"
5333 fi
5334 # For gcc 4.x we need to use -fwrapv so lets check if its supported
5335 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
5336 WRAP="-fwrapv"
5337 fi
5338 case $ac_cv_prog_cc_g in
5339 yes)
5340 if test "$Py_DEBUG" = 'true' ; then
5341 # Optimization messes up debuggers, so turn it off for
5342 # debug builds.
Mark Dickinsonb2153e92010-05-05 22:31:36 +00005343 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005344 else
5345 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
5346 fi
5347 ;;
5348 *)
5349 OPT="-O3 -Wall $STRICT_PROTO"
5350 ;;
5351 esac
5352 case $ac_sys_system in
5353 SCO_SV*) OPT="$OPT -m486 -DSCO5"
5354 ;;
5355 esac
5356 ;;
5357
5358 *)
5359 OPT="-O"
5360 ;;
5361 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005362fi
5363
5364
5365
5366# The -arch flags for universal builds on OSX
5367UNIVERSAL_ARCH_FLAGS=
5368
5369
5370# tweak BASECFLAGS based on compiler and platform
5371case $GCC in
5372yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005373 # Python doesn't violate C99 aliasing rules, but older versions of
5374 # GCC produce warnings for legal Python code. Enable
5375 # -fno-strict-aliasing on versions of GCC that support but produce
5376 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00005377 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
5378$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005379 ac_save_cc="$CC"
5380 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005381 save_CFLAGS="$CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +00005382 if test "${ac_cv_no_strict_aliasing+set}" = set; then :
5383 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00005384else
Matthias Kloseb9621712010-04-24 17:59:49 +00005385 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005386/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005387
Matthias Kloseb159a552010-04-25 21:00:44 +00005388
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005389int
5390main ()
5391{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005392
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005393 ;
5394 return 0;
5395}
Matthias Kloseb159a552010-04-25 21:00:44 +00005396
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005397_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005398if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00005399
5400 CC="$ac_save_cc -fstrict-aliasing"
5401 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
5402 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005403/* end confdefs.h. */
5404
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005405 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005406int
5407main ()
5408{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005409double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005410 ;
5411 return 0;
5412}
Matthias Kloseb159a552010-04-25 21:00:44 +00005413
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005414_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005415if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00005416
5417 ac_cv_no_strict_aliasing=no
5418
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005419else
Matthias Kloseb159a552010-04-25 21:00:44 +00005420
5421 ac_cv_no_strict_aliasing=yes
5422
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005423fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005424rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00005425
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005426else
Matthias Kloseb159a552010-04-25 21:00:44 +00005427
5428 ac_cv_no_strict_aliasing=no
5429
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005430fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005431rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00005432fi
5433
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005434 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005435 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00005436 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
5437$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005438 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005439 then
5440 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
5441 fi
5442
5443 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
5444 # support. Without this, treatment of subnormals doesn't follow
5445 # the standard.
5446 case $ac_sys_machine in
5447 alpha*)
5448 BASECFLAGS="$BASECFLAGS -mieee"
5449 ;;
5450 esac
5451
5452 case $ac_sys_system in
5453 SCO_SV*)
5454 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
5455 ;;
5456 # is there any other compiler on Darwin besides gcc?
5457 Darwin*)
5458 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
5459 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussoren666028b2010-04-18 19:07:43 +00005460 if test "${CC}" = gcc
5461 then
Matthias Kloseb9621712010-04-24 17:59:49 +00005462 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
5463$as_echo_n "checking which compiler should be used... " >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00005464 case "${UNIVERSALSDK}" in
5465 */MacOSX10.4u.sdk)
5466 # Build using 10.4 SDK, force usage of gcc when the
5467 # compiler is gcc, otherwise the user will get very
5468 # confusing error messages when building on OSX 10.6
5469 CC=gcc-4.0
5470 CPP=cpp-4.0
5471 ;;
5472 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005473 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5474$as_echo "$CC" >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00005475 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005476
5477
5478 if test "${enable_universalsdk}"; then
5479 UNIVERSAL_ARCH_FLAGS=""
5480 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
5481 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
5482 ARCH_RUN_32BIT=""
Benjamin Peterson99f03762010-04-11 22:15:28 +00005483 LIPO_32BIT_FLAGS=""
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005484 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
5485 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005486 LIPO_32BIT_FLAGS=""
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005487 ARCH_RUN_32BIT="true"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005488
5489 elif test "$UNIVERSAL_ARCHS" = "all" ; then
5490 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005491 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005492 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005493
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005494 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
5495 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005496 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005497 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005498
5499 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
5500 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005501 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005502 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005503
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005504 else
Benjamin Peterson79263252010-10-31 16:50:44 +00005505 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 +00005506
5507 fi
5508
5509
Ronald Oussoren666028b2010-04-18 19:07:43 +00005510 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
5511 if test "${UNIVERSALSDK}" != "/"
5512 then
5513 CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
5514 LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren712979d2010-04-20 19:51:33 +00005515 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005516 fi
5517 fi
5518
5519 # Calculate the right deployment target for this build.
5520 #
5521 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
5522 if test ${cur_target} '>' 10.2; then
5523 cur_target=10.3
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005524 if test ${enable_universalsdk}; then
5525 if test "${UNIVERSAL_ARCHS}" = "all"; then
5526 # Ensure that the default platform for a
5527 # 4-way universal build is OSX 10.5,
5528 # that's the first OS release where
5529 # 4-way builds make sense.
5530 cur_target='10.5'
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005531
5532 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
5533 cur_target='10.5'
5534
5535 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
5536 cur_target='10.5'
5537
5538 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
5539 cur_target='10.5'
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005540 fi
5541 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00005542 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005543 # On Intel macs default to a deployment
5544 # target of 10.4, that's the first OSX
5545 # release with Intel support.
5546 cur_target="10.4"
5547 fi
5548 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005549 fi
5550 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
5551
5552 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
5553 # environment with a value that is the same as what we'll use
5554 # in the Makefile to ensure that we'll get the same compiler
5555 # environment during configure and build time.
5556 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
5557 export MACOSX_DEPLOYMENT_TARGET
5558 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
5559
5560 ;;
5561 OSF*)
5562 BASECFLAGS="$BASECFLAGS -mieee"
5563 ;;
5564 esac
5565 ;;
5566
5567*)
5568 case $ac_sys_system in
5569 OpenUNIX*|UnixWare*)
5570 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
5571 ;;
5572 OSF*)
5573 BASECFLAGS="$BASECFLAGS -ieee -std"
5574 ;;
5575 SCO_SV*)
5576 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
5577 ;;
5578 esac
5579 ;;
5580esac
5581
5582if test "$Py_DEBUG" = 'true'; then
5583 :
5584else
5585 OPT="-DNDEBUG $OPT"
5586fi
5587
5588if test "$ac_arch_flags"
5589then
5590 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
5591fi
5592
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005593# Check whether GCC supports PyArg_ParseTuple format
5594if test "$GCC" = "yes"
5595then
Matthias Kloseb9621712010-04-24 17:59:49 +00005596 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5
5597$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005598 save_CFLAGS=$CFLAGS
5599 CFLAGS="$CFLAGS -Werror"
Matthias Kloseb9621712010-04-24 17:59:49 +00005600 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005601/* end confdefs.h. */
5602
5603 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005604int
5605main ()
5606{
5607
5608 ;
5609 return 0;
5610}
Matthias Kloseb159a552010-04-25 21:00:44 +00005611
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005612_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005613if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005614
Matthias Kloseb159a552010-04-25 21:00:44 +00005615
Matthias Kloseb9621712010-04-24 17:59:49 +00005616$as_echo "#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005617
Matthias Kloseb159a552010-04-25 21:00:44 +00005618 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00005619$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00005620
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005621else
Matthias Kloseb159a552010-04-25 21:00:44 +00005622
5623 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00005624$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005625
5626fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005627rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5628 CFLAGS=$save_CFLAGS
5629fi
5630
5631# On some compilers, pthreads are available without further options
5632# (e.g. MacOS X). On some of these systems, the compiler will not
5633# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
5634# So we have to see first whether pthreads are available without
5635# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00005636{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
5637$as_echo_n "checking whether pthreads are available without options... " >&6; }
5638if test "${ac_cv_pthread_is_default+set}" = set; then :
5639 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005640else
Matthias Kloseb9621712010-04-24 17:59:49 +00005641 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005642 ac_cv_pthread_is_default=no
5643else
Matthias Kloseb9621712010-04-24 17:59:49 +00005644 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005645/* end confdefs.h. */
5646
5647#include <pthread.h>
5648
5649void* routine(void* p){return NULL;}
5650
5651int main(){
5652 pthread_t p;
5653 if(pthread_create(&p,NULL,routine,NULL)!=0)
5654 return 1;
5655 (void)pthread_detach(p);
5656 return 0;
5657}
5658
5659_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005660if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005661
5662 ac_cv_pthread_is_default=yes
5663 ac_cv_kthread=no
5664 ac_cv_pthread=no
5665
5666else
Matthias Kloseb9621712010-04-24 17:59:49 +00005667 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005668fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005669rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5670 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005671fi
5672
5673
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005674fi
5675
Matthias Kloseb9621712010-04-24 17:59:49 +00005676{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
5677$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005678
5679
5680if test $ac_cv_pthread_is_default = yes
5681then
5682 ac_cv_kpthread=no
5683else
5684# -Kpthread, if available, provides the right #defines
5685# and linker options to make pthread_create available
5686# Some compilers won't report that they do not support -Kpthread,
5687# so we need to run a program to see whether it really made the
5688# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005689{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
5690$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
5691if test "${ac_cv_kpthread+set}" = set; then :
5692 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005693else
5694 ac_save_cc="$CC"
5695CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005696if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005697 ac_cv_kpthread=no
5698else
Matthias Kloseb9621712010-04-24 17:59:49 +00005699 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005700/* end confdefs.h. */
5701
5702#include <pthread.h>
5703
5704void* routine(void* p){return NULL;}
5705
5706int main(){
5707 pthread_t p;
5708 if(pthread_create(&p,NULL,routine,NULL)!=0)
5709 return 1;
5710 (void)pthread_detach(p);
5711 return 0;
5712}
5713
5714_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005715if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005716 ac_cv_kpthread=yes
5717else
Matthias Kloseb9621712010-04-24 17:59:49 +00005718 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005719fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005720rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5721 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005722fi
5723
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005724CC="$ac_save_cc"
5725fi
5726
Matthias Kloseb9621712010-04-24 17:59:49 +00005727{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
5728$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005729fi
5730
5731if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
5732then
5733# -Kthread, if available, provides the right #defines
5734# and linker options to make pthread_create available
5735# Some compilers won't report that they do not support -Kthread,
5736# so we need to run a program to see whether it really made the
5737# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005738{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
5739$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
5740if test "${ac_cv_kthread+set}" = set; then :
5741 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005742else
5743 ac_save_cc="$CC"
5744CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005745if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005746 ac_cv_kthread=no
5747else
Matthias Kloseb9621712010-04-24 17:59:49 +00005748 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005749/* end confdefs.h. */
5750
5751#include <pthread.h>
5752
5753void* routine(void* p){return NULL;}
5754
5755int main(){
5756 pthread_t p;
5757 if(pthread_create(&p,NULL,routine,NULL)!=0)
5758 return 1;
5759 (void)pthread_detach(p);
5760 return 0;
5761}
5762
5763_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005764if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005765 ac_cv_kthread=yes
5766else
Matthias Kloseb9621712010-04-24 17:59:49 +00005767 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005768fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005769rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5770 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005771fi
5772
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005773CC="$ac_save_cc"
5774fi
5775
Matthias Kloseb9621712010-04-24 17:59:49 +00005776{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
5777$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005778fi
5779
5780if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
5781then
5782# -pthread, if available, provides the right #defines
5783# and linker options to make pthread_create available
5784# Some compilers won't report that they do not support -pthread,
5785# so we need to run a program to see whether it really made the
5786# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
5788$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
5789if test "${ac_cv_thread+set}" = set; then :
5790 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005791else
5792 ac_save_cc="$CC"
5793CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005794if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005795 ac_cv_pthread=no
5796else
Matthias Kloseb9621712010-04-24 17:59:49 +00005797 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005798/* end confdefs.h. */
5799
5800#include <pthread.h>
5801
5802void* routine(void* p){return NULL;}
5803
5804int main(){
5805 pthread_t p;
5806 if(pthread_create(&p,NULL,routine,NULL)!=0)
5807 return 1;
5808 (void)pthread_detach(p);
5809 return 0;
5810}
5811
5812_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005813if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005814 ac_cv_pthread=yes
5815else
Matthias Kloseb9621712010-04-24 17:59:49 +00005816 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005817fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005818rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5819 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005820fi
5821
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005822CC="$ac_save_cc"
5823fi
5824
Matthias Kloseb9621712010-04-24 17:59:49 +00005825{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
5826$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005827fi
5828
5829# If we have set a CC compiler flag for thread support then
5830# check if it works for CXX, too.
5831ac_cv_cxx_thread=no
5832if test ! -z "$CXX"
5833then
Matthias Kloseb9621712010-04-24 17:59:49 +00005834{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
5835$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005836ac_save_cxx="$CXX"
5837
5838if test "$ac_cv_kpthread" = "yes"
5839then
5840 CXX="$CXX -Kpthread"
5841 ac_cv_cxx_thread=yes
5842elif test "$ac_cv_kthread" = "yes"
5843then
5844 CXX="$CXX -Kthread"
5845 ac_cv_cxx_thread=yes
5846elif test "$ac_cv_pthread" = "yes"
5847then
5848 CXX="$CXX -pthread"
5849 ac_cv_cxx_thread=yes
5850fi
5851
5852if test $ac_cv_cxx_thread = yes
5853then
5854 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5855 $CXX -c conftest.$ac_ext 2>&5
5856 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5857 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5858 then
5859 ac_cv_cxx_thread=yes
5860 else
5861 ac_cv_cxx_thread=no
5862 fi
5863 rm -fr conftest*
5864fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005865{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
5866$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005867fi
5868CXX="$ac_save_cxx"
5869
5870
5871# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00005872{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5873$as_echo_n "checking for ANSI C header files... " >&6; }
5874if test "${ac_cv_header_stdc+set}" = set; then :
5875 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005876else
Matthias Kloseb9621712010-04-24 17:59:49 +00005877 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005878/* end confdefs.h. */
5879#include <stdlib.h>
5880#include <stdarg.h>
5881#include <string.h>
5882#include <float.h>
5883
5884int
5885main ()
5886{
5887
5888 ;
5889 return 0;
5890}
5891_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005892if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005893 ac_cv_header_stdc=yes
5894else
Matthias Kloseb9621712010-04-24 17:59:49 +00005895 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005896fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005897rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5898
5899if test $ac_cv_header_stdc = yes; then
5900 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00005901 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005902/* end confdefs.h. */
5903#include <string.h>
5904
5905_ACEOF
5906if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005907 $EGREP "memchr" >/dev/null 2>&1; then :
5908
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005909else
5910 ac_cv_header_stdc=no
5911fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005912rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005913
5914fi
5915
5916if test $ac_cv_header_stdc = yes; then
5917 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00005918 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005919/* end confdefs.h. */
5920#include <stdlib.h>
5921
5922_ACEOF
5923if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005924 $EGREP "free" >/dev/null 2>&1; then :
5925
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005926else
5927 ac_cv_header_stdc=no
5928fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005929rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005930
5931fi
5932
5933if test $ac_cv_header_stdc = yes; then
5934 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00005935 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005936 :
5937else
Matthias Kloseb9621712010-04-24 17:59:49 +00005938 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005939/* end confdefs.h. */
5940#include <ctype.h>
5941#include <stdlib.h>
5942#if ((' ' & 0x0FF) == 0x020)
5943# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5944# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5945#else
5946# define ISLOWER(c) \
5947 (('a' <= (c) && (c) <= 'i') \
5948 || ('j' <= (c) && (c) <= 'r') \
5949 || ('s' <= (c) && (c) <= 'z'))
5950# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5951#endif
5952
5953#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5954int
5955main ()
5956{
5957 int i;
5958 for (i = 0; i < 256; i++)
5959 if (XOR (islower (i), ISLOWER (i))
5960 || toupper (i) != TOUPPER (i))
5961 return 2;
5962 return 0;
5963}
5964_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005965if ac_fn_c_try_run "$LINENO"; then :
5966
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005967else
Matthias Kloseb9621712010-04-24 17:59:49 +00005968 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005969fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005970rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5971 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005972fi
5973
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005974fi
5975fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005976{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5977$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005978if test $ac_cv_header_stdc = yes; then
5979
Matthias Kloseb9621712010-04-24 17:59:49 +00005980$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005981
5982fi
5983
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005984for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
5985fcntl.h grp.h \
Christian Heimesbbe741d2008-03-28 10:53:29 +00005986ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Thomas Wouters89f507f2006-12-13 04:49:30 +00005987shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00005988unistd.h utime.h \
Christian Heimes4fbc72b2008-03-22 00:47:35 +00005989sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
5990sys/lock.h sys/mkdev.h sys/modem.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005991sys/param.h sys/poll.h sys/select.h sys/socket.h sys/statvfs.h sys/stat.h \
Benjamin Petersonde9c8692008-07-01 18:23:09 +00005992sys/termio.h sys/time.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005993sys/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 +00005994sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Ronald Oussoren755740f2010-02-07 19:56:39 +00005995bluetooth/bluetooth.h linux/tipc.h spawn.h util.h
Matthias Kloseb9621712010-04-24 17:59:49 +00005996do :
5997 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5998ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Benjamin Peterson79263252010-10-31 16:50:44 +00005999eval as_val=\$$as_ac_Header
6000 if test "x$as_val" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006001 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006002#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006003_ACEOF
6004
6005fi
6006
Guido van Rossum627b2d71993-12-24 10:39:16 +00006007done
6008
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006009ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006010for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00006011 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6012{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
6013$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Benjamin Peterson79263252010-10-31 16:50:44 +00006014if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006015 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006016else
Matthias Kloseb9621712010-04-24 17:59:49 +00006017 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006018/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006019#include <sys/types.h>
6020#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00006021
Martin v. Löwis11437992002-04-12 09:54:03 +00006022int
6023main ()
6024{
6025if ((DIR *) 0)
6026return 0;
6027 ;
6028 return 0;
6029}
6030_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006031if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006032 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00006033else
Matthias Kloseb9621712010-04-24 17:59:49 +00006034 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006035fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006036rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006037fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006038eval ac_res=\$$as_ac_Header
6039 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6040$as_echo "$ac_res" >&6; }
Benjamin Peterson79263252010-10-31 16:50:44 +00006041eval as_val=\$$as_ac_Header
6042 if test "x$as_val" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006043 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006044#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006045_ACEOF
6046
6047ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00006048fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006049
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006050done
6051# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6052if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006053 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6054$as_echo_n "checking for library containing opendir... " >&6; }
6055if test "${ac_cv_search_opendir+set}" = set; then :
6056 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006057else
Martin v. Löwis11437992002-04-12 09:54:03 +00006058 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006059cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006060/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006061
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006062/* Override any GCC internal prototype to avoid an error.
6063 Use char because int might match the return type of a GCC
6064 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006065#ifdef __cplusplus
6066extern "C"
6067#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006068char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006069int
6070main ()
6071{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006072return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006073 ;
6074 return 0;
6075}
6076_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006077for ac_lib in '' dir; do
6078 if test -z "$ac_lib"; then
6079 ac_res="none required"
6080 else
6081 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006082 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006083 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006084 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006085 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006086fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006087rm -f core conftest.err conftest.$ac_objext \
6088 conftest$ac_exeext
6089 if test "${ac_cv_search_opendir+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006090 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006091fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006092done
Matthias Kloseb9621712010-04-24 17:59:49 +00006093if test "${ac_cv_search_opendir+set}" = set; then :
6094
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006095else
6096 ac_cv_search_opendir=no
6097fi
6098rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006099LIBS=$ac_func_search_save_LIBS
6100fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006101{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6102$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006103ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006104if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006105 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00006106
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006107fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006108
Michael W. Hudson54241132001-12-07 15:38:26 +00006109else
Matthias Kloseb9621712010-04-24 17:59:49 +00006110 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6111$as_echo_n "checking for library containing opendir... " >&6; }
6112if test "${ac_cv_search_opendir+set}" = set; then :
6113 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006114else
6115 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006116cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006117/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006118
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006119/* Override any GCC internal prototype to avoid an error.
6120 Use char because int might match the return type of a GCC
6121 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006122#ifdef __cplusplus
6123extern "C"
6124#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006125char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006126int
6127main ()
6128{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006129return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006130 ;
6131 return 0;
6132}
6133_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006134for ac_lib in '' x; do
6135 if test -z "$ac_lib"; then
6136 ac_res="none required"
6137 else
6138 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006139 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006140 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006141 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006142 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006143fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006144rm -f core conftest.err conftest.$ac_objext \
6145 conftest$ac_exeext
6146 if test "${ac_cv_search_opendir+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006147 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006148fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006149done
Matthias Kloseb9621712010-04-24 17:59:49 +00006150if test "${ac_cv_search_opendir+set}" = set; then :
6151
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006152else
6153 ac_cv_search_opendir=no
6154fi
6155rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006156LIBS=$ac_func_search_save_LIBS
6157fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006158{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6159$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006160ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006161if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006162 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006163
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006164fi
6165
6166fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006167
Matthias Kloseb9621712010-04-24 17:59:49 +00006168{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
6169$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
6170if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then :
6171 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006172else
Matthias Kloseb9621712010-04-24 17:59:49 +00006173 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006174/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006175#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006176int
6177main ()
6178{
6179return makedev(0, 0);
6180 ;
6181 return 0;
6182}
6183_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006184if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006185 ac_cv_header_sys_types_h_makedev=yes
6186else
Matthias Kloseb9621712010-04-24 17:59:49 +00006187 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006188fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006189rm -f core conftest.err conftest.$ac_objext \
6190 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006191
6192fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006193{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
6194$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006195
6196if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006197ac_fn_c_check_header_mongrel "$LINENO" "sys/mkdev.h" "ac_cv_header_sys_mkdev_h" "$ac_includes_default"
6198if test "x$ac_cv_header_sys_mkdev_h" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006199
Matthias Kloseb9621712010-04-24 17:59:49 +00006200$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006201
6202fi
6203
6204
6205
6206 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006207 ac_fn_c_check_header_mongrel "$LINENO" "sys/sysmacros.h" "ac_cv_header_sys_sysmacros_h" "$ac_includes_default"
6208if test "x$ac_cv_header_sys_sysmacros_h" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006209
Matthias Kloseb9621712010-04-24 17:59:49 +00006210$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006211
6212fi
6213
6214
6215 fi
6216fi
6217
Michael W. Hudson54241132001-12-07 15:38:26 +00006218
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006219# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006220for ac_header in term.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006221do :
6222 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006223#ifdef HAVE_CURSES_H
6224#include <curses.h>
6225#endif
6226
Matthias Kloseb9621712010-04-24 17:59:49 +00006227"
6228if test "x$ac_cv_header_term_h" = x""yes; then :
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006229 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006230#define HAVE_TERM_H 1
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006231_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006232
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006233fi
6234
6235done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006236
6237
Martin v. Löwis11017b12006-01-14 18:12:57 +00006238# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00006239for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006240do :
6241 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 +00006242#ifdef HAVE_ASM_TYPES_H
6243#include <asm/types.h>
6244#endif
6245#ifdef HAVE_SYS_SOCKET_H
6246#include <sys/socket.h>
6247#endif
6248
Matthias Kloseb9621712010-04-24 17:59:49 +00006249"
6250if test "x$ac_cv_header_linux_netlink_h" = x""yes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00006251 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006252#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006253_ACEOF
6254
6255fi
6256
6257done
6258
6259
Guido van Rossum627b2d71993-12-24 10:39:16 +00006260# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006261was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006262{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
6263$as_echo_n "checking for clock_t in time.h... " >&6; }
6264cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006265/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006266#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006267
6268_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006269if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006270 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00006271 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006272else
Martin v. Löwis11437992002-04-12 09:54:03 +00006273
6274
Matthias Kloseb9621712010-04-24 17:59:49 +00006275$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00006276
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006277
Guido van Rossum627b2d71993-12-24 10:39:16 +00006278fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006279rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006280
Matthias Kloseb9621712010-04-24 17:59:49 +00006281{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
6282$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006283
Neal Norwitz11690112002-07-30 01:08:28 +00006284# Check whether using makedev requires defining _OSF_SOURCE
Matthias Kloseb9621712010-04-24 17:59:49 +00006285{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
6286$as_echo_n "checking for makedev... " >&6; }
6287cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006288/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00006289
Jesus Cea740f53a2010-04-28 11:35:30 +00006290#if defined(MAJOR_IN_MKDEV)
6291#include <sys/mkdev.h>
6292#elif defined(MAJOR_IN_SYSMACROS)
6293#include <sys/sysmacros.h>
6294#else
6295#include <sys/types.h>
6296#endif
6297
Neal Norwitz11690112002-07-30 01:08:28 +00006298int
6299main ()
6300{
Jesus Cea740f53a2010-04-28 11:35:30 +00006301
6302 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00006303 ;
6304 return 0;
6305}
Matthias Kloseb159a552010-04-25 21:00:44 +00006306
Neal Norwitz11690112002-07-30 01:08:28 +00006307_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006308if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006309 ac_cv_has_makedev=yes
6310else
Matthias Kloseb9621712010-04-24 17:59:49 +00006311 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006312fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006313rm -f core conftest.err conftest.$ac_objext \
6314 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006315if test "$ac_cv_has_makedev" = "no"; then
6316 # we didn't link, try if _OSF_SOURCE will allow us to link
Matthias Kloseb9621712010-04-24 17:59:49 +00006317 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006318/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006319
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006320#define _OSF_SOURCE 1
6321#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006322
Neal Norwitz11690112002-07-30 01:08:28 +00006323int
6324main ()
6325{
6326 makedev(0, 0)
6327 ;
6328 return 0;
6329}
6330_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006331if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006332 ac_cv_has_makedev=yes
6333else
Matthias Kloseb9621712010-04-24 17:59:49 +00006334 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006335fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006336rm -f core conftest.err conftest.$ac_objext \
6337 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006338 if test "$ac_cv_has_makedev" = "yes"; then
6339
Matthias Kloseb9621712010-04-24 17:59:49 +00006340$as_echo "#define _OSF_SOURCE 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006341
6342 fi
6343fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006344{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
6345$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006346if test "$ac_cv_has_makedev" = "yes"; then
6347
Matthias Kloseb9621712010-04-24 17:59:49 +00006348$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006349
6350fi
6351
Martin v. Löwis399a6892002-10-04 10:22:02 +00006352# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6353# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6354# defined, but the compiler does not support pragma redefine_extname,
6355# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6356# structures (such as rlimit64) without declaring them. As a
6357# work-around, disable LFS on such configurations
6358
6359use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00006360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
6361$as_echo_n "checking Solaris LFS bug... " >&6; }
6362cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006363/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006364
6365#define _LARGEFILE_SOURCE 1
6366#define _FILE_OFFSET_BITS 64
6367#include <sys/resource.h>
6368
Martin v. Löwis399a6892002-10-04 10:22:02 +00006369int
6370main ()
6371{
6372struct rlimit foo;
6373 ;
6374 return 0;
6375}
6376_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006377if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00006378 sol_lfs_bug=no
6379else
Matthias Kloseb9621712010-04-24 17:59:49 +00006380 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006381fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006382rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006383{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
6384$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006385if test "$sol_lfs_bug" = "yes"; then
6386 use_lfs=no
6387fi
6388
6389if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006390# Two defines needed to enable largefile support on various platforms
6391# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00006392
Matthias Kloseb9621712010-04-24 17:59:49 +00006393$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006394
6395
Matthias Kloseb9621712010-04-24 17:59:49 +00006396$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00006397
Martin v. Löwis399a6892002-10-04 10:22:02 +00006398fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006399
Guido van Rossum84e7b241996-08-19 21:59:00 +00006400# Add some code to confdefs.h so that the test for off_t works on SCO
6401cat >> confdefs.h <<\EOF
6402#if defined(SCO_DS)
6403#undef _OFF_T
6404#endif
6405EOF
6406
Guido van Rossumef2255b2000-03-10 22:30:29 +00006407# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00006408ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
6409if test "x$ac_cv_type_mode_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006410
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006411else
Martin v. Löwis11437992002-04-12 09:54:03 +00006412
6413cat >>confdefs.h <<_ACEOF
6414#define mode_t int
6415_ACEOF
6416
6417fi
6418
Matthias Kloseb9621712010-04-24 17:59:49 +00006419ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
6420if test "x$ac_cv_type_off_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006421
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006422else
Martin v. Löwis11437992002-04-12 09:54:03 +00006423
6424cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006425#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006426_ACEOF
6427
6428fi
6429
Matthias Kloseb9621712010-04-24 17:59:49 +00006430ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
6431if test "x$ac_cv_type_pid_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006432
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006433else
Martin v. Löwis11437992002-04-12 09:54:03 +00006434
6435cat >>confdefs.h <<_ACEOF
6436#define pid_t int
6437_ACEOF
6438
6439fi
6440
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006441
Martin v. Löwis11437992002-04-12 09:54:03 +00006442cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00006443#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00006444_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006445
Matthias Kloseb9621712010-04-24 17:59:49 +00006446ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
6447if test "x$ac_cv_type_size_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006448
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006449else
Martin v. Löwis11437992002-04-12 09:54:03 +00006450
6451cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006452#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00006453_ACEOF
6454
6455fi
6456
Matthias Kloseb9621712010-04-24 17:59:49 +00006457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
6458$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
6459if test "${ac_cv_type_uid_t+set}" = set; then :
6460 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006461else
Matthias Kloseb9621712010-04-24 17:59:49 +00006462 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006463/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006464#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006465
6466_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006467if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006468 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006469 ac_cv_type_uid_t=yes
6470else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006471 ac_cv_type_uid_t=no
6472fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006473rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006474
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006475fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006476{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
6477$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00006478if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006479
Matthias Kloseb9621712010-04-24 17:59:49 +00006480$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006481
6482
Matthias Kloseb9621712010-04-24 17:59:49 +00006483$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006484
6485fi
6486
Matthias Kloseb9621712010-04-24 17:59:49 +00006487ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
6488case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006489 no|yes) ;; #(
6490 *)
6491
Matthias Kloseb9621712010-04-24 17:59:49 +00006492$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006493
6494
6495cat >>confdefs.h <<_ACEOF
6496#define uint32_t $ac_cv_c_uint32_t
6497_ACEOF
6498;;
6499 esac
6500
Matthias Kloseb9621712010-04-24 17:59:49 +00006501ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
6502case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006503 no|yes) ;; #(
6504 *)
6505
Matthias Kloseb9621712010-04-24 17:59:49 +00006506$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006507
6508
6509cat >>confdefs.h <<_ACEOF
6510#define uint64_t $ac_cv_c_uint64_t
6511_ACEOF
6512;;
6513 esac
6514
Matthias Kloseb9621712010-04-24 17:59:49 +00006515ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
6516case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006517 no|yes) ;; #(
6518 *)
6519
6520cat >>confdefs.h <<_ACEOF
6521#define int32_t $ac_cv_c_int32_t
6522_ACEOF
6523;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00006524esac
6525
Matthias Kloseb9621712010-04-24 17:59:49 +00006526ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
6527case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006528 no|yes) ;; #(
6529 *)
6530
6531cat >>confdefs.h <<_ACEOF
6532#define int64_t $ac_cv_c_int64_t
6533_ACEOF
6534;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006535esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00006536
Matthias Kloseb9621712010-04-24 17:59:49 +00006537ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
6538if test "x$ac_cv_type_ssize_t" = x""yes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006539
Matthias Kloseb9621712010-04-24 17:59:49 +00006540$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00006541
6542fi
6543
Jack Jansendd19cf82001-12-06 22:36:17 +00006544
Michael W. Hudson54241132001-12-07 15:38:26 +00006545# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00006546# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006547# The cast to long int works around a bug in the HP C Compiler
6548# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6549# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6550# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006551{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
6552$as_echo_n "checking size of int... " >&6; }
6553if test "${ac_cv_sizeof_int+set}" = set; then :
6554 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006555else
Matthias Kloseb9621712010-04-24 17:59:49 +00006556 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 +00006557
Martin v. Löwis11437992002-04-12 09:54:03 +00006558else
Matthias Kloseb9621712010-04-24 17:59:49 +00006559 if test "$ac_cv_type_int" = yes; then
6560 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6561$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson79263252010-10-31 16:50:44 +00006562{ as_fn_set_status 77
6563as_fn_error "cannot compute sizeof (int)
6564See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006565 else
6566 ac_cv_sizeof_int=0
6567 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006568fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006569
Martin v. Löwis11437992002-04-12 09:54:03 +00006570fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006571{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
6572$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006573
6574
6575
Martin v. Löwis11437992002-04-12 09:54:03 +00006576cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006577#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00006578_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006579
6580
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006581# The cast to long int works around a bug in the HP C Compiler
6582# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6583# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6584# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006585{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
6586$as_echo_n "checking size of long... " >&6; }
6587if test "${ac_cv_sizeof_long+set}" = set; then :
6588 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006589else
Matthias Kloseb9621712010-04-24 17:59:49 +00006590 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 +00006591
Martin v. Löwis11437992002-04-12 09:54:03 +00006592else
Matthias Kloseb9621712010-04-24 17:59:49 +00006593 if test "$ac_cv_type_long" = yes; then
6594 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6595$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson79263252010-10-31 16:50:44 +00006596{ as_fn_set_status 77
6597as_fn_error "cannot compute sizeof (long)
6598See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006599 else
6600 ac_cv_sizeof_long=0
6601 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006602fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006603
Martin v. Löwis11437992002-04-12 09:54:03 +00006604fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006605{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
6606$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006607
6608
6609
Martin v. Löwis11437992002-04-12 09:54:03 +00006610cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006611#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006612_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006613
6614
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006615# The cast to long int works around a bug in the HP C Compiler
6616# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6617# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6618# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006619{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
6620$as_echo_n "checking size of void *... " >&6; }
6621if test "${ac_cv_sizeof_void_p+set}" = set; then :
6622 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006623else
Matthias Kloseb9621712010-04-24 17:59:49 +00006624 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 +00006625
Martin v. Löwis11437992002-04-12 09:54:03 +00006626else
Matthias Kloseb9621712010-04-24 17:59:49 +00006627 if test "$ac_cv_type_void_p" = yes; then
6628 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6629$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson79263252010-10-31 16:50:44 +00006630{ as_fn_set_status 77
6631as_fn_error "cannot compute sizeof (void *)
6632See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006633 else
6634 ac_cv_sizeof_void_p=0
6635 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006636fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006637
Martin v. Löwis11437992002-04-12 09:54:03 +00006638fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006639{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
6640$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006641
6642
6643
Martin v. Löwis11437992002-04-12 09:54:03 +00006644cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006645#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00006646_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006647
6648
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006649# The cast to long int works around a bug in the HP C Compiler
6650# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6651# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6652# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
6654$as_echo_n "checking size of short... " >&6; }
6655if test "${ac_cv_sizeof_short+set}" = set; then :
6656 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006657else
Matthias Kloseb9621712010-04-24 17:59:49 +00006658 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 +00006659
Martin v. Löwis11437992002-04-12 09:54:03 +00006660else
Matthias Kloseb9621712010-04-24 17:59:49 +00006661 if test "$ac_cv_type_short" = yes; then
6662 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6663$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson79263252010-10-31 16:50:44 +00006664{ as_fn_set_status 77
6665as_fn_error "cannot compute sizeof (short)
6666See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006667 else
6668 ac_cv_sizeof_short=0
6669 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006670fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006671
Martin v. Löwis11437992002-04-12 09:54:03 +00006672fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006673{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
6674$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006675
6676
6677
Martin v. Löwis11437992002-04-12 09:54:03 +00006678cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006679#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00006680_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006681
6682
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006683# The cast to long int works around a bug in the HP C Compiler
6684# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6685# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6686# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006687{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
6688$as_echo_n "checking size of float... " >&6; }
6689if test "${ac_cv_sizeof_float+set}" = set; then :
6690 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006691else
Matthias Kloseb9621712010-04-24 17:59:49 +00006692 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 +00006693
Martin v. Löwis11437992002-04-12 09:54:03 +00006694else
Matthias Kloseb9621712010-04-24 17:59:49 +00006695 if test "$ac_cv_type_float" = yes; then
6696 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6697$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson79263252010-10-31 16:50:44 +00006698{ as_fn_set_status 77
6699as_fn_error "cannot compute sizeof (float)
6700See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006701 else
6702 ac_cv_sizeof_float=0
6703 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006704fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006705
Martin v. Löwis11437992002-04-12 09:54:03 +00006706fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006707{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
6708$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006709
6710
6711
Martin v. Löwis11437992002-04-12 09:54:03 +00006712cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006713#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00006714_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006715
6716
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006717# The cast to long int works around a bug in the HP C Compiler
6718# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6719# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6720# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
6722$as_echo_n "checking size of double... " >&6; }
6723if test "${ac_cv_sizeof_double+set}" = set; then :
6724 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006725else
Matthias Kloseb9621712010-04-24 17:59:49 +00006726 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 +00006727
Martin v. Löwis11437992002-04-12 09:54:03 +00006728else
Matthias Kloseb9621712010-04-24 17:59:49 +00006729 if test "$ac_cv_type_double" = yes; then
6730 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6731$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson79263252010-10-31 16:50:44 +00006732{ as_fn_set_status 77
6733as_fn_error "cannot compute sizeof (double)
6734See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006735 else
6736 ac_cv_sizeof_double=0
6737 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006738fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006739
Martin v. Löwis11437992002-04-12 09:54:03 +00006740fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006741{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
6742$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006743
6744
6745
Martin v. Löwis11437992002-04-12 09:54:03 +00006746cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006747#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00006748_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006749
6750
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006751# The cast to long int works around a bug in the HP C Compiler
6752# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6753# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6754# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006755{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
6756$as_echo_n "checking size of fpos_t... " >&6; }
6757if test "${ac_cv_sizeof_fpos_t+set}" = set; then :
6758 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006759else
Matthias Kloseb9621712010-04-24 17:59:49 +00006760 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 +00006761
Martin v. Löwis11437992002-04-12 09:54:03 +00006762else
Matthias Kloseb9621712010-04-24 17:59:49 +00006763 if test "$ac_cv_type_fpos_t" = yes; then
6764 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6765$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson79263252010-10-31 16:50:44 +00006766{ as_fn_set_status 77
6767as_fn_error "cannot compute sizeof (fpos_t)
6768See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006769 else
6770 ac_cv_sizeof_fpos_t=0
6771 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006772fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006773
Martin v. Löwis11437992002-04-12 09:54:03 +00006774fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006775{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
6776$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006777
6778
6779
Martin v. Löwis11437992002-04-12 09:54:03 +00006780cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006781#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00006782_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006783
Michael W. Hudson54241132001-12-07 15:38:26 +00006784
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006785# The cast to long int works around a bug in the HP C Compiler
6786# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6787# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6788# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006789{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
6790$as_echo_n "checking size of size_t... " >&6; }
6791if test "${ac_cv_sizeof_size_t+set}" = set; then :
6792 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00006793else
Matthias Kloseb9621712010-04-24 17:59:49 +00006794 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 +00006795
Martin v. Löwis18e16552006-02-15 17:27:45 +00006796else
Matthias Kloseb9621712010-04-24 17:59:49 +00006797 if test "$ac_cv_type_size_t" = yes; then
6798 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6799$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson79263252010-10-31 16:50:44 +00006800{ as_fn_set_status 77
6801as_fn_error "cannot compute sizeof (size_t)
6802See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006803 else
6804 ac_cv_sizeof_size_t=0
6805 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00006806fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006807
Martin v. Löwis18e16552006-02-15 17:27:45 +00006808fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006809{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
6810$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006811
6812
6813
Martin v. Löwis18e16552006-02-15 17:27:45 +00006814cat >>confdefs.h <<_ACEOF
6815#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
6816_ACEOF
6817
6818
Christian Heimes400adb02008-02-01 08:12:03 +00006819# The cast to long int works around a bug in the HP C Compiler
6820# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6821# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6822# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006823{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
6824$as_echo_n "checking size of pid_t... " >&6; }
6825if test "${ac_cv_sizeof_pid_t+set}" = set; then :
6826 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00006827else
Matthias Kloseb9621712010-04-24 17:59:49 +00006828 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 +00006829
Christian Heimes400adb02008-02-01 08:12:03 +00006830else
Matthias Kloseb9621712010-04-24 17:59:49 +00006831 if test "$ac_cv_type_pid_t" = yes; then
6832 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6833$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson79263252010-10-31 16:50:44 +00006834{ as_fn_set_status 77
6835as_fn_error "cannot compute sizeof (pid_t)
6836See \`config.log' for more details." "$LINENO" 5; }; }
Christian Heimes400adb02008-02-01 08:12:03 +00006837 else
6838 ac_cv_sizeof_pid_t=0
6839 fi
6840fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006841
Christian Heimes400adb02008-02-01 08:12:03 +00006842fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006843{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
6844$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00006845
6846
6847
6848cat >>confdefs.h <<_ACEOF
6849#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
6850_ACEOF
6851
6852
Michael W. Hudson54241132001-12-07 15:38:26 +00006853
Matthias Kloseb9621712010-04-24 17:59:49 +00006854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
6855$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006856have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006857cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006858/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006859
Martin v. Löwis11437992002-04-12 09:54:03 +00006860int
6861main ()
6862{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006863long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00006864 ;
6865 return 0;
6866}
6867_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006868if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006869
6870
Matthias Kloseb9621712010-04-24 17:59:49 +00006871$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006872
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006873 have_long_long=yes
6874
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006875fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006876rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006877{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
6878$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00006879if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006880# The cast to long int works around a bug in the HP C Compiler
6881# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6882# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6883# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006884{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
6885$as_echo_n "checking size of long long... " >&6; }
6886if test "${ac_cv_sizeof_long_long+set}" = set; then :
6887 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006888else
Matthias Kloseb9621712010-04-24 17:59:49 +00006889 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 +00006890
Martin v. Löwis11437992002-04-12 09:54:03 +00006891else
Matthias Kloseb9621712010-04-24 17:59:49 +00006892 if test "$ac_cv_type_long_long" = yes; then
6893 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6894$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson79263252010-10-31 16:50:44 +00006895{ as_fn_set_status 77
6896as_fn_error "cannot compute sizeof (long long)
6897See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006898 else
6899 ac_cv_sizeof_long_long=0
6900 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006901fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006902
Martin v. Löwis11437992002-04-12 09:54:03 +00006903fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006904{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
6905$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006906
6907
6908
Martin v. Löwis11437992002-04-12 09:54:03 +00006909cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006910#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006911_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006912
Michael W. Hudson54241132001-12-07 15:38:26 +00006913
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006914fi
6915
Matthias Kloseb9621712010-04-24 17:59:49 +00006916{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
6917$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006918have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006919cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006920/* end confdefs.h. */
6921
6922int
6923main ()
6924{
6925long double x; x = (long double)0;
6926 ;
6927 return 0;
6928}
6929_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006930if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006931
6932
Matthias Kloseb9621712010-04-24 17:59:49 +00006933$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006934
6935 have_long_double=yes
6936
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006937fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006938rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006939{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
6940$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006941if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006942# The cast to long int works around a bug in the HP C Compiler
6943# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6944# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6945# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006946{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
6947$as_echo_n "checking size of long double... " >&6; }
6948if test "${ac_cv_sizeof_long_double+set}" = set; then :
6949 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006950else
Matthias Kloseb9621712010-04-24 17:59:49 +00006951 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 +00006952
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006953else
Matthias Kloseb9621712010-04-24 17:59:49 +00006954 if test "$ac_cv_type_long_double" = yes; then
6955 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6956$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson79263252010-10-31 16:50:44 +00006957{ as_fn_set_status 77
6958as_fn_error "cannot compute sizeof (long double)
6959See \`config.log' for more details." "$LINENO" 5; }; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006960 else
6961 ac_cv_sizeof_long_double=0
6962 fi
6963fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006964
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006965fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006966{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
6967$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006968
6969
6970
6971cat >>confdefs.h <<_ACEOF
6972#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
6973_ACEOF
6974
6975
6976fi
6977
6978
Matthias Kloseb9621712010-04-24 17:59:49 +00006979{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
6980$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00006981have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006982cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00006983/* end confdefs.h. */
6984
6985int
6986main ()
6987{
6988_Bool x; x = (_Bool)0;
6989 ;
6990 return 0;
6991}
6992_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006993if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00006994
6995
Matthias Kloseb9621712010-04-24 17:59:49 +00006996$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00006997
6998 have_c99_bool=yes
6999
Thomas Woutersb2137042007-02-01 18:02:27 +00007000fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007001rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007002{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
7003$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007004if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007005# The cast to long int works around a bug in the HP C Compiler
7006# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7007# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7008# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007009{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
7010$as_echo_n "checking size of _Bool... " >&6; }
7011if test "${ac_cv_sizeof__Bool+set}" = set; then :
7012 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00007013else
Matthias Kloseb9621712010-04-24 17:59:49 +00007014 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 +00007015
Thomas Woutersb2137042007-02-01 18:02:27 +00007016else
Matthias Kloseb9621712010-04-24 17:59:49 +00007017 if test "$ac_cv_type__Bool" = yes; then
7018 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7019$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson79263252010-10-31 16:50:44 +00007020{ as_fn_set_status 77
7021as_fn_error "cannot compute sizeof (_Bool)
7022See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007023 else
7024 ac_cv_sizeof__Bool=0
7025 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00007026fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007027
Thomas Woutersb2137042007-02-01 18:02:27 +00007028fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007029{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
7030$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007031
7032
7033
Thomas Woutersb2137042007-02-01 18:02:27 +00007034cat >>confdefs.h <<_ACEOF
7035#define SIZEOF__BOOL $ac_cv_sizeof__Bool
7036_ACEOF
7037
7038
7039fi
7040
Matthias Kloseb9621712010-04-24 17:59:49 +00007041ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00007042 #include <stdint.h>
7043 #endif
Antoine Pitrou1bf29b72010-10-10 08:10:16 +00007044 #ifdef HAVE_INTTYPES_H
7045 #include <inttypes.h>
7046 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00007047"
7048if test "x$ac_cv_type_uintptr_t" = x""yes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00007049
7050cat >>confdefs.h <<_ACEOF
7051#define HAVE_UINTPTR_T 1
7052_ACEOF
7053
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007054# The cast to long int works around a bug in the HP C Compiler
7055# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7056# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7057# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007058{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
7059$as_echo_n "checking size of uintptr_t... " >&6; }
7060if test "${ac_cv_sizeof_uintptr_t+set}" = set; then :
7061 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007062else
Matthias Kloseb9621712010-04-24 17:59:49 +00007063 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 +00007064
Martin v. Löwis11437992002-04-12 09:54:03 +00007065else
Matthias Kloseb9621712010-04-24 17:59:49 +00007066 if test "$ac_cv_type_uintptr_t" = yes; then
7067 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7068$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson79263252010-10-31 16:50:44 +00007069{ as_fn_set_status 77
7070as_fn_error "cannot compute sizeof (uintptr_t)
7071See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007072 else
7073 ac_cv_sizeof_uintptr_t=0
7074 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007075fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007076
Martin v. Löwis11437992002-04-12 09:54:03 +00007077fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007078{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
7079$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007080
7081
7082
Martin v. Löwis11437992002-04-12 09:54:03 +00007083cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007084#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007085_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007086
Michael W. Hudson54241132001-12-07 15:38:26 +00007087
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007088fi
7089
Thomas Wouters89f507f2006-12-13 04:49:30 +00007090
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007091# The cast to long int works around a bug in the HP C Compiler
7092# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7093# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7094# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007095{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
7096$as_echo_n "checking size of off_t... " >&6; }
7097if test "${ac_cv_sizeof_off_t+set}" = set; then :
7098 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007099else
Matthias Kloseb9621712010-04-24 17:59:49 +00007100 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007101#ifdef HAVE_SYS_TYPES_H
7102#include <sys/types.h>
7103#endif
7104
Matthias Kloseb9621712010-04-24 17:59:49 +00007105"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007106
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007107else
Matthias Kloseb9621712010-04-24 17:59:49 +00007108 if test "$ac_cv_type_off_t" = yes; then
7109 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7110$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson79263252010-10-31 16:50:44 +00007111{ as_fn_set_status 77
7112as_fn_error "cannot compute sizeof (off_t)
7113See \`config.log' for more details." "$LINENO" 5; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007114 else
7115 ac_cv_sizeof_off_t=0
7116 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007117fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007118
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007119fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007120{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
7121$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007122
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007123
7124
Martin v. Löwis11437992002-04-12 09:54:03 +00007125cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007126#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007127_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007128
Michael W. Hudson54241132001-12-07 15:38:26 +00007129
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007130
Matthias Kloseb9621712010-04-24 17:59:49 +00007131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
7132$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007133if test "$have_long_long" = yes
7134then
7135if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007136 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007137
Matthias Kloseb9621712010-04-24 17:59:49 +00007138$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007139
Matthias Kloseb9621712010-04-24 17:59:49 +00007140 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7141$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007142else
Matthias Kloseb9621712010-04-24 17:59:49 +00007143 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7144$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007145fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00007146else
Matthias Kloseb9621712010-04-24 17:59:49 +00007147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7148$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007149fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007150
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007151# The cast to long int works around a bug in the HP C Compiler
7152# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7153# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7154# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007155{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
7156$as_echo_n "checking size of time_t... " >&6; }
7157if test "${ac_cv_sizeof_time_t+set}" = set; then :
7158 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007159else
Matthias Kloseb9621712010-04-24 17:59:49 +00007160 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007161#ifdef HAVE_SYS_TYPES_H
7162#include <sys/types.h>
7163#endif
7164#ifdef HAVE_TIME_H
7165#include <time.h>
7166#endif
7167
Matthias Kloseb9621712010-04-24 17:59:49 +00007168"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007169
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007170else
Matthias Kloseb9621712010-04-24 17:59:49 +00007171 if test "$ac_cv_type_time_t" = yes; then
7172 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7173$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson79263252010-10-31 16:50:44 +00007174{ as_fn_set_status 77
7175as_fn_error "cannot compute sizeof (time_t)
7176See \`config.log' for more details." "$LINENO" 5; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007177 else
7178 ac_cv_sizeof_time_t=0
7179 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007180fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007181
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007182fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007183{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
7184$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007185
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007186
7187
Martin v. Löwis11437992002-04-12 09:54:03 +00007188cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007189#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007190_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007191
Michael W. Hudson54241132001-12-07 15:38:26 +00007192
7193
Trent Mick635f6fb2000-08-23 21:33:05 +00007194# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007195ac_save_cc="$CC"
7196if test "$ac_cv_kpthread" = "yes"
7197then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00007198elif test "$ac_cv_kthread" = "yes"
7199then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00007200elif test "$ac_cv_pthread" = "yes"
7201then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007202fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007203
Matthias Kloseb9621712010-04-24 17:59:49 +00007204{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
7205$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007206have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007207cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007208/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007209
7210 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007211int
7212main ()
7213{
Guido van Rossum12580492000-09-24 16:47:19 +00007214pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007215 ;
7216 return 0;
7217}
Matthias Kloseb159a552010-04-25 21:00:44 +00007218
Martin v. Löwis11437992002-04-12 09:54:03 +00007219_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007220if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00007221 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00007222fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007223rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007224{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
7225$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007226if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007227 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007228# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7229# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7230# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007231{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
7232$as_echo_n "checking size of pthread_t... " >&6; }
7233if test "${ac_cv_sizeof_pthread_t+set}" = set; then :
7234 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007235else
Matthias Kloseb9621712010-04-24 17:59:49 +00007236 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007237#ifdef HAVE_PTHREAD_H
7238#include <pthread.h>
7239#endif
7240
Matthias Kloseb9621712010-04-24 17:59:49 +00007241"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007242
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007243else
Matthias Kloseb9621712010-04-24 17:59:49 +00007244 if test "$ac_cv_type_pthread_t" = yes; then
7245 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7246$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson79263252010-10-31 16:50:44 +00007247{ as_fn_set_status 77
7248as_fn_error "cannot compute sizeof (pthread_t)
7249See \`config.log' for more details." "$LINENO" 5; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007250 else
7251 ac_cv_sizeof_pthread_t=0
7252 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00007253fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007254
Trent Mick635f6fb2000-08-23 21:33:05 +00007255fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007256{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
7257$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007258
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007259
7260
Martin v. Löwis11437992002-04-12 09:54:03 +00007261cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007262#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007263_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007264
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007265
Trent Mick635f6fb2000-08-23 21:33:05 +00007266fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007267CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00007268
Michael W. Hudson54241132001-12-07 15:38:26 +00007269
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007270case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007271 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007272 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
7273 ;;
7274 Darwin/*)
7275 OTHER_LIBTOOL_OPT=""
7276 ;;
7277esac
7278
7279
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007280ARCH_RUN_32BIT=""
7281
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007282case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007283 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00007284 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
7285 if test "${enable_universalsdk}"; then
7286 :
7287 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007288 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007289 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00007290 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007291 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00007292 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00007293 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007294 if test ${gcc_version} '<' 4.0
7295 then
7296 LIBTOOL_CRUFT="-lcc_dynamic"
7297 else
7298 LIBTOOL_CRUFT=""
7299 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007300 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007301 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007302else
Matthias Kloseb9621712010-04-24 17:59:49 +00007303 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007304/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007305
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007306 #include <unistd.h>
7307 int main(int argc, char*argv[])
7308 {
7309 if (sizeof(long) == 4) {
7310 return 0;
7311 } else {
7312 return 1;
7313 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007314 }
7315
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007316_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007317if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007318 ac_osx_32bit=yes
7319else
Matthias Kloseb9621712010-04-24 17:59:49 +00007320 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007321fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007322rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7323 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007324fi
7325
7326
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007327 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007328 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007329 i386)
7330 MACOSX_DEFAULT_ARCH="i386"
7331 ;;
7332 ppc)
7333 MACOSX_DEFAULT_ARCH="ppc"
7334 ;;
7335 *)
Benjamin Peterson79263252010-10-31 16:50:44 +00007336 as_fn_error "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007337 ;;
7338 esac
7339 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007340 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007341 i386)
7342 MACOSX_DEFAULT_ARCH="x86_64"
7343 ;;
7344 ppc)
7345 MACOSX_DEFAULT_ARCH="ppc64"
7346 ;;
7347 *)
Benjamin Peterson79263252010-10-31 16:50:44 +00007348 as_fn_error "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007349 ;;
7350 esac
7351
7352 #ARCH_RUN_32BIT="true"
7353 fi
7354
7355 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00007356 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007357 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007358esac
7359
Matthias Kloseb9621712010-04-24 17:59:49 +00007360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
7361$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007362if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007363then
Skip Montanarodecc6a42003-01-01 20:07:49 +00007364 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00007365 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00007366 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007367
Matthias Kloseb9621712010-04-24 17:59:49 +00007368$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007369
Matthias Kloseb9621712010-04-24 17:59:49 +00007370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7371$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00007372 if test $enable_shared = "yes"
7373 then
Benjamin Peterson79263252010-10-31 16:50:44 +00007374 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 +00007375 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007376else
Matthias Kloseb9621712010-04-24 17:59:49 +00007377 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7378$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007379fi
7380
Matthias Kloseb9621712010-04-24 17:59:49 +00007381{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
7382$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007383case $ac_sys_system/$ac_sys_release in
7384 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007385
Matthias Kloseb9621712010-04-24 17:59:49 +00007386$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007387
Matthias Kloseb9621712010-04-24 17:59:49 +00007388 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
7389$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007390 ;;
7391 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00007392 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7393$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007394 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007395esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007396
Guido van Rossum0a516c91994-09-12 10:58:40 +00007397# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00007398
Michael W. Hudson54241132001-12-07 15:38:26 +00007399
7400
7401
7402
Benjamin Peterson99f03762010-04-11 22:15:28 +00007403
Thomas Wouters477c8d52006-05-27 19:21:47 +00007404
Georg Brandlb1441c72009-01-03 22:33:39 +00007405
Thomas Wouters477c8d52006-05-27 19:21:47 +00007406cat >>confdefs.h <<_ACEOF
7407#define SHLIB_EXT "$SO"
7408_ACEOF
7409
Guido van Rossum0a516c91994-09-12 10:58:40 +00007410# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00007411# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007412# (Shared libraries in this instance are shared modules to be loaded into
7413# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00007414{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
7415$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007416if test -z "$LDSHARED"
7417then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007418 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007419 AIX*)
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00007420 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp -L\$(srcdir)"
Guido van Rossumce608b02001-09-28 15:59:38 +00007421 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007422 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00007423 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00007424 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00007425 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007426 if test "$GCC" = "yes" ; then
7427 LDSHARED='$(CC) -shared'
7428 LDCXXSHARED='$(CXX) -shared'
7429 else
7430 LDSHARED='$(CC) -G'
7431 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00007432 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007433 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007434 if test "$GCC" = "yes" ; then
7435 LDSHARED='$(CC) -shared'
7436 LDCXXSHARED='$(CXX) -shared'
7437 else
7438 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007439 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +00007440 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +00007441 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007442 LDSHARED='$(CC) -bundle'
7443 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00007444 if test "$enable_framework" ; then
7445 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007446 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7447 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007448 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007449 else
7450 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00007451 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00007452 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00007453 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007454 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007455 LDSHARED='$(CC) -bundle'
7456 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00007457 if test "$enable_framework" ; then
7458 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007459 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7460 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007461 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007462 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00007463 # No framework, use the Python app as bundle-loader
7464 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00007465 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007466 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007467 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007468 Darwin/*)
7469 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
7470 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00007471
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007472 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +00007473 then
Thomas Wouters477c8d52006-05-27 19:21:47 +00007474 if test "${enable_universalsdk}"; then
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007475 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007476 fi
Antoine Pitroud4958c22010-10-13 17:01:10 +00007477 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
7478 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
Jack Jansen6b08a402004-06-03 12:41:45 +00007479 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00007480 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00007481 LDSHARED='$(CC) -bundle'
7482 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00007483 if test "$enable_framework" ; then
7484 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007485 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7486 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007487 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007488 else
7489 # No framework, use the Python app as bundle-loader
7490 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
7491 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007492 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007493 fi
7494 fi
7495 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007496 Linux*|GNU*|QNX*)
7497 LDSHARED='$(CC) -shared'
7498 LDCXXSHARED='$(CXX) -shared';;
7499 BSD/OS*/4*)
7500 LDSHARED="gcc -shared"
7501 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007502 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00007503 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00007504 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00007505 LDSHARED='$(CC) -shared'
7506 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00007507 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00007508 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00007509 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007510 OpenBSD*)
7511 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7512 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00007513 LDSHARED='$(CC) -shared $(CCSHARED)'
7514 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007515 else
7516 case `uname -r` in
7517 [01].* | 2.[0-7] | 2.[0-7].*)
7518 LDSHARED="ld -Bshareable ${LDFLAGS}"
7519 ;;
7520 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007521 LDSHARED='$(CC) -shared $(CCSHARED)'
7522 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007523 ;;
7524 esac
7525 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007526 NetBSD*|DragonFly*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007527 LDSHARED="cc -shared"
7528 LDCXXSHARED="c++ -shared";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007529 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007530 if test "$GCC" = "yes" ; then
7531 LDSHARED='$(CC) -shared'
7532 LDCXXSHARED='$(CXX) -shared'
7533 else
7534 LDSHARED='$(CC) -G'
7535 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00007536 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007537 SCO_SV*)
7538 LDSHARED='$(CC) -Wl,-G,-Bexport'
7539 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
7540 CYGWIN*)
7541 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
7542 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007543 *) LDSHARED="ld";;
7544 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007545fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007546{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
7547$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00007548LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007549BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00007550# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007551# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007552{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
7553$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007554if test -z "$CCSHARED"
7555then
Guido van Rossum07397971997-04-29 21:49:50 +00007556 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00007557 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007558 then CCSHARED="-fPIC";
7559 elif test `uname -p` = sparc;
7560 then CCSHARED="-xcode=pic32";
7561 else CCSHARED="-Kpic";
7562 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00007563 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00007564 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00007565 else CCSHARED="+z";
7566 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007567 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007568 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007569 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007570 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00007571 if test "$GCC" = "yes"
7572 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00007573 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00007574 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007575 SCO_SV*)
7576 if test "$GCC" = "yes"
7577 then CCSHARED="-fPIC"
7578 else CCSHARED="-Kpic -belf"
7579 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007580 IRIX*/6*) case $CC in
7581 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00007582 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007583 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007584 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007585fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007586{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
7587$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007588# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007589# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007590{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
7591$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007592if test -z "$LINKFORSHARED"
7593then
Guido van Rossum07397971997-04-29 21:49:50 +00007594 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007595 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007596 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00007597 LINKFORSHARED="-Wl,-E -Wl,+s";;
7598# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007599 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007600 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007601 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00007602 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00007603 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Jack Jansene578a632001-08-15 01:27:14 +00007604 if test "$enable_framework"
7605 then
Jack Jansenda49e192005-01-07 13:08:22 +00007606 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007607 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007608 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007609 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007610 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00007611 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007612 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00007613 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7614 then
7615 LINKFORSHARED="-Wl,--export-dynamic"
7616 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007617 SunOS/5*) case $CC in
7618 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00007619 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00007620 then
7621 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007622 fi;;
7623 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00007624 CYGWIN*)
7625 if test $enable_shared = "no"
7626 then
7627 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
7628 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00007629 QNX*)
7630 # -Wl,-E causes the symbols to be added to the dynamic
7631 # symbol table so that they can be found when a module
7632 # is loaded. -N 2048K causes the stack size to be set
7633 # to 2048 kilobytes so that the stack doesn't overflow
7634 # when running test_compile.py.
7635 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007636 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007637fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007638{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
7639$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007640
Michael W. Hudson54241132001-12-07 15:38:26 +00007641
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00007642
Matthias Kloseb9621712010-04-24 17:59:49 +00007643{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
7644$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007645if test ! "$LIBRARY" = "$LDLIBRARY"
7646then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00007647 case $ac_sys_system in
7648 CYGWIN*)
7649 # Cygwin needs CCSHARED when building extension DLLs
7650 # but not when building the interpreter DLL.
7651 CFLAGSFORSHARED='';;
7652 *)
7653 CFLAGSFORSHARED='$(CCSHARED)'
7654 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007655fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007656{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
7657$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007658
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007659# SHLIBS are libraries (except -lc and -lm) to link to the python shared
7660# library (with --enable-shared).
7661# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007662# symbols, this must be set to $(LIBS) (expanded by make). We do this even
7663# if it is not required, since it creates a dependency of the shared library
7664# to LIBS. This, in turn, means that applications linking the shared libpython
7665# don't need to link LIBS explicitly. The default should be only changed
7666# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007667
Matthias Kloseb9621712010-04-24 17:59:49 +00007668{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
7669$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007670case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007671 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007672 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007673esac
Matthias Kloseb9621712010-04-24 17:59:49 +00007674{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
7675$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007676
7677
Guido van Rossum627b2d71993-12-24 10:39:16 +00007678# checks for libraries
Matthias Kloseb9621712010-04-24 17:59:49 +00007679{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
7680$as_echo_n "checking for dlopen in -ldl... " >&6; }
7681if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
7682 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007683else
Martin v. Löwis11437992002-04-12 09:54:03 +00007684 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007685LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007686cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007687/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007688
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007689/* Override any GCC internal prototype to avoid an error.
7690 Use char because int might match the return type of a GCC
7691 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007692#ifdef __cplusplus
7693extern "C"
7694#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007695char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007696int
7697main ()
7698{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007699return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007700 ;
7701 return 0;
7702}
7703_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007704if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007705 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007706else
Matthias Kloseb9621712010-04-24 17:59:49 +00007707 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007708fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007709rm -f core conftest.err conftest.$ac_objext \
7710 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007711LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007712fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007713{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
7714$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
7715if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007716 cat >>confdefs.h <<_ACEOF
7717#define HAVE_LIBDL 1
7718_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007719
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007720 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00007721
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007722fi
7723 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00007724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
7725$as_echo_n "checking for shl_load in -ldld... " >&6; }
7726if test "${ac_cv_lib_dld_shl_load+set}" = set; then :
7727 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007728else
Martin v. Löwis11437992002-04-12 09:54:03 +00007729 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007730LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007731cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007732/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007733
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007734/* Override any GCC internal prototype to avoid an error.
7735 Use char because int might match the return type of a GCC
7736 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007737#ifdef __cplusplus
7738extern "C"
7739#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007740char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007741int
7742main ()
7743{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007744return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007745 ;
7746 return 0;
7747}
7748_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007749if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007750 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007751else
Matthias Kloseb9621712010-04-24 17:59:49 +00007752 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007753fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007754rm -f core conftest.err conftest.$ac_objext \
7755 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007756LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007757fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007758{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
7759$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
7760if test "x$ac_cv_lib_dld_shl_load" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007761 cat >>confdefs.h <<_ACEOF
7762#define HAVE_LIBDLD 1
7763_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007764
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007765 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007766
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007767fi
7768 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00007769
Georg Brandlb1441c72009-01-03 22:33:39 +00007770# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00007771if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007772 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
7773$as_echo_n "checking for library containing sem_init... " >&6; }
7774if test "${ac_cv_search_sem_init+set}" = set; then :
7775 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007776else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00007777 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007778cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007779/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007780
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007781/* Override any GCC internal prototype to avoid an error.
7782 Use char because int might match the return type of a GCC
7783 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007784#ifdef __cplusplus
7785extern "C"
7786#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007787char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007788int
7789main ()
7790{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007791return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007792 ;
7793 return 0;
7794}
7795_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007796for ac_lib in '' pthread rt posix4; do
7797 if test -z "$ac_lib"; then
7798 ac_res="none required"
7799 else
7800 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007801 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007802 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007803 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007804 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007805fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007806rm -f core conftest.err conftest.$ac_objext \
7807 conftest$ac_exeext
7808 if test "${ac_cv_search_sem_init+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007809 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007810fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007811done
Matthias Kloseb9621712010-04-24 17:59:49 +00007812if test "${ac_cv_search_sem_init+set}" = set; then :
7813
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007814else
7815 ac_cv_search_sem_init=no
7816fi
7817rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00007818LIBS=$ac_func_search_save_LIBS
7819fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007820{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
7821$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007822ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00007823if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007824 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007825
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007826fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00007827 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00007828 # posix4 on Solaris 2.6
7829 # pthread (first!) on Linux
7830fi
7831
Martin v. Löwis19d17342003-06-14 21:03:05 +00007832# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00007833{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
7834$as_echo_n "checking for textdomain in -lintl... " >&6; }
7835if test "${ac_cv_lib_intl_textdomain+set}" = set; then :
7836 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00007837else
7838 ac_check_lib_save_LIBS=$LIBS
7839LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007840cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007841/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00007842
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007843/* Override any GCC internal prototype to avoid an error.
7844 Use char because int might match the return type of a GCC
7845 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00007846#ifdef __cplusplus
7847extern "C"
7848#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00007849char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00007850int
7851main ()
7852{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007853return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00007854 ;
7855 return 0;
7856}
7857_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007858if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00007859 ac_cv_lib_intl_textdomain=yes
7860else
Matthias Kloseb9621712010-04-24 17:59:49 +00007861 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00007862fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007863rm -f core conftest.err conftest.$ac_objext \
7864 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00007865LIBS=$ac_check_lib_save_LIBS
7866fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007867{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
7868$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
7869if test "x$ac_cv_lib_intl_textdomain" = x""yes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00007870
Matthias Kloseb9621712010-04-24 17:59:49 +00007871$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00007872
Brett Cannonc6d936e2009-06-07 20:09:53 +00007873 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00007874fi
7875
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007876
7877# checks for system dependent C++ extensions support
7878case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00007879 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
7880$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
7881 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007882/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007883
7884 #include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007885int
7886main ()
7887{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007888loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00007889 ;
7890 return 0;
7891}
Matthias Kloseb159a552010-04-25 21:00:44 +00007892
Martin v. Löwis11437992002-04-12 09:54:03 +00007893_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007894if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007895
Matthias Kloseb159a552010-04-25 21:00:44 +00007896
Matthias Kloseb9621712010-04-24 17:59:49 +00007897$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007898
Matthias Kloseb159a552010-04-25 21:00:44 +00007899 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007900$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00007901
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007902else
Matthias Kloseb159a552010-04-25 21:00:44 +00007903
7904 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007905$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00007906
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007907fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007908rm -f core conftest.err conftest.$ac_objext \
7909 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007910 *) ;;
7911esac
7912
Guido van Rossum70c7f481998-03-26 18:44:10 +00007913# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00007914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
7915$as_echo_n "checking for t_open in -lnsl... " >&6; }
7916if test "${ac_cv_lib_nsl_t_open+set}" = set; then :
7917 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007918else
Martin v. Löwis11437992002-04-12 09:54:03 +00007919 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007920LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007921cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007922/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007923
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007924/* Override any GCC internal prototype to avoid an error.
7925 Use char because int might match the return type of a GCC
7926 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007927#ifdef __cplusplus
7928extern "C"
7929#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007930char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007931int
7932main ()
7933{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007934return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007935 ;
7936 return 0;
7937}
7938_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007939if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007940 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007941else
Matthias Kloseb9621712010-04-24 17:59:49 +00007942 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007943fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007944rm -f core conftest.err conftest.$ac_objext \
7945 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007946LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007947fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007948{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
7949$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
7950if test "x$ac_cv_lib_nsl_t_open" = x""yes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007951 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007952fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00007953 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00007954{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
7955$as_echo_n "checking for socket in -lsocket... " >&6; }
7956if test "${ac_cv_lib_socket_socket+set}" = set; then :
7957 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007958else
Martin v. Löwis11437992002-04-12 09:54:03 +00007959 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007960LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007961cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007962/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007963
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007964/* Override any GCC internal prototype to avoid an error.
7965 Use char because int might match the return type of a GCC
7966 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007967#ifdef __cplusplus
7968extern "C"
7969#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007970char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007971int
7972main ()
7973{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007974return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007975 ;
7976 return 0;
7977}
7978_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007979if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007980 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007981else
Matthias Kloseb9621712010-04-24 17:59:49 +00007982 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007983fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007984rm -f core conftest.err conftest.$ac_objext \
7985 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007986LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007987fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007988{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
7989$as_echo "$ac_cv_lib_socket_socket" >&6; }
7990if test "x$ac_cv_lib_socket_socket" = x""yes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00007991 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00007992fi
7993 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00007994
Matthias Kloseb9621712010-04-24 17:59:49 +00007995{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
7996$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007997
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007998# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00007999if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008000 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00008001{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8002$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00008003LIBS="$withval $LIBS"
8004
8005else
Matthias Kloseb9621712010-04-24 17:59:49 +00008006 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8007$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008008fi
8009
Guido van Rossum7f43da71994-08-01 12:15:30 +00008010
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008011if test -n "$ac_tool_prefix"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008012 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
8013set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008014{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8015$as_echo_n "checking for $ac_word... " >&6; }
8016if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
8017 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008018else
8019 case $PKG_CONFIG in
8020 [\\/]* | ?:[\\/]*)
8021 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8022 ;;
8023 *)
8024 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8025for as_dir in $PATH
8026do
8027 IFS=$as_save_IFS
8028 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008029 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Petersond78735d2010-01-01 16:04:23 +00008030 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8031 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008032 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008033 break 2
8034 fi
8035done
Matthias Kloseb9621712010-04-24 17:59:49 +00008036 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008037IFS=$as_save_IFS
8038
8039 ;;
8040esac
8041fi
8042PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8043if test -n "$PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008044 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8045$as_echo "$PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008046else
Matthias Kloseb9621712010-04-24 17:59:49 +00008047 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8048$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008049fi
8050
8051
8052fi
8053if test -z "$ac_cv_path_PKG_CONFIG"; then
8054 ac_pt_PKG_CONFIG=$PKG_CONFIG
8055 # Extract the first word of "pkg-config", so it can be a program name with args.
8056set dummy pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8058$as_echo_n "checking for $ac_word... " >&6; }
8059if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then :
8060 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008061else
8062 case $ac_pt_PKG_CONFIG in
8063 [\\/]* | ?:[\\/]*)
8064 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
8065 ;;
8066 *)
8067 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8068for as_dir in $PATH
8069do
8070 IFS=$as_save_IFS
8071 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008072 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Petersond78735d2010-01-01 16:04:23 +00008073 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8074 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008075 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008076 break 2
8077 fi
8078done
Matthias Kloseb9621712010-04-24 17:59:49 +00008079 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008080IFS=$as_save_IFS
8081
8082 ;;
8083esac
8084fi
8085ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
8086if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
8088$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008089else
Matthias Kloseb9621712010-04-24 17:59:49 +00008090 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8091$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008092fi
8093
8094 if test "x$ac_pt_PKG_CONFIG" = x; then
8095 PKG_CONFIG=""
8096 else
8097 case $cross_compiling:$ac_tool_warned in
8098yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00008099{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8100$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Petersond78735d2010-01-01 16:04:23 +00008101ac_tool_warned=yes ;;
8102esac
8103 PKG_CONFIG=$ac_pt_PKG_CONFIG
8104 fi
8105else
8106 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
8107fi
8108
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008109
8110# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00008111{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
8112$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008113
8114# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008115if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008116 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00008117else
8118 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008119fi
8120
8121
Matthias Kloseb9621712010-04-24 17:59:49 +00008122{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
8123$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008124
8125# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00008126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
8127$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008128
8129# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008130if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008131 withval=$with_system_ffi;
Benjamin Peterson79263252010-10-31 16:50:44 +00008132else
8133 with_system_ffi="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008134fi
8135
8136
8137if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008138 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
8139else
8140 LIBFFI_INCLUDEDIR=""
8141fi
8142
8143
Matthias Kloseb9621712010-04-24 17:59:49 +00008144{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
8145$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008146
Benjamin Peterson076ed002010-10-31 17:11:02 +00008147# Check for support for loadable sqlite extensions
8148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
8149$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
8150# Check whether --enable-loadable-sqlite-extensions was given.
8151if test "${enable_loadable_sqlite_extensions+set}" = set; then :
8152 enableval=$enable_loadable_sqlite_extensions;
8153else
8154 enable_loadable_sqlite_extensions="no"
8155fi
8156
8157
8158{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
8159$as_echo "$enable_loadable_sqlite_extensions" >&6; }
8160
Matthias Klose55708cc2009-04-30 08:06:49 +00008161# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +00008162{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
8163$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008164
8165# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008166if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +00008167 withval=$with_dbmliborder;
8168if test x$with_dbmliborder = xyes
8169then
Benjamin Peterson79263252010-10-31 16:50:44 +00008170as_fn_error "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008171else
8172 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
8173 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
8174 then
Benjamin Peterson79263252010-10-31 16:50:44 +00008175 as_fn_error "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008176 fi
8177 done
8178fi
8179fi
8180
Matthias Kloseb9621712010-04-24 17:59:49 +00008181{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
8182$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008183
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00008184# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008185
8186
Matthias Kloseb9621712010-04-24 17:59:49 +00008187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
8188$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008189
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008190# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008191if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008192 withval=$with_signal_module;
8193fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008194
8195
8196if test -z "$with_signal_module"
8197then with_signal_module="yes"
8198fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008199{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
8200$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008201
8202if test "${with_signal_module}" = "yes"; then
8203 USE_SIGNAL_MODULE=""
8204 SIGNAL_OBJS=""
8205else
8206 USE_SIGNAL_MODULE="#"
8207 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
8208fi
8209
Guido van Rossum3d15bd82001-01-10 18:53:48 +00008210# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00008211
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008212USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00008213
Matthias Kloseb9621712010-04-24 17:59:49 +00008214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dec-threads" >&5
8215$as_echo_n "checking for --with-dec-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008216
Guido van Rossumec2f0731997-01-22 20:54:01 +00008217
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008218# Check whether --with-dec-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008219if test "${with_dec_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008220 withval=$with_dec_threads;
Matthias Kloseb9621712010-04-24 17:59:49 +00008221{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8222$as_echo "$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +00008223LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00008224if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00008225 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00008226fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008227else
Matthias Kloseb9621712010-04-24 17:59:49 +00008228 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8229$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008230fi
8231
Martin v. Löwis11437992002-04-12 09:54:03 +00008232
8233# Templates for things AC_DEFINEd more than once.
8234# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00008235
8236
Martin v. Löwis11437992002-04-12 09:54:03 +00008237
8238
Matthias Kloseb9621712010-04-24 17:59:49 +00008239{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
8240$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008241
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008242# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008243if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008244 withval=$with_threads;
8245fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008246
8247
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008248# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00008249
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008250# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008251if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008252 withval=$with_thread; with_threads=$with_thread
8253fi
8254
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008255
8256if test -z "$with_threads"
8257then with_threads="yes"
8258fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008259{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
8260$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008261
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008262
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008263if test "$with_threads" = "no"
8264then
8265 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008266elif test "$ac_cv_pthread_is_default" = yes
8267then
Matthias Kloseb9621712010-04-24 17:59:49 +00008268 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008269
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008270 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +00008271 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008272
8273 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00008274 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008275elif test "$ac_cv_kpthread" = "yes"
8276then
8277 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008278 if test "$ac_cv_cxx_thread" = "yes"; then
8279 CXX="$CXX -Kpthread"
8280 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008281 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00008282
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008283 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008284 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008285elif test "$ac_cv_kthread" = "yes"
8286then
8287 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008288 if test "$ac_cv_cxx_thread" = "yes"; then
8289 CXX="$CXX -Kthread"
8290 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008291 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008292
8293 posix_threads=yes
8294 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008295elif test "$ac_cv_pthread" = "yes"
8296then
8297 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008298 if test "$ac_cv_cxx_thread" = "yes"; then
8299 CXX="$CXX -pthread"
8300 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008301 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008302
8303 posix_threads=yes
8304 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008305else
8306 if test ! -z "$with_threads" -a -d "$with_threads"
8307 then LDFLAGS="$LDFLAGS -L$with_threads"
8308 fi
8309 if test ! -z "$withval" -a -d "$withval"
8310 then LDFLAGS="$LDFLAGS -L$withval"
8311 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008312
8313 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00008314 # define _POSIX_THREADS in unistd.h. Some apparently don't
8315 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +00008316 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
8317$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
8318 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008319/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008320
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008321#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008322#ifdef _POSIX_THREADS
8323yes
8324#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008325
8326_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008327if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008328 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008329 unistd_defines_pthreads=yes
8330else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008331 unistd_defines_pthreads=no
8332fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008333rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008334
Matthias Kloseb9621712010-04-24 17:59:49 +00008335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
8336$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008337
Matthias Kloseb9621712010-04-24 17:59:49 +00008338 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00008339
Matthias Kloseb9621712010-04-24 17:59:49 +00008340 ac_fn_c_check_header_mongrel "$LINENO" "cthreads.h" "ac_cv_header_cthreads_h" "$ac_includes_default"
8341if test "x$ac_cv_header_cthreads_h" = x""yes; then :
8342 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008343
Matthias Kloseb9621712010-04-24 17:59:49 +00008344 $as_echo "#define C_THREADS 1" >>confdefs.h
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008345
Martin v. Löwis11437992002-04-12 09:54:03 +00008346
Matthias Kloseb9621712010-04-24 17:59:49 +00008347$as_echo "#define HURD_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008348
8349 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008350 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008351else
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008352
Matthias Kloseb9621712010-04-24 17:59:49 +00008353 ac_fn_c_check_header_mongrel "$LINENO" "mach/cthreads.h" "ac_cv_header_mach_cthreads_h" "$ac_includes_default"
8354if test "x$ac_cv_header_mach_cthreads_h" = x""yes; then :
8355 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008356
Matthias Kloseb9621712010-04-24 17:59:49 +00008357 $as_echo "#define C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008358
Martin v. Löwis11437992002-04-12 09:54:03 +00008359
Matthias Kloseb9621712010-04-24 17:59:49 +00008360$as_echo "#define MACH_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008361
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008362 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008363else
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008364
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008365 # Just looking for pthread_create in libpthread is not enough:
8366 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
8367 # So we really have to include pthread.h, and then link.
8368 _libs=$LIBS
8369 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00008370 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
8371$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
8372 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008373/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008374#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00008375
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008376void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00008377int
8378main ()
8379{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008380
8381pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00008382 ;
8383 return 0;
8384}
8385_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008386if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008387
Matthias Kloseb9621712010-04-24 17:59:49 +00008388 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8389$as_echo "yes" >&6; }
8390 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00008391
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008392 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008393 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00008394else
Martin v. Löwis11437992002-04-12 09:54:03 +00008395
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008396 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +00008397 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
8398if test "x$ac_cv_func_pthread_detach" = x""yes; then :
8399 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00008400
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008401 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008402 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00008403else
Guido van Rossumad678af1998-10-02 14:42:15 +00008404
Matthias Kloseb9621712010-04-24 17:59:49 +00008405 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
8406$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
8407if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then :
8408 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008409else
Martin v. Löwis11437992002-04-12 09:54:03 +00008410 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008411LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008412cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008413/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008414
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008415/* Override any GCC internal prototype to avoid an error.
8416 Use char because int might match the return type of a GCC
8417 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008418#ifdef __cplusplus
8419extern "C"
8420#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008421char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008422int
8423main ()
8424{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008425return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008426 ;
8427 return 0;
8428}
8429_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008430if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008431 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00008432else
Matthias Kloseb9621712010-04-24 17:59:49 +00008433 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00008434fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008435rm -f core conftest.err conftest.$ac_objext \
8436 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008437LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008438fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008439{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
8440$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
8441if test "x$ac_cv_lib_pthreads_pthread_create" = x""yes; then :
8442 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00008443
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008444 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008445 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008446 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00008447else
Greg Steinadf63d62000-07-05 10:38:09 +00008448
Matthias Kloseb9621712010-04-24 17:59:49 +00008449 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
8450$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
8451if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then :
8452 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00008453else
Martin v. Löwis11437992002-04-12 09:54:03 +00008454 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008455LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008456cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008457/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008458
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008459/* Override any GCC internal prototype to avoid an error.
8460 Use char because int might match the return type of a GCC
8461 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008462#ifdef __cplusplus
8463extern "C"
8464#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008465char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008466int
8467main ()
8468{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008469return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008470 ;
8471 return 0;
8472}
8473_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008474if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008475 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00008476else
Matthias Kloseb9621712010-04-24 17:59:49 +00008477 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00008478fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008479rm -f core conftest.err conftest.$ac_objext \
8480 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008481LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00008482fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008483{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
8484$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
8485if test "x$ac_cv_lib_c_r_pthread_create" = x""yes; then :
8486 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00008487
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008488 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008489 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008490 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008491else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008492
Matthias Kloseb9621712010-04-24 17:59:49 +00008493 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
8494$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
8495if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then :
8496 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008497else
Martin v. Löwis11437992002-04-12 09:54:03 +00008498 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008499LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008500cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008501/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008502
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008503/* Override any GCC internal prototype to avoid an error.
8504 Use char because int might match the return type of a GCC
8505 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008506#ifdef __cplusplus
8507extern "C"
8508#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008509char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008510int
8511main ()
8512{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008513return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008514 ;
8515 return 0;
8516}
8517_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008518if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008519 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008520else
Matthias Kloseb9621712010-04-24 17:59:49 +00008521 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008522fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008523rm -f core conftest.err conftest.$ac_objext \
8524 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008525LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008526fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008527{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
8528$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
8529if test "x$ac_cv_lib_pthread___pthread_create_system" = x""yes; then :
8530 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008531
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008532 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008533 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008534 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008535else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008536
Matthias Kloseb9621712010-04-24 17:59:49 +00008537 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
8538$as_echo_n "checking for pthread_create in -lcma... " >&6; }
8539if test "${ac_cv_lib_cma_pthread_create+set}" = set; then :
8540 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00008541else
Martin v. Löwis11437992002-04-12 09:54:03 +00008542 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008543LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008544cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008545/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008546
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008547/* Override any GCC internal prototype to avoid an error.
8548 Use char because int might match the return type of a GCC
8549 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008550#ifdef __cplusplus
8551extern "C"
8552#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008553char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008554int
8555main ()
8556{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008557return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008558 ;
8559 return 0;
8560}
8561_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008562if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008563 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00008564else
Matthias Kloseb9621712010-04-24 17:59:49 +00008565 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00008566fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008567rm -f core conftest.err conftest.$ac_objext \
8568 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008569LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008570fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008571{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
8572$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
8573if test "x$ac_cv_lib_cma_pthread_create" = x""yes; then :
8574 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00008575
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008576 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008577 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008578 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00008579else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00008580
Martin v. Löwis130fb172001-07-19 11:00:41 +00008581 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00008582fi
8583
Guido van Rossum627b2d71993-12-24 10:39:16 +00008584
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008585fi
8586
Guido van Rossum0be3e491997-05-22 20:33:33 +00008587fi
8588
Guido van Rossum49545951997-12-02 19:28:29 +00008589fi
8590
Guido van Rossumb93a8621998-05-07 13:27:32 +00008591fi
8592
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008593fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008594rm -f core conftest.err conftest.$ac_objext \
8595 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008596fi
8597
Martin v. Löwis11437992002-04-12 09:54:03 +00008598
8599fi
8600
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008601
Michael W. Hudson54241132001-12-07 15:38:26 +00008602
Matthias Kloseb9621712010-04-24 17:59:49 +00008603 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
8604$as_echo_n "checking for usconfig in -lmpc... " >&6; }
8605if test "${ac_cv_lib_mpc_usconfig+set}" = set; then :
8606 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008607else
Martin v. Löwis11437992002-04-12 09:54:03 +00008608 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008609LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008610cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008611/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008612
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008613/* Override any GCC internal prototype to avoid an error.
8614 Use char because int might match the return type of a GCC
8615 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008616#ifdef __cplusplus
8617extern "C"
8618#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008619char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008620int
8621main ()
8622{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008623return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008624 ;
8625 return 0;
8626}
8627_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008628if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008629 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008630else
Matthias Kloseb9621712010-04-24 17:59:49 +00008631 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008632fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008633rm -f core conftest.err conftest.$ac_objext \
8634 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008635LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008636fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008637{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
8638$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
8639if test "x$ac_cv_lib_mpc_usconfig" = x""yes; then :
8640 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008641
Martin v. Löwis130fb172001-07-19 11:00:41 +00008642 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008643 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008644 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008645fi
8646
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008647
Neal Norwitza978ab02002-11-02 16:58:05 +00008648 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008649 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
8650$as_echo_n "checking for thr_create in -lthread... " >&6; }
8651if test "${ac_cv_lib_thread_thr_create+set}" = set; then :
8652 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008653else
Martin v. Löwis11437992002-04-12 09:54:03 +00008654 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008655LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008656cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008657/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008658
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008659/* Override any GCC internal prototype to avoid an error.
8660 Use char because int might match the return type of a GCC
8661 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008662#ifdef __cplusplus
8663extern "C"
8664#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008665char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008666int
8667main ()
8668{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008669return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008670 ;
8671 return 0;
8672}
8673_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008674if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008675 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008676else
Matthias Kloseb9621712010-04-24 17:59:49 +00008677 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008678fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008679rm -f core conftest.err conftest.$ac_objext \
8680 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008681LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008682fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008683{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
8684$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
8685if test "x$ac_cv_lib_thread_thr_create" = x""yes; then :
8686 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008687
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008688 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008689 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008690 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008691fi
8692
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008693 fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008694
Martin v. Löwis130fb172001-07-19 11:00:41 +00008695 if test "$USE_THREAD_MODULE" != "#"
8696 then
8697 # If the above checks didn't disable threads, (at least) OSF1
8698 # needs this '-threads' argument during linking.
8699 case $ac_sys_system in
8700 OSF1) LDLAST=-threads;;
8701 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +00008702 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008703fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008704
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008705if test "$posix_threads" = "yes"; then
8706 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008707
Matthias Kloseb9621712010-04-24 17:59:49 +00008708$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008709
8710 fi
8711
8712 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
8713 case $ac_sys_system/$ac_sys_release in
8714 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +00008715$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008716
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008717 ;;
8718 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +00008719$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008720
8721 ;;
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00008722 AIX/5)
Matthias Kloseb9621712010-04-24 17:59:49 +00008723$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00008724
8725 ;;
Antoine Pitrou33a29942010-08-30 14:52:00 +00008726 AIX/6)
8727$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
8728
8729 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008730 esac
8731
Matthias Kloseb9621712010-04-24 17:59:49 +00008732 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
8733$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
8734 if test "${ac_cv_pthread_system_supported+set}" = set; then :
8735 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008736else
Matthias Kloseb9621712010-04-24 17:59:49 +00008737 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008738 ac_cv_pthread_system_supported=no
8739else
Matthias Kloseb9621712010-04-24 17:59:49 +00008740 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008741/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008742#include <pthread.h>
8743 void *foo(void *parm) {
8744 return NULL;
8745 }
8746 main() {
8747 pthread_attr_t attr;
8748 pthread_t id;
8749 if (pthread_attr_init(&attr)) exit(-1);
8750 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
8751 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
8752 exit(0);
8753 }
8754_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008755if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008756 ac_cv_pthread_system_supported=yes
8757else
Matthias Kloseb9621712010-04-24 17:59:49 +00008758 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008759fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008760rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8761 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008762fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008763
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008764
Guido van Rossum627b2d71993-12-24 10:39:16 +00008765fi
8766
Matthias Kloseb9621712010-04-24 17:59:49 +00008767 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
8768$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008769 if test "$ac_cv_pthread_system_supported" = "yes"; then
8770
Matthias Kloseb9621712010-04-24 17:59:49 +00008771$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008772
8773 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008774 for ac_func in pthread_sigmask
8775do :
8776 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
8777if test "x$ac_cv_func_pthread_sigmask" = x""yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008778 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008779#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008780_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +00008781 case $ac_sys_system in
8782 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008783
Matthias Kloseb9621712010-04-24 17:59:49 +00008784$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +00008785
8786 ;;
8787 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008788fi
8789done
8790
8791fi
8792
8793
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008794# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +00008795
Matthias Kloseb9621712010-04-24 17:59:49 +00008796{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
8797$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008798# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008799if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008800 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008801 no)
Matthias Kloseb9621712010-04-24 17:59:49 +00008802 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8803$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008804 ipv6=no
8805 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00008806 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8807$as_echo "yes" >&6; }
8808 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008809
8810 ipv6=yes
8811 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008812 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008813else
Martin v. Löwis11437992002-04-12 09:54:03 +00008814
Matthias Kloseb9621712010-04-24 17:59:49 +00008815 if test "$cross_compiling" = yes; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008816
Matthias Kloseb9621712010-04-24 17:59:49 +00008817 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8818$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008819 ipv6=no
8820
8821else
Matthias Kloseb9621712010-04-24 17:59:49 +00008822 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008823/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008824 /* AF_INET6 available check */
8825#include <sys/types.h>
8826#include <sys/socket.h>
8827main()
8828{
8829 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
8830 exit(1);
8831 else
8832 exit(0);
8833}
8834
Martin v. Löwis11437992002-04-12 09:54:03 +00008835_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008836if ac_fn_c_try_run "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008837
Matthias Kloseb9621712010-04-24 17:59:49 +00008838 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8839$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008840 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +00008841
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008842else
Matthias Kloseb159a552010-04-25 21:00:44 +00008843
Matthias Kloseb9621712010-04-24 17:59:49 +00008844 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8845$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008846 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +00008847
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008848fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008849rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8850 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008851fi
8852
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008853
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008854if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008855 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
8856$as_echo_n "checking if RFC2553 API is available... " >&6; }
8857 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008858/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008859
8860 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008861#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008862int
8863main ()
8864{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008865struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +00008866 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +00008867 ;
8868 return 0;
8869}
Matthias Kloseb159a552010-04-25 21:00:44 +00008870
Martin v. Löwis11437992002-04-12 09:54:03 +00008871_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008872if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008873
8874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008875$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008876 ipv6=yes
8877
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008878else
Matthias Kloseb159a552010-04-25 21:00:44 +00008879
8880 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008881$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008882 ipv6=no
8883
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008884fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008885rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008886fi
8887
8888if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008889 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008890
8891fi
8892
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008893fi
8894
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008895
8896ipv6type=unknown
8897ipv6lib=none
8898ipv6trylibc=no
8899
8900if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008901 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
8902$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +00008903 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
8904 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008905 case $i in
8906 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +00008907 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008908/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008909
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008910#include <netinet/in.h>
8911#ifdef IPV6_INRIA_VERSION
8912yes
8913#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008914_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008915if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008916 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00008917 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008918fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008919rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008920
8921 ;;
8922 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +00008923 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008924/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008925
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008926#include <netinet/in.h>
8927#ifdef __KAME__
8928yes
8929#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008930_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008931if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008932 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008933 ipv6type=$i;
8934 ipv6lib=inet6
8935 ipv6libdir=/usr/local/v6/lib
8936 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008937fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008938rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008939
8940 ;;
8941 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +00008942 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008943/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008944
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008945#include <features.h>
8946#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
8947yes
8948#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008949_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008950if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008951 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008952 ipv6type=$i;
8953 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008954fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008955rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008956
8957 ;;
8958 linux-inet6)
8959 if test -d /usr/inet6; then
8960 ipv6type=$i
8961 ipv6lib=inet6
8962 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +00008963 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008964 fi
8965 ;;
8966 solaris)
8967 if test -f /etc/netconfig; then
8968 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
8969 ipv6type=$i
8970 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008971 fi
8972 fi
8973 ;;
8974 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +00008975 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008976/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008977
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008978#include <sys/param.h>
8979#ifdef _TOSHIBA_INET6
8980yes
8981#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008982_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008983if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008984 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008985 ipv6type=$i;
8986 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00008987 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008988fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008989rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008990
8991 ;;
8992 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +00008993 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008994/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008995
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008996#include </usr/local/v6/include/sys/v6config.h>
8997#ifdef __V6D__
8998yes
8999#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009000_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009001if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009002 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009003 ipv6type=$i;
9004 ipv6lib=v6;
9005 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +00009006 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009007fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009008rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009009
9010 ;;
9011 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +00009012 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009013/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009014
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009015#include <sys/param.h>
9016#ifdef _ZETA_MINAMI_INET6
9017yes
9018#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009019_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009020if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009021 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009022 ipv6type=$i;
9023 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009024 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009025fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009026rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009027
9028 ;;
9029 esac
9030 if test "$ipv6type" != "unknown"; then
9031 break
9032 fi
9033 done
Matthias Kloseb9621712010-04-24 17:59:49 +00009034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
9035$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009036fi
9037
9038if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
9039 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
9040 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
9041 echo "using lib$ipv6lib"
9042 else
9043 if test $ipv6trylibc = "yes"; then
9044 echo "using libc"
9045 else
9046 echo 'Fatal: no $ipv6lib library found. cannot continue.'
9047 echo "You need to fetch lib$ipv6lib.a from appropriate"
9048 echo 'ipv6 kit and compile beforehand.'
9049 exit 1
9050 fi
9051 fi
9052fi
9053
Matthias Kloseb9621712010-04-24 17:59:49 +00009054{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
9055$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
9056cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009057/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009058
9059 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009060int
9061main ()
9062{
9063FSIORefNum fRef = 0
9064 ;
9065 return 0;
9066}
Matthias Kloseb159a552010-04-25 21:00:44 +00009067
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009068_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009069if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009070
Matthias Kloseb159a552010-04-25 21:00:44 +00009071
Matthias Kloseb9621712010-04-24 17:59:49 +00009072$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009073
Matthias Kloseb9621712010-04-24 17:59:49 +00009074 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9075$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009076
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009077else
Matthias Kloseb159a552010-04-25 21:00:44 +00009078
Matthias Kloseb9621712010-04-24 17:59:49 +00009079 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9080$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009081
9082fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009083rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9084
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009085# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +00009086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
9087$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009088
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009089# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009090if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009091 withval=$with_doc_strings;
9092fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009093
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009094
9095if test -z "$with_doc_strings"
9096then with_doc_strings="yes"
9097fi
9098if test "$with_doc_strings" != "no"
9099then
9100
Matthias Kloseb9621712010-04-24 17:59:49 +00009101$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009102
9103fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009104{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
9105$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009106
Antoine Pitrou042b1282010-08-13 21:15:58 +00009107# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +00009108{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
9109$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009110
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009111# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009112if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009113 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009114if test "$withval" != no
9115then
9116
Matthias Kloseb9621712010-04-24 17:59:49 +00009117$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009118
Matthias Kloseb9621712010-04-24 17:59:49 +00009119 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9120$as_echo "yes" >&6; }
9121else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9122$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009123fi
9124else
Matthias Kloseb9621712010-04-24 17:59:49 +00009125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9126$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009127fi
9128
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009129
9130# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +00009131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
9132$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009133
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009134# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009135if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009136 withval=$with_pymalloc;
9137fi
Michael W. Hudson54241132001-12-07 15:38:26 +00009138
Neil Schemenauera35c6882001-02-27 04:45:05 +00009139
Neil Schemenauer16c22972002-03-22 15:34:49 +00009140if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00009141then
9142 with_pymalloc="yes"
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00009143 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +00009144fi
9145if test "$with_pymalloc" != "no"
9146then
Martin v. Löwis11437992002-04-12 09:54:03 +00009147
Matthias Kloseb9621712010-04-24 17:59:49 +00009148$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +00009149
9150fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009151{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
9152$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +00009153
Benjamin Peterson05159c42009-12-03 03:01:27 +00009154# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +00009155{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
9156$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009157
9158# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009159if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009160 withval=$with_valgrind;
9161else
9162 with_valgrind=no
9163fi
9164
Matthias Kloseb9621712010-04-24 17:59:49 +00009165{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
9166$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009167if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009168 ac_fn_c_check_header_mongrel "$LINENO" "valgrind/valgrind.h" "ac_cv_header_valgrind_valgrind_h" "$ac_includes_default"
9169if test "x$ac_cv_header_valgrind_valgrind_h" = x""yes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009170
Matthias Kloseb9621712010-04-24 17:59:49 +00009171$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +00009172
9173else
Benjamin Peterson79263252010-10-31 16:50:44 +00009174 as_fn_error "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +00009175
9176fi
9177
9178
Jeffrey Yasskin39370832010-05-03 19:29:34 +00009179 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +00009180fi
9181
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009182# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00009183
Guido van Rossum98935bf2001-09-05 19:13:16 +00009184DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +00009185
Guido van Rossume97ee181999-12-20 21:27:22 +00009186# the dlopen() function means we might want to use dynload_shlib.o. some
9187# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +00009188for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +00009189do :
9190 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
9191if test "x$ac_cv_func_dlopen" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009192 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009193#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009194_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +00009195
Guido van Rossume97ee181999-12-20 21:27:22 +00009196fi
Thomas Wouters3a584202000-08-05 23:28:51 +00009197done
Guido van Rossume97ee181999-12-20 21:27:22 +00009198
Michael W. Hudson54241132001-12-07 15:38:26 +00009199
Guido van Rossume97ee181999-12-20 21:27:22 +00009200# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
9201# loading of modules.
9202
Matthias Kloseb9621712010-04-24 17:59:49 +00009203{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
9204$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009205if test -z "$DYNLOADFILE"
9206then
9207 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00009208 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
9209 if test "$ac_cv_func_dlopen" = yes
9210 then DYNLOADFILE="dynload_shlib.o"
9211 else DYNLOADFILE="dynload_aix.o"
9212 fi
9213 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +00009214 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009215 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
9216 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +00009217 *)
9218 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
9219 # out any dynamic loading
9220 if test "$ac_cv_func_dlopen" = yes
9221 then DYNLOADFILE="dynload_shlib.o"
9222 else DYNLOADFILE="dynload_stub.o"
9223 fi
9224 ;;
9225 esac
9226fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009227{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
9228$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009229if test "$DYNLOADFILE" != "dynload_stub.o"
9230then
Martin v. Löwis11437992002-04-12 09:54:03 +00009231
Matthias Kloseb9621712010-04-24 17:59:49 +00009232$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +00009233
9234fi
9235
Neil Schemenauer4e425612001-06-19 15:44:15 +00009236# MACHDEP_OBJS can be set to platform-specific object files needed by Python
9237
Michael W. Hudson54241132001-12-07 15:38:26 +00009238
Matthias Kloseb9621712010-04-24 17:59:49 +00009239{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
9240$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009241if test -z "$MACHDEP_OBJS"
9242then
Jack Jansene578a632001-08-15 01:27:14 +00009243 MACHDEP_OBJS=$extra_machdep_objs
9244else
9245 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +00009246fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009247{ $as_echo "$as_me:${as_lineno-$LINENO}: result: MACHDEP_OBJS" >&5
9248$as_echo "MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009249
Guido van Rossum627b2d71993-12-24 10:39:16 +00009250# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +00009251for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Martin v. Löwis823725e2008-03-24 13:39:54 +00009252 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +00009253 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +00009254 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Antoine Pitroub7572f02009-12-02 20:46:48 +00009255 initgroups kill killpg lchmod lchown lstat mbrtowc mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +00009256 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +00009257 putenv readlink realpath \
Benjamin Peterson965ce872009-04-05 21:24:58 +00009258 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
9259 setgid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +00009260 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setuid setvbuf \
Jean-Paul Calderone6ed7ac42010-06-19 19:58:37 +00009261 sigaction siginterrupt sigrelse snprintf strftime strlcpy \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +00009262 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Martin v. Löwis113a0852009-05-29 17:25:39 +00009263 truncate uname unsetenv utimes waitpid wait3 wait4 \
9264 wcscoll wcsftime wcsxfrm _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +00009265do :
9266 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9267ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Benjamin Peterson79263252010-10-31 16:50:44 +00009268eval as_val=\$$as_ac_var
9269 if test "x$as_val" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009270 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009271#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009272_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00009273
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009274fi
9275done
9276
Michael W. Hudson54241132001-12-07 15:38:26 +00009277
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009278# For some functions, having a definition is not sufficient, since
9279# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +00009280{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
9281$as_echo_n "checking for chroot... " >&6; }
9282cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009283/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009284#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009285int
9286main ()
9287{
9288void *x=chroot
9289 ;
9290 return 0;
9291}
9292_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009293if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009294
Matthias Kloseb9621712010-04-24 17:59:49 +00009295$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009296
Matthias Kloseb159a552010-04-25 21:00:44 +00009297 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009298$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009299else
Matthias Kloseb9621712010-04-24 17:59:49 +00009300 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9301$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009302
9303fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009304rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009305{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
9306$as_echo_n "checking for link... " >&6; }
9307cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009308/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009309#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009310int
9311main ()
9312{
9313void *x=link
9314 ;
9315 return 0;
9316}
9317_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009318if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009319
Matthias Kloseb9621712010-04-24 17:59:49 +00009320$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009321
Matthias Kloseb159a552010-04-25 21:00:44 +00009322 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009323$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009324else
Matthias Kloseb9621712010-04-24 17:59:49 +00009325 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9326$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009327
9328fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009329rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009330{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
9331$as_echo_n "checking for symlink... " >&6; }
9332cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009333/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009334#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009335int
9336main ()
9337{
9338void *x=symlink
9339 ;
9340 return 0;
9341}
9342_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009343if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009344
Matthias Kloseb9621712010-04-24 17:59:49 +00009345$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009346
Matthias Kloseb159a552010-04-25 21:00:44 +00009347 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009348$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009349else
Matthias Kloseb9621712010-04-24 17:59:49 +00009350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9351$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009352
9353fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009354rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009355{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
9356$as_echo_n "checking for fchdir... " >&6; }
9357cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009358/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009359#include <unistd.h>
9360int
9361main ()
9362{
9363void *x=fchdir
9364 ;
9365 return 0;
9366}
9367_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009368if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009369
Matthias Kloseb9621712010-04-24 17:59:49 +00009370$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009371
Matthias Kloseb159a552010-04-25 21:00:44 +00009372 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009373$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009374else
Matthias Kloseb9621712010-04-24 17:59:49 +00009375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9376$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009377
9378fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009379rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009380{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
9381$as_echo_n "checking for fsync... " >&6; }
9382cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009383/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009384#include <unistd.h>
9385int
9386main ()
9387{
9388void *x=fsync
9389 ;
9390 return 0;
9391}
9392_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009393if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009394
Matthias Kloseb9621712010-04-24 17:59:49 +00009395$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009396
Matthias Kloseb159a552010-04-25 21:00:44 +00009397 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009398$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009399else
Matthias Kloseb9621712010-04-24 17:59:49 +00009400 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9401$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009402
9403fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009404rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009405{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
9406$as_echo_n "checking for fdatasync... " >&6; }
9407cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009408/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009409#include <unistd.h>
9410int
9411main ()
9412{
9413void *x=fdatasync
9414 ;
9415 return 0;
9416}
9417_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009418if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009419
Matthias Kloseb9621712010-04-24 17:59:49 +00009420$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009421
Matthias Kloseb159a552010-04-25 21:00:44 +00009422 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009423$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009424else
Matthias Kloseb9621712010-04-24 17:59:49 +00009425 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9426$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009427
9428fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009429rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009430{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
9431$as_echo_n "checking for epoll... " >&6; }
9432cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009433/* end confdefs.h. */
9434#include <sys/epoll.h>
9435int
9436main ()
9437{
9438void *x=epoll_create
9439 ;
9440 return 0;
9441}
9442_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009443if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009444
Matthias Kloseb9621712010-04-24 17:59:49 +00009445$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009446
Matthias Kloseb159a552010-04-25 21:00:44 +00009447 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009448$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009449else
Matthias Kloseb9621712010-04-24 17:59:49 +00009450 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9451$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009452
9453fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009454rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009455{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
9456$as_echo_n "checking for kqueue... " >&6; }
9457cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009458/* end confdefs.h. */
9459
9460#include <sys/types.h>
9461#include <sys/event.h>
9462
9463int
9464main ()
9465{
9466int x=kqueue()
9467 ;
9468 return 0;
9469}
9470_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009471if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009472
Matthias Kloseb9621712010-04-24 17:59:49 +00009473$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009474
Matthias Kloseb159a552010-04-25 21:00:44 +00009475 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009476$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009477else
Matthias Kloseb9621712010-04-24 17:59:49 +00009478 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9479$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009480
9481fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009482rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +00009483# On some systems (eg. FreeBSD 5), we would find a definition of the
9484# functions ctermid_r, setgroups in the library, but no prototype
9485# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
9486# address to avoid compiler warnings and potential miscompilations
9487# because of the missing prototypes.
9488
Matthias Kloseb9621712010-04-24 17:59:49 +00009489{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
9490$as_echo_n "checking for ctermid_r... " >&6; }
9491cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009492/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +00009493
Martin v. Löwisd5843682002-11-21 20:41:28 +00009494#include <stdio.h>
9495
Martin v. Löwisd5843682002-11-21 20:41:28 +00009496int
9497main ()
9498{
9499void* p = ctermid_r
9500 ;
9501 return 0;
9502}
9503_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009504if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +00009505
Matthias Kloseb9621712010-04-24 17:59:49 +00009506$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +00009507
Matthias Kloseb159a552010-04-25 21:00:44 +00009508 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009509$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009510else
Matthias Kloseb9621712010-04-24 17:59:49 +00009511 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9512$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009513
9514fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009515rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9516
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009517{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
9518$as_echo_n "checking for flock declaration... " >&6; }
9519if test "${ac_cv_flock_decl+set}" = set; then :
9520 $as_echo_n "(cached) " >&6
9521else
9522 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009523/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009524#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009525int
9526main ()
9527{
9528void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009529
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009530 ;
9531 return 0;
9532}
9533_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009534if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009535 ac_cv_flock_decl=yes
9536else
9537 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009538
9539fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009540rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +00009541
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009542fi
9543{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
9544$as_echo "$ac_cv_flock_decl" >&6; }
9545if test "x${ac_cv_flock_decl}" = xyes; then
9546 for ac_func in flock
9547do :
9548 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
9549if test "x$ac_cv_func_flock" = x""yes; then :
9550 cat >>confdefs.h <<_ACEOF
9551#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +00009552_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009553
Antoine Pitroua3000072010-09-07 14:52:42 +00009554else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009555 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +00009556$as_echo_n "checking for flock in -lbsd... " >&6; }
9557if test "${ac_cv_lib_bsd_flock+set}" = set; then :
9558 $as_echo_n "(cached) " >&6
9559else
9560 ac_check_lib_save_LIBS=$LIBS
9561LIBS="-lbsd $LIBS"
9562cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9563/* end confdefs.h. */
9564
9565/* Override any GCC internal prototype to avoid an error.
9566 Use char because int might match the return type of a GCC
9567 builtin and then its argument prototype would still apply. */
9568#ifdef __cplusplus
9569extern "C"
9570#endif
9571char flock ();
9572int
9573main ()
9574{
9575return flock ();
9576 ;
9577 return 0;
9578}
9579_ACEOF
9580if ac_fn_c_try_link "$LINENO"; then :
9581 ac_cv_lib_bsd_flock=yes
9582else
9583 ac_cv_lib_bsd_flock=no
9584fi
9585rm -f core conftest.err conftest.$ac_objext \
9586 conftest$ac_exeext conftest.$ac_ext
9587LIBS=$ac_check_lib_save_LIBS
9588fi
9589{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
9590$as_echo "$ac_cv_lib_bsd_flock" >&6; }
9591if test "x$ac_cv_lib_bsd_flock" = x""yes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009592 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +00009593
9594
9595$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
9596
9597
9598fi
9599
9600
9601fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009602done
9603
Antoine Pitroua3000072010-09-07 14:52:42 +00009604fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009605
Matthias Kloseb9621712010-04-24 17:59:49 +00009606{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
9607$as_echo_n "checking for getpagesize... " >&6; }
9608cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009609/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009610
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009611#include <unistd.h>
9612
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009613int
9614main ()
9615{
9616void* p = getpagesize
9617 ;
9618 return 0;
9619}
9620_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009621if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009622
Matthias Kloseb9621712010-04-24 17:59:49 +00009623$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009624
Matthias Kloseb159a552010-04-25 21:00:44 +00009625 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009626$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009627else
Matthias Kloseb9621712010-04-24 17:59:49 +00009628 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9629$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009630
9631fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009632rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009633
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009634for ac_prog in true
9635do
9636 # Extract the first word of "$ac_prog", so it can be a program name with args.
9637set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00009638{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9639$as_echo_n "checking for $ac_word... " >&6; }
9640if test "${ac_cv_prog_TRUE+set}" = set; then :
9641 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009642else
9643 if test -n "$TRUE"; then
9644 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
9645else
9646as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9647for as_dir in $PATH
9648do
9649 IFS=$as_save_IFS
9650 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009651 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009652 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 +00009653 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00009654 $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 +00009655 break 2
9656 fi
9657done
Matthias Kloseb9621712010-04-24 17:59:49 +00009658 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009659IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009660
9661fi
9662fi
9663TRUE=$ac_cv_prog_TRUE
9664if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009665 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
9666$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009667else
Matthias Kloseb9621712010-04-24 17:59:49 +00009668 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9669$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009670fi
9671
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009672
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009673 test -n "$TRUE" && break
9674done
9675test -n "$TRUE" || TRUE="/bin/true"
9676
9677
Matthias Kloseb9621712010-04-24 17:59:49 +00009678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
9679$as_echo_n "checking for inet_aton in -lc... " >&6; }
9680if test "${ac_cv_lib_c_inet_aton+set}" = set; then :
9681 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009682else
9683 ac_check_lib_save_LIBS=$LIBS
9684LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009685cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009686/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009687
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009688/* Override any GCC internal prototype to avoid an error.
9689 Use char because int might match the return type of a GCC
9690 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009691#ifdef __cplusplus
9692extern "C"
9693#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009694char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009695int
9696main ()
9697{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009698return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009699 ;
9700 return 0;
9701}
9702_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009703if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009704 ac_cv_lib_c_inet_aton=yes
9705else
Matthias Kloseb9621712010-04-24 17:59:49 +00009706 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009707fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009708rm -f core conftest.err conftest.$ac_objext \
9709 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009710LIBS=$ac_check_lib_save_LIBS
9711fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009712{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
9713$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
9714if test "x$ac_cv_lib_c_inet_aton" = x""yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009715 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009716else
Matthias Kloseb9621712010-04-24 17:59:49 +00009717 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
9718$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
9719if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then :
9720 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009721else
9722 ac_check_lib_save_LIBS=$LIBS
9723LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009724cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009725/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009726
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009727/* Override any GCC internal prototype to avoid an error.
9728 Use char because int might match the return type of a GCC
9729 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009730#ifdef __cplusplus
9731extern "C"
9732#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009733char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009734int
9735main ()
9736{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009737return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009738 ;
9739 return 0;
9740}
9741_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009742if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009743 ac_cv_lib_resolv_inet_aton=yes
9744else
Matthias Kloseb9621712010-04-24 17:59:49 +00009745 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009746fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009747rm -f core conftest.err conftest.$ac_objext \
9748 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009749LIBS=$ac_check_lib_save_LIBS
9750fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009751{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
9752$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
9753if test "x$ac_cv_lib_resolv_inet_aton" = x""yes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009754 cat >>confdefs.h <<_ACEOF
9755#define HAVE_LIBRESOLV 1
9756_ACEOF
9757
9758 LIBS="-lresolv $LIBS"
9759
9760fi
9761
9762
9763fi
9764
9765
Christian Heimesd0764e22007-12-04 15:00:33 +00009766# On Tru64, chflags seems to be present, but calling it will
9767# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +00009768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
9769$as_echo_n "checking for chflags... " >&6; }
9770if test "${ac_cv_have_chflags+set}" = set; then :
9771 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009772else
Matthias Kloseb9621712010-04-24 17:59:49 +00009773 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009774 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +00009775else
Matthias Kloseb9621712010-04-24 17:59:49 +00009776 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +00009777/* end confdefs.h. */
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009778[
Christian Heimesd0764e22007-12-04 15:00:33 +00009779#include <sys/stat.h>
9780#include <unistd.h>
9781int main(int argc, char*argv[])
9782{
9783 if(chflags(argv[0], 0) != 0)
9784 return 1;
9785 return 0;
9786}
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009787]
Christian Heimesd0764e22007-12-04 15:00:33 +00009788_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009789if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009790 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009791else
Matthias Kloseb9621712010-04-24 17:59:49 +00009792 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009793fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009794rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9795 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009796fi
9797
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009798
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009799fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009800{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
9801$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009802if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009803 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
9804if test "x$ac_cv_func_chflags" = x""yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009805 ac_cv_have_chflags="yes"
9806else
9807 ac_cv_have_chflags="no"
9808fi
9809
9810fi
9811if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009812
Matthias Kloseb9621712010-04-24 17:59:49 +00009813$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009814
9815fi
9816
Matthias Kloseb9621712010-04-24 17:59:49 +00009817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
9818$as_echo_n "checking for lchflags... " >&6; }
9819if test "${ac_cv_have_lchflags+set}" = set; then :
9820 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009821else
Matthias Kloseb9621712010-04-24 17:59:49 +00009822 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009823 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +00009824else
Matthias Kloseb9621712010-04-24 17:59:49 +00009825 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +00009826/* end confdefs.h. */
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009827[
Christian Heimesd0764e22007-12-04 15:00:33 +00009828#include <sys/stat.h>
9829#include <unistd.h>
9830int main(int argc, char*argv[])
9831{
9832 if(lchflags(argv[0], 0) != 0)
9833 return 1;
9834 return 0;
9835}
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009836]
Christian Heimesd0764e22007-12-04 15:00:33 +00009837_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009838if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009839 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009840else
Matthias Kloseb9621712010-04-24 17:59:49 +00009841 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +00009842fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009843rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9844 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009845fi
9846
9847
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009848fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009849{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
9850$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009851if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009852 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
9853if test "x$ac_cv_func_lchflags" = x""yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009854 ac_cv_have_lchflags="yes"
9855else
9856 ac_cv_have_lchflags="no"
9857fi
9858
9859fi
9860if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009861
Matthias Kloseb9621712010-04-24 17:59:49 +00009862$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009863
9864fi
9865
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009866case $ac_sys_system/$ac_sys_release in
9867Darwin/*)
9868 _CUR_CFLAGS="${CFLAGS}"
9869 _CUR_LDFLAGS="${LDFLAGS}"
9870 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
9871 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
9872 ;;
9873esac
9874
Matthias Kloseb9621712010-04-24 17:59:49 +00009875{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
9876$as_echo_n "checking for inflateCopy in -lz... " >&6; }
9877if test "${ac_cv_lib_z_inflateCopy+set}" = set; then :
9878 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009879else
9880 ac_check_lib_save_LIBS=$LIBS
9881LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009882cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009883/* end confdefs.h. */
9884
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009885/* Override any GCC internal prototype to avoid an error.
9886 Use char because int might match the return type of a GCC
9887 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009888#ifdef __cplusplus
9889extern "C"
9890#endif
9891char inflateCopy ();
9892int
9893main ()
9894{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009895return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009896 ;
9897 return 0;
9898}
9899_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009900if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009901 ac_cv_lib_z_inflateCopy=yes
9902else
Matthias Kloseb9621712010-04-24 17:59:49 +00009903 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009904fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009905rm -f core conftest.err conftest.$ac_objext \
9906 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009907LIBS=$ac_check_lib_save_LIBS
9908fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009909{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
9910$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
9911if test "x$ac_cv_lib_z_inflateCopy" = x""yes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009912
Matthias Kloseb9621712010-04-24 17:59:49 +00009913$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009914
9915fi
9916
9917
9918case $ac_sys_system/$ac_sys_release in
9919Darwin/*)
9920 CFLAGS="${_CUR_CFLAGS}"
9921 LDFLAGS="${_CUR_LDFLAGS}"
9922 ;;
9923esac
9924
Matthias Kloseb9621712010-04-24 17:59:49 +00009925{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
9926$as_echo_n "checking for hstrerror... " >&6; }
9927cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009928/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +00009929
Martin v. Löwise9416172003-05-03 10:12:45 +00009930#include <netdb.h>
9931
Martin v. Löwise9416172003-05-03 10:12:45 +00009932int
9933main ()
9934{
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009935void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +00009936 ;
9937 return 0;
9938}
9939_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009940if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +00009941
Matthias Kloseb9621712010-04-24 17:59:49 +00009942$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +00009943
Matthias Kloseb159a552010-04-25 21:00:44 +00009944 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009945$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +00009946else
Matthias Kloseb9621712010-04-24 17:59:49 +00009947 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9948$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +00009949
9950fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009951rm -f core conftest.err conftest.$ac_objext \
9952 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009953
Matthias Kloseb9621712010-04-24 17:59:49 +00009954{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
9955$as_echo_n "checking for inet_aton... " >&6; }
9956cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009957/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +00009958
Martin v. Löwis86d66262006-02-17 08:40:11 +00009959#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +00009960#include <sys/socket.h>
9961#include <netinet/in.h>
9962#include <arpa/inet.h>
9963
Martin v. Löwise9416172003-05-03 10:12:45 +00009964int
9965main ()
9966{
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009967void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +00009968 ;
9969 return 0;
9970}
9971_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009972if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +00009973
Matthias Kloseb9621712010-04-24 17:59:49 +00009974$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +00009975
Matthias Kloseb159a552010-04-25 21:00:44 +00009976 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009977$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +00009978else
Matthias Kloseb9621712010-04-24 17:59:49 +00009979 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9980$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +00009981
9982fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009983rm -f core conftest.err conftest.$ac_objext \
9984 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009985
Matthias Kloseb9621712010-04-24 17:59:49 +00009986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
9987$as_echo_n "checking for inet_pton... " >&6; }
9988cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009989/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +00009990
Martin v. Löwisf2e488d2003-05-05 22:00:11 +00009991#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +00009992#include <sys/socket.h>
9993#include <netinet/in.h>
9994#include <arpa/inet.h>
9995
Martin v. Löwise9416172003-05-03 10:12:45 +00009996int
9997main ()
9998{
9999void* p = inet_pton
10000 ;
10001 return 0;
10002}
10003_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010004if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010005
Matthias Kloseb9621712010-04-24 17:59:49 +000010006$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010007
Matthias Kloseb159a552010-04-25 21:00:44 +000010008 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010009$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010010else
Matthias Kloseb9621712010-04-24 17:59:49 +000010011 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10012$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010013
10014fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010015rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000010016
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010017# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000010018{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
10019$as_echo_n "checking for setgroups... " >&6; }
10020cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010021/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010022
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010023#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010024#ifdef HAVE_GRP_H
10025#include <grp.h>
10026#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000010027
Martin v. Löwisd5843682002-11-21 20:41:28 +000010028int
10029main ()
10030{
10031void* p = setgroups
10032 ;
10033 return 0;
10034}
10035_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010036if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010037
Matthias Kloseb9621712010-04-24 17:59:49 +000010038$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010039
Matthias Kloseb159a552010-04-25 21:00:44 +000010040 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010041$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010042else
Matthias Kloseb9621712010-04-24 17:59:49 +000010043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10044$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010045
10046fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010047rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010048
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010049# check for openpty and forkpty
10050
10051for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010052do :
10053 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
10054if test "x$ac_cv_func_openpty" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010055 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010056#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010057_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010058
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010059else
Matthias Kloseb9621712010-04-24 17:59:49 +000010060 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
10061$as_echo_n "checking for openpty in -lutil... " >&6; }
10062if test "${ac_cv_lib_util_openpty+set}" = set; then :
10063 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010064else
Martin v. Löwis11437992002-04-12 09:54:03 +000010065 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010066LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010067cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010068/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010069
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010070/* Override any GCC internal prototype to avoid an error.
10071 Use char because int might match the return type of a GCC
10072 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010073#ifdef __cplusplus
10074extern "C"
10075#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010076char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010077int
10078main ()
10079{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010080return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010081 ;
10082 return 0;
10083}
10084_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010085if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010086 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010087else
Matthias Kloseb9621712010-04-24 17:59:49 +000010088 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010089fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010090rm -f core conftest.err conftest.$ac_objext \
10091 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010092LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010093fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010094{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
10095$as_echo "$ac_cv_lib_util_openpty" >&6; }
10096if test "x$ac_cv_lib_util_openpty" = x""yes; then :
10097 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010098 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010099else
Matthias Kloseb9621712010-04-24 17:59:49 +000010100 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
10101$as_echo_n "checking for openpty in -lbsd... " >&6; }
10102if test "${ac_cv_lib_bsd_openpty+set}" = set; then :
10103 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010104else
10105 ac_check_lib_save_LIBS=$LIBS
10106LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010107cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010108/* end confdefs.h. */
10109
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010110/* Override any GCC internal prototype to avoid an error.
10111 Use char because int might match the return type of a GCC
10112 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010113#ifdef __cplusplus
10114extern "C"
10115#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010116char openpty ();
10117int
10118main ()
10119{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010120return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010121 ;
10122 return 0;
10123}
10124_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010125if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010126 ac_cv_lib_bsd_openpty=yes
10127else
Matthias Kloseb9621712010-04-24 17:59:49 +000010128 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010129fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010130rm -f core conftest.err conftest.$ac_objext \
10131 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010132LIBS=$ac_check_lib_save_LIBS
10133fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010134{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
10135$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
10136if test "x$ac_cv_lib_bsd_openpty" = x""yes; then :
10137 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010138 LIBS="$LIBS -lbsd"
10139fi
10140
10141
10142fi
10143
Fred Drake8cef4cf2000-06-28 16:40:38 +000010144
10145fi
10146done
10147
10148for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010149do :
10150 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
10151if test "x$ac_cv_func_forkpty" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010152 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010153#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010154_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010155
Fred Drake8cef4cf2000-06-28 16:40:38 +000010156else
Matthias Kloseb9621712010-04-24 17:59:49 +000010157 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
10158$as_echo_n "checking for forkpty in -lutil... " >&6; }
10159if test "${ac_cv_lib_util_forkpty+set}" = set; then :
10160 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010161else
Martin v. Löwis11437992002-04-12 09:54:03 +000010162 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010163LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010164cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010165/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010166
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010167/* Override any GCC internal prototype to avoid an error.
10168 Use char because int might match the return type of a GCC
10169 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010170#ifdef __cplusplus
10171extern "C"
10172#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010173char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010174int
10175main ()
10176{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010177return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010178 ;
10179 return 0;
10180}
10181_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010182if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010183 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010184else
Matthias Kloseb9621712010-04-24 17:59:49 +000010185 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010186fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010187rm -f core conftest.err conftest.$ac_objext \
10188 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010189LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010190fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010191{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
10192$as_echo "$ac_cv_lib_util_forkpty" >&6; }
10193if test "x$ac_cv_lib_util_forkpty" = x""yes; then :
10194 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010195 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010196else
Matthias Kloseb9621712010-04-24 17:59:49 +000010197 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
10198$as_echo_n "checking for forkpty in -lbsd... " >&6; }
10199if test "${ac_cv_lib_bsd_forkpty+set}" = set; then :
10200 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010201else
10202 ac_check_lib_save_LIBS=$LIBS
10203LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010204cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010205/* end confdefs.h. */
10206
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010207/* Override any GCC internal prototype to avoid an error.
10208 Use char because int might match the return type of a GCC
10209 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010210#ifdef __cplusplus
10211extern "C"
10212#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010213char forkpty ();
10214int
10215main ()
10216{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010217return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010218 ;
10219 return 0;
10220}
10221_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010222if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010223 ac_cv_lib_bsd_forkpty=yes
10224else
Matthias Kloseb9621712010-04-24 17:59:49 +000010225 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010226fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010227rm -f core conftest.err conftest.$ac_objext \
10228 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010229LIBS=$ac_check_lib_save_LIBS
10230fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010231{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
10232$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
10233if test "x$ac_cv_lib_bsd_forkpty" = x""yes; then :
10234 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010235 LIBS="$LIBS -lbsd"
10236fi
10237
10238
10239fi
10240
Fred Drake8cef4cf2000-06-28 16:40:38 +000010241
10242fi
10243done
10244
Jack Jansendd19cf82001-12-06 22:36:17 +000010245
Christian Heimesb186d002008-03-18 15:15:01 +000010246# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000010247for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000010248do :
10249 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
10250if test "x$ac_cv_func_memmove" = x""yes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000010251 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010252#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000010253_ACEOF
10254
10255fi
10256done
10257
10258
Michael W. Hudson54241132001-12-07 15:38:26 +000010259# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000010260for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000010261do :
10262 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10263ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Benjamin Peterson79263252010-10-31 16:50:44 +000010264eval as_val=\$$as_ac_var
10265 if test "x$as_val" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010266 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010267#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010268_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000010269
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010270fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000010271done
10272
Michael W. Hudson54241132001-12-07 15:38:26 +000010273
Benjamin Peterson79263252010-10-31 16:50:44 +000010274for ac_func in dup2 getcwd strdup
10275do :
10276 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10277ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10278eval as_val=\$$as_ac_var
10279 if test "x$as_val" = x""yes; then :
10280 cat >>confdefs.h <<_ACEOF
10281#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
10282_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000010283
Martin v. Löwis1142de32002-03-29 16:28:31 +000010284else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010285 case " $LIBOBJS " in
Benjamin Peterson79263252010-10-31 16:50:44 +000010286 *" $ac_func.$ac_objext "* ) ;;
10287 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010288 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010289esac
10290
Martin v. Löwis1142de32002-03-29 16:28:31 +000010291fi
Benjamin Peterson79263252010-10-31 16:50:44 +000010292done
Martin v. Löwis1142de32002-03-29 16:28:31 +000010293
10294
10295for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010296do :
10297 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
10298if test "x$ac_cv_func_getpgrp" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010299 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010300#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010301_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010302 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010303/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010304#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010305int
10306main ()
10307{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010308getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010309 ;
10310 return 0;
10311}
10312_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010313if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010314
Matthias Kloseb9621712010-04-24 17:59:49 +000010315$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010316
Guido van Rossum627b2d71993-12-24 10:39:16 +000010317fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010318rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010319
Guido van Rossum627b2d71993-12-24 10:39:16 +000010320fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010321done
Guido van Rossum627b2d71993-12-24 10:39:16 +000010322
Jack Jansen150753c2003-03-29 22:07:47 +000010323for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010324do :
10325 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
10326if test "x$ac_cv_func_setpgrp" = x""yes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000010327 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010328#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000010329_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010330 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010331/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000010332#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000010333int
10334main ()
10335{
10336setpgrp(0,0);
10337 ;
10338 return 0;
10339}
10340_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010341if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010342
Matthias Kloseb9621712010-04-24 17:59:49 +000010343$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010344
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010345fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010346rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000010347
10348fi
10349done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010350
Thomas Wouters3a584202000-08-05 23:28:51 +000010351for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000010352do :
10353 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
10354if test "x$ac_cv_func_gettimeofday" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010355 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010356#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010357_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010358 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010359/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010360#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010361int
10362main ()
10363{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010364gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010365 ;
10366 return 0;
10367}
10368_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010369if ac_fn_c_try_compile "$LINENO"; then :
10370
Guido van Rossum627b2d71993-12-24 10:39:16 +000010371else
Skip Montanaro6dead952003-09-25 14:50:04 +000010372
Matthias Kloseb9621712010-04-24 17:59:49 +000010373$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010374
Martin v. Löwis11437992002-04-12 09:54:03 +000010375
Guido van Rossum627b2d71993-12-24 10:39:16 +000010376fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010377rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010378
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010379fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010380done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010381
Michael W. Hudson54241132001-12-07 15:38:26 +000010382
Matthias Kloseb9621712010-04-24 17:59:49 +000010383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
10384$as_echo_n "checking for major... " >&6; }
10385cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010386/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010387
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010388#if defined(MAJOR_IN_MKDEV)
10389#include <sys/mkdev.h>
10390#elif defined(MAJOR_IN_SYSMACROS)
10391#include <sys/sysmacros.h>
10392#else
10393#include <sys/types.h>
10394#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010395
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010396int
10397main ()
10398{
10399
10400 makedev(major(0),minor(0));
10401
10402 ;
10403 return 0;
10404}
10405_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010406if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010407
10408
Matthias Kloseb9621712010-04-24 17:59:49 +000010409$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010410
Matthias Kloseb9621712010-04-24 17:59:49 +000010411 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10412$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010413
10414else
Skip Montanaro6dead952003-09-25 14:50:04 +000010415
Matthias Kloseb9621712010-04-24 17:59:49 +000010416 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10417$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010418
10419fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010420rm -f core conftest.err conftest.$ac_objext \
10421 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010422
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010423# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000010424# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000010425{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
10426$as_echo_n "checking for getaddrinfo... " >&6; }
10427cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010428/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010429
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010430#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010431#include <sys/socket.h>
10432#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010433#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010434
Martin v. Löwis11437992002-04-12 09:54:03 +000010435int
10436main ()
10437{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010438getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000010439 ;
10440 return 0;
10441}
10442_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010443if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010444 have_getaddrinfo=yes
10445else
Matthias Kloseb9621712010-04-24 17:59:49 +000010446 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010447fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010448rm -f core conftest.err conftest.$ac_objext \
10449 conftest$ac_exeext conftest.$ac_ext
10450{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
10451$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010452if test $have_getaddrinfo = yes
10453then
Matthias Kloseb9621712010-04-24 17:59:49 +000010454 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
10455$as_echo_n "checking getaddrinfo bug... " >&6; }
10456 if test "${ac_cv_buggy_getaddrinfo+set}" = set; then :
10457 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010458else
Matthias Kloseb9621712010-04-24 17:59:49 +000010459 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010460 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010461else
Matthias Kloseb9621712010-04-24 17:59:49 +000010462 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010463/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010464
10465#include <sys/types.h>
10466#include <netdb.h>
10467#include <string.h>
10468#include <sys/socket.h>
10469#include <netinet/in.h>
10470
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010471int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010472{
10473 int passive, gaierr, inet4 = 0, inet6 = 0;
10474 struct addrinfo hints, *ai, *aitop;
10475 char straddr[INET6_ADDRSTRLEN], strport[16];
10476
10477 for (passive = 0; passive <= 1; passive++) {
10478 memset(&hints, 0, sizeof(hints));
10479 hints.ai_family = AF_UNSPEC;
10480 hints.ai_flags = passive ? AI_PASSIVE : 0;
10481 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000010482 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010483 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
10484 (void)gai_strerror(gaierr);
10485 goto bad;
10486 }
10487 for (ai = aitop; ai; ai = ai->ai_next) {
10488 if (ai->ai_addr == NULL ||
10489 ai->ai_addrlen == 0 ||
10490 getnameinfo(ai->ai_addr, ai->ai_addrlen,
10491 straddr, sizeof(straddr), strport, sizeof(strport),
10492 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
10493 goto bad;
10494 }
10495 switch (ai->ai_family) {
10496 case AF_INET:
10497 if (strcmp(strport, "54321") != 0) {
10498 goto bad;
10499 }
10500 if (passive) {
10501 if (strcmp(straddr, "0.0.0.0") != 0) {
10502 goto bad;
10503 }
10504 } else {
10505 if (strcmp(straddr, "127.0.0.1") != 0) {
10506 goto bad;
10507 }
10508 }
10509 inet4++;
10510 break;
10511 case AF_INET6:
10512 if (strcmp(strport, "54321") != 0) {
10513 goto bad;
10514 }
10515 if (passive) {
10516 if (strcmp(straddr, "::") != 0) {
10517 goto bad;
10518 }
10519 } else {
10520 if (strcmp(straddr, "::1") != 0) {
10521 goto bad;
10522 }
10523 }
10524 inet6++;
10525 break;
10526 case AF_UNSPEC:
10527 goto bad;
10528 break;
10529 default:
10530 /* another family support? */
10531 break;
10532 }
10533 }
10534 }
10535
10536 if (!(inet4 == 0 || inet4 == 2))
10537 goto bad;
10538 if (!(inet6 == 0 || inet6 == 2))
10539 goto bad;
10540
10541 if (aitop)
10542 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010543 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010544
10545 bad:
10546 if (aitop)
10547 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010548 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010549}
10550
Martin v. Löwis11437992002-04-12 09:54:03 +000010551_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010552if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010553 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010554else
Matthias Kloseb9621712010-04-24 17:59:49 +000010555 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010556fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010557rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10558 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010559fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010560
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010561fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010562
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010563fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010564
Mark Dickinson2df5d282009-12-31 21:22:50 +000010565if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010566then
10567 if test $ipv6 = yes
10568 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010569 echo 'Fatal: You must get working getaddrinfo() function.'
10570 echo ' or you can specify "--disable-ipv6"'.
10571 exit 1
10572 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010573else
Martin v. Löwis11437992002-04-12 09:54:03 +000010574
Matthias Kloseb9621712010-04-24 17:59:49 +000010575$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010576
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010577fi
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010578for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000010579do :
10580 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
10581if test "x$ac_cv_func_getnameinfo" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010582 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010583#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010584_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010585
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010586fi
10587done
10588
Michael W. Hudson54241132001-12-07 15:38:26 +000010589
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010590# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000010591{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
10592$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
10593if test "${ac_cv_header_time+set}" = set; then :
10594 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010595else
Matthias Kloseb9621712010-04-24 17:59:49 +000010596 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010597/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010598#include <sys/types.h>
10599#include <sys/time.h>
10600#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010601
Martin v. Löwis11437992002-04-12 09:54:03 +000010602int
10603main ()
10604{
10605if ((struct tm *) 0)
10606return 0;
10607 ;
10608 return 0;
10609}
10610_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010611if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010612 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000010613else
Matthias Kloseb9621712010-04-24 17:59:49 +000010614 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010615fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010616rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010617fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010618{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
10619$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010620if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010621
Matthias Kloseb9621712010-04-24 17:59:49 +000010622$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010623
10624fi
10625
Matthias Kloseb9621712010-04-24 17:59:49 +000010626{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
10627$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
10628if test "${ac_cv_struct_tm+set}" = set; then :
10629 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010630else
Matthias Kloseb9621712010-04-24 17:59:49 +000010631 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010632/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010633#include <sys/types.h>
10634#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010635
Martin v. Löwis11437992002-04-12 09:54:03 +000010636int
10637main ()
10638{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010639struct tm tm;
10640 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000010641 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000010642 ;
10643 return 0;
10644}
10645_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010646if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010647 ac_cv_struct_tm=time.h
10648else
Matthias Kloseb9621712010-04-24 17:59:49 +000010649 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010650fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010651rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010652fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010653{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
10654$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010655if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010656
Matthias Kloseb9621712010-04-24 17:59:49 +000010657$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010658
10659fi
10660
Matthias Kloseb9621712010-04-24 17:59:49 +000010661ac_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 +000010662#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000010663
Matthias Kloseb9621712010-04-24 17:59:49 +000010664"
10665if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010666
10667cat >>confdefs.h <<_ACEOF
10668#define HAVE_STRUCT_TM_TM_ZONE 1
10669_ACEOF
10670
10671
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010672fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010673
Martin v. Löwis11437992002-04-12 09:54:03 +000010674if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
10675
Matthias Kloseb9621712010-04-24 17:59:49 +000010676$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010677
10678else
Matthias Kloseb9621712010-04-24 17:59:49 +000010679 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
10680"
10681if test "x$ac_cv_have_decl_tzname" = x""yes; then :
10682 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010683else
Matthias Kloseb9621712010-04-24 17:59:49 +000010684 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010685fi
10686
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010687cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010688#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010689_ACEOF
10690
Matthias Kloseb9621712010-04-24 17:59:49 +000010691 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
10692$as_echo_n "checking for tzname... " >&6; }
10693if test "${ac_cv_var_tzname+set}" = set; then :
10694 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010695else
Matthias Kloseb9621712010-04-24 17:59:49 +000010696 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010697/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010698#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010699#if !HAVE_DECL_TZNAME
10700extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000010701#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010702
Martin v. Löwis11437992002-04-12 09:54:03 +000010703int
10704main ()
10705{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010706return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000010707 ;
10708 return 0;
10709}
10710_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010711if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010712 ac_cv_var_tzname=yes
10713else
Matthias Kloseb9621712010-04-24 17:59:49 +000010714 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010715fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010716rm -f core conftest.err conftest.$ac_objext \
10717 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000010718fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010719{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
10720$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010721 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010722
Matthias Kloseb9621712010-04-24 17:59:49 +000010723$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010724
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010725 fi
10726fi
10727
Matthias Kloseb9621712010-04-24 17:59:49 +000010728ac_fn_c_check_member "$LINENO" "struct stat" "st_rdev" "ac_cv_member_struct_stat_st_rdev" "$ac_includes_default"
10729if test "x$ac_cv_member_struct_stat_st_rdev" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010730
10731cat >>confdefs.h <<_ACEOF
10732#define HAVE_STRUCT_STAT_ST_RDEV 1
10733_ACEOF
10734
10735
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010736fi
10737
Matthias Kloseb9621712010-04-24 17:59:49 +000010738ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
10739if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000010740
Martin v. Löwis11437992002-04-12 09:54:03 +000010741cat >>confdefs.h <<_ACEOF
10742#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
10743_ACEOF
10744
10745
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010746fi
10747
Matthias Kloseb9621712010-04-24 17:59:49 +000010748ac_fn_c_check_member "$LINENO" "struct stat" "st_flags" "ac_cv_member_struct_stat_st_flags" "$ac_includes_default"
10749if test "x$ac_cv_member_struct_stat_st_flags" = x""yes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000010750
10751cat >>confdefs.h <<_ACEOF
10752#define HAVE_STRUCT_STAT_ST_FLAGS 1
10753_ACEOF
10754
10755
10756fi
10757
Matthias Kloseb9621712010-04-24 17:59:49 +000010758ac_fn_c_check_member "$LINENO" "struct stat" "st_gen" "ac_cv_member_struct_stat_st_gen" "$ac_includes_default"
10759if test "x$ac_cv_member_struct_stat_st_gen" = x""yes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000010760
10761cat >>confdefs.h <<_ACEOF
10762#define HAVE_STRUCT_STAT_ST_GEN 1
10763_ACEOF
10764
10765
10766fi
10767
Matthias Kloseb9621712010-04-24 17:59:49 +000010768ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtime" "ac_cv_member_struct_stat_st_birthtime" "$ac_includes_default"
10769if test "x$ac_cv_member_struct_stat_st_birthtime" = x""yes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000010770
10771cat >>confdefs.h <<_ACEOF
10772#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
10773_ACEOF
10774
10775
10776fi
10777
Matthias Kloseb9621712010-04-24 17:59:49 +000010778ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
10779if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000010780
Martin v. Löwis11437992002-04-12 09:54:03 +000010781cat >>confdefs.h <<_ACEOF
10782#define HAVE_STRUCT_STAT_ST_BLOCKS 1
10783_ACEOF
10784
10785
Matthias Kloseb9621712010-04-24 17:59:49 +000010786$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010787
10788else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010789 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000010790 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010791 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
10792 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010793esac
10794
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010795fi
10796
Michael W. Hudson54241132001-12-07 15:38:26 +000010797
Martin v. Löwis11437992002-04-12 09:54:03 +000010798
Matthias Kloseb9621712010-04-24 17:59:49 +000010799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
10800$as_echo_n "checking for time.h that defines altzone... " >&6; }
10801if test "${ac_cv_header_time_altzone+set}" = set; then :
10802 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010803else
Matthias Kloseb159a552010-04-25 21:00:44 +000010804
Matthias Kloseb9621712010-04-24 17:59:49 +000010805 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010806/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000010807#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010808int
10809main ()
10810{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010811return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000010812 ;
10813 return 0;
10814}
10815_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010816if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010817 ac_cv_header_time_altzone=yes
10818else
Matthias Kloseb9621712010-04-24 17:59:49 +000010819 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000010820fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010821rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000010822
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010823fi
10824
Matthias Kloseb9621712010-04-24 17:59:49 +000010825{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
10826$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010827if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010828
Matthias Kloseb9621712010-04-24 17:59:49 +000010829$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010830
10831fi
10832
Guido van Rossumda88dad1995-01-26 00:46:29 +000010833was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000010834{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
10835$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
10836cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010837/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000010838
10839#include <sys/types.h>
10840#include <sys/select.h>
10841#include <sys/time.h>
10842
Martin v. Löwis11437992002-04-12 09:54:03 +000010843int
10844main ()
10845{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010846;
Martin v. Löwis11437992002-04-12 09:54:03 +000010847 ;
10848 return 0;
10849}
10850_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010851if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010852
10853
Matthias Kloseb9621712010-04-24 17:59:49 +000010854$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000010855
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010856 was_it_defined=yes
10857
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010858fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010859rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010860{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
10861$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010862
Matthias Kloseb9621712010-04-24 17:59:49 +000010863{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
10864$as_echo_n "checking for addrinfo... " >&6; }
10865if test "${ac_cv_struct_addrinfo+set}" = set; then :
10866 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010867else
Matthias Kloseb9621712010-04-24 17:59:49 +000010868 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010869/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010870#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010871int
10872main ()
10873{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010874struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000010875 ;
10876 return 0;
10877}
10878_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010879if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010880 ac_cv_struct_addrinfo=yes
10881else
Matthias Kloseb9621712010-04-24 17:59:49 +000010882 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010883fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010884rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10885fi
10886
Matthias Kloseb9621712010-04-24 17:59:49 +000010887{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
10888$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010889if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010890
Matthias Kloseb9621712010-04-24 17:59:49 +000010891$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010892
10893fi
10894
Matthias Kloseb9621712010-04-24 17:59:49 +000010895{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
10896$as_echo_n "checking for sockaddr_storage... " >&6; }
10897if test "${ac_cv_struct_sockaddr_storage+set}" = set; then :
10898 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010899else
Matthias Kloseb9621712010-04-24 17:59:49 +000010900 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010901/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010902
10903# include <sys/types.h>
10904# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010905int
10906main ()
10907{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010908struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000010909 ;
10910 return 0;
10911}
10912_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010913if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010914 ac_cv_struct_sockaddr_storage=yes
10915else
Matthias Kloseb9621712010-04-24 17:59:49 +000010916 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010917fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010918rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10919fi
10920
Matthias Kloseb9621712010-04-24 17:59:49 +000010921{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
10922$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010923if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010924
Matthias Kloseb9621712010-04-24 17:59:49 +000010925$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010926
10927fi
10928
Guido van Rossum627b2d71993-12-24 10:39:16 +000010929# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000010930
Matthias Kloseb9621712010-04-24 17:59:49 +000010931{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
10932$as_echo_n "checking whether char is unsigned... " >&6; }
10933if test "${ac_cv_c_char_unsigned+set}" = set; then :
10934 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000010935else
Matthias Kloseb9621712010-04-24 17:59:49 +000010936 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010937/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010938$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000010939int
10940main ()
10941{
10942static int test_array [1 - 2 * !(((char) -1) < 0)];
10943test_array [0] = 0
10944
10945 ;
10946 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000010947}
Martin v. Löwis11437992002-04-12 09:54:03 +000010948_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010949if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000010950 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000010951else
Matthias Kloseb9621712010-04-24 17:59:49 +000010952 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010953fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010954rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010955fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010956{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
10957$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010958if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010959 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010960
10961fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000010962
Matthias Kloseb9621712010-04-24 17:59:49 +000010963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
10964$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
10965if test "${ac_cv_c_const+set}" = set; then :
10966 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000010967else
Matthias Kloseb9621712010-04-24 17:59:49 +000010968 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010969/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010970
Martin v. Löwis11437992002-04-12 09:54:03 +000010971int
10972main ()
10973{
10974/* FIXME: Include the comments suggested by Paul. */
10975#ifndef __cplusplus
10976 /* Ultrix mips cc rejects this. */
10977 typedef int charset[2];
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010978 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000010979 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010980 char const *const *pcpcc;
10981 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000010982 /* NEC SVR4.0.2 mips cc rejects this. */
10983 struct point {int x, y;};
10984 static struct point const zero = {0,0};
10985 /* AIX XL C 1.02.0.0 rejects this.
10986 It does not let you subtract one const X* pointer from another in
10987 an arm of an if-expression whose if-part is not a constant
10988 expression */
10989 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010990 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010991 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010992 ++pcpcc;
10993 ppc = (char**) pcpcc;
10994 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000010995 { /* SCO 3.2v4 cc rejects this. */
10996 char *t;
10997 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010998
Martin v. Löwis11437992002-04-12 09:54:03 +000010999 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011000 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011001 }
11002 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
11003 int x[] = {25, 17};
11004 const int *foo = &x[0];
11005 ++foo;
11006 }
11007 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11008 typedef const int *iptr;
11009 iptr p = 0;
11010 ++p;
11011 }
11012 { /* AIX XL C 1.02.0.0 rejects this saying
11013 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11014 struct s { int j; const int *ap[3]; };
11015 struct s *b; b->j = 5;
11016 }
11017 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11018 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011019 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011020 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011021 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000011022#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000011023
Martin v. Löwis11437992002-04-12 09:54:03 +000011024 ;
11025 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000011026}
Martin v. Löwis11437992002-04-12 09:54:03 +000011027_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011028if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011029 ac_cv_c_const=yes
11030else
Matthias Kloseb9621712010-04-24 17:59:49 +000011031 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011032fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011033rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011034fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011035{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
11036$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011037if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011038
Matthias Kloseb9621712010-04-24 17:59:49 +000011039$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011040
11041fi
11042
Michael W. Hudson54241132001-12-07 15:38:26 +000011043
Guido van Rossumda88dad1995-01-26 00:46:29 +000011044works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011045{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
11046$as_echo_n "checking for working volatile... " >&6; }
11047cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011048/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011049
Martin v. Löwis11437992002-04-12 09:54:03 +000011050int
11051main ()
11052{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011053volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011054 ;
11055 return 0;
11056}
11057_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011058if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011059 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011060else
Skip Montanaro6dead952003-09-25 14:50:04 +000011061
Matthias Kloseb9621712010-04-24 17:59:49 +000011062$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011063
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011064
Guido van Rossum627b2d71993-12-24 10:39:16 +000011065fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011066rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011067{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11068$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011069
Guido van Rossumda88dad1995-01-26 00:46:29 +000011070works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011071{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
11072$as_echo_n "checking for working signed char... " >&6; }
11073cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011074/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011075
Martin v. Löwis11437992002-04-12 09:54:03 +000011076int
11077main ()
11078{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011079signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000011080 ;
11081 return 0;
11082}
11083_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011084if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011085 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011086else
Skip Montanaro6dead952003-09-25 14:50:04 +000011087
Matthias Kloseb9621712010-04-24 17:59:49 +000011088$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000011089
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011090
Guido van Rossum7f43da71994-08-01 12:15:30 +000011091fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011092rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011093{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11094$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011095
Guido van Rossumda88dad1995-01-26 00:46:29 +000011096have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
11098$as_echo_n "checking for prototypes... " >&6; }
11099cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011100/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011101int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011102int
11103main ()
11104{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011105return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000011106 ;
11107 return 0;
11108}
11109_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011110if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011111
Matthias Kloseb9621712010-04-24 17:59:49 +000011112$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011113
Matthias Kloseb159a552010-04-25 21:00:44 +000011114 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011115fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011116rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011117{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
11118$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011119
Guido van Rossumda88dad1995-01-26 00:46:29 +000011120works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
11122$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
11123cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011124/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011125
11126#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000011127int foo(int x, ...) {
11128 va_list va;
11129 va_start(va, x);
11130 va_arg(va, int);
11131 va_arg(va, char *);
11132 va_arg(va, double);
11133 return 0;
11134}
Guido van Rossum7f43da71994-08-01 12:15:30 +000011135
Martin v. Löwis11437992002-04-12 09:54:03 +000011136int
11137main ()
11138{
Guido van Rossum90eea071996-08-30 20:58:57 +000011139return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000011140 ;
11141 return 0;
11142}
11143_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011144if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011145
11146
Matthias Kloseb9621712010-04-24 17:59:49 +000011147$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011148
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011149 works=yes
11150
Guido van Rossum627b2d71993-12-24 10:39:16 +000011151fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011152rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011153{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11154$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011155
Martin v. Löwisd6320502004-08-12 13:45:08 +000011156# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000011157{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
11158$as_echo_n "checking for socketpair... " >&6; }
11159cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011160/* end confdefs.h. */
11161
11162#include <sys/types.h>
11163#include <sys/socket.h>
11164
11165int
11166main ()
11167{
11168void *x=socketpair
11169 ;
11170 return 0;
11171}
11172_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011173if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000011174
Matthias Kloseb9621712010-04-24 17:59:49 +000011175$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000011176
Matthias Kloseb159a552010-04-25 21:00:44 +000011177 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011178$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011179else
Matthias Kloseb9621712010-04-24 17:59:49 +000011180 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11181$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011182
11183fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011184rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011185
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011186# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000011187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
11188$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
11189cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011190/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011191#include <sys/types.h>
11192#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011193int
11194main ()
11195{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011196struct sockaddr x;
11197x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011198 ;
11199 return 0;
11200}
11201_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011202if ac_fn_c_try_compile "$LINENO"; then :
11203 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11204$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011205
Matthias Kloseb9621712010-04-24 17:59:49 +000011206$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011207
11208else
Matthias Kloseb9621712010-04-24 17:59:49 +000011209 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11210$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011211
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011212fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011213rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011214
Guido van Rossumda88dad1995-01-26 00:46:29 +000011215va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011216{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
11217$as_echo_n "checking whether va_list is an array... " >&6; }
11218cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011219/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011220
11221#ifdef HAVE_STDARG_PROTOTYPES
11222#include <stdarg.h>
11223#else
11224#include <varargs.h>
11225#endif
11226
Martin v. Löwis11437992002-04-12 09:54:03 +000011227int
11228main ()
11229{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011230va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000011231 ;
11232 return 0;
11233}
11234_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011235if ac_fn_c_try_compile "$LINENO"; then :
11236
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011237else
Skip Montanaro6dead952003-09-25 14:50:04 +000011238
Martin v. Löwis11437992002-04-12 09:54:03 +000011239
Matthias Kloseb9621712010-04-24 17:59:49 +000011240$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011241
Guido van Rossumda88dad1995-01-26 00:46:29 +000011242 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011243
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011244fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011245rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011246{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
11247$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011248
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011249# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000011250
11251
Matthias Kloseb9621712010-04-24 17:59:49 +000011252ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
11253if test "x$ac_cv_func_gethostbyname_r" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011254
Matthias Kloseb9621712010-04-24 17:59:49 +000011255 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000011256
Matthias Kloseb9621712010-04-24 17:59:49 +000011257 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
11258$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011259 OLD_CFLAGS=$CFLAGS
11260 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011261 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011262/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011263
11264# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011265
Martin v. Löwis11437992002-04-12 09:54:03 +000011266int
11267main ()
11268{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011269
11270 char *name;
11271 struct hostent *he, *res;
11272 char buffer[2048];
11273 int buflen = 2048;
11274 int h_errnop;
11275
11276 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011277
11278 ;
11279 return 0;
11280}
11281_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011282if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011283
Matthias Kloseb9621712010-04-24 17:59:49 +000011284 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011285
Martin v. Löwis11437992002-04-12 09:54:03 +000011286
Matthias Kloseb9621712010-04-24 17:59:49 +000011287$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011288
Matthias Kloseb9621712010-04-24 17:59:49 +000011289 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11290$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011291
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011292else
Skip Montanaro6dead952003-09-25 14:50:04 +000011293
Matthias Kloseb9621712010-04-24 17:59:49 +000011294 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11295$as_echo "no" >&6; }
11296 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
11297$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
11298 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011299/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011300
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011301# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011302
Martin v. Löwis11437992002-04-12 09:54:03 +000011303int
11304main ()
11305{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011306
11307 char *name;
11308 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000011309 char buffer[2048];
11310 int buflen = 2048;
11311 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011312
Matthias Kloseb159a552010-04-25 21:00:44 +000011313 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011314
11315 ;
11316 return 0;
11317}
11318_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011319if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011320
Matthias Kloseb9621712010-04-24 17:59:49 +000011321 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011322
Martin v. Löwis11437992002-04-12 09:54:03 +000011323
Matthias Kloseb159a552010-04-25 21:00:44 +000011324$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011325
Matthias Kloseb9621712010-04-24 17:59:49 +000011326 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11327$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011328
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011329else
Skip Montanaro6dead952003-09-25 14:50:04 +000011330
Matthias Kloseb9621712010-04-24 17:59:49 +000011331 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11332$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011333 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
11334$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
11335 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11336/* end confdefs.h. */
11337
11338# include <netdb.h>
11339
11340int
11341main ()
11342{
11343
11344 char *name;
11345 struct hostent *he;
11346 struct hostent_data data;
11347
11348 (void) gethostbyname_r(name, he, &data);
11349
11350 ;
11351 return 0;
11352}
11353_ACEOF
11354if ac_fn_c_try_compile "$LINENO"; then :
11355
11356 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
11357
11358
11359$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
11360
11361 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11362$as_echo "yes" >&6; }
11363
11364else
11365
11366 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11367$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011368
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011369fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011370rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011371
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011372fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011373rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011374
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011375fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011376rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011377 CFLAGS=$OLD_CFLAGS
11378
11379else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011380
Matthias Kloseb9621712010-04-24 17:59:49 +000011381 for ac_func in gethostbyname
11382do :
11383 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
11384if test "x$ac_cv_func_gethostbyname" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011385 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011386#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011387_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011388
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011389fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011390done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011391
Michael W. Hudson54241132001-12-07 15:38:26 +000011392
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011393fi
11394
Michael W. Hudson54241132001-12-07 15:38:26 +000011395
11396
11397
11398
11399
11400
Guido van Rossum627b2d71993-12-24 10:39:16 +000011401# checks for system services
11402# (none yet)
11403
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011404# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000011405ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
11406if test "x$ac_cv_func___fpu_control" = x""yes; then :
11407
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011408else
Matthias Kloseb9621712010-04-24 17:59:49 +000011409 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
11410$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
11411if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then :
11412 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011413else
Martin v. Löwis11437992002-04-12 09:54:03 +000011414 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011415LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011416cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011417/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011418
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011419/* Override any GCC internal prototype to avoid an error.
11420 Use char because int might match the return type of a GCC
11421 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011422#ifdef __cplusplus
11423extern "C"
11424#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011425char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011426int
11427main ()
11428{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011429return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011430 ;
11431 return 0;
11432}
11433_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011434if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011435 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011436else
Matthias Kloseb9621712010-04-24 17:59:49 +000011437 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011438fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011439rm -f core conftest.err conftest.$ac_objext \
11440 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011441LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011442fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011443{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
11444$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
11445if test "x$ac_cv_lib_ieee___fpu_control" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011446 cat >>confdefs.h <<_ACEOF
11447#define HAVE_LIBIEEE 1
11448_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011449
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011450 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011451
Guido van Rossum627b2d71993-12-24 10:39:16 +000011452fi
11453
Michael W. Hudson54241132001-12-07 15:38:26 +000011454
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011455fi
11456
Michael W. Hudson54241132001-12-07 15:38:26 +000011457
Guido van Rossum7f253911997-05-09 02:42:48 +000011458# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000011459{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
11460$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011461
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011462# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011463if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011464 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000011465if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000011466then
11467
Matthias Kloseb9621712010-04-24 17:59:49 +000011468$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011469
Matthias Kloseb9621712010-04-24 17:59:49 +000011470 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11471$as_echo "yes" >&6; }
11472else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11473$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011474fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000011475else
Matthias Kloseb9621712010-04-24 17:59:49 +000011476 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11477$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011478fi
11479
Guido van Rossum7f253911997-05-09 02:42:48 +000011480
Guido van Rossum7f43da71994-08-01 12:15:30 +000011481# check for --with-libm=...
11482
Guido van Rossum563e7081996-09-10 18:20:48 +000011483case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000011484Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000011485*) LIBM=-lm
11486esac
Matthias Kloseb9621712010-04-24 17:59:49 +000011487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
11488$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011489
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011490# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011491if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011492 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000011493if test "$withval" = no
11494then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000011495 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
11496$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011497elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011498then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000011499 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
11500$as_echo "set LIBM=\"$withval\"" >&6; }
Benjamin Peterson79263252010-10-31 16:50:44 +000011501else as_fn_error "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011502fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011503else
Matthias Kloseb9621712010-04-24 17:59:49 +000011504 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
11505$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011506fi
11507
Guido van Rossum7f43da71994-08-01 12:15:30 +000011508
11509# check for --with-libc=...
11510
Matthias Kloseb9621712010-04-24 17:59:49 +000011511{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
11512$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011513
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011514# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011515if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011516 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000011517if test "$withval" = no
11518then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000011519 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
11520$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011521elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011522then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000011523 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
11524$as_echo "set LIBC=\"$withval\"" >&6; }
Benjamin Peterson79263252010-10-31 16:50:44 +000011525else as_fn_error "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011526fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011527else
Matthias Kloseb9621712010-04-24 17:59:49 +000011528 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
11529$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011530fi
11531
Guido van Rossum7f43da71994-08-01 12:15:30 +000011532
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011533# **************************************************
11534# * Check for various properties of floating point *
11535# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011536
Matthias Kloseb9621712010-04-24 17:59:49 +000011537{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
11538$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
11539if test "${ac_cv_little_endian_double+set}" = set; then :
11540 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011541else
11542
Matthias Kloseb9621712010-04-24 17:59:49 +000011543if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011544 ac_cv_little_endian_double=no
11545else
Matthias Kloseb9621712010-04-24 17:59:49 +000011546 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011547/* end confdefs.h. */
11548
11549#include <string.h>
11550int main() {
11551 double x = 9006104071832581.0;
11552 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
11553 return 0;
11554 else
11555 return 1;
11556}
11557
11558_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011559if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011560 ac_cv_little_endian_double=yes
11561else
Matthias Kloseb9621712010-04-24 17:59:49 +000011562 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011563fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011564rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11565 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011566fi
11567
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011568fi
11569
Matthias Kloseb9621712010-04-24 17:59:49 +000011570{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
11571$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011572if test "$ac_cv_little_endian_double" = yes
11573then
11574
Matthias Kloseb9621712010-04-24 17:59:49 +000011575$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011576
11577fi
11578
Matthias Kloseb9621712010-04-24 17:59:49 +000011579{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
11580$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
11581if test "${ac_cv_big_endian_double+set}" = set; then :
11582 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011583else
11584
Matthias Kloseb9621712010-04-24 17:59:49 +000011585if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011586 ac_cv_big_endian_double=no
11587else
Matthias Kloseb9621712010-04-24 17:59:49 +000011588 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011589/* end confdefs.h. */
11590
11591#include <string.h>
11592int main() {
11593 double x = 9006104071832581.0;
11594 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
11595 return 0;
11596 else
11597 return 1;
11598}
11599
11600_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011601if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011602 ac_cv_big_endian_double=yes
11603else
Matthias Kloseb9621712010-04-24 17:59:49 +000011604 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011605fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011606rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11607 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011608fi
11609
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011610fi
11611
Matthias Kloseb9621712010-04-24 17:59:49 +000011612{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
11613$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011614if test "$ac_cv_big_endian_double" = yes
11615then
11616
Matthias Kloseb9621712010-04-24 17:59:49 +000011617$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011618
11619fi
11620
11621# Some ARM platforms use a mixed-endian representation for doubles.
11622# While Python doesn't currently have full support for these platforms
11623# (see e.g., issue 1762561), we can at least make sure that float <-> string
11624# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000011625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
11626$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
11627if test "${ac_cv_mixed_endian_double+set}" = set; then :
11628 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011629else
11630
Matthias Kloseb9621712010-04-24 17:59:49 +000011631if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011632 ac_cv_mixed_endian_double=no
11633else
Matthias Kloseb9621712010-04-24 17:59:49 +000011634 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011635/* end confdefs.h. */
11636
11637#include <string.h>
11638int main() {
11639 double x = 9006104071832581.0;
11640 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
11641 return 0;
11642 else
11643 return 1;
11644}
11645
11646_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011647if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011648 ac_cv_mixed_endian_double=yes
11649else
Matthias Kloseb9621712010-04-24 17:59:49 +000011650 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011651fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011652rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11653 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011654fi
11655
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011656fi
11657
Matthias Kloseb9621712010-04-24 17:59:49 +000011658{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
11659$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011660if test "$ac_cv_mixed_endian_double" = yes
11661then
11662
Matthias Kloseb9621712010-04-24 17:59:49 +000011663$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011664
11665fi
11666
Mark Dickinson7abf8d42009-04-18 20:17:52 +000011667# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000011668# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000011669# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000011670# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011671# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000011672# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011673
11674# This inline assembler syntax may also work for suncc and icc,
11675# so we try it on all platforms.
11676
Matthias Kloseb9621712010-04-24 17:59:49 +000011677{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
11678$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
11679cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011680/* end confdefs.h. */
11681
11682int
11683main ()
11684{
11685
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011686 unsigned short cw;
11687 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
11688 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011689
11690 ;
11691 return 0;
11692}
11693_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011694if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011695 have_gcc_asm_for_x87=yes
11696else
Matthias Kloseb9621712010-04-24 17:59:49 +000011697 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011698fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011699rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011700{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
11701$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011702if test "$have_gcc_asm_for_x87" = yes
11703then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011704
Matthias Kloseb9621712010-04-24 17:59:49 +000011705$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011706
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011707fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011708
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011709# Detect whether system arithmetic is subject to x87-style double
11710# rounding issues. The result of this test has little meaning on non
11711# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
11712# mode is round-to-nearest and double rounding issues are present, and
11713# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000011714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
11715$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011716# $BASECFLAGS may affect the result
11717ac_save_cc="$CC"
11718CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011719if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011720 ac_cv_x87_double_rounding=no
11721else
Matthias Kloseb9621712010-04-24 17:59:49 +000011722 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011723/* end confdefs.h. */
11724
11725#include <stdlib.h>
11726#include <math.h>
11727int main() {
11728 volatile double x, y, z;
11729 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
11730 x = 0.99999999999999989; /* 1-2**-53 */
11731 y = 1./x;
11732 if (y != 1.)
11733 exit(0);
11734 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
11735 x = 1e16;
11736 y = 2.99999;
11737 z = x + y;
11738 if (z != 1e16+4.)
11739 exit(0);
11740 /* both tests show evidence of double rounding */
11741 exit(1);
11742}
11743
11744_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011745if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011746 ac_cv_x87_double_rounding=no
11747else
Matthias Kloseb9621712010-04-24 17:59:49 +000011748 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011749fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011750rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11751 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011752fi
11753
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011754CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000011755{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
11756$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011757if test "$ac_cv_x87_double_rounding" = yes
11758then
11759
Matthias Kloseb9621712010-04-24 17:59:49 +000011760$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011761
11762fi
11763
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011764# ************************************
11765# * Check for mathematical functions *
11766# ************************************
11767
11768LIBS_SAVE=$LIBS
11769LIBS="$LIBS $LIBM"
11770
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011771# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
11772# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000011773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
11774$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
11775if test "${ac_cv_tanh_preserves_zero_sign+set}" = set; then :
11776 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011777else
11778
Matthias Kloseb9621712010-04-24 17:59:49 +000011779if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011780 ac_cv_tanh_preserves_zero_sign=no
11781else
Matthias Kloseb9621712010-04-24 17:59:49 +000011782 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011783/* end confdefs.h. */
11784
11785#include <math.h>
11786#include <stdlib.h>
11787int main() {
11788 /* return 0 if either negative zeros don't exist
11789 on this platform or if negative zeros exist
11790 and tanh(-0.) == -0. */
11791 if (atan2(0., -1.) == atan2(-0., -1.) ||
11792 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
11793 else exit(1);
11794}
11795
11796_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011797if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011798 ac_cv_tanh_preserves_zero_sign=yes
11799else
Matthias Kloseb9621712010-04-24 17:59:49 +000011800 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011801fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011802rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11803 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011804fi
11805
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011806fi
11807
Matthias Kloseb9621712010-04-24 17:59:49 +000011808{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
11809$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011810if test "$ac_cv_tanh_preserves_zero_sign" = yes
11811then
11812
Matthias Kloseb9621712010-04-24 17:59:49 +000011813$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011814
11815fi
11816
Mark Dickinson9c113362009-09-05 10:36:23 +000011817for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
Matthias Kloseb9621712010-04-24 17:59:49 +000011818do :
11819 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11820ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Benjamin Peterson79263252010-10-31 16:50:44 +000011821eval as_val=\$$as_ac_var
11822 if test "x$as_val" = x""yes; then :
Mark Dickinson9c113362009-09-05 10:36:23 +000011823 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011824#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Mark Dickinson9c113362009-09-05 10:36:23 +000011825_ACEOF
11826
11827fi
11828done
11829
Mark Dickinson9c113362009-09-05 10:36:23 +000011830for ac_func in hypot lgamma log1p round tgamma
Matthias Kloseb9621712010-04-24 17:59:49 +000011831do :
11832 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11833ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Benjamin Peterson79263252010-10-31 16:50:44 +000011834eval as_val=\$$as_ac_var
11835 if test "x$as_val" = x""yes; then :
Christian Heimes99170a52007-12-19 02:07:34 +000011836 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011837#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimes99170a52007-12-19 02:07:34 +000011838_ACEOF
11839
11840fi
11841done
11842
Matthias Kloseb9621712010-04-24 17:59:49 +000011843ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
11844"
11845if test "x$ac_cv_have_decl_isinf" = x""yes; then :
11846 ac_have_decl=1
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011847else
Matthias Kloseb9621712010-04-24 17:59:49 +000011848 ac_have_decl=0
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011849fi
11850
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011851cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011852#define HAVE_DECL_ISINF $ac_have_decl
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011853_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011854ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
11855"
11856if test "x$ac_cv_have_decl_isnan" = x""yes; then :
11857 ac_have_decl=1
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011858else
Matthias Kloseb9621712010-04-24 17:59:49 +000011859 ac_have_decl=0
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011860fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011861
11862cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011863#define HAVE_DECL_ISNAN $ac_have_decl
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011864_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011865ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
11866"
11867if test "x$ac_cv_have_decl_isfinite" = x""yes; then :
11868 ac_have_decl=1
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011869else
Matthias Kloseb9621712010-04-24 17:59:49 +000011870 ac_have_decl=0
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011871fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011872
11873cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011874#define HAVE_DECL_ISFINITE $ac_have_decl
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011875_ACEOF
11876
11877
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000011878LIBS=$LIBS_SAVE
11879
Mark Dickinsona614f042009-11-28 12:48:43 +000011880# For multiprocessing module, check that sem_open
11881# actually works. For FreeBSD versions <= 7.2,
11882# the kernel module that provides POSIX semaphores
11883# isn't loaded by default, so an attempt to call
11884# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000011885{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
11886$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
11887if test "${ac_cv_posix_semaphores_enabled+set}" = set; then :
11888 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000011889else
Matthias Kloseb9621712010-04-24 17:59:49 +000011890 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000011891 ac_cv_posix_semaphores_enabled=yes
11892else
Matthias Kloseb9621712010-04-24 17:59:49 +000011893 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000011894/* end confdefs.h. */
11895
11896#include <unistd.h>
11897#include <fcntl.h>
11898#include <stdio.h>
11899#include <semaphore.h>
11900#include <sys/stat.h>
11901
11902int main(void) {
11903 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
11904 if (a == SEM_FAILED) {
11905 perror("sem_open");
11906 return 1;
11907 }
11908 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000011909 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000011910 return 0;
11911}
11912
11913_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011914if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000011915 ac_cv_posix_semaphores_enabled=yes
11916else
Matthias Kloseb9621712010-04-24 17:59:49 +000011917 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000011918fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011919rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11920 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000011921fi
11922
11923
Mark Dickinsona614f042009-11-28 12:48:43 +000011924fi
11925
Matthias Kloseb9621712010-04-24 17:59:49 +000011926{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
11927$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000011928if test $ac_cv_posix_semaphores_enabled = no
11929then
11930
Matthias Kloseb9621712010-04-24 17:59:49 +000011931$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000011932
11933fi
11934
Mark Dickinson10683072009-04-18 21:18:19 +000011935# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000011936{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
11937$as_echo_n "checking for broken sem_getvalue... " >&6; }
11938if test "${ac_cv_broken_sem_getvalue+set}" = set; then :
11939 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011940else
Matthias Kloseb9621712010-04-24 17:59:49 +000011941 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011942 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000011943else
Matthias Kloseb9621712010-04-24 17:59:49 +000011944 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000011945/* end confdefs.h. */
11946
11947#include <unistd.h>
11948#include <fcntl.h>
11949#include <stdio.h>
11950#include <semaphore.h>
11951#include <sys/stat.h>
11952
11953int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000011954 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000011955 int count;
11956 int res;
11957 if(a==SEM_FAILED){
11958 perror("sem_open");
11959 return 1;
11960
11961 }
11962 res = sem_getvalue(a, &count);
11963 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000011964 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000011965 return res==-1 ? 1 : 0;
11966}
11967
Mark Dickinson10683072009-04-18 21:18:19 +000011968_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011969if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011970 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000011971else
Matthias Kloseb9621712010-04-24 17:59:49 +000011972 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011973fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011974rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11975 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011976fi
11977
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011978
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011979fi
11980
Matthias Kloseb9621712010-04-24 17:59:49 +000011981{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
11982$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011983if test $ac_cv_broken_sem_getvalue = yes
11984then
11985
Matthias Kloseb9621712010-04-24 17:59:49 +000011986$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011987
11988fi
11989
Mark Dickinsonbd792642009-03-18 20:06:12 +000011990# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000011991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
11992$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000011993# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011994if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000011995 enableval=$enable_big_digits; case $enable_big_digits in
11996yes)
11997 enable_big_digits=30 ;;
11998no)
11999 enable_big_digits=15 ;;
1200015|30)
12001 ;;
12002*)
Benjamin Peterson79263252010-10-31 16:50:44 +000012003 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 +000012004esac
Matthias Kloseb9621712010-04-24 17:59:49 +000012005{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
12006$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012007
12008cat >>confdefs.h <<_ACEOF
12009#define PYLONG_BITS_IN_DIGIT $enable_big_digits
12010_ACEOF
12011
12012
12013else
Matthias Kloseb9621712010-04-24 17:59:49 +000012014 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
12015$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012016fi
12017
12018
Guido van Rossumef2255b2000-03-10 22:30:29 +000012019# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012020ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
12021if test "x$ac_cv_header_wchar_h" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012022
12023
Matthias Kloseb9621712010-04-24 17:59:49 +000012024$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012025
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012026 wchar_h="yes"
12027
Guido van Rossumef2255b2000-03-10 22:30:29 +000012028else
Martin v. Löwis11437992002-04-12 09:54:03 +000012029 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000012030
12031fi
12032
Michael W. Hudson54241132001-12-07 15:38:26 +000012033
Martin v. Löwis11437992002-04-12 09:54:03 +000012034
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012035# determine wchar_t size
12036if test "$wchar_h" = yes
12037then
Matthias Kloseb9621712010-04-24 17:59:49 +000012038 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012039# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12040# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12041# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000012042{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
12043$as_echo_n "checking size of wchar_t... " >&6; }
12044if test "${ac_cv_sizeof_wchar_t+set}" = set; then :
12045 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012046else
Matthias Kloseb9621712010-04-24 17:59:49 +000012047 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
12048"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012049
Martin v. Löwis11437992002-04-12 09:54:03 +000012050else
Matthias Kloseb9621712010-04-24 17:59:49 +000012051 if test "$ac_cv_type_wchar_t" = yes; then
12052 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12053$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson79263252010-10-31 16:50:44 +000012054{ as_fn_set_status 77
12055as_fn_error "cannot compute sizeof (wchar_t)
12056See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012057 else
12058 ac_cv_sizeof_wchar_t=0
12059 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012060fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012061
Martin v. Löwis11437992002-04-12 09:54:03 +000012062fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012063{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
12064$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012065
12066
12067
Martin v. Löwis11437992002-04-12 09:54:03 +000012068cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012069#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012070_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012071
Michael W. Hudson54241132001-12-07 15:38:26 +000012072
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012073fi
12074
Matthias Kloseb9621712010-04-24 17:59:49 +000012075{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
12076$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012077have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012078cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012079/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012080
12081#include <tcl.h>
12082#if TCL_UTF_MAX != 6
12083# error "NOT UCS4_TCL"
12084#endif
12085int
12086main ()
12087{
12088
12089 ;
12090 return 0;
12091}
12092_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012093if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012094
12095
Matthias Kloseb9621712010-04-24 17:59:49 +000012096$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012097
12098 have_ucs4_tcl=yes
12099
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012100fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012101rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012102{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
12103$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012104
Skip Montanaro6dead952003-09-25 14:50:04 +000012105# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012106if test "$wchar_h" = yes
12107then
12108 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000012109 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
12110$as_echo_n "checking whether wchar_t is signed... " >&6; }
12111 if test "${ac_cv_wchar_t_signed+set}" = set; then :
12112 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012113else
12114
Matthias Kloseb9621712010-04-24 17:59:49 +000012115 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012116 ac_cv_wchar_t_signed=yes
12117else
Matthias Kloseb9621712010-04-24 17:59:49 +000012118 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012119/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012120
12121 #include <wchar.h>
12122 int main()
12123 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000012124 /* Success: exit code 0 */
12125 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012126 }
12127
12128_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012129if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012130 ac_cv_wchar_t_signed=yes
12131else
Matthias Kloseb9621712010-04-24 17:59:49 +000012132 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012133fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012134rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12135 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012136fi
12137
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012138fi
12139
Matthias Kloseb9621712010-04-24 17:59:49 +000012140 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
12141$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012142fi
12143
Matthias Kloseb9621712010-04-24 17:59:49 +000012144{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what type to use for str" >&5
12145$as_echo_n "checking what type to use for str... " >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000012146
12147# Check whether --with-wide-unicode was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012148if test "${with_wide_unicode+set}" = set; then :
Georg Brandl52d168a2008-01-07 18:10:24 +000012149 withval=$with_wide_unicode;
12150if test "$withval" != no
12151then unicode_size="4"
12152else unicode_size="2"
12153fi
12154
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012155else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012156
Georg Brandl52d168a2008-01-07 18:10:24 +000012157case "$have_ucs4_tcl" in
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012158 yes) unicode_size="4";;
Georg Brandl52d168a2008-01-07 18:10:24 +000012159 *) unicode_size="2" ;;
12160esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012161
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012162fi
12163
Martin v. Löwis0036cba2002-04-12 09:58:45 +000012164
12165
Georg Brandl52d168a2008-01-07 18:10:24 +000012166case "$unicode_size" in
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012167 4)
12168 $as_echo "#define Py_UNICODE_SIZE 4" >>confdefs.h
12169
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012170 ABIFLAGS="${ABIFLAGS}u"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012171 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000012172 *) $as_echo "#define Py_UNICODE_SIZE 2" >>confdefs.h
Georg Brandl52d168a2008-01-07 18:10:24 +000012173 ;;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012174esac
12175
Michael W. Hudson54241132001-12-07 15:38:26 +000012176
Martin v. Löwis11437992002-04-12 09:54:03 +000012177
Georg Brandl52d168a2008-01-07 18:10:24 +000012178# wchar_t is only usable if it maps to an unsigned type
12179if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000012180 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000012181then
12182 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012183
Matthias Kloseb9621712010-04-24 17:59:49 +000012184$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012185
Matthias Kloseb9621712010-04-24 17:59:49 +000012186 $as_echo "#define PY_UNICODE_TYPE wchar_t" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012187
Georg Brandl52d168a2008-01-07 18:10:24 +000012188elif test "$ac_cv_sizeof_short" = "$unicode_size"
12189then
12190 PY_UNICODE_TYPE="unsigned short"
Matthias Kloseb9621712010-04-24 17:59:49 +000012191 $as_echo "#define PY_UNICODE_TYPE unsigned short" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012192
Georg Brandl52d168a2008-01-07 18:10:24 +000012193elif test "$ac_cv_sizeof_long" = "$unicode_size"
12194then
12195 PY_UNICODE_TYPE="unsigned long"
Matthias Kloseb9621712010-04-24 17:59:49 +000012196 $as_echo "#define PY_UNICODE_TYPE unsigned long" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012197
Georg Brandl52d168a2008-01-07 18:10:24 +000012198else
12199 PY_UNICODE_TYPE="no type found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012200fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012201{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PY_UNICODE_TYPE" >&5
12202$as_echo "$PY_UNICODE_TYPE" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000012203
12204# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000012205 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12206$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
12207if test "${ac_cv_c_bigendian+set}" = set; then :
12208 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000012209else
Matthias Kloseb9621712010-04-24 17:59:49 +000012210 ac_cv_c_bigendian=unknown
12211 # See if we're dealing with a universal compiler.
12212 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12213/* end confdefs.h. */
12214#ifndef __APPLE_CC__
12215 not a universal capable compiler
12216 #endif
12217 typedef int dummy;
12218
Skip Montanaro6dead952003-09-25 14:50:04 +000012219_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012220if ac_fn_c_try_compile "$LINENO"; then :
12221
12222 # Check for potential -arch flags. It is not universal unless
12223 # there are at least two -arch flags with different values.
12224 ac_arch=
12225 ac_prev=
12226 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12227 if test -n "$ac_prev"; then
12228 case $ac_word in
12229 i?86 | x86_64 | ppc | ppc64)
12230 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12231 ac_arch=$ac_word
12232 else
12233 ac_cv_c_bigendian=universal
12234 break
12235 fi
12236 ;;
12237 esac
12238 ac_prev=
12239 elif test "x$ac_word" = "x-arch"; then
12240 ac_prev=arch
12241 fi
12242 done
12243fi
12244rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12245 if test $ac_cv_c_bigendian = unknown; then
12246 # See if sys/param.h defines the BYTE_ORDER macro.
12247 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012248/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012249#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012250 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012251
Martin v. Löwis11437992002-04-12 09:54:03 +000012252int
12253main ()
12254{
Matthias Kloseb9621712010-04-24 17:59:49 +000012255#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12256 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12257 && LITTLE_ENDIAN)
12258 bogus endian macros
12259 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012260
12261 ;
12262 return 0;
12263}
12264_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012265if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012266 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000012267 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012268/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012269#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012270 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012271
Martin v. Löwis11437992002-04-12 09:54:03 +000012272int
12273main ()
12274{
Guido van Rossumef2255b2000-03-10 22:30:29 +000012275#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000012276 not big endian
12277 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012278
12279 ;
12280 return 0;
12281}
12282_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012283if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012284 ac_cv_c_bigendian=yes
12285else
Matthias Kloseb9621712010-04-24 17:59:49 +000012286 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000012287fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012288rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012289fi
12290rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12291 fi
12292 if test $ac_cv_c_bigendian = unknown; then
12293 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12294 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012295/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000012296#include <limits.h>
12297
Martin v. Löwis11437992002-04-12 09:54:03 +000012298int
12299main ()
12300{
Matthias Kloseb9621712010-04-24 17:59:49 +000012301#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12302 bogus endian macros
12303 #endif
12304
Martin v. Löwis11437992002-04-12 09:54:03 +000012305 ;
12306 return 0;
12307}
12308_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012309if ac_fn_c_try_compile "$LINENO"; then :
12310 # It does; now see whether it defined to _BIG_ENDIAN or not.
12311 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12312/* end confdefs.h. */
12313#include <limits.h>
12314
12315int
12316main ()
12317{
12318#ifndef _BIG_ENDIAN
12319 not big endian
12320 #endif
12321
12322 ;
12323 return 0;
12324}
12325_ACEOF
12326if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012327 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012328else
Matthias Kloseb9621712010-04-24 17:59:49 +000012329 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012330fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012331rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12332fi
12333rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12334 fi
12335 if test $ac_cv_c_bigendian = unknown; then
12336 # Compile a test program.
12337 if test "$cross_compiling" = yes; then :
12338 # Try to guess by grepping values from an object file.
12339 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12340/* end confdefs.h. */
12341short int ascii_mm[] =
12342 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12343 short int ascii_ii[] =
12344 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12345 int use_ascii (int i) {
12346 return ascii_mm[i] + ascii_ii[i];
12347 }
12348 short int ebcdic_ii[] =
12349 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12350 short int ebcdic_mm[] =
12351 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12352 int use_ebcdic (int i) {
12353 return ebcdic_mm[i] + ebcdic_ii[i];
12354 }
12355 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012356
Matthias Kloseb9621712010-04-24 17:59:49 +000012357int
12358main ()
12359{
12360return use_ascii (foo) == use_ebcdic (foo);
12361 ;
12362 return 0;
12363}
12364_ACEOF
12365if ac_fn_c_try_compile "$LINENO"; then :
12366 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12367 ac_cv_c_bigendian=yes
12368 fi
12369 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12370 if test "$ac_cv_c_bigendian" = unknown; then
12371 ac_cv_c_bigendian=no
12372 else
12373 # finding both strings is unlikely to happen, but who knows?
12374 ac_cv_c_bigendian=unknown
12375 fi
12376 fi
12377fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012378rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012379else
Matthias Kloseb9621712010-04-24 17:59:49 +000012380 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012381/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012382$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012383int
12384main ()
12385{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012386
Matthias Kloseb9621712010-04-24 17:59:49 +000012387 /* Are we little or big endian? From Harbison&Steele. */
12388 union
12389 {
12390 long int l;
12391 char c[sizeof (long int)];
12392 } u;
12393 u.l = 1;
12394 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012395
12396 ;
12397 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000012398}
Martin v. Löwis11437992002-04-12 09:54:03 +000012399_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012400if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012401 ac_cv_c_bigendian=no
12402else
Matthias Kloseb9621712010-04-24 17:59:49 +000012403 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000012404fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012405rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12406 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000012407fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012408
Matthias Kloseb9621712010-04-24 17:59:49 +000012409 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012410fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012411{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12412$as_echo "$ac_cv_c_bigendian" >&6; }
12413 case $ac_cv_c_bigendian in #(
12414 yes)
12415 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12416;; #(
12417 no)
12418 ;; #(
12419 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012420
Matthias Kloseb9621712010-04-24 17:59:49 +000012421$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012422
Matthias Kloseb9621712010-04-24 17:59:49 +000012423 ;; #(
12424 *)
Benjamin Peterson79263252010-10-31 16:50:44 +000012425 as_fn_error "unknown endianness
12426 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000012427 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000012428
Michael W. Hudson54241132001-12-07 15:38:26 +000012429
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012430# ABI version string for Python extension modules. This appears between the
12431# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
12432# from the following attributes which affect the ABI of this Python build (in
12433# this order):
12434#
12435# * The Python implementation (always 'cpython-' for us)
12436# * The major and minor version numbers
12437# * --with-pydebug (adds a 'd')
12438# * --with-pymalloc (adds a 'm')
12439# * --with-wide-unicode (adds a 'u')
12440#
12441# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012442# would get a shared library ABI version tag of 'cpython-32dmu' and shared
12443# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012444
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012445{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
12446$as_echo_n "checking ABIFLAGS... " >&6; }
12447{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
12448$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012449{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
12450$as_echo_n "checking SOABI... " >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012451SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012452{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
12453$as_echo "$SOABI" >&6; }
12454
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012455{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
12456$as_echo_n "checking LDVERSION... " >&6; }
12457LDVERSION='$(VERSION)$(ABIFLAGS)'
12458{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
12459$as_echo "$LDVERSION" >&6; }
12460
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012461# SO is the extension of shared libraries `(including the dot!)
12462# -- usually .so, .sl on HP-UX, .dll on Cygwin
12463{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SO" >&5
12464$as_echo_n "checking SO... " >&6; }
12465if test -z "$SO"
12466then
12467 case $ac_sys_system in
12468 hp*|HP*)
12469 case `uname -m` in
12470 ia64) SO=.so;;
12471 *) SO=.sl;;
12472 esac
12473 ;;
12474 CYGWIN*) SO=.dll;;
Barry Warsaw278266f2010-10-14 17:38:46 +000012475 Linux*|GNU*)
12476 SO=.${SOABI}.so;;
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012477 *) SO=.so;;
12478 esac
12479else
12480 # this might also be a termcap variable, see #610332
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012481 echo
12482 echo '====================================================================='
12483 echo '+ +'
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012484 echo '+ WARNING: You have set SO in your environment. +'
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012485 echo '+ Do you really mean to change the extension for shared libraries? +'
12486 echo '+ Continuing in 10 seconds to let you to ponder. +'
12487 echo '+ +'
12488 echo '====================================================================='
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012489 sleep 10
12490fi
12491{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SO" >&5
12492$as_echo "$SO" >&6; }
12493
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012494# Check whether right shifting a negative integer extends the sign bit
12495# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000012496{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
12497$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
12498if test "${ac_cv_rshift_extends_sign+set}" = set; then :
12499 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000012500else
Martin v. Löwis11437992002-04-12 09:54:03 +000012501
Matthias Kloseb9621712010-04-24 17:59:49 +000012502if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000012503 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012504else
Matthias Kloseb9621712010-04-24 17:59:49 +000012505 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012506/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012507
12508int main()
12509{
Vladimir Marangozova6180282000-07-12 05:05:06 +000012510 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012511}
12512
Martin v. Löwis11437992002-04-12 09:54:03 +000012513_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012514if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000012515 ac_cv_rshift_extends_sign=yes
12516else
Matthias Kloseb9621712010-04-24 17:59:49 +000012517 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000012518fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012519rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12520 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000012521fi
12522
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012523fi
12524
Matthias Kloseb9621712010-04-24 17:59:49 +000012525{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
12526$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000012527if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012528then
Martin v. Löwis11437992002-04-12 09:54:03 +000012529
Matthias Kloseb9621712010-04-24 17:59:49 +000012530$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012531
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012532fi
12533
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012534# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000012535{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
12536$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
12537if test "${ac_cv_have_getc_unlocked+set}" = set; then :
12538 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012539else
Martin v. Löwis11437992002-04-12 09:54:03 +000012540
Matthias Kloseb9621712010-04-24 17:59:49 +000012541cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012542/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012543#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012544int
12545main ()
12546{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012547
12548 FILE *f = fopen("/dev/null", "r");
12549 flockfile(f);
12550 getc_unlocked(f);
12551 funlockfile(f);
12552
Martin v. Löwis11437992002-04-12 09:54:03 +000012553 ;
12554 return 0;
12555}
12556_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012557if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012558 ac_cv_have_getc_unlocked=yes
12559else
Matthias Kloseb9621712010-04-24 17:59:49 +000012560 ac_cv_have_getc_unlocked=no
12561fi
12562rm -f core conftest.err conftest.$ac_objext \
12563 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012564fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012565
Matthias Kloseb9621712010-04-24 17:59:49 +000012566{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
12567$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012568if test "$ac_cv_have_getc_unlocked" = yes
12569then
Martin v. Löwis11437992002-04-12 09:54:03 +000012570
Matthias Kloseb9621712010-04-24 17:59:49 +000012571$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012572
12573fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012574
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012575# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000012576# save the value of LIBS so we don't actually link Python with readline
12577LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012578
Gregory P. Smith18820942008-09-07 06:24:49 +000012579# On some systems we need to link readline to a termcap compatible
12580# library. NOTE: Keep the precedence of listed libraries synchronised
12581# with setup.py.
12582py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012583{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
12584$as_echo_n "checking how to link readline libs... " >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012585for py_libtermcap in "" ncursesw ncurses curses termcap; do
12586 if test -z "$py_libtermcap"; then
12587 READLINE_LIBS="-lreadline"
12588 else
12589 READLINE_LIBS="-lreadline -l$py_libtermcap"
12590 fi
12591 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000012592 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012593/* end confdefs.h. */
12594
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012595/* Override any GCC internal prototype to avoid an error.
12596 Use char because int might match the return type of a GCC
12597 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012598#ifdef __cplusplus
12599extern "C"
12600#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012601char readline ();
12602int
12603main ()
12604{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012605return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012606 ;
12607 return 0;
12608}
12609_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012610if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000012611 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012612fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012613rm -f core conftest.err conftest.$ac_objext \
12614 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000012615 if test $py_cv_lib_readline = yes; then
12616 break
12617 fi
12618done
12619# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
12620#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000012621if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012622 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
12623$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012624else
Matthias Kloseb9621712010-04-24 17:59:49 +000012625 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
12626$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012627
Matthias Kloseb9621712010-04-24 17:59:49 +000012628$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012629
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012630fi
12631
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012632# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000012633{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
12634$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
12635if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then :
12636 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012637else
12638 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012639LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012640cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012641/* end confdefs.h. */
12642
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012643/* Override any GCC internal prototype to avoid an error.
12644 Use char because int might match the return type of a GCC
12645 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012646#ifdef __cplusplus
12647extern "C"
12648#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012649char rl_callback_handler_install ();
12650int
12651main ()
12652{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012653return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012654 ;
12655 return 0;
12656}
12657_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012658if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012659 ac_cv_lib_readline_rl_callback_handler_install=yes
12660else
Matthias Kloseb9621712010-04-24 17:59:49 +000012661 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012662fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012663rm -f core conftest.err conftest.$ac_objext \
12664 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012665LIBS=$ac_check_lib_save_LIBS
12666fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012667{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
12668$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
12669if test "x$ac_cv_lib_readline_rl_callback_handler_install" = x""yes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012670
Matthias Kloseb9621712010-04-24 17:59:49 +000012671$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012672
12673fi
12674
12675
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012676# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000012677cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012678/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012679#include <readline/readline.h>
12680_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012681if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012682 have_readline=yes
12683else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012684 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000012685
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012686fi
Benjamin Peterson79263252010-10-31 16:50:44 +000012687rm -f conftest.err conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012688if test $have_readline = yes
12689then
Matthias Kloseb9621712010-04-24 17:59:49 +000012690 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012691/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012692#include <readline/readline.h>
12693
12694_ACEOF
12695if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012696 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012697
Matthias Kloseb9621712010-04-24 17:59:49 +000012698$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012699
12700fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012701rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012702
Matthias Kloseb9621712010-04-24 17:59:49 +000012703 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000012704/* end confdefs.h. */
12705#include <readline/readline.h>
12706
12707_ACEOF
12708if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012709 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000012710
Matthias Kloseb9621712010-04-24 17:59:49 +000012711$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000012712
12713fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012714rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000012715
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012716fi
12717
Martin v. Löwis0daad592001-09-30 21:09:59 +000012718# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000012719{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
12720$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
12721if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then :
12722 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000012723else
Martin v. Löwis11437992002-04-12 09:54:03 +000012724 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012725LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012726cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012727/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012728
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012729/* Override any GCC internal prototype to avoid an error.
12730 Use char because int might match the return type of a GCC
12731 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012732#ifdef __cplusplus
12733extern "C"
12734#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012735char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012736int
12737main ()
12738{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012739return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012740 ;
12741 return 0;
12742}
12743_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012744if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012745 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000012746else
Matthias Kloseb9621712010-04-24 17:59:49 +000012747 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000012748fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012749rm -f core conftest.err conftest.$ac_objext \
12750 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012751LIBS=$ac_check_lib_save_LIBS
12752fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012753{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
12754$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
12755if test "x$ac_cv_lib_readline_rl_pre_input_hook" = x""yes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012756
Matthias Kloseb9621712010-04-24 17:59:49 +000012757$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000012758
Martin v. Löwis0daad592001-09-30 21:09:59 +000012759fi
12760
Michael W. Hudson54241132001-12-07 15:38:26 +000012761
Thomas Wouters89d996e2007-09-08 17:39:28 +000012762# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000012763{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
12764$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
12765if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then :
12766 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000012767else
12768 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012769LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012770cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000012771/* end confdefs.h. */
12772
12773/* Override any GCC internal prototype to avoid an error.
12774 Use char because int might match the return type of a GCC
12775 builtin and then its argument prototype would still apply. */
12776#ifdef __cplusplus
12777extern "C"
12778#endif
12779char rl_completion_display_matches_hook ();
12780int
12781main ()
12782{
12783return rl_completion_display_matches_hook ();
12784 ;
12785 return 0;
12786}
12787_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012788if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000012789 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
12790else
Matthias Kloseb9621712010-04-24 17:59:49 +000012791 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000012792fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012793rm -f core conftest.err conftest.$ac_objext \
12794 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000012795LIBS=$ac_check_lib_save_LIBS
12796fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012797{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
12798$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
12799if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = x""yes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000012800
Matthias Kloseb9621712010-04-24 17:59:49 +000012801$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000012802
12803fi
12804
12805
Martin v. Löwis0daad592001-09-30 21:09:59 +000012806# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000012807{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
12808$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
12809if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then :
12810 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000012811else
Martin v. Löwis11437992002-04-12 09:54:03 +000012812 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012813LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012814cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012815/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012816
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012817/* Override any GCC internal prototype to avoid an error.
12818 Use char because int might match the return type of a GCC
12819 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012820#ifdef __cplusplus
12821extern "C"
12822#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012823char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012824int
12825main ()
12826{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012827return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012828 ;
12829 return 0;
12830}
12831_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012832if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012833 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000012834else
Matthias Kloseb9621712010-04-24 17:59:49 +000012835 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000012836fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012837rm -f core conftest.err conftest.$ac_objext \
12838 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012839LIBS=$ac_check_lib_save_LIBS
12840fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012841{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
12842$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
12843if test "x$ac_cv_lib_readline_rl_completion_matches" = x""yes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012844
Matthias Kloseb9621712010-04-24 17:59:49 +000012845$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000012846
Guido van Rossum353ae582001-07-10 16:45:32 +000012847fi
12848
Jack Jansendd19cf82001-12-06 22:36:17 +000012849
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012850# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000012851cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012852/* end confdefs.h. */
12853#include <readline/readline.h>
12854_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012855if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012856 have_readline=yes
12857else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012858 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000012859
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012860fi
Benjamin Peterson79263252010-10-31 16:50:44 +000012861rm -f conftest.err conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012862if test $have_readline = yes
12863then
Matthias Kloseb9621712010-04-24 17:59:49 +000012864 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012865/* end confdefs.h. */
12866#include <readline/readline.h>
12867
12868_ACEOF
12869if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012870 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012871
Matthias Kloseb9621712010-04-24 17:59:49 +000012872$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012873
12874fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012875rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012876
12877fi
12878
Martin v. Löwis82bca632006-02-10 20:49:30 +000012879# End of readline checks: restore LIBS
12880LIBS=$LIBS_no_readline
12881
Matthias Kloseb9621712010-04-24 17:59:49 +000012882{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
12883$as_echo_n "checking for broken nice()... " >&6; }
12884if test "${ac_cv_broken_nice+set}" = set; then :
12885 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000012886else
Martin v. Löwis11437992002-04-12 09:54:03 +000012887
Matthias Kloseb9621712010-04-24 17:59:49 +000012888if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000012889 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012890else
Matthias Kloseb9621712010-04-24 17:59:49 +000012891 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012892/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012893
12894int main()
12895{
12896 int val1 = nice(1);
12897 if (val1 != -1 && val1 == nice(2))
12898 exit(0);
12899 exit(1);
12900}
12901
Martin v. Löwis11437992002-04-12 09:54:03 +000012902_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012903if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012904 ac_cv_broken_nice=yes
12905else
Matthias Kloseb9621712010-04-24 17:59:49 +000012906 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012907fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012908rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12909 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012910fi
12911
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012912fi
12913
Matthias Kloseb9621712010-04-24 17:59:49 +000012914{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
12915$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012916if test "$ac_cv_broken_nice" = yes
12917then
Martin v. Löwis11437992002-04-12 09:54:03 +000012918
Matthias Kloseb9621712010-04-24 17:59:49 +000012919$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012920
12921fi
12922
Matthias Kloseb9621712010-04-24 17:59:49 +000012923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
12924$as_echo_n "checking for broken poll()... " >&6; }
12925if test "${ac_cv_broken_poll+set}" = set; then :
12926 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012927else
Matthias Kloseb9621712010-04-24 17:59:49 +000012928 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012929 ac_cv_broken_poll=no
12930else
Matthias Kloseb9621712010-04-24 17:59:49 +000012931 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012932/* end confdefs.h. */
12933
12934#include <poll.h>
12935
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012936int main()
12937{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012938 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012939 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012940
12941 close (42);
12942
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012943 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012944 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012945 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012946 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012947 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012948 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012949 return 1;
12950}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012951
12952_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012953if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012954 ac_cv_broken_poll=yes
12955else
Matthias Kloseb9621712010-04-24 17:59:49 +000012956 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012957fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012958rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12959 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012960fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012961
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012962fi
12963
Matthias Kloseb9621712010-04-24 17:59:49 +000012964{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
12965$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012966if test "$ac_cv_broken_poll" = yes
12967then
12968
Matthias Kloseb9621712010-04-24 17:59:49 +000012969$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012970
12971fi
12972
Brett Cannon43802422005-02-10 20:48:03 +000012973# 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 +000012974# (which is not required by ISO C or UNIX spec) and/or if we support
12975# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000012976ac_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 +000012977#include <$ac_cv_struct_tm>
12978
Matthias Kloseb9621712010-04-24 17:59:49 +000012979"
12980if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then :
Brett Cannon43802422005-02-10 20:48:03 +000012981
12982cat >>confdefs.h <<_ACEOF
12983#define HAVE_STRUCT_TM_TM_ZONE 1
12984_ACEOF
12985
12986
12987fi
12988
12989if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
12990
Matthias Kloseb9621712010-04-24 17:59:49 +000012991$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000012992
12993else
Matthias Kloseb9621712010-04-24 17:59:49 +000012994 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
12995"
12996if test "x$ac_cv_have_decl_tzname" = x""yes; then :
12997 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012998else
Matthias Kloseb9621712010-04-24 17:59:49 +000012999 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013000fi
13001
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013002cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013003#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013004_ACEOF
13005
Matthias Kloseb9621712010-04-24 17:59:49 +000013006 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13007$as_echo_n "checking for tzname... " >&6; }
13008if test "${ac_cv_var_tzname+set}" = set; then :
13009 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013010else
Matthias Kloseb9621712010-04-24 17:59:49 +000013011 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013012/* end confdefs.h. */
13013#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013014#if !HAVE_DECL_TZNAME
13015extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000013016#endif
13017
13018int
13019main ()
13020{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013021return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000013022 ;
13023 return 0;
13024}
13025_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013026if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000013027 ac_cv_var_tzname=yes
13028else
Matthias Kloseb9621712010-04-24 17:59:49 +000013029 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000013030fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013031rm -f core conftest.err conftest.$ac_objext \
13032 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013033fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013034{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13035$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000013036 if test $ac_cv_var_tzname = yes; then
13037
Matthias Kloseb9621712010-04-24 17:59:49 +000013038$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013039
13040 fi
13041fi
13042
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013043
Martin v. Löwis1d459062005-03-14 21:23:33 +000013044# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000013045{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
13046$as_echo_n "checking for working tzset()... " >&6; }
13047if test "${ac_cv_working_tzset+set}" = set; then :
13048 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013049else
13050
Matthias Kloseb9621712010-04-24 17:59:49 +000013051if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013052 ac_cv_working_tzset=no
13053else
Matthias Kloseb9621712010-04-24 17:59:49 +000013054 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013055/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013056
13057#include <stdlib.h>
13058#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000013059#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000013060
13061#if HAVE_TZNAME
13062extern char *tzname[];
13063#endif
13064
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013065int main()
13066{
Brett Cannon18367812003-09-19 00:59:16 +000013067 /* Note that we need to ensure that not only does tzset(3)
13068 do 'something' with localtime, but it works as documented
13069 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000013070 This includes making sure that tzname is set properly if
13071 tm->tm_zone does not exist since it is the alternative way
13072 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000013073
13074 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000013075 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000013076 */
13077
Martin v. Löwis1d459062005-03-14 21:23:33 +000013078 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000013079 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
13080
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013081 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013082 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013083 if (localtime(&groundhogday)->tm_hour != 0)
13084 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013085#if HAVE_TZNAME
13086 /* For UTC, tzname[1] is sometimes "", sometimes " " */
13087 if (strcmp(tzname[0], "UTC") ||
13088 (tzname[1][0] != 0 && tzname[1][0] != ' '))
13089 exit(1);
13090#endif
Brett Cannon18367812003-09-19 00:59:16 +000013091
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013092 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013093 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013094 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013095 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013096#if HAVE_TZNAME
13097 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
13098 exit(1);
13099#endif
Brett Cannon18367812003-09-19 00:59:16 +000013100
13101 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
13102 tzset();
13103 if (localtime(&groundhogday)->tm_hour != 11)
13104 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013105#if HAVE_TZNAME
13106 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
13107 exit(1);
13108#endif
13109
13110#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000013111 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
13112 exit(1);
13113 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
13114 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013115#endif
Brett Cannon18367812003-09-19 00:59:16 +000013116
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013117 exit(0);
13118}
13119
13120_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013121if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013122 ac_cv_working_tzset=yes
13123else
Matthias Kloseb9621712010-04-24 17:59:49 +000013124 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013125fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013126rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13127 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013128fi
13129
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013130fi
13131
Matthias Kloseb9621712010-04-24 17:59:49 +000013132{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
13133$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013134if test "$ac_cv_working_tzset" = yes
13135then
13136
Matthias Kloseb9621712010-04-24 17:59:49 +000013137$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013138
13139fi
13140
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013141# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013142{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
13143$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
13144if test "${ac_cv_stat_tv_nsec+set}" = set; then :
13145 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013146else
Matthias Kloseb9621712010-04-24 17:59:49 +000013147 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013148/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013149#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013150int
13151main ()
13152{
13153
13154struct stat st;
13155st.st_mtim.tv_nsec = 1;
13156
13157 ;
13158 return 0;
13159}
13160_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013161if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000013162 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013163else
Matthias Kloseb9621712010-04-24 17:59:49 +000013164 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013165fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013166rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13167fi
13168
Matthias Kloseb9621712010-04-24 17:59:49 +000013169{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
13170$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013171if test "$ac_cv_stat_tv_nsec" = yes
13172then
13173
Matthias Kloseb9621712010-04-24 17:59:49 +000013174$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013175
13176fi
13177
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013178# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013179{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
13180$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
13181if test "${ac_cv_stat_tv_nsec2+set}" = set; then :
13182 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013183else
Matthias Kloseb9621712010-04-24 17:59:49 +000013184 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013185/* end confdefs.h. */
13186#include <sys/stat.h>
13187int
13188main ()
13189{
13190
13191struct stat st;
13192st.st_mtimespec.tv_nsec = 1;
13193
13194 ;
13195 return 0;
13196}
13197_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013198if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013199 ac_cv_stat_tv_nsec2=yes
13200else
Matthias Kloseb9621712010-04-24 17:59:49 +000013201 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013202fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013203rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13204fi
13205
Matthias Kloseb9621712010-04-24 17:59:49 +000013206{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
13207$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013208if test "$ac_cv_stat_tv_nsec2" = yes
13209then
13210
Matthias Kloseb9621712010-04-24 17:59:49 +000013211$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013212
13213fi
13214
Jack Jansen666b1e72001-10-31 12:11:48 +000013215# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000013216{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
13217$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
13218if test "${ac_cv_mvwdelch_is_expression+set}" = set; then :
13219 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013220else
Matthias Kloseb9621712010-04-24 17:59:49 +000013221 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013222/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013223#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013224int
13225main ()
13226{
Jack Jansen666b1e72001-10-31 12:11:48 +000013227
13228 int rtn;
13229 rtn = mvwdelch(0,0,0);
13230
Martin v. Löwis11437992002-04-12 09:54:03 +000013231 ;
13232 return 0;
13233}
13234_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013235if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013236 ac_cv_mvwdelch_is_expression=yes
13237else
Matthias Kloseb9621712010-04-24 17:59:49 +000013238 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013239fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013240rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13241fi
13242
Matthias Kloseb9621712010-04-24 17:59:49 +000013243{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
13244$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000013245
13246if test "$ac_cv_mvwdelch_is_expression" = yes
13247then
Martin v. Löwis11437992002-04-12 09:54:03 +000013248
Matthias Kloseb9621712010-04-24 17:59:49 +000013249$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013250
13251fi
13252
Matthias Kloseb9621712010-04-24 17:59:49 +000013253{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
13254$as_echo_n "checking whether WINDOW has _flags... " >&6; }
13255if test "${ac_cv_window_has_flags+set}" = set; then :
13256 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013257else
Matthias Kloseb9621712010-04-24 17:59:49 +000013258 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013259/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013260#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013261int
13262main ()
13263{
Jack Jansen666b1e72001-10-31 12:11:48 +000013264
13265 WINDOW *w;
13266 w->_flags = 0;
13267
Martin v. Löwis11437992002-04-12 09:54:03 +000013268 ;
13269 return 0;
13270}
13271_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013272if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013273 ac_cv_window_has_flags=yes
13274else
Matthias Kloseb9621712010-04-24 17:59:49 +000013275 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013276fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013277rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13278fi
13279
Matthias Kloseb9621712010-04-24 17:59:49 +000013280{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
13281$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013282
Jack Jansen666b1e72001-10-31 12:11:48 +000013283
13284if test "$ac_cv_window_has_flags" = yes
13285then
Martin v. Löwis11437992002-04-12 09:54:03 +000013286
Matthias Kloseb9621712010-04-24 17:59:49 +000013287$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013288
13289fi
13290
Matthias Kloseb9621712010-04-24 17:59:49 +000013291{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
13292$as_echo_n "checking for is_term_resized... " >&6; }
13293cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013294/* end confdefs.h. */
13295#include <curses.h>
13296int
13297main ()
13298{
13299void *x=is_term_resized
13300 ;
13301 return 0;
13302}
13303_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013304if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013305
Matthias Kloseb9621712010-04-24 17:59:49 +000013306$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013307
Matthias Kloseb159a552010-04-25 21:00:44 +000013308 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013309$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013310else
Matthias Kloseb9621712010-04-24 17:59:49 +000013311 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13312$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013313
13314fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013315rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13316
Matthias Kloseb9621712010-04-24 17:59:49 +000013317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
13318$as_echo_n "checking for resize_term... " >&6; }
13319cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013320/* end confdefs.h. */
13321#include <curses.h>
13322int
13323main ()
13324{
13325void *x=resize_term
13326 ;
13327 return 0;
13328}
13329_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013330if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013331
Matthias Kloseb9621712010-04-24 17:59:49 +000013332$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013333
Matthias Kloseb159a552010-04-25 21:00:44 +000013334 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013335$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013336else
Matthias Kloseb9621712010-04-24 17:59:49 +000013337 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13338$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013339
13340fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013341rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13342
Matthias Kloseb9621712010-04-24 17:59:49 +000013343{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
13344$as_echo_n "checking for resizeterm... " >&6; }
13345cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013346/* end confdefs.h. */
13347#include <curses.h>
13348int
13349main ()
13350{
13351void *x=resizeterm
13352 ;
13353 return 0;
13354}
13355_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013356if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013357
Matthias Kloseb9621712010-04-24 17:59:49 +000013358$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013359
Matthias Kloseb159a552010-04-25 21:00:44 +000013360 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013361$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013362else
Matthias Kloseb9621712010-04-24 17:59:49 +000013363 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13364$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013365
13366fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013367rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13368
Matthias Kloseb9621712010-04-24 17:59:49 +000013369{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
13370$as_echo_n "checking for /dev/ptmx... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013371
13372if test -r /dev/ptmx
13373then
Matthias Kloseb9621712010-04-24 17:59:49 +000013374 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13375$as_echo "yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013376
Matthias Kloseb9621712010-04-24 17:59:49 +000013377$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013378
Thomas Wouters89f507f2006-12-13 04:49:30 +000013379else
Matthias Kloseb9621712010-04-24 17:59:49 +000013380 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13381$as_echo "no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013382fi
13383
Matthias Kloseb9621712010-04-24 17:59:49 +000013384{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
13385$as_echo_n "checking for /dev/ptc... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013386
13387if test -r /dev/ptc
13388then
Matthias Kloseb9621712010-04-24 17:59:49 +000013389 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13390$as_echo "yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013391
Matthias Kloseb9621712010-04-24 17:59:49 +000013392$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000013393
Thomas Wouters89f507f2006-12-13 04:49:30 +000013394else
Matthias Kloseb9621712010-04-24 17:59:49 +000013395 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13396$as_echo "no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013397fi
13398
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013399if test "$have_long_long" = yes
13400then
Matthias Kloseb9621712010-04-24 17:59:49 +000013401 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
13402$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
13403 if test "${ac_cv_have_long_long_format+set}" = set; then :
13404 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013405else
Matthias Kloseb9621712010-04-24 17:59:49 +000013406 if test "$cross_compiling" = yes; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013407 ac_cv_have_long_long_format=no
13408else
Matthias Kloseb9621712010-04-24 17:59:49 +000013409 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013410/* end confdefs.h. */
13411
13412 #include <stdio.h>
13413 #include <stddef.h>
13414 #include <string.h>
13415
13416 #ifdef HAVE_SYS_TYPES_H
13417 #include <sys/types.h>
13418 #endif
13419
13420 int main()
13421 {
13422 char buffer[256];
13423
13424 if (sprintf(buffer, "%lld", (long long)123) < 0)
13425 return 1;
13426 if (strcmp(buffer, "123"))
13427 return 1;
13428
13429 if (sprintf(buffer, "%lld", (long long)-123) < 0)
13430 return 1;
13431 if (strcmp(buffer, "-123"))
13432 return 1;
13433
13434 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
13435 return 1;
13436 if (strcmp(buffer, "123"))
13437 return 1;
13438
13439 return 0;
13440 }
13441
13442_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013443if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013444 ac_cv_have_long_long_format=yes
13445else
Matthias Kloseb9621712010-04-24 17:59:49 +000013446 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013447fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013448rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13449 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013450fi
13451
13452
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013453fi
13454
Matthias Kloseb9621712010-04-24 17:59:49 +000013455 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
13456$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013457fi
13458
Mark Dickinson89d7d412009-12-31 20:50:59 +000013459if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013460then
13461
Matthias Kloseb9621712010-04-24 17:59:49 +000013462$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013463
13464fi
13465
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000013466if test $ac_sys_system = Darwin
13467then
13468 LIBS="$LIBS -framework CoreFoundation"
13469fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013470
Matthias Kloseb9621712010-04-24 17:59:49 +000013471{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
13472$as_echo_n "checking for %zd printf() format support... " >&6; }
13473if test "${ac_cv_have_size_t_format+set}" = set; then :
13474 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013475else
Matthias Kloseb9621712010-04-24 17:59:49 +000013476 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000013477 ac_cv_have_size_t_format="cross -- assuming yes"
13478
Thomas Wouters477c8d52006-05-27 19:21:47 +000013479else
Matthias Kloseb9621712010-04-24 17:59:49 +000013480 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000013481/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013482
Thomas Wouters477c8d52006-05-27 19:21:47 +000013483#include <stdio.h>
13484#include <stddef.h>
13485#include <string.h>
13486
Christian Heimes2c181612007-12-17 20:04:13 +000013487#ifdef HAVE_SYS_TYPES_H
13488#include <sys/types.h>
13489#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000013490
13491#ifdef HAVE_SSIZE_T
13492typedef ssize_t Py_ssize_t;
13493#elif SIZEOF_VOID_P == SIZEOF_LONG
13494typedef long Py_ssize_t;
13495#else
13496typedef int Py_ssize_t;
13497#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000013498
Christian Heimes2c181612007-12-17 20:04:13 +000013499int main()
13500{
13501 char buffer[256];
13502
Thomas Wouters477c8d52006-05-27 19:21:47 +000013503 if(sprintf(buffer, "%zd", (size_t)123) < 0)
13504 return 1;
13505
Thomas Wouters89f507f2006-12-13 04:49:30 +000013506 if (strcmp(buffer, "123"))
13507 return 1;
13508
13509 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
13510 return 1;
13511
13512 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000013513 return 1;
13514
13515 return 0;
13516}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013517
Thomas Wouters477c8d52006-05-27 19:21:47 +000013518_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013519if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013520 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013521else
Matthias Kloseb9621712010-04-24 17:59:49 +000013522 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013523fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013524rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13525 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013526fi
13527
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013528fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013529{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
13530$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000013531if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013532
Matthias Kloseb9621712010-04-24 17:59:49 +000013533$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013534
13535fi
13536
Matthias Kloseb9621712010-04-24 17:59:49 +000013537ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000013538#ifdef HAVE_SYS_TYPES_H
13539#include <sys/types.h>
13540#endif
13541#ifdef HAVE_SYS_SOCKET_H
13542#include <sys/socket.h>
13543#endif
13544
Matthias Kloseb9621712010-04-24 17:59:49 +000013545"
13546if test "x$ac_cv_type_socklen_t" = x""yes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000013547
Martin v. Löwis11437992002-04-12 09:54:03 +000013548else
Guido van Rossum95713eb2000-05-18 20:53:31 +000013549
Matthias Kloseb9621712010-04-24 17:59:49 +000013550$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000013551
13552fi
13553
Michael W. Hudson54241132001-12-07 15:38:26 +000013554
Matthias Kloseb9621712010-04-24 17:59:49 +000013555{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
13556$as_echo_n "checking for broken mbstowcs... " >&6; }
13557if test "${ac_cv_broken_mbstowcs+set}" = set; then :
13558 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013559else
Matthias Kloseb9621712010-04-24 17:59:49 +000013560 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000013561 ac_cv_broken_mbstowcs=no
13562else
Matthias Kloseb9621712010-04-24 17:59:49 +000013563 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000013564/* end confdefs.h. */
13565
13566#include<stdlib.h>
13567int main() {
13568 size_t len = -1;
13569 const char *str = "text";
13570 len = mbstowcs(NULL, str, 0);
13571 return (len != 4);
13572}
13573
13574_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013575if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000013576 ac_cv_broken_mbstowcs=no
13577else
Matthias Kloseb9621712010-04-24 17:59:49 +000013578 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000013579fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013580rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13581 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000013582fi
13583
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013584fi
13585
Matthias Kloseb9621712010-04-24 17:59:49 +000013586{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
13587$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000013588if test "$ac_cv_broken_mbstowcs" = yes
13589then
13590
Matthias Kloseb9621712010-04-24 17:59:49 +000013591$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000013592
13593fi
13594
Antoine Pitrou042b1282010-08-13 21:15:58 +000013595{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
13596$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
13597if test "${ac_cv_computed_gotos+set}" = set; then :
13598 $as_echo_n "(cached) " >&6
13599else
13600 if test "$cross_compiling" = yes; then :
13601 ac_cv_computed_gotos=no
13602else
13603 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13604/* end confdefs.h. */
13605
13606int main(int argc, char **argv)
13607{
13608 static void *targets[1] = { &&LABEL1 };
13609 goto LABEL2;
13610LABEL1:
13611 return 0;
13612LABEL2:
13613 goto *targets[0];
13614 return 1;
13615}
13616
13617_ACEOF
13618if ac_fn_c_try_run "$LINENO"; then :
13619 ac_cv_computed_gotos=yes
13620else
13621 ac_cv_computed_gotos=no
13622fi
13623rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13624 conftest.$ac_objext conftest.beam conftest.$ac_ext
13625fi
13626
13627fi
13628
13629{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
13630$as_echo "$ac_cv_computed_gotos" >&6; }
13631if test "$ac_cv_computed_gotos" = yes
13632then
13633
13634$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
13635
13636fi
13637
Antoine Pitroub52ec782009-01-25 16:34:23 +000013638# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000013639{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
13640$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013641
13642# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013643if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000013644 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000013645if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000013646then
13647
Matthias Kloseb9621712010-04-24 17:59:49 +000013648$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000013649
Matthias Kloseb9621712010-04-24 17:59:49 +000013650 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13651$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013652fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000013653if test "$withval" = no
13654then
13655
13656$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
13657
Matthias Kloseb9621712010-04-24 17:59:49 +000013658 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13659$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013660fi
13661
Antoine Pitrou042b1282010-08-13 21:15:58 +000013662else
13663 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
13664$as_echo "no value specified" >&6; }
13665fi
13666
Antoine Pitroub52ec782009-01-25 16:34:23 +000013667
Benjamin Petersond8d835b2010-10-15 23:14:46 +000013668case $ac_sys_system in
13669AIX*)
13670
13671$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
13672 ;;
13673esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000013674
Michael W. Hudson54241132001-12-07 15:38:26 +000013675
Jesus Cea6a792292010-05-03 21:18:48 +000013676case $ac_sys_system in
Benjamin Peterson79263252010-10-31 16:50:44 +000013677 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 +000013678esac
13679
13680
13681
Mark Dickinsonb2153e92010-05-05 22:31:36 +000013682
13683
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000013684for h in `(cd $srcdir;echo Python/thread_*.h)`
13685do
13686 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
13687done
13688
Michael W. Hudson54241132001-12-07 15:38:26 +000013689
Neal Norwitzd24499d2005-12-18 21:36:39 +000013690SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Kloseb9621712010-04-24 17:59:49 +000013691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
13692$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013693for dir in $SRCDIRS; do
13694 if test ! -d $dir; then
13695 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000013696 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013697done
Matthias Kloseb9621712010-04-24 17:59:49 +000013698{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
13699$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000013700
Guido van Rossum627b2d71993-12-24 10:39:16 +000013701# generate output files
Antoine Pitrou20327222009-05-24 20:39:11 +000013702ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000013703
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000013704ac_config_files="$ac_config_files Modules/ld_so_aix"
13705
Martin v. Löwis11437992002-04-12 09:54:03 +000013706cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013707# This file is a shell script that caches the results of configure
13708# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000013709# scripts and configure runs, see configure's option --config-cache.
13710# It is not useful on other systems. If it contains results you don't
13711# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013712#
Martin v. Löwis11437992002-04-12 09:54:03 +000013713# config.status only pays attention to the cache file if you give it
13714# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013715#
Skip Montanaro6dead952003-09-25 14:50:04 +000013716# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000013717# loading this file, other *unset* `ac_cv_foo' will be assigned the
13718# following values.
13719
13720_ACEOF
13721
Guido van Rossumf78abae1997-01-21 22:02:36 +000013722# The following way of writing the cache mishandles newlines in values,
13723# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013724# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013725# Ultrix sh set writes to stderr and can't be redirected directly,
13726# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013727(
13728 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
13729 eval ac_val=\$$ac_var
13730 case $ac_val in #(
13731 *${as_nl}*)
13732 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000013733 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
13734$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013735 esac
13736 case $ac_var in #(
13737 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000013738 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
13739 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013740 esac ;;
13741 esac
13742 done
13743
Martin v. Löwis11437992002-04-12 09:54:03 +000013744 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013745 case $as_nl`(ac_space=' '; set) 2>&1` in #(
13746 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000013747 # `set' does not quote correctly, so add quotes: double-quote
13748 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000013749 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013750 "s/'/'\\\\''/g;
13751 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013752 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000013753 *)
13754 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013755 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000013756 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013757 esac |
13758 sort
13759) |
Martin v. Löwis11437992002-04-12 09:54:03 +000013760 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013761 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000013762 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013763 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000013764 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
13765 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013766 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
13767 :end' >>confcache
13768if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
13769 if test -w "$cache_file"; then
13770 test "x$cache_file" != "x/dev/null" &&
Matthias Kloseb9621712010-04-24 17:59:49 +000013771 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
13772$as_echo "$as_me: updating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000013773 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013774 else
Matthias Kloseb9621712010-04-24 17:59:49 +000013775 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
13776$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013777 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013778fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013779rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000013780
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013781test "x$prefix" = xNONE && prefix=$ac_default_prefix
13782# Let make expand exec_prefix.
13783test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000013784
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013785DEFS=-DHAVE_CONFIG_H
13786
Skip Montanaro6dead952003-09-25 14:50:04 +000013787ac_libobjs=
13788ac_ltlibobjs=
13789for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
13790 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013791 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000013792 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013793 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
13794 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000013795 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
13796 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000013797done
13798LIBOBJS=$ac_libobjs
13799
13800LTLIBOBJS=$ac_ltlibobjs
13801
13802
Martin v. Löwis11437992002-04-12 09:54:03 +000013803
Matthias Kloseb9621712010-04-24 17:59:49 +000013804
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013805: ${CONFIG_STATUS=./config.status}
Matthias Kloseb9621712010-04-24 17:59:49 +000013806ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000013807ac_clean_files_save=$ac_clean_files
13808ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013809{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
13810$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
13811as_write_fail=0
13812cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000013813#! $SHELL
13814# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000013815# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013816# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000013817# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000013818
Martin v. Löwis11437992002-04-12 09:54:03 +000013819debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000013820ac_cs_recheck=false
13821ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000013822
Matthias Kloseb9621712010-04-24 17:59:49 +000013823SHELL=\${CONFIG_SHELL-$SHELL}
13824export SHELL
13825_ASEOF
13826cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
13827## -------------------- ##
13828## M4sh Initialization. ##
13829## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000013830
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013831# Be more Bourne compatible
13832DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000013833if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013834 emulate sh
13835 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000013836 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000013837 # is contrary to our usage. Disable this feature.
13838 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013839 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013840else
Matthias Kloseb9621712010-04-24 17:59:49 +000013841 case `(set -o) 2>/dev/null` in #(
13842 *posix*) :
13843 set -o posix ;; #(
13844 *) :
13845 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013846esac
Michael W. Hudson54241132001-12-07 15:38:26 +000013847fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000013848
13849
Matthias Kloseb9621712010-04-24 17:59:49 +000013850as_nl='
13851'
13852export as_nl
13853# Printing a long string crashes Solaris 7 /usr/bin/printf.
13854as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
13855as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
13856as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
13857# Prefer a ksh shell builtin over an external printf program on Solaris,
13858# but without wasting forks for bash or zsh.
13859if test -z "$BASH_VERSION$ZSH_VERSION" \
13860 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
13861 as_echo='print -r --'
13862 as_echo_n='print -rn --'
13863elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
13864 as_echo='printf %s\n'
13865 as_echo_n='printf %s'
13866else
13867 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
13868 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
13869 as_echo_n='/usr/ucb/echo -n'
13870 else
13871 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
13872 as_echo_n_body='eval
13873 arg=$1;
13874 case $arg in #(
13875 *"$as_nl"*)
13876 expr "X$arg" : "X\\(.*\\)$as_nl";
13877 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
13878 esac;
13879 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
13880 '
13881 export as_echo_n_body
13882 as_echo_n='sh -c $as_echo_n_body as_echo'
13883 fi
13884 export as_echo_body
13885 as_echo='sh -c $as_echo_body as_echo'
13886fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013887
13888# The user is always right.
13889if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013890 PATH_SEPARATOR=:
13891 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
13892 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
13893 PATH_SEPARATOR=';'
13894 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013895fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013896
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013897
13898# IFS
13899# We need space, tab and new line, in precisely that order. Quoting is
13900# there to prevent editors from complaining about space-tab.
13901# (If _AS_PATH_WALK were called with IFS unset, it would disable word
13902# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013903IFS=" "" $as_nl"
13904
13905# Find who we are. Look in the path if we contain no directory separator.
Matthias Kloseb9621712010-04-24 17:59:49 +000013906case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013907 *[\\/]* ) as_myself=$0 ;;
13908 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000013909for as_dir in $PATH
13910do
13911 IFS=$as_save_IFS
13912 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000013913 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
13914 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013915IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000013916
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013917 ;;
13918esac
13919# We did not find ourselves, most probably we were run as `sh COMMAND'
13920# in which case we are not to be found in the path.
13921if test "x$as_myself" = x; then
13922 as_myself=$0
13923fi
13924if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013925 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
13926 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013927fi
13928
Matthias Kloseb9621712010-04-24 17:59:49 +000013929# Unset variables that we do not need and which cause bugs (e.g. in
13930# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
13931# suppresses any "Segmentation fault" message there. '((' could
13932# trigger a bug in pdksh 5.2.14.
13933for as_var in BASH_ENV ENV MAIL MAILPATH
13934do eval test x\${$as_var+set} = xset \
13935 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013936done
13937PS1='$ '
13938PS2='> '
13939PS4='+ '
13940
13941# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000013942LC_ALL=C
13943export LC_ALL
13944LANGUAGE=C
13945export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013946
Matthias Kloseb9621712010-04-24 17:59:49 +000013947# CDPATH.
13948(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
13949
13950
Benjamin Peterson79263252010-10-31 16:50:44 +000013951# as_fn_error ERROR [LINENO LOG_FD]
13952# ---------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000013953# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
13954# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Benjamin Peterson79263252010-10-31 16:50:44 +000013955# script with status $?, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000013956as_fn_error ()
13957{
Benjamin Peterson79263252010-10-31 16:50:44 +000013958 as_status=$?; test $as_status -eq 0 && as_status=1
13959 if test "$3"; then
13960 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
13961 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
Matthias Kloseb9621712010-04-24 17:59:49 +000013962 fi
Benjamin Peterson79263252010-10-31 16:50:44 +000013963 $as_echo "$as_me: error: $1" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000013964 as_fn_exit $as_status
13965} # as_fn_error
13966
13967
13968# as_fn_set_status STATUS
13969# -----------------------
13970# Set $? to STATUS, without forking.
13971as_fn_set_status ()
13972{
13973 return $1
13974} # as_fn_set_status
13975
13976# as_fn_exit STATUS
13977# -----------------
13978# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
13979as_fn_exit ()
13980{
13981 set +e
13982 as_fn_set_status $1
13983 exit $1
13984} # as_fn_exit
13985
13986# as_fn_unset VAR
13987# ---------------
13988# Portably unset VAR.
13989as_fn_unset ()
13990{
13991 { eval $1=; unset $1;}
13992}
13993as_unset=as_fn_unset
13994# as_fn_append VAR VALUE
13995# ----------------------
13996# Append the text in VALUE to the end of the definition contained in VAR. Take
13997# advantage of any shell optimizations that allow amortized linear growth over
13998# repeated appends, instead of the typical quadratic growth present in naive
13999# implementations.
14000if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
14001 eval 'as_fn_append ()
14002 {
14003 eval $1+=\$2
14004 }'
14005else
14006 as_fn_append ()
14007 {
14008 eval $1=\$$1\$2
14009 }
14010fi # as_fn_append
14011
14012# as_fn_arith ARG...
14013# ------------------
14014# Perform arithmetic evaluation on the ARGs, and store the result in the
14015# global $as_val. Take advantage of shells that can avoid forks. The arguments
14016# must be portable across $(()) and expr.
14017if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
14018 eval 'as_fn_arith ()
14019 {
14020 as_val=$(( $* ))
14021 }'
14022else
14023 as_fn_arith ()
14024 {
14025 as_val=`expr "$@" || test $? -eq 1`
14026 }
14027fi # as_fn_arith
14028
14029
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014030if expr a : '\(a\)' >/dev/null 2>&1 &&
14031 test "X`expr 00001 : '.*\(...\)'`" = X001; then
14032 as_expr=expr
14033else
14034 as_expr=false
14035fi
14036
14037if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
14038 as_basename=basename
14039else
14040 as_basename=false
14041fi
14042
Matthias Kloseb9621712010-04-24 17:59:49 +000014043if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
14044 as_dirname=dirname
14045else
14046 as_dirname=false
14047fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014048
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014049as_me=`$as_basename -- "$0" ||
14050$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
14051 X"$0" : 'X\(//\)$' \| \
14052 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014053$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014054 sed '/^.*\/\([^/][^/]*\)\/*$/{
14055 s//\1/
14056 q
14057 }
14058 /^X\/\(\/\/\)$/{
14059 s//\1/
14060 q
14061 }
14062 /^X\/\(\/\).*/{
14063 s//\1/
14064 q
14065 }
14066 s/.*/./; q'`
14067
Matthias Kloseb9621712010-04-24 17:59:49 +000014068# Avoid depending upon Character Ranges.
14069as_cr_letters='abcdefghijklmnopqrstuvwxyz'
14070as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14071as_cr_Letters=$as_cr_letters$as_cr_LETTERS
14072as_cr_digits='0123456789'
14073as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014074
14075ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000014076case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014077-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014078 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014079 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000014080 xy) ECHO_C='\c';;
14081 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
14082 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014083 esac;;
14084*)
14085 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000014086esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014087
Martin v. Löwis11437992002-04-12 09:54:03 +000014088rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014089if test -d conf$$.dir; then
14090 rm -f conf$$.dir/conf$$.file
14091else
14092 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000014093 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014094fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014095if (echo >conf$$.file) 2>/dev/null; then
14096 if ln -s conf$$.file conf$$ 2>/dev/null; then
14097 as_ln_s='ln -s'
14098 # ... but there are two gotchas:
14099 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
14100 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
14101 # In both cases, we have to default to `cp -p'.
14102 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
14103 as_ln_s='cp -p'
14104 elif ln conf$$.file conf$$ 2>/dev/null; then
14105 as_ln_s=ln
14106 else
Martin v. Löwis11437992002-04-12 09:54:03 +000014107 as_ln_s='cp -p'
Matthias Kloseb9621712010-04-24 17:59:49 +000014108 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014109else
14110 as_ln_s='cp -p'
14111fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014112rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
14113rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000014114
Matthias Kloseb9621712010-04-24 17:59:49 +000014115
14116# as_fn_mkdir_p
14117# -------------
14118# Create "$as_dir" as a directory, including parents if necessary.
14119as_fn_mkdir_p ()
14120{
14121
14122 case $as_dir in #(
14123 -*) as_dir=./$as_dir;;
14124 esac
14125 test -d "$as_dir" || eval $as_mkdir_p || {
14126 as_dirs=
14127 while :; do
14128 case $as_dir in #(
14129 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
14130 *) as_qdir=$as_dir;;
14131 esac
14132 as_dirs="'$as_qdir' $as_dirs"
14133 as_dir=`$as_dirname -- "$as_dir" ||
14134$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
14135 X"$as_dir" : 'X\(//\)[^/]' \| \
14136 X"$as_dir" : 'X\(//\)$' \| \
14137 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
14138$as_echo X"$as_dir" |
14139 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14140 s//\1/
14141 q
14142 }
14143 /^X\(\/\/\)[^/].*/{
14144 s//\1/
14145 q
14146 }
14147 /^X\(\/\/\)$/{
14148 s//\1/
14149 q
14150 }
14151 /^X\(\/\).*/{
14152 s//\1/
14153 q
14154 }
14155 s/.*/./; q'`
14156 test -d "$as_dir" && break
14157 done
14158 test -z "$as_dirs" || eval "mkdir $as_dirs"
Benjamin Peterson79263252010-10-31 16:50:44 +000014159 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000014160
14161
14162} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000014163if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014164 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000014165else
Skip Montanarof0d5f792004-08-15 14:08:23 +000014166 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000014167 as_mkdir_p=false
14168fi
14169
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014170if test -x / >/dev/null 2>&1; then
14171 as_test_x='test -x'
14172else
14173 if ls -dL / >/dev/null 2>&1; then
14174 as_ls_L_option=L
14175 else
14176 as_ls_L_option=
14177 fi
14178 as_test_x='
14179 eval sh -c '\''
14180 if test -d "$1"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014181 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014182 else
Matthias Kloseb9621712010-04-24 17:59:49 +000014183 case $1 in #(
14184 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014185 esac;
Matthias Kloseb9621712010-04-24 17:59:49 +000014186 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014187 ???[sx]*):;;*)false;;esac;fi
14188 '\'' sh
14189 '
14190fi
14191as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000014192
14193# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014194as_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 +000014195
14196# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014197as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014198
14199
Martin v. Löwis11437992002-04-12 09:54:03 +000014200exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000014201## ----------------------------------- ##
14202## Main body of $CONFIG_STATUS script. ##
14203## ----------------------------------- ##
14204_ASEOF
14205test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014206
Matthias Kloseb9621712010-04-24 17:59:49 +000014207cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14208# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000014209# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014210# values after options handling.
14211ac_log="
Benjamin Peterson46ea4f72009-06-27 21:40:27 +000014212This file was extended by python $as_me 3.2, which was
Benjamin Peterson79263252010-10-31 16:50:44 +000014213generated by GNU Autoconf 2.65. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000014214
14215 CONFIG_FILES = $CONFIG_FILES
14216 CONFIG_HEADERS = $CONFIG_HEADERS
14217 CONFIG_LINKS = $CONFIG_LINKS
14218 CONFIG_COMMANDS = $CONFIG_COMMANDS
14219 $ $0 $@
14220
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014221on `(hostname || uname -n) 2>/dev/null | sed 1q`
14222"
14223
Martin v. Löwis11437992002-04-12 09:54:03 +000014224_ACEOF
14225
Matthias Kloseb9621712010-04-24 17:59:49 +000014226case $ac_config_files in *"
14227"*) set x $ac_config_files; shift; ac_config_files=$*;;
14228esac
14229
14230case $ac_config_headers in *"
14231"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
14232esac
14233
14234
14235cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014236# Files that config.status was made for.
Barry Warsaw278266f2010-10-14 17:38:46 +000014237config_files="$ac_config_files"
14238config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000014239
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014240_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014241
Matthias Kloseb9621712010-04-24 17:59:49 +000014242cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014243ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000014244\`$as_me' instantiates files and other configuration actions
14245from templates according to the current configuration. Unless the files
14246and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000014247
Matthias Kloseb9621712010-04-24 17:59:49 +000014248Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000014249
14250 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014251 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000014252 --config print configuration, then exit
14253 -q, --quiet, --silent
14254 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000014255 -d, --debug don't remove temporary files
14256 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000014257 --file=FILE[:TEMPLATE]
14258 instantiate the configuration file FILE
14259 --header=FILE[:TEMPLATE]
14260 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000014261
14262Configuration files:
14263$config_files
14264
14265Configuration headers:
14266$config_headers
14267
Matthias Kloseb9621712010-04-24 17:59:49 +000014268Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014269
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014270_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014271cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14272ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000014273ac_cs_version="\\
Benjamin Peterson46ea4f72009-06-27 21:40:27 +000014274python config.status 3.2
Benjamin Peterson79263252010-10-31 16:50:44 +000014275configured by $0, generated by GNU Autoconf 2.65,
Matthias Kloseb9621712010-04-24 17:59:49 +000014276 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000014277
Benjamin Peterson79263252010-10-31 16:50:44 +000014278Copyright (C) 2009 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000014279This config.status script is free software; the Free Software Foundation
14280gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014281
14282ac_pwd='$ac_pwd'
14283srcdir='$srcdir'
14284INSTALL='$INSTALL'
Matthias Kloseb9621712010-04-24 17:59:49 +000014285test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000014286_ACEOF
14287
Matthias Kloseb9621712010-04-24 17:59:49 +000014288cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14289# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000014290ac_need_defaults=:
14291while test $# != 0
14292do
14293 case $1 in
Benjamin Peterson79263252010-10-31 16:50:44 +000014294 --*=*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014295 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14296 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000014297 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000014298 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014299 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000014300 ac_option=$1
14301 ac_optarg=$2
14302 ac_shift=shift
14303 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014304 esac
14305
Skip Montanaro6dead952003-09-25 14:50:04 +000014306 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000014307 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000014308 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14309 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014310 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000014311 $as_echo "$ac_cs_version"; exit ;;
14312 --config | --confi | --conf | --con | --co | --c )
14313 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014314 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000014315 debug=: ;;
14316 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000014317 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014318 case $ac_optarg in
14319 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14320 esac
14321 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014322 ac_need_defaults=false;;
14323 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000014324 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014325 case $ac_optarg in
14326 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14327 esac
14328 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014329 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014330 --he | --h)
14331 # Conflict between --help and --header
Benjamin Peterson79263252010-10-31 16:50:44 +000014332 as_fn_error "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000014333Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014334 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000014335 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000014336 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
14337 | -silent | --silent | --silen | --sile | --sil | --si | --s)
14338 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014339
14340 # This is an error.
Benjamin Peterson79263252010-10-31 16:50:44 +000014341 -*) as_fn_error "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000014342Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014343
Matthias Kloseb9621712010-04-24 17:59:49 +000014344 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014345 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014346
14347 esac
14348 shift
14349done
14350
Skip Montanaro6dead952003-09-25 14:50:04 +000014351ac_configure_extra_args=
14352
14353if $ac_cs_silent; then
14354 exec 6>/dev/null
14355 ac_configure_extra_args="$ac_configure_extra_args --silent"
14356fi
14357
14358_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014359cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000014360if \$ac_cs_recheck; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014361 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
14362 shift
14363 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
14364 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014365 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000014366 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000014367fi
14368
Martin v. Löwis11437992002-04-12 09:54:03 +000014369_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014370cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014371exec 5>>config.log
14372{
14373 echo
14374 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
14375## Running $as_me. ##
14376_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000014377 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014378} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014379
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014380_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014381cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014382_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014383
Matthias Kloseb9621712010-04-24 17:59:49 +000014384cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014385
14386# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000014387for ac_config_target in $ac_config_targets
14388do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014389 case $ac_config_target in
14390 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
14391 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
14392 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014393 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
14394 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014395 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
14396 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000014397 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000014398 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014399
Benjamin Peterson79263252010-10-31 16:50:44 +000014400 *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014401 esac
14402done
14403
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014404
Martin v. Löwis11437992002-04-12 09:54:03 +000014405# If the user did not use the arguments to specify the items to instantiate,
14406# then the envvar interface is used. Set only those that are not.
14407# We use the long form for the default assignment because of an extremely
14408# bizarre bug on SunOS 4.1.3.
14409if $ac_need_defaults; then
14410 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
14411 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
14412fi
14413
Skip Montanaro6dead952003-09-25 14:50:04 +000014414# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014415# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000014416# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014417# Hook for its removal unless debugging.
14418# Note that there is a small window in which the directory will not be cleaned:
14419# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000014420$debug ||
14421{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014422 tmp=
14423 trap 'exit_status=$?
14424 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
14425' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000014426 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000014427}
Martin v. Löwis11437992002-04-12 09:54:03 +000014428# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000014429
Martin v. Löwis11437992002-04-12 09:54:03 +000014430{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014431 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000014432 test -n "$tmp" && test -d "$tmp"
14433} ||
14434{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014435 tmp=./conf$$-$RANDOM
14436 (umask 077 && mkdir "$tmp")
Benjamin Peterson79263252010-10-31 16:50:44 +000014437} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000014438
Matthias Kloseb9621712010-04-24 17:59:49 +000014439# Set up the scripts for CONFIG_FILES section.
14440# No need to generate them if there are no CONFIG_FILES.
14441# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014442if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014443
Matthias Kloseb9621712010-04-24 17:59:49 +000014444
14445ac_cr=`echo X | tr X '\015'`
14446# On cygwin, bash can eat \r inside `` if the user requested igncr.
14447# But we know of no other shell where ac_cr would be empty at this
14448# point, so we can use a bashism as a fallback.
14449if test "x$ac_cr" = x; then
14450 eval ac_cr=\$\'\\r\'
14451fi
14452ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
14453if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Benjamin Peterson79263252010-10-31 16:50:44 +000014454 ac_cs_awk_cr='\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000014455else
14456 ac_cs_awk_cr=$ac_cr
14457fi
14458
14459echo 'BEGIN {' >"$tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000014460_ACEOF
14461
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014462
Matthias Kloseb9621712010-04-24 17:59:49 +000014463{
14464 echo "cat >conf$$subs.awk <<_ACEOF" &&
14465 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
14466 echo "_ACEOF"
14467} >conf$$subs.sh ||
Benjamin Peterson79263252010-10-31 16:50:44 +000014468 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
14469ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014470ac_delim='%!_!# '
14471for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000014472 . ./conf$$subs.sh ||
Benjamin Peterson79263252010-10-31 16:50:44 +000014473 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014474
Matthias Kloseb9621712010-04-24 17:59:49 +000014475 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
14476 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014477 break
14478 elif $ac_last_try; then
Benjamin Peterson79263252010-10-31 16:50:44 +000014479 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014480 else
14481 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000014482 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014483done
Matthias Kloseb9621712010-04-24 17:59:49 +000014484rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014485
Matthias Kloseb9621712010-04-24 17:59:49 +000014486cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14487cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014488_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014489sed -n '
14490h
14491s/^/S["/; s/!.*/"]=/
14492p
14493g
14494s/^[^!]*!//
14495:repl
14496t repl
14497s/'"$ac_delim"'$//
14498t delim
14499:nl
14500h
14501s/\(.\{148\}\)..*/\1/
14502t more1
14503s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
14504p
14505n
14506b repl
14507:more1
14508s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14509p
14510g
14511s/.\{148\}//
14512t nl
14513:delim
14514h
14515s/\(.\{148\}\)..*/\1/
14516t more2
14517s/["\\]/\\&/g; s/^/"/; s/$/"/
14518p
14519b
14520:more2
14521s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14522p
14523g
14524s/.\{148\}//
14525t delim
14526' <conf$$subs.awk | sed '
14527/^[^""]/{
14528 N
14529 s/\n//
14530}
14531' >>$CONFIG_STATUS || ac_write_fail=1
14532rm -f conf$$subs.awk
14533cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14534_ACAWK
14535cat >>"\$tmp/subs1.awk" <<_ACAWK &&
14536 for (key in S) S_is_set[key] = 1
14537 FS = ""
14538
14539}
14540{
14541 line = $ 0
14542 nfields = split(line, field, "@")
14543 substed = 0
14544 len = length(field[1])
14545 for (i = 2; i < nfields; i++) {
14546 key = field[i]
14547 keylen = length(key)
14548 if (S_is_set[key]) {
14549 value = S[key]
14550 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
14551 len += length(value) + length(field[++i])
14552 substed = 1
14553 } else
14554 len += 1 + keylen
14555 }
14556
14557 print line
14558}
14559
14560_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014561_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014562cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14563if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
14564 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
14565else
14566 cat
14567fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
Benjamin Peterson79263252010-10-31 16:50:44 +000014568 || as_fn_error "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014569_ACEOF
14570
Benjamin Peterson79263252010-10-31 16:50:44 +000014571# VPATH may cause trouble with some makes, so we remove $(srcdir),
14572# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014573# trailing colons and then remove the whole line if VPATH becomes empty
14574# (actually we leave an empty line to preserve line numbers).
14575if test "x$srcdir" = x.; then
Benjamin Peterson79263252010-10-31 16:50:44 +000014576 ac_vpsub='/^[ ]*VPATH[ ]*=/{
14577s/:*\$(srcdir):*/:/
14578s/:*\${srcdir}:*/:/
14579s/:*@srcdir@:*/:/
14580s/^\([^=]*=[ ]*\):*/\1/
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014581s/:*$//
14582s/^[^=]*=[ ]*$//
14583}'
14584fi
14585
Matthias Kloseb9621712010-04-24 17:59:49 +000014586cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014587fi # test -n "$CONFIG_FILES"
14588
Matthias Kloseb9621712010-04-24 17:59:49 +000014589# Set up the scripts for CONFIG_HEADERS section.
14590# No need to generate them if there are no CONFIG_HEADERS.
14591# This happens for instance with `./config.status Makefile'.
14592if test -n "$CONFIG_HEADERS"; then
14593cat >"$tmp/defines.awk" <<\_ACAWK ||
14594BEGIN {
14595_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014596
Matthias Kloseb9621712010-04-24 17:59:49 +000014597# Transform confdefs.h into an awk script `defines.awk', embedded as
14598# here-document in config.status, that substitutes the proper values into
14599# config.h.in to produce config.h.
14600
14601# Create a delimiter string that does not exist in confdefs.h, to ease
14602# handling of long lines.
14603ac_delim='%!_!# '
14604for ac_last_try in false false :; do
14605 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
14606 if test -z "$ac_t"; then
14607 break
14608 elif $ac_last_try; then
Benjamin Peterson79263252010-10-31 16:50:44 +000014609 as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000014610 else
14611 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
14612 fi
14613done
14614
14615# For the awk script, D is an array of macro values keyed by name,
14616# likewise P contains macro parameters if any. Preserve backslash
14617# newline sequences.
14618
14619ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
14620sed -n '
14621s/.\{148\}/&'"$ac_delim"'/g
14622t rset
14623:rset
14624s/^[ ]*#[ ]*define[ ][ ]*/ /
14625t def
14626d
14627:def
14628s/\\$//
14629t bsnl
14630s/["\\]/\\&/g
14631s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14632D["\1"]=" \3"/p
14633s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
14634d
14635:bsnl
14636s/["\\]/\\&/g
14637s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14638D["\1"]=" \3\\\\\\n"\\/p
14639t cont
14640s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
14641t cont
14642d
14643:cont
14644n
14645s/.\{148\}/&'"$ac_delim"'/g
14646t clear
14647:clear
14648s/\\$//
14649t bsnlc
14650s/["\\]/\\&/g; s/^/"/; s/$/"/p
14651d
14652:bsnlc
14653s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
14654b cont
14655' <confdefs.h | sed '
14656s/'"$ac_delim"'/"\\\
14657"/g' >>$CONFIG_STATUS || ac_write_fail=1
14658
14659cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14660 for (key in D) D_is_set[key] = 1
14661 FS = ""
14662}
14663/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
14664 line = \$ 0
14665 split(line, arg, " ")
14666 if (arg[1] == "#") {
14667 defundef = arg[2]
14668 mac1 = arg[3]
14669 } else {
14670 defundef = substr(arg[1], 2)
14671 mac1 = arg[2]
14672 }
14673 split(mac1, mac2, "(") #)
14674 macro = mac2[1]
14675 prefix = substr(line, 1, index(line, defundef) - 1)
14676 if (D_is_set[macro]) {
14677 # Preserve the white space surrounding the "#".
14678 print prefix "define", macro P[macro] D[macro]
14679 next
14680 } else {
14681 # Replace #undef with comments. This is necessary, for example,
14682 # in the case of _POSIX_SOURCE, which is predefined and required
14683 # on some systems where configure will not decide to define it.
14684 if (defundef == "undef") {
14685 print "/*", prefix defundef, macro, "*/"
14686 next
14687 }
14688 }
14689}
14690{ print }
14691_ACAWK
14692_ACEOF
14693cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Benjamin Peterson79263252010-10-31 16:50:44 +000014694 as_fn_error "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000014695fi # test -n "$CONFIG_HEADERS"
14696
14697
14698eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
14699shift
14700for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014701do
14702 case $ac_tag in
14703 :[FHLC]) ac_mode=$ac_tag; continue;;
14704 esac
14705 case $ac_mode$ac_tag in
14706 :[FHL]*:*);;
Benjamin Peterson79263252010-10-31 16:50:44 +000014707 :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014708 :[FH]-) ac_tag=-:-;;
14709 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
14710 esac
14711 ac_save_IFS=$IFS
14712 IFS=:
14713 set x $ac_tag
14714 IFS=$ac_save_IFS
14715 shift
14716 ac_file=$1
14717 shift
14718
14719 case $ac_mode in
14720 :L) ac_source=$1;;
14721 :[FH])
14722 ac_file_inputs=
14723 for ac_f
14724 do
14725 case $ac_f in
14726 -) ac_f="$tmp/stdin";;
14727 *) # Look for the file first in the build tree, then in the source tree
14728 # (if the path is not absolute). The absolute path cannot be DOS-style,
14729 # because $ac_f cannot contain `:'.
14730 test -f "$ac_f" ||
14731 case $ac_f in
14732 [\\/$]*) false;;
14733 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
14734 esac ||
Benjamin Peterson79263252010-10-31 16:50:44 +000014735 as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014736 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014737 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
14738 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014739 done
14740
14741 # Let's still pretend it is `configure' which instantiates (i.e., don't
14742 # use $as_me), people would be surprised to read:
14743 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014744 configure_input='Generated from '`
14745 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
14746 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014747 if test x"$ac_file" != x-; then
14748 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000014749 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
14750$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014751 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014752 # Neutralize special characters interpreted by sed in replacement strings.
14753 case $configure_input in #(
14754 *\&* | *\|* | *\\* )
14755 ac_sed_conf_input=`$as_echo "$configure_input" |
14756 sed 's/[\\\\&|]/\\\\&/g'`;; #(
14757 *) ac_sed_conf_input=$configure_input;;
14758 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014759
14760 case $ac_tag in
Matthias Kloseb9621712010-04-24 17:59:49 +000014761 *:-:* | *:-) cat >"$tmp/stdin" \
Benjamin Peterson79263252010-10-31 16:50:44 +000014762 || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014763 esac
14764 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014765 esac
14766
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014767 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000014768$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014769 X"$ac_file" : 'X\(//\)[^/]' \| \
14770 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014771 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014772$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014773 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14774 s//\1/
14775 q
14776 }
14777 /^X\(\/\/\)[^/].*/{
14778 s//\1/
14779 q
14780 }
14781 /^X\(\/\/\)$/{
14782 s//\1/
14783 q
14784 }
14785 /^X\(\/\).*/{
14786 s//\1/
14787 q
14788 }
14789 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000014790 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000014791 ac_builddir=.
14792
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014793case "$ac_dir" in
14794.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
14795*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014796 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014797 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000014798 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014799 case $ac_top_builddir_sub in
14800 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
14801 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
14802 esac ;;
14803esac
14804ac_abs_top_builddir=$ac_pwd
14805ac_abs_builddir=$ac_pwd$ac_dir_suffix
14806# for backward compatibility:
14807ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000014808
14809case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014810 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000014811 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014812 ac_top_srcdir=$ac_top_builddir_sub
14813 ac_abs_top_srcdir=$ac_pwd ;;
14814 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000014815 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014816 ac_top_srcdir=$srcdir
14817 ac_abs_top_srcdir=$srcdir ;;
14818 *) # Relative name.
14819 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
14820 ac_top_srcdir=$ac_top_build_prefix$srcdir
14821 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014822esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014823ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000014824
Martin v. Löwis11437992002-04-12 09:54:03 +000014825
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014826 case $ac_mode in
14827 :F)
14828 #
14829 # CONFIG_FILE
14830 #
Martin v. Löwis11437992002-04-12 09:54:03 +000014831
14832 case $INSTALL in
14833 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014834 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014835 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000014836_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014837
Matthias Kloseb9621712010-04-24 17:59:49 +000014838cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014839# If the template does not know about datarootdir, expand it.
14840# FIXME: This hack should be removed a few years after 2.60.
14841ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000014842ac_sed_dataroot='
14843/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014844 p
14845 q
14846}
14847/@datadir@/p
14848/@docdir@/p
14849/@infodir@/p
14850/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000014851/@mandir@/p'
14852case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014853*datarootdir*) ac_datarootdir_seen=yes;;
14854*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014855 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
14856$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014857_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014858cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014859 ac_datarootdir_hack='
14860 s&@datadir@&$datadir&g
14861 s&@docdir@&$docdir&g
14862 s&@infodir@&$infodir&g
14863 s&@localedir@&$localedir&g
14864 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000014865 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014866esac
14867_ACEOF
14868
14869# Neutralize VPATH when `$srcdir' = `.'.
14870# Shell code in configure.ac might set extrasub.
14871# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000014872cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14873ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000014874$extrasub
14875_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014876cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014877:t
14878/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000014879s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014880s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000014881s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014882s&@srcdir@&$ac_srcdir&;t t
14883s&@abs_srcdir@&$ac_abs_srcdir&;t t
14884s&@top_srcdir@&$ac_top_srcdir&;t t
14885s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
14886s&@builddir@&$ac_builddir&;t t
14887s&@abs_builddir@&$ac_abs_builddir&;t t
14888s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
14889s&@INSTALL@&$ac_INSTALL&;t t
14890$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000014891"
14892eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
Benjamin Peterson79263252010-10-31 16:50:44 +000014893 || as_fn_error "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014894
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014895test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
14896 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
14897 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000014898 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Benjamin Peterson79263252010-10-31 16:50:44 +000014899which seems to be undefined. Please make sure it is defined." >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014900$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Benjamin Peterson79263252010-10-31 16:50:44 +000014901which seems to be undefined. Please make sure it is defined." >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014902
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014903 rm -f "$tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000014904 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +000014905 -) cat "$tmp/out" && rm -f "$tmp/out";;
14906 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
14907 esac \
Benjamin Peterson79263252010-10-31 16:50:44 +000014908 || as_fn_error "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014909 ;;
14910 :H)
14911 #
14912 # CONFIG_HEADER
14913 #
Martin v. Löwis11437992002-04-12 09:54:03 +000014914 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014915 {
14916 $as_echo "/* $configure_input */" \
14917 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
14918 } >"$tmp/config.h" \
Benjamin Peterson79263252010-10-31 16:50:44 +000014919 || as_fn_error "could not create $ac_file" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000014920 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
14921 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
14922$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000014923 else
Matthias Kloseb9621712010-04-24 17:59:49 +000014924 rm -f "$ac_file"
14925 mv "$tmp/config.h" "$ac_file" \
Benjamin Peterson79263252010-10-31 16:50:44 +000014926 || as_fn_error "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000014927 fi
14928 else
Matthias Kloseb9621712010-04-24 17:59:49 +000014929 $as_echo "/* $configure_input */" \
14930 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
Benjamin Peterson79263252010-10-31 16:50:44 +000014931 || as_fn_error "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000014932 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014933 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000014934
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014935
14936 esac
14937
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000014938
14939 case $ac_file$ac_mode in
14940 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
14941
14942 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014943done # for ac_tag
14944
Guido van Rossum627b2d71993-12-24 10:39:16 +000014945
Matthias Kloseb9621712010-04-24 17:59:49 +000014946as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000014947_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014948ac_clean_files=$ac_clean_files_save
14949
Matthias Kloseb9621712010-04-24 17:59:49 +000014950test $ac_write_fail = 0 ||
Benjamin Peterson79263252010-10-31 16:50:44 +000014951 as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000014952
Martin v. Löwis11437992002-04-12 09:54:03 +000014953
14954# configure is writing to config.log, and then calls config.status.
14955# config.status does its own redirection, appending to config.log.
14956# Unfortunately, on DOS this fails, as config.log is still kept open
14957# by configure, so config.status won't be able to write to it; its
14958# output is simply discarded. So we exec the FD to /dev/null,
14959# effectively closing config.log, so it can be properly (re)opened and
14960# appended to by config.status. When coming back to configure, we
14961# need to make the FD available again.
14962if test "$no_create" != yes; then
14963 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000014964 ac_config_status_args=
14965 test "$silent" = yes &&
14966 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000014967 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000014968 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000014969 exec 5>>config.log
14970 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
14971 # would make configure fail if this is the last instruction.
Benjamin Peterson79263252010-10-31 16:50:44 +000014972 $ac_cs_success || as_fn_exit $?
Matthias Kloseb9621712010-04-24 17:59:49 +000014973fi
14974if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
14975 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
14976$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000014977fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000014978
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014979
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014980echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014981if test ! -f Modules/Setup
14982then
14983 cp $srcdir/Modules/Setup.dist Modules/Setup
14984fi
14985
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014986echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014987if test ! -f Modules/Setup.local
14988then
14989 echo "# Edit this file for local setup changes" >Modules/Setup.local
14990fi
14991
14992echo "creating Makefile"
14993$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
14994 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000014995 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000014996mv config.c Modules