blob: d7cffff8af8c72dfe9e4802dd067ece4e23b45e8 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Mark Dickinson18b00562010-07-19 07:35:16 +00002# From configure.in Revision: 80702 .
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Benjamin Petersonf7155a32010-06-21 16:51:22 +00004# Generated by GNU Autoconf 2.65 for python 3.1.
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#
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008#
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
Benjamin Petersonf7155a32010-06-21 16:51:22 +000010# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
11# Inc.
12#
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.
Benjamin Petersonf7155a32010-06-21 16:51:22 +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
Benjamin Petersonf7155a32010-06-21 16:51:22 +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=:
Benjamin Peterson82af01d2010-05-02 16:45:41 +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
Benjamin Petersonf7155a32010-06-21 16:51:22 +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
Benjamin Peterson82af01d2010-05-02 16:45:41 +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
Benjamin Petersonf7155a32010-06-21 16:51:22 +000046# 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
Benjamin Peterson82af01d2010-05-02 16:45:41 +000053 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;
Benjamin Petersonf7155a32010-06-21 16:51:22 +000063 case $arg in #(
Benjamin Peterson82af01d2010-05-02 16:45:41 +000064 *"$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
76
Martin v. Löwis11437992002-04-12 09:54:03 +000077# The user is always right.
78if test "${PATH_SEPARATOR+set}" != set; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +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 }
Martin v. Löwis11437992002-04-12 09:54:03 +000084fi
85
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.
Benjamin Petersonf7155a32010-06-21 16:51:22 +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=.
Benjamin Petersonf7155a32010-06-21 16:51:22 +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
Benjamin Peterson82af01d2010-05-02 16:45:41 +0000114 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
Benjamin Petersonf7155a32010-06-21 16:51:22 +0000115 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000116fi
117
Benjamin Petersonf7155a32010-06-21 16:51:22 +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.
Benjamin Peterson82af01d2010-05-02 16:45:41 +0000131LC_ALL=C
132export LC_ALL
133LANGUAGE=C
134export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000135
Benjamin Petersonf7155a32010-06-21 16:51:22 +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"
323 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
324
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
363# as_fn_error ERROR [LINENO LOG_FD]
364# ---------------------------------
365# 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
367# script with status $?, using 1 if that was 0.
368as_fn_error ()
369{
370 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
374 fi
375 $as_echo "$as_me: error: $1" >&2
376 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
Benjamin Petersonf7155a32010-06-21 16:51:22 +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 ||
Benjamin Peterson82af01d2010-05-02 16:45:41 +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
Benjamin Petersonf7155a32010-06-21 16:51:22 +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
Benjamin Petersonf7155a32010-06-21 16:51:22 +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" ||
Benjamin Petersonf7155a32010-06-21 16:51:22 +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=
Benjamin Petersonf7155a32010-06-21 16:51:22 +0000457case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000458-n*)
Benjamin Petersonf7155a32010-06-21 16:51:22 +0000459 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000460 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Benjamin Petersonf7155a32010-06-21 16:51:22 +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
Martin v. Löwis11437992002-04-12 09:54:03 +0000468
469rm -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
Benjamin Peterson82af01d2010-05-02 16:45:41 +0000474 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000475fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +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'
Benjamin Peterson82af01d2010-05-02 16:45:41 +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
Benjamin Petersonf7155a32010-06-21 16:51:22 +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
Benjamin Peterson82af01d2010-05-02 16:45:41 +0000514 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000515 else
Benjamin Petersonf7155a32010-06-21 16:51:22 +0000516 case $1 in #(
Benjamin Peterson82af01d2010-05-02 16:45:41 +0000517 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000518 esac;
Benjamin Petersonf7155a32010-06-21 16:51:22 +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
Benjamin Petersonf7155a32010-06-21 16:51:22 +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.
537# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
538# 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'
Christian Heimes70e5cab2008-12-03 18:18:23 +0000556PACKAGE_VERSION='3.1'
557PACKAGE_STRING='python 3.1'
Georg Brandle2e15612009-05-20 18:25:10 +0000558PACKAGE_BUGREPORT='http://bugs.python.org/'
Benjamin Petersonf7155a32010-06-21 16:51:22 +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
Benjamin Peterson82af01d2010-05-02 16:45:41 +0000598ac_subst_vars='LTLIBOBJS
Ronald Oussoren5644eb72009-09-20 20:10:02 +0000599SRCDIRS
Benjamin Peterson82af01d2010-05-02 16:45:41 +0000600THREADHEADERS
601LIBC
602LIBM
603HAVE_GETHOSTBYNAME
604HAVE_GETHOSTBYNAME_R
605HAVE_GETHOSTBYNAME_R_3_ARG
606HAVE_GETHOSTBYNAME_R_5_ARG
607HAVE_GETHOSTBYNAME_R_6_ARG
608LIBOBJS
609TRUE
610MACHDEP_OBJS
611DYNLOADFILE
612DLINCLDIR
613THREADOBJ
614LDLAST
615USE_THREAD_MODULE
616SIGNAL_OBJS
617USE_SIGNAL_MODULE
618SHLIBS
619CFLAGSFORSHARED
620LINKFORSHARED
621CCSHARED
622BLDSHARED
623LDSHARED
624SO
625LIBTOOL_CRUFT
626OTHER_LIBTOOL_OPT
627UNIVERSAL_ARCH_FLAGS
628BASECFLAGS
629OPT
630LN
631INSTALL_DATA
632INSTALL_SCRIPT
633INSTALL_PROGRAM
634SVNVERSION
635ARFLAGS
636AR
637RANLIB
638GNULD
639LINKCC
640RUNSHARED
641INSTSONAME
642LDLIBRARYDIR
643BLDLIBRARY
644DLLLIBRARY
645LDLIBRARY
646LIBRARY
647BUILDEXEEXT
648EGREP
649GREP
650CPP
651MAINCC
652CXX
653OBJEXT
654EXEEXT
655ac_ct_CC
656CPPFLAGS
657LDFLAGS
658CFLAGS
659CC
660EXPORT_MACOSX_DEPLOYMENT_TARGET
661CONFIGURE_MACOSX_DEPLOYMENT_TARGET
662SGI_ABI
663MACHDEP
664FRAMEWORKUNIXTOOLSPREFIX
665FRAMEWORKALTINSTALLLAST
666FRAMEWORKALTINSTALLFIRST
667FRAMEWORKINSTALLLAST
668FRAMEWORKINSTALLFIRST
669PYTHONFRAMEWORKINSTALLDIR
670PYTHONFRAMEWORKPREFIX
671PYTHONFRAMEWORKDIR
672PYTHONFRAMEWORKIDENTIFIER
673PYTHONFRAMEWORK
674LIPO_64BIT_FLAGS
675LIPO_32BIT_FLAGS
676ARCH_RUN_32BIT
677UNIVERSALSDK
678CONFIG_ARGS
679SOVERSION
680VERSION
681target_alias
682host_alias
683build_alias
684LIBS
685ECHO_T
686ECHO_N
687ECHO_C
688DEFS
689mandir
690localedir
691libdir
692psdir
693pdfdir
694dvidir
695htmldir
696infodir
697docdir
698oldincludedir
699includedir
700localstatedir
701sharedstatedir
702sysconfdir
703datadir
704datarootdir
705libexecdir
706sbindir
707bindir
708program_transform_name
709prefix
710exec_prefix
Benjamin Petersonf7155a32010-06-21 16:51:22 +0000711PACKAGE_URL
Benjamin Peterson82af01d2010-05-02 16:45:41 +0000712PACKAGE_BUGREPORT
713PACKAGE_STRING
714PACKAGE_VERSION
715PACKAGE_TARNAME
716PACKAGE_NAME
717PATH_SEPARATOR
718SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000719ac_subst_files=''
Benjamin Peterson82af01d2010-05-02 16:45:41 +0000720ac_user_opts='
721enable_option_checking
722enable_universalsdk
723with_universal_archs
724with_framework_name
725enable_framework
726with_gcc
727with_cxx_main
728with_suffix
729enable_shared
730enable_profiling
731with_pydebug
732with_libs
733with_system_ffi
734with_dbmliborder
735with_signal_module
736with_dec_threads
737with_threads
738with_thread
739with_pth
740enable_ipv6
741with_doc_strings
742with_tsc
743with_pymalloc
744with_wctype_functions
745with_fpectl
746with_libm
747with_libc
748enable_big_digits
749with_wide_unicode
750with_computed_gotos
751'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000752 ac_precious_vars='build_alias
753host_alias
754target_alias
755CC
756CFLAGS
757LDFLAGS
758LIBS
759CPPFLAGS
760CPP'
761
Guido van Rossum627b2d71993-12-24 10:39:16 +0000762
Guido van Rossum7f43da71994-08-01 12:15:30 +0000763# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000764ac_init_help=
765ac_init_version=false
Benjamin Peterson82af01d2010-05-02 16:45:41 +0000766ac_unrecognized_opts=
767ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000768# The variables have the same names as the options, with
769# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000770cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000771exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000772no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000773no_recursion=
774prefix=NONE
775program_prefix=NONE
776program_suffix=NONE
777program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000778silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000779site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000780srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000781verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000782x_includes=NONE
783x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000784
785# Installation directory options.
786# These are left unexpanded so users can "make install exec_prefix=/foo"
787# and all the variables that are supposed to be based on exec_prefix
788# by default will actually change.
789# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000790# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000791bindir='${exec_prefix}/bin'
792sbindir='${exec_prefix}/sbin'
793libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000794datarootdir='${prefix}/share'
795datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000796sysconfdir='${prefix}/etc'
797sharedstatedir='${prefix}/com'
798localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000799includedir='${prefix}/include'
800oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000801docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
802infodir='${datarootdir}/info'
803htmldir='${docdir}'
804dvidir='${docdir}'
805pdfdir='${docdir}'
806psdir='${docdir}'
807libdir='${exec_prefix}/lib'
808localedir='${datarootdir}/locale'
809mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000810
Guido van Rossum7f43da71994-08-01 12:15:30 +0000811ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000812ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000813for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000814do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000815 # If the previous option needs an argument, assign it.
816 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000817 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000818 ac_prev=
819 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000820 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000821
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000822 case $ac_option in
823 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
824 *) ac_optarg=yes ;;
825 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000826
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000827 # Accept the important Cygnus configure options, so we can diagnose typos.
828
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000829 case $ac_dashdash$ac_option in
830 --)
831 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000832
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000833 -bindir | --bindir | --bindi | --bind | --bin | --bi)
834 ac_prev=bindir ;;
835 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000836 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000837
838 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000839 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000840 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000841 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000842
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000843 -cache-file | --cache-file | --cache-fil | --cache-fi \
844 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
845 ac_prev=cache_file ;;
846 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
847 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000848 cache_file=$ac_optarg ;;
849
850 --config-cache | -C)
851 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000852
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000853 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000854 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000855 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000856 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000857
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000858 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
859 | --dataroo | --dataro | --datar)
860 ac_prev=datarootdir ;;
861 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
862 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
863 datarootdir=$ac_optarg ;;
864
Guido van Rossum7f43da71994-08-01 12:15:30 +0000865 -disable-* | --disable-*)
Benjamin Peterson82af01d2010-05-02 16:45:41 +0000866 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000867 # Reject names that are not valid shell variable names.
Benjamin Peterson82af01d2010-05-02 16:45:41 +0000868 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Benjamin Petersonf7155a32010-06-21 16:51:22 +0000869 as_fn_error "invalid feature name: $ac_useropt"
Benjamin Peterson82af01d2010-05-02 16:45:41 +0000870 ac_useropt_orig=$ac_useropt
871 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
872 case $ac_user_opts in
873 *"
874"enable_$ac_useropt"
875"*) ;;
876 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
877 ac_unrecognized_sep=', ';;
878 esac
879 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000880
881 -docdir | --docdir | --docdi | --doc | --do)
882 ac_prev=docdir ;;
883 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
884 docdir=$ac_optarg ;;
885
886 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
887 ac_prev=dvidir ;;
888 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
889 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000890
891 -enable-* | --enable-*)
Benjamin Peterson82af01d2010-05-02 16:45:41 +0000892 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000893 # Reject names that are not valid shell variable names.
Benjamin Peterson82af01d2010-05-02 16:45:41 +0000894 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Benjamin Petersonf7155a32010-06-21 16:51:22 +0000895 as_fn_error "invalid feature name: $ac_useropt"
Benjamin Peterson82af01d2010-05-02 16:45:41 +0000896 ac_useropt_orig=$ac_useropt
897 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
898 case $ac_user_opts in
899 *"
900"enable_$ac_useropt"
901"*) ;;
902 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
903 ac_unrecognized_sep=', ';;
904 esac
905 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000906
Guido van Rossum7f43da71994-08-01 12:15:30 +0000907 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
908 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
909 | --exec | --exe | --ex)
910 ac_prev=exec_prefix ;;
911 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
912 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
913 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000914 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000915
916 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000917 # Obsolete; use --with-gas.
918 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000919
Martin v. Löwis11437992002-04-12 09:54:03 +0000920 -help | --help | --hel | --he | -h)
921 ac_init_help=long ;;
922 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
923 ac_init_help=recursive ;;
924 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
925 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000926
927 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000928 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000929 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000930 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000931
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000932 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
933 ac_prev=htmldir ;;
934 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
935 | --ht=*)
936 htmldir=$ac_optarg ;;
937
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000938 -includedir | --includedir | --includedi | --included | --include \
939 | --includ | --inclu | --incl | --inc)
940 ac_prev=includedir ;;
941 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
942 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000943 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000944
945 -infodir | --infodir | --infodi | --infod | --info | --inf)
946 ac_prev=infodir ;;
947 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000948 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000949
950 -libdir | --libdir | --libdi | --libd)
951 ac_prev=libdir ;;
952 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000953 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000954
955 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
956 | --libexe | --libex | --libe)
957 ac_prev=libexecdir ;;
958 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
959 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000960 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000961
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000962 -localedir | --localedir | --localedi | --localed | --locale)
963 ac_prev=localedir ;;
964 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
965 localedir=$ac_optarg ;;
966
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000967 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000968 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000969 ac_prev=localstatedir ;;
970 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000971 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000972 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000973
974 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
975 ac_prev=mandir ;;
976 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000977 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000978
Guido van Rossum7f43da71994-08-01 12:15:30 +0000979 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000980 # Obsolete; use --without-fp.
981 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000982
983 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +0000984 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000985 no_create=yes ;;
986
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000987 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
988 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
989 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000990
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000991 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
992 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
993 | --oldin | --oldi | --old | --ol | --o)
994 ac_prev=oldincludedir ;;
995 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
996 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
997 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000998 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000999
Guido van Rossum7f43da71994-08-01 12:15:30 +00001000 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1001 ac_prev=prefix ;;
1002 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001003 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001004
1005 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1006 | --program-pre | --program-pr | --program-p)
1007 ac_prev=program_prefix ;;
1008 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1009 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001010 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001011
1012 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1013 | --program-suf | --program-su | --program-s)
1014 ac_prev=program_suffix ;;
1015 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1016 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001017 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001018
1019 -program-transform-name | --program-transform-name \
1020 | --program-transform-nam | --program-transform-na \
1021 | --program-transform-n | --program-transform- \
1022 | --program-transform | --program-transfor \
1023 | --program-transfo | --program-transf \
1024 | --program-trans | --program-tran \
1025 | --progr-tra | --program-tr | --program-t)
1026 ac_prev=program_transform_name ;;
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=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001034 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001035
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001036 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1037 ac_prev=pdfdir ;;
1038 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1039 pdfdir=$ac_optarg ;;
1040
1041 -psdir | --psdir | --psdi | --psd | --ps)
1042 ac_prev=psdir ;;
1043 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1044 psdir=$ac_optarg ;;
1045
Guido van Rossum7f43da71994-08-01 12:15:30 +00001046 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1047 | -silent | --silent | --silen | --sile | --sil)
1048 silent=yes ;;
1049
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001050 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1051 ac_prev=sbindir ;;
1052 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1053 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001054 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001055
1056 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1057 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1058 | --sharedst | --shareds | --shared | --share | --shar \
1059 | --sha | --sh)
1060 ac_prev=sharedstatedir ;;
1061 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1062 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1063 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1064 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001065 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001066
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001067 -site | --site | --sit)
1068 ac_prev=site ;;
1069 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001070 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001071
Guido van Rossum7f43da71994-08-01 12:15:30 +00001072 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1073 ac_prev=srcdir ;;
1074 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001075 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001076
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001077 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1078 | --syscon | --sysco | --sysc | --sys | --sy)
1079 ac_prev=sysconfdir ;;
1080 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1081 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001082 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001083
Guido van Rossum7f43da71994-08-01 12:15:30 +00001084 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001085 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001086 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001087 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001088
1089 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1090 verbose=yes ;;
1091
Martin v. Löwis11437992002-04-12 09:54:03 +00001092 -version | --version | --versio | --versi | --vers | -V)
1093 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001094
1095 -with-* | --with-*)
Benjamin Peterson82af01d2010-05-02 16:45:41 +00001096 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001097 # Reject names that are not valid shell variable names.
Benjamin Peterson82af01d2010-05-02 16:45:41 +00001098 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Benjamin Petersonf7155a32010-06-21 16:51:22 +00001099 as_fn_error "invalid package name: $ac_useropt"
Benjamin Peterson82af01d2010-05-02 16:45:41 +00001100 ac_useropt_orig=$ac_useropt
1101 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1102 case $ac_user_opts in
1103 *"
1104"with_$ac_useropt"
1105"*) ;;
1106 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1107 ac_unrecognized_sep=', ';;
1108 esac
1109 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001110
1111 -without-* | --without-*)
Benjamin Peterson82af01d2010-05-02 16:45:41 +00001112 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001113 # Reject names that are not valid shell variable names.
Benjamin Peterson82af01d2010-05-02 16:45:41 +00001114 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Benjamin Petersonf7155a32010-06-21 16:51:22 +00001115 as_fn_error "invalid package name: $ac_useropt"
Benjamin Peterson82af01d2010-05-02 16:45:41 +00001116 ac_useropt_orig=$ac_useropt
1117 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1118 case $ac_user_opts in
1119 *"
1120"with_$ac_useropt"
1121"*) ;;
1122 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1123 ac_unrecognized_sep=', ';;
1124 esac
1125 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001126
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001127 --x)
1128 # Obsolete; use --with-x.
1129 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001130
1131 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1132 | --x-incl | --x-inc | --x-in | --x-i)
1133 ac_prev=x_includes ;;
1134 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1135 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001136 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001137
1138 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1139 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1140 ac_prev=x_libraries ;;
1141 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1142 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001143 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001144
Benjamin Petersonf7155a32010-06-21 16:51:22 +00001145 -*) as_fn_error "unrecognized option: \`$ac_option'
1146Try \`$0 --help' for more information."
Guido van Rossum7f43da71994-08-01 12:15:30 +00001147 ;;
1148
Martin v. Löwis11437992002-04-12 09:54:03 +00001149 *=*)
1150 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1151 # Reject names that are not valid shell variable names.
Benjamin Petersonf7155a32010-06-21 16:51:22 +00001152 case $ac_envvar in #(
1153 '' | [0-9]* | *[!_$as_cr_alnum]* )
1154 as_fn_error "invalid variable name: \`$ac_envvar'" ;;
1155 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001156 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001157 export $ac_envvar ;;
1158
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001159 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001160 # FIXME: should be removed in autoconf 3.0.
Benjamin Peterson82af01d2010-05-02 16:45:41 +00001161 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001162 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Benjamin Peterson82af01d2010-05-02 16:45:41 +00001163 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001164 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
Guido van Rossum7f43da71994-08-01 12:15:30 +00001165 ;;
1166
1167 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001168done
1169
Guido van Rossum7f43da71994-08-01 12:15:30 +00001170if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001171 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Benjamin Petersonf7155a32010-06-21 16:51:22 +00001172 as_fn_error "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001173fi
1174
Benjamin Peterson82af01d2010-05-02 16:45:41 +00001175if test -n "$ac_unrecognized_opts"; then
1176 case $enable_option_checking in
1177 no) ;;
Benjamin Petersonf7155a32010-06-21 16:51:22 +00001178 fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
Benjamin Peterson82af01d2010-05-02 16:45:41 +00001179 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1180 esac
1181fi
1182
1183# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001184for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1185 datadir sysconfdir sharedstatedir localstatedir includedir \
1186 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1187 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001188do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001189 eval ac_val=\$$ac_var
Benjamin Peterson82af01d2010-05-02 16:45:41 +00001190 # Remove trailing slashes.
1191 case $ac_val in
1192 */ )
1193 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1194 eval $ac_var=\$ac_val;;
1195 esac
1196 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001197 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001198 [\\/$]* | ?:[\\/]* ) continue;;
1199 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001200 esac
Benjamin Petersonf7155a32010-06-21 16:51:22 +00001201 as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001202done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001203
Martin v. Löwis11437992002-04-12 09:54:03 +00001204# There might be people who depend on the old broken behavior: `$host'
1205# used to hold the argument of --host etc.
1206# FIXME: To remove some day.
1207build=$build_alias
1208host=$host_alias
1209target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001210
Martin v. Löwis11437992002-04-12 09:54:03 +00001211# FIXME: To remove some day.
1212if test "x$host_alias" != x; then
1213 if test "x$build_alias" = x; then
1214 cross_compiling=maybe
Benjamin Peterson82af01d2010-05-02 16:45:41 +00001215 $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
Martin v. Löwis11437992002-04-12 09:54:03 +00001216 If a cross compiler is detected then cross compile mode will be used." >&2
1217 elif test "x$build_alias" != "x$host_alias"; then
1218 cross_compiling=yes
1219 fi
1220fi
1221
1222ac_tool_prefix=
1223test -n "$host_alias" && ac_tool_prefix=$host_alias-
1224
1225test "$silent" = yes && exec 6>/dev/null
1226
Guido van Rossum627b2d71993-12-24 10:39:16 +00001227
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001228ac_pwd=`pwd` && test -n "$ac_pwd" &&
1229ac_ls_di=`ls -di .` &&
1230ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Benjamin Petersonf7155a32010-06-21 16:51:22 +00001231 as_fn_error "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001232test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Benjamin Petersonf7155a32010-06-21 16:51:22 +00001233 as_fn_error "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001234
1235
Guido van Rossum627b2d71993-12-24 10:39:16 +00001236# Find the source files, if location was not specified.
1237if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001238 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001239 # Try the directory containing this script, then the parent directory.
Benjamin Peterson82af01d2010-05-02 16:45:41 +00001240 ac_confdir=`$as_dirname -- "$as_myself" ||
1241$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1242 X"$as_myself" : 'X\(//\)[^/]' \| \
1243 X"$as_myself" : 'X\(//\)$' \| \
1244 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1245$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001246 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1247 s//\1/
1248 q
1249 }
1250 /^X\(\/\/\)[^/].*/{
1251 s//\1/
1252 q
1253 }
1254 /^X\(\/\/\)$/{
1255 s//\1/
1256 q
1257 }
1258 /^X\(\/\).*/{
1259 s//\1/
1260 q
1261 }
1262 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001263 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001264 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001265 srcdir=..
1266 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001267else
1268 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001269fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001270if test ! -r "$srcdir/$ac_unique_file"; then
1271 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Benjamin Petersonf7155a32010-06-21 16:51:22 +00001272 as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001273fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001274ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1275ac_abs_confdir=`(
Benjamin Petersonf7155a32010-06-21 16:51:22 +00001276 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001277 pwd)`
1278# When building in place, set srcdir=.
1279if test "$ac_abs_confdir" = "$ac_pwd"; then
1280 srcdir=.
1281fi
1282# Remove unnecessary trailing slashes from srcdir.
1283# Double slashes in file names in object file debugging info
1284# mess up M-x gdb in Emacs.
1285case $srcdir in
1286*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1287esac
1288for ac_var in $ac_precious_vars; do
1289 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1290 eval ac_env_${ac_var}_value=\$${ac_var}
1291 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1292 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1293done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001294
Martin v. Löwis11437992002-04-12 09:54:03 +00001295#
1296# Report the --help message.
1297#
1298if test "$ac_init_help" = "long"; then
1299 # Omit some internal or obsolete options to make the list less imposing.
1300 # This message is too long to be a string in the A/UX 3.1 sh.
1301 cat <<_ACEOF
Christian Heimes70e5cab2008-12-03 18:18:23 +00001302\`configure' configures python 3.1 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001303
1304Usage: $0 [OPTION]... [VAR=VALUE]...
1305
1306To assign environment variables (e.g., CC, CFLAGS...), specify them as
1307VAR=VALUE. See below for descriptions of some of the useful variables.
1308
1309Defaults for the options are specified in brackets.
1310
1311Configuration:
1312 -h, --help display this help and exit
1313 --help=short display options specific to this package
1314 --help=recursive display the short help of all the included packages
1315 -V, --version display version information and exit
1316 -q, --quiet, --silent do not print \`checking...' messages
1317 --cache-file=FILE cache test results in FILE [disabled]
1318 -C, --config-cache alias for \`--cache-file=config.cache'
1319 -n, --no-create do not create output files
1320 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1321
Martin v. Löwis11437992002-04-12 09:54:03 +00001322Installation directories:
1323 --prefix=PREFIX install architecture-independent files in PREFIX
Benjamin Peterson82af01d2010-05-02 16:45:41 +00001324 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001325 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Benjamin Peterson82af01d2010-05-02 16:45:41 +00001326 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001327
1328By default, \`make install' will install all the files in
1329\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1330an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1331for instance \`--prefix=\$HOME'.
1332
1333For better control, use the options below.
1334
1335Fine tuning of the installation directories:
Benjamin Peterson82af01d2010-05-02 16:45:41 +00001336 --bindir=DIR user executables [EPREFIX/bin]
1337 --sbindir=DIR system admin executables [EPREFIX/sbin]
1338 --libexecdir=DIR program executables [EPREFIX/libexec]
1339 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1340 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1341 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1342 --libdir=DIR object code libraries [EPREFIX/lib]
1343 --includedir=DIR C header files [PREFIX/include]
1344 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1345 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1346 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1347 --infodir=DIR info documentation [DATAROOTDIR/info]
1348 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1349 --mandir=DIR man documentation [DATAROOTDIR/man]
1350 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1351 --htmldir=DIR html documentation [DOCDIR]
1352 --dvidir=DIR dvi documentation [DOCDIR]
1353 --pdfdir=DIR pdf documentation [DOCDIR]
1354 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001355_ACEOF
1356
1357 cat <<\_ACEOF
1358_ACEOF
1359fi
1360
1361if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001362 case $ac_init_help in
Christian Heimes70e5cab2008-12-03 18:18:23 +00001363 short | recursive ) echo "Configuration of python 3.1:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001364 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001365 cat <<\_ACEOF
1366
1367Optional Features:
Benjamin Peterson82af01d2010-05-02 16:45:41 +00001368 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001369 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1370 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001371 --enable-universalsdk[=SDKDIR]
Christian Heimes292d3512008-02-03 16:51:08 +00001372 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001373 --enable-framework[=INSTALLDIR]
1374 Build (MacOSX|Darwin) framework
1375 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001376 --enable-profiling enable C-level code profiling
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001377 --enable-ipv6 Enable ipv6 (with ipv4) support
1378 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001379 --enable-big-digits[=BITS]
Benjamin Petersonf7155a32010-06-21 16:51:22 +00001380 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001381
1382Optional Packages:
1383 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1384 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001385 --with-universal-archs=ARCH
1386 select architectures for universal build ("32-bit",
Ronald Oussoren856624d2009-09-08 07:13:53 +00001387 "64-bit", "3-way", "intel" or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001388 --with-framework-name=FRAMEWORK
1389 specify an alternate name of the framework built
1390 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001391 --without-gcc never use gcc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001392 --with-cxx-main=<compiler>
1393 compile main() and link python executable with C++
1394 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001395 --with-suffix=.exe set executable suffix
1396 --with-pydebug build with Py_DEBUG defined
1397 --with-libs='lib1 ...' link against additional libs
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001398 --with-system-ffi build _ctypes module using an installed ffi library
Matthias Klose55708cc2009-04-30 08:06:49 +00001399 --with-dbmliborder=db1:db2:...
1400 order to check db backends for dbm. Valid value is a
1401 colon separated string with the backend names
1402 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001403 --with-signal-module disable/enable signal module
1404 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1405 --with(out)-threads[=DIRECTORY]
1406 disable/enable thread support
1407 --with(out)-thread[=DIRECTORY]
1408 deprecated; use --with(out)-threads
1409 --with-pth use GNU pth threading libraries
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001410 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001411 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001412 --with(out)-pymalloc disable/enable specialized mallocs
1413 --with-wctype-functions use wctype.h functions
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001414 --with-fpectl enable SIGFPE catching
1415 --with-libm=STRING math library
1416 --with-libc=STRING C library
Georg Brandl52d168a2008-01-07 18:10:24 +00001417 --with-wide-unicode Use 4-byte Unicode characters (default is 2 bytes)
Antoine Pitroub52ec782009-01-25 16:34:23 +00001418 --with-computed-gotos Use computed gotos / threaded dispatch in evaluation
1419 loop (not available on all compilers)
Martin v. Löwis11437992002-04-12 09:54:03 +00001420
1421Some influential environment variables:
1422 CC C compiler command
1423 CFLAGS C compiler flags
1424 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1425 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001426 LIBS libraries to pass to the linker, e.g. -l<library>
Benjamin Petersonf7155a32010-06-21 16:51:22 +00001427 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001428 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001429 CPP C preprocessor
1430
1431Use these variables to override the choices made by `configure' or to help
1432it to find libraries and programs with nonstandard names/locations.
1433
Georg Brandle2e15612009-05-20 18:25:10 +00001434Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001435_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001436ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001437fi
1438
1439if test "$ac_init_help" = "recursive"; then
1440 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001441 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Benjamin Peterson82af01d2010-05-02 16:45:41 +00001442 test -d "$ac_dir" ||
1443 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1444 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001445 ac_builddir=.
1446
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001447case "$ac_dir" in
1448.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1449*)
Benjamin Peterson82af01d2010-05-02 16:45:41 +00001450 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001451 # A ".." for each directory in $ac_dir_suffix.
Benjamin Peterson82af01d2010-05-02 16:45:41 +00001452 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001453 case $ac_top_builddir_sub in
1454 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1455 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1456 esac ;;
1457esac
1458ac_abs_top_builddir=$ac_pwd
1459ac_abs_builddir=$ac_pwd$ac_dir_suffix
1460# for backward compatibility:
1461ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001462
1463case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001464 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001465 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001466 ac_top_srcdir=$ac_top_builddir_sub
1467 ac_abs_top_srcdir=$ac_pwd ;;
1468 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001469 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001470 ac_top_srcdir=$srcdir
1471 ac_abs_top_srcdir=$srcdir ;;
1472 *) # Relative name.
1473 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1474 ac_top_srcdir=$ac_top_build_prefix$srcdir
1475 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001476esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001477ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001478
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001479 cd "$ac_dir" || { ac_status=$?; continue; }
1480 # Check for guested configure.
1481 if test -f "$ac_srcdir/configure.gnu"; then
1482 echo &&
1483 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1484 elif test -f "$ac_srcdir/configure"; then
1485 echo &&
1486 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001487 else
Benjamin Peterson82af01d2010-05-02 16:45:41 +00001488 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001489 fi || ac_status=$?
1490 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001491 done
1492fi
1493
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001494test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001495if $ac_init_version; then
1496 cat <<\_ACEOF
Christian Heimes70e5cab2008-12-03 18:18:23 +00001497python configure 3.1
Benjamin Petersonf7155a32010-06-21 16:51:22 +00001498generated by GNU Autoconf 2.65
Martin v. Löwis11437992002-04-12 09:54:03 +00001499
Benjamin Petersonf7155a32010-06-21 16:51:22 +00001500Copyright (C) 2009 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001501This configure script is free software; the Free Software Foundation
1502gives unlimited permission to copy, distribute and modify it.
1503_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001504 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001505fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +00001506
1507## ------------------------ ##
1508## Autoconf initialization. ##
1509## ------------------------ ##
1510
1511# ac_fn_c_try_compile LINENO
1512# --------------------------
1513# Try to compile conftest.$ac_ext, and return whether this succeeded.
1514ac_fn_c_try_compile ()
1515{
1516 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1517 rm -f conftest.$ac_objext
1518 if { { ac_try="$ac_compile"
1519case "(($ac_try" in
1520 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1521 *) ac_try_echo=$ac_try;;
1522esac
1523eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1524$as_echo "$ac_try_echo"; } >&5
1525 (eval "$ac_compile") 2>conftest.err
1526 ac_status=$?
1527 if test -s conftest.err; then
1528 grep -v '^ *+' conftest.err >conftest.er1
1529 cat conftest.er1 >&5
1530 mv -f conftest.er1 conftest.err
1531 fi
1532 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1533 test $ac_status = 0; } && {
1534 test -z "$ac_c_werror_flag" ||
1535 test ! -s conftest.err
1536 } && test -s conftest.$ac_objext; then :
1537 ac_retval=0
1538else
1539 $as_echo "$as_me: failed program was:" >&5
1540sed 's/^/| /' conftest.$ac_ext >&5
1541
1542 ac_retval=1
1543fi
1544 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1545 as_fn_set_status $ac_retval
1546
1547} # ac_fn_c_try_compile
1548
1549# ac_fn_c_try_cpp LINENO
1550# ----------------------
1551# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1552ac_fn_c_try_cpp ()
1553{
1554 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1555 if { { ac_try="$ac_cpp conftest.$ac_ext"
1556case "(($ac_try" in
1557 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1558 *) ac_try_echo=$ac_try;;
1559esac
1560eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1561$as_echo "$ac_try_echo"; } >&5
1562 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1563 ac_status=$?
1564 if test -s conftest.err; then
1565 grep -v '^ *+' conftest.err >conftest.er1
1566 cat conftest.er1 >&5
1567 mv -f conftest.er1 conftest.err
1568 fi
1569 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1570 test $ac_status = 0; } >/dev/null && {
1571 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1572 test ! -s conftest.err
1573 }; then :
1574 ac_retval=0
1575else
1576 $as_echo "$as_me: failed program was:" >&5
1577sed 's/^/| /' conftest.$ac_ext >&5
1578
1579 ac_retval=1
1580fi
1581 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1582 as_fn_set_status $ac_retval
1583
1584} # ac_fn_c_try_cpp
1585
1586# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1587# -------------------------------------------------------
1588# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1589# the include files in INCLUDES and setting the cache variable VAR
1590# accordingly.
1591ac_fn_c_check_header_mongrel ()
1592{
1593 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1594 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1595 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1596$as_echo_n "checking for $2... " >&6; }
1597if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1598 $as_echo_n "(cached) " >&6
1599fi
1600eval ac_res=\$$3
1601 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1602$as_echo "$ac_res" >&6; }
1603else
1604 # Is the header compilable?
1605{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1606$as_echo_n "checking $2 usability... " >&6; }
1607cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1608/* end confdefs.h. */
1609$4
1610#include <$2>
1611_ACEOF
1612if ac_fn_c_try_compile "$LINENO"; then :
1613 ac_header_compiler=yes
1614else
1615 ac_header_compiler=no
1616fi
1617rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1618{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1619$as_echo "$ac_header_compiler" >&6; }
1620
1621# Is the header present?
1622{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1623$as_echo_n "checking $2 presence... " >&6; }
1624cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1625/* end confdefs.h. */
1626#include <$2>
1627_ACEOF
1628if ac_fn_c_try_cpp "$LINENO"; then :
1629 ac_header_preproc=yes
1630else
1631 ac_header_preproc=no
1632fi
1633rm -f conftest.err conftest.$ac_ext
1634{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1635$as_echo "$ac_header_preproc" >&6; }
1636
1637# So? What about this header?
1638case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1639 yes:no: )
1640 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1641$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1642 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1643$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1644 ;;
1645 no:yes:* )
1646 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1647$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1648 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1649$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1650 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1651$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1652 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1653$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&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( cat <<\_ASBOX
1657## -------------------------------------- ##
1658## Report this to http://bugs.python.org/ ##
1659## -------------------------------------- ##
1660_ASBOX
1661 ) | sed "s/^/$as_me: WARNING: /" >&2
1662 ;;
1663esac
1664 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1665$as_echo_n "checking for $2... " >&6; }
1666if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1667 $as_echo_n "(cached) " >&6
1668else
1669 eval "$3=\$ac_header_compiler"
1670fi
1671eval ac_res=\$$3
1672 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1673$as_echo "$ac_res" >&6; }
1674fi
1675 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1676
1677} # ac_fn_c_check_header_mongrel
1678
1679# ac_fn_c_try_run LINENO
1680# ----------------------
1681# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1682# that executables *can* be run.
1683ac_fn_c_try_run ()
1684{
1685 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1686 if { { ac_try="$ac_link"
1687case "(($ac_try" in
1688 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1689 *) ac_try_echo=$ac_try;;
1690esac
1691eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1692$as_echo "$ac_try_echo"; } >&5
1693 (eval "$ac_link") 2>&5
1694 ac_status=$?
1695 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1696 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1697 { { case "(($ac_try" in
1698 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1699 *) ac_try_echo=$ac_try;;
1700esac
1701eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1702$as_echo "$ac_try_echo"; } >&5
1703 (eval "$ac_try") 2>&5
1704 ac_status=$?
1705 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1706 test $ac_status = 0; }; }; then :
1707 ac_retval=0
1708else
1709 $as_echo "$as_me: program exited with status $ac_status" >&5
1710 $as_echo "$as_me: failed program was:" >&5
1711sed 's/^/| /' conftest.$ac_ext >&5
1712
1713 ac_retval=$ac_status
1714fi
1715 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1716 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1717 as_fn_set_status $ac_retval
1718
1719} # ac_fn_c_try_run
1720
1721# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1722# -------------------------------------------------------
1723# Tests whether HEADER exists and can be compiled using the include files in
1724# INCLUDES, setting the cache variable VAR accordingly.
1725ac_fn_c_check_header_compile ()
1726{
1727 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1728 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1729$as_echo_n "checking for $2... " >&6; }
1730if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1731 $as_echo_n "(cached) " >&6
1732else
1733 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1734/* end confdefs.h. */
1735$4
1736#include <$2>
1737_ACEOF
1738if ac_fn_c_try_compile "$LINENO"; then :
1739 eval "$3=yes"
1740else
1741 eval "$3=no"
1742fi
1743rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1744fi
1745eval ac_res=\$$3
1746 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1747$as_echo "$ac_res" >&6; }
1748 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1749
1750} # ac_fn_c_check_header_compile
1751
1752# ac_fn_c_try_link LINENO
1753# -----------------------
1754# Try to link conftest.$ac_ext, and return whether this succeeded.
1755ac_fn_c_try_link ()
1756{
1757 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1758 rm -f conftest.$ac_objext conftest$ac_exeext
1759 if { { ac_try="$ac_link"
1760case "(($ac_try" in
1761 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1762 *) ac_try_echo=$ac_try;;
1763esac
1764eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1765$as_echo "$ac_try_echo"; } >&5
1766 (eval "$ac_link") 2>conftest.err
1767 ac_status=$?
1768 if test -s conftest.err; then
1769 grep -v '^ *+' conftest.err >conftest.er1
1770 cat conftest.er1 >&5
1771 mv -f conftest.er1 conftest.err
1772 fi
1773 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1774 test $ac_status = 0; } && {
1775 test -z "$ac_c_werror_flag" ||
1776 test ! -s conftest.err
1777 } && test -s conftest$ac_exeext && {
1778 test "$cross_compiling" = yes ||
1779 $as_test_x conftest$ac_exeext
1780 }; then :
1781 ac_retval=0
1782else
1783 $as_echo "$as_me: failed program was:" >&5
1784sed 's/^/| /' conftest.$ac_ext >&5
1785
1786 ac_retval=1
1787fi
1788 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1789 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1790 # interfere with the next link command; also delete a directory that is
1791 # left behind by Apple's compiler. We do this before executing the actions.
1792 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1793 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1794 as_fn_set_status $ac_retval
1795
1796} # ac_fn_c_try_link
1797
1798# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1799# -------------------------------------------
1800# Tests whether TYPE exists after having included INCLUDES, setting cache
1801# variable VAR accordingly.
1802ac_fn_c_check_type ()
1803{
1804 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1805 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1806$as_echo_n "checking for $2... " >&6; }
1807if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1808 $as_echo_n "(cached) " >&6
1809else
1810 eval "$3=no"
1811 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1812/* end confdefs.h. */
1813$4
1814int
1815main ()
1816{
1817if (sizeof ($2))
1818 return 0;
1819 ;
1820 return 0;
1821}
1822_ACEOF
1823if ac_fn_c_try_compile "$LINENO"; then :
1824 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1825/* end confdefs.h. */
1826$4
1827int
1828main ()
1829{
1830if (sizeof (($2)))
1831 return 0;
1832 ;
1833 return 0;
1834}
1835_ACEOF
1836if ac_fn_c_try_compile "$LINENO"; then :
1837
1838else
1839 eval "$3=yes"
1840fi
1841rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1842fi
1843rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1844fi
1845eval ac_res=\$$3
1846 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1847$as_echo "$ac_res" >&6; }
1848 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1849
1850} # ac_fn_c_check_type
1851
1852# ac_fn_c_find_uintX_t LINENO BITS VAR
1853# ------------------------------------
1854# Finds an unsigned integer type with width BITS, setting cache variable VAR
1855# accordingly.
1856ac_fn_c_find_uintX_t ()
1857{
1858 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1859 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1860$as_echo_n "checking for uint$2_t... " >&6; }
1861if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1862 $as_echo_n "(cached) " >&6
1863else
1864 eval "$3=no"
1865 # Order is important - never check a type that is potentially smaller
1866 # than half of the expected target width.
1867 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1868 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1869 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1870/* end confdefs.h. */
1871$ac_includes_default
1872int
1873main ()
1874{
1875static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
1876test_array [0] = 0
1877
1878 ;
1879 return 0;
1880}
1881_ACEOF
1882if ac_fn_c_try_compile "$LINENO"; then :
1883 case $ac_type in #(
1884 uint$2_t) :
1885 eval "$3=yes" ;; #(
1886 *) :
1887 eval "$3=\$ac_type" ;;
1888esac
1889fi
1890rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1891 eval as_val=\$$3
1892 if test "x$as_val" = x""no; then :
1893
1894else
1895 break
1896fi
1897 done
1898fi
1899eval ac_res=\$$3
1900 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1901$as_echo "$ac_res" >&6; }
1902 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1903
1904} # ac_fn_c_find_uintX_t
1905
1906# ac_fn_c_find_intX_t LINENO BITS VAR
1907# -----------------------------------
1908# Finds a signed integer type with width BITS, setting cache variable VAR
1909# accordingly.
1910ac_fn_c_find_intX_t ()
1911{
1912 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1913 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
1914$as_echo_n "checking for int$2_t... " >&6; }
1915if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1916 $as_echo_n "(cached) " >&6
1917else
1918 eval "$3=no"
1919 # Order is important - never check a type that is potentially smaller
1920 # than half of the expected target width.
1921 for ac_type in int$2_t 'int' 'long int' \
1922 'long long int' 'short int' 'signed char'; do
1923 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1924/* end confdefs.h. */
1925$ac_includes_default
1926int
1927main ()
1928{
Mark Dickinson18b00562010-07-19 07:35:16 +00001929static int test_array [1 - 2 * !(enum { N = $2 / 2 - 1 };
1930 0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
Benjamin Petersonf7155a32010-06-21 16:51:22 +00001931test_array [0] = 0
1932
1933 ;
1934 return 0;
1935}
1936_ACEOF
1937if ac_fn_c_try_compile "$LINENO"; then :
1938 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1939/* end confdefs.h. */
1940$ac_includes_default
1941int
1942main ()
1943{
Mark Dickinson18b00562010-07-19 07:35:16 +00001944static int test_array [1 - 2 * !(enum { N = $2 / 2 - 1 };
1945 ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Benjamin Petersonf7155a32010-06-21 16:51:22 +00001946 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
1947test_array [0] = 0
1948
1949 ;
1950 return 0;
1951}
1952_ACEOF
1953if ac_fn_c_try_compile "$LINENO"; then :
1954
1955else
1956 case $ac_type in #(
1957 int$2_t) :
1958 eval "$3=yes" ;; #(
1959 *) :
1960 eval "$3=\$ac_type" ;;
1961esac
1962fi
1963rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1964fi
1965rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1966 eval as_val=\$$3
1967 if test "x$as_val" = x""no; then :
1968
1969else
1970 break
1971fi
1972 done
1973fi
1974eval ac_res=\$$3
1975 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1976$as_echo "$ac_res" >&6; }
1977 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1978
1979} # ac_fn_c_find_intX_t
1980
1981# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1982# --------------------------------------------
1983# Tries to find the compile-time value of EXPR in a program that includes
1984# INCLUDES, setting VAR accordingly. Returns whether the value could be
1985# computed
1986ac_fn_c_compute_int ()
1987{
1988 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1989 if test "$cross_compiling" = yes; then
1990 # Depending upon the size, compute the lo and hi bounds.
1991cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1992/* end confdefs.h. */
1993$4
1994int
1995main ()
1996{
1997static int test_array [1 - 2 * !(($2) >= 0)];
1998test_array [0] = 0
1999
2000 ;
2001 return 0;
2002}
2003_ACEOF
2004if ac_fn_c_try_compile "$LINENO"; then :
2005 ac_lo=0 ac_mid=0
2006 while :; do
2007 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2008/* end confdefs.h. */
2009$4
2010int
2011main ()
2012{
2013static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2014test_array [0] = 0
2015
2016 ;
2017 return 0;
2018}
2019_ACEOF
2020if ac_fn_c_try_compile "$LINENO"; then :
2021 ac_hi=$ac_mid; break
2022else
2023 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2024 if test $ac_lo -le $ac_mid; then
2025 ac_lo= ac_hi=
2026 break
2027 fi
2028 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2029fi
2030rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2031 done
2032else
2033 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2034/* end confdefs.h. */
2035$4
2036int
2037main ()
2038{
2039static int test_array [1 - 2 * !(($2) < 0)];
2040test_array [0] = 0
2041
2042 ;
2043 return 0;
2044}
2045_ACEOF
2046if ac_fn_c_try_compile "$LINENO"; then :
2047 ac_hi=-1 ac_mid=-1
2048 while :; do
2049 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2050/* end confdefs.h. */
2051$4
2052int
2053main ()
2054{
2055static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2056test_array [0] = 0
2057
2058 ;
2059 return 0;
2060}
2061_ACEOF
2062if ac_fn_c_try_compile "$LINENO"; then :
2063 ac_lo=$ac_mid; break
2064else
2065 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2066 if test $ac_mid -le $ac_hi; then
2067 ac_lo= ac_hi=
2068 break
2069 fi
2070 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2071fi
2072rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2073 done
2074else
2075 ac_lo= ac_hi=
2076fi
2077rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2078fi
2079rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2080# Binary search between lo and hi bounds.
2081while test "x$ac_lo" != "x$ac_hi"; do
2082 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2083 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2084/* end confdefs.h. */
2085$4
2086int
2087main ()
2088{
2089static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2090test_array [0] = 0
2091
2092 ;
2093 return 0;
2094}
2095_ACEOF
2096if ac_fn_c_try_compile "$LINENO"; then :
2097 ac_hi=$ac_mid
2098else
2099 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2100fi
2101rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2102done
2103case $ac_lo in #((
2104?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2105'') ac_retval=1 ;;
2106esac
2107 else
2108 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2109/* end confdefs.h. */
2110$4
2111static long int longval () { return $2; }
2112static unsigned long int ulongval () { return $2; }
2113#include <stdio.h>
2114#include <stdlib.h>
2115int
2116main ()
2117{
2118
2119 FILE *f = fopen ("conftest.val", "w");
2120 if (! f)
2121 return 1;
2122 if (($2) < 0)
2123 {
2124 long int i = longval ();
2125 if (i != ($2))
2126 return 1;
2127 fprintf (f, "%ld", i);
2128 }
2129 else
2130 {
2131 unsigned long int i = ulongval ();
2132 if (i != ($2))
2133 return 1;
2134 fprintf (f, "%lu", i);
2135 }
2136 /* Do not output a trailing newline, as this causes \r\n confusion
2137 on some platforms. */
2138 return ferror (f) || fclose (f) != 0;
2139
2140 ;
2141 return 0;
2142}
2143_ACEOF
2144if ac_fn_c_try_run "$LINENO"; then :
2145 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2146else
2147 ac_retval=1
2148fi
2149rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2150 conftest.$ac_objext conftest.beam conftest.$ac_ext
2151rm -f conftest.val
2152
2153 fi
2154 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2155 as_fn_set_status $ac_retval
2156
2157} # ac_fn_c_compute_int
2158
2159# ac_fn_c_check_func LINENO FUNC VAR
2160# ----------------------------------
2161# Tests whether FUNC exists, setting the cache variable VAR accordingly
2162ac_fn_c_check_func ()
2163{
2164 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2165 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2166$as_echo_n "checking for $2... " >&6; }
2167if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2168 $as_echo_n "(cached) " >&6
2169else
2170 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2171/* end confdefs.h. */
2172/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2173 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2174#define $2 innocuous_$2
2175
2176/* System header to define __stub macros and hopefully few prototypes,
2177 which can conflict with char $2 (); below.
2178 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2179 <limits.h> exists even on freestanding compilers. */
2180
2181#ifdef __STDC__
2182# include <limits.h>
2183#else
2184# include <assert.h>
2185#endif
2186
2187#undef $2
2188
2189/* Override any GCC internal prototype to avoid an error.
2190 Use char because int might match the return type of a GCC
2191 builtin and then its argument prototype would still apply. */
2192#ifdef __cplusplus
2193extern "C"
2194#endif
2195char $2 ();
2196/* The GNU C library defines this for functions which it implements
2197 to always fail with ENOSYS. Some functions are actually named
2198 something starting with __ and the normal name is an alias. */
2199#if defined __stub_$2 || defined __stub___$2
2200choke me
2201#endif
2202
2203int
2204main ()
2205{
2206return $2 ();
2207 ;
2208 return 0;
2209}
2210_ACEOF
2211if ac_fn_c_try_link "$LINENO"; then :
2212 eval "$3=yes"
2213else
2214 eval "$3=no"
2215fi
2216rm -f core conftest.err conftest.$ac_objext \
2217 conftest$ac_exeext conftest.$ac_ext
2218fi
2219eval ac_res=\$$3
2220 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2221$as_echo "$ac_res" >&6; }
2222 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2223
2224} # ac_fn_c_check_func
2225
2226# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2227# ----------------------------------------------------
2228# Tries to find if the field MEMBER exists in type AGGR, after including
2229# INCLUDES, setting cache variable VAR accordingly.
2230ac_fn_c_check_member ()
2231{
2232 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2233 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2234$as_echo_n "checking for $2.$3... " >&6; }
2235if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then :
2236 $as_echo_n "(cached) " >&6
2237else
2238 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2239/* end confdefs.h. */
2240$5
2241int
2242main ()
2243{
2244static $2 ac_aggr;
2245if (ac_aggr.$3)
2246return 0;
2247 ;
2248 return 0;
2249}
2250_ACEOF
2251if ac_fn_c_try_compile "$LINENO"; then :
2252 eval "$4=yes"
2253else
2254 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2255/* end confdefs.h. */
2256$5
2257int
2258main ()
2259{
2260static $2 ac_aggr;
2261if (sizeof ac_aggr.$3)
2262return 0;
2263 ;
2264 return 0;
2265}
2266_ACEOF
2267if ac_fn_c_try_compile "$LINENO"; then :
2268 eval "$4=yes"
2269else
2270 eval "$4=no"
2271fi
2272rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2273fi
2274rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2275fi
2276eval ac_res=\$$4
2277 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2278$as_echo "$ac_res" >&6; }
2279 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2280
2281} # ac_fn_c_check_member
2282
2283# ac_fn_c_check_decl LINENO SYMBOL VAR
2284# ------------------------------------
2285# Tests whether SYMBOL is declared, setting cache variable VAR accordingly.
2286ac_fn_c_check_decl ()
2287{
2288 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2289 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $2 is declared" >&5
2290$as_echo_n "checking whether $2 is declared... " >&6; }
2291if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2292 $as_echo_n "(cached) " >&6
2293else
2294 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2295/* end confdefs.h. */
2296$4
2297int
2298main ()
2299{
2300#ifndef $2
2301 (void) $2;
2302#endif
2303
2304 ;
2305 return 0;
2306}
2307_ACEOF
2308if ac_fn_c_try_compile "$LINENO"; then :
2309 eval "$3=yes"
2310else
2311 eval "$3=no"
2312fi
2313rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2314fi
2315eval ac_res=\$$3
2316 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2317$as_echo "$ac_res" >&6; }
2318 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2319
2320} # ac_fn_c_check_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002321cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002322This file contains any messages produced by compilers while
2323running configure, to aid debugging if configure makes a mistake.
2324
Christian Heimes70e5cab2008-12-03 18:18:23 +00002325It was created by python $as_me 3.1, which was
Benjamin Petersonf7155a32010-06-21 16:51:22 +00002326generated by GNU Autoconf 2.65. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002327
2328 $ $0 $@
2329
2330_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002331exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002332{
2333cat <<_ASUNAME
2334## --------- ##
2335## Platform. ##
2336## --------- ##
2337
2338hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2339uname -m = `(uname -m) 2>/dev/null || echo unknown`
2340uname -r = `(uname -r) 2>/dev/null || echo unknown`
2341uname -s = `(uname -s) 2>/dev/null || echo unknown`
2342uname -v = `(uname -v) 2>/dev/null || echo unknown`
2343
2344/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2345/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2346
2347/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2348/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2349/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002350/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002351/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2352/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2353/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2354
2355_ASUNAME
2356
2357as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2358for as_dir in $PATH
2359do
2360 IFS=$as_save_IFS
2361 test -z "$as_dir" && as_dir=.
Benjamin Petersonf7155a32010-06-21 16:51:22 +00002362 $as_echo "PATH: $as_dir"
2363 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002364IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002365
2366} >&5
2367
2368cat >&5 <<_ACEOF
2369
2370
2371## ----------- ##
2372## Core tests. ##
2373## ----------- ##
2374
2375_ACEOF
2376
2377
2378# Keep a trace of the command line.
2379# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002380# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002381# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002382# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002383ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002384ac_configure_args0=
2385ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002386ac_must_keep_next=false
2387for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002388do
Skip Montanaro6dead952003-09-25 14:50:04 +00002389 for ac_arg
2390 do
2391 case $ac_arg in
2392 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2393 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2394 | -silent | --silent | --silen | --sile | --sil)
2395 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002396 *\'*)
Benjamin Peterson82af01d2010-05-02 16:45:41 +00002397 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002398 esac
2399 case $ac_pass in
Benjamin Petersonf7155a32010-06-21 16:51:22 +00002400 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002401 2)
Benjamin Petersonf7155a32010-06-21 16:51:22 +00002402 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002403 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002404 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002405 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002406 case $ac_arg in
2407 *=* | --config-cache | -C | -disable-* | --disable-* \
2408 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2409 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2410 | -with-* | --with-* | -without-* | --without-* | --x)
2411 case "$ac_configure_args0 " in
2412 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2413 esac
2414 ;;
2415 -* ) ac_must_keep_next=true ;;
2416 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002417 fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +00002418 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002419 ;;
2420 esac
2421 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002422done
Benjamin Petersonf7155a32010-06-21 16:51:22 +00002423{ ac_configure_args0=; unset ac_configure_args0;}
2424{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002425
2426# When interrupted or exit'd, cleanup temporary files, and complete
2427# config.log. We remove comments because anyway the quotes in there
2428# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002429# WARNING: Use '\'' to represent an apostrophe within the trap.
2430# 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 +00002431trap 'exit_status=$?
2432 # Save into config.log some information that might help in debugging.
2433 {
2434 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002435
Martin v. Löwis11437992002-04-12 09:54:03 +00002436 cat <<\_ASBOX
2437## ---------------- ##
2438## Cache variables. ##
2439## ---------------- ##
2440_ASBOX
2441 echo
2442 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002443(
2444 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2445 eval ac_val=\$$ac_var
2446 case $ac_val in #(
2447 *${as_nl}*)
2448 case $ac_var in #(
Benjamin Petersonf7155a32010-06-21 16:51:22 +00002449 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00002450$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002451 esac
2452 case $ac_var in #(
2453 _ | IFS | as_nl) ;; #(
Benjamin Peterson82af01d2010-05-02 16:45:41 +00002454 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
Benjamin Petersonf7155a32010-06-21 16:51:22 +00002455 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002456 esac ;;
2457 esac
2458 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002459 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002460 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2461 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002462 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002463 "s/'\''/'\''\\\\'\'''\''/g;
2464 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2465 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002466 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002467 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002468 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002469 esac |
2470 sort
2471)
Martin v. Löwis11437992002-04-12 09:54:03 +00002472 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002473
2474 cat <<\_ASBOX
2475## ----------------- ##
2476## Output variables. ##
2477## ----------------- ##
2478_ASBOX
2479 echo
2480 for ac_var in $ac_subst_vars
2481 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002482 eval ac_val=\$$ac_var
2483 case $ac_val in
Benjamin Peterson82af01d2010-05-02 16:45:41 +00002484 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002485 esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +00002486 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002487 done | sort
2488 echo
2489
2490 if test -n "$ac_subst_files"; then
2491 cat <<\_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002492## ------------------- ##
2493## File substitutions. ##
2494## ------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002495_ASBOX
2496 echo
2497 for ac_var in $ac_subst_files
2498 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002499 eval ac_val=\$$ac_var
2500 case $ac_val in
Benjamin Peterson82af01d2010-05-02 16:45:41 +00002501 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002502 esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +00002503 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002504 done | sort
2505 echo
2506 fi
2507
Martin v. Löwis11437992002-04-12 09:54:03 +00002508 if test -s confdefs.h; then
2509 cat <<\_ASBOX
2510## ----------- ##
2511## confdefs.h. ##
2512## ----------- ##
2513_ASBOX
2514 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002515 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002516 echo
2517 fi
2518 test "$ac_signal" != 0 &&
Benjamin Peterson82af01d2010-05-02 16:45:41 +00002519 $as_echo "$as_me: caught signal $ac_signal"
2520 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002521 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002522 rm -f core *.core core.conftest.* &&
2523 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002524 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002525' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002526for ac_signal in 1 2 13 15; do
Benjamin Petersonf7155a32010-06-21 16:51:22 +00002527 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002528done
2529ac_signal=0
2530
2531# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002532rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002533
Benjamin Petersonf7155a32010-06-21 16:51:22 +00002534$as_echo "/* confdefs.h */" > confdefs.h
2535
Martin v. Löwis11437992002-04-12 09:54:03 +00002536# Predefined preprocessor variables.
2537
2538cat >>confdefs.h <<_ACEOF
2539#define PACKAGE_NAME "$PACKAGE_NAME"
2540_ACEOF
2541
Martin v. Löwis11437992002-04-12 09:54:03 +00002542cat >>confdefs.h <<_ACEOF
2543#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2544_ACEOF
2545
Martin v. Löwis11437992002-04-12 09:54:03 +00002546cat >>confdefs.h <<_ACEOF
2547#define PACKAGE_VERSION "$PACKAGE_VERSION"
2548_ACEOF
2549
Martin v. Löwis11437992002-04-12 09:54:03 +00002550cat >>confdefs.h <<_ACEOF
2551#define PACKAGE_STRING "$PACKAGE_STRING"
2552_ACEOF
2553
Martin v. Löwis11437992002-04-12 09:54:03 +00002554cat >>confdefs.h <<_ACEOF
2555#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2556_ACEOF
2557
Benjamin Petersonf7155a32010-06-21 16:51:22 +00002558cat >>confdefs.h <<_ACEOF
2559#define PACKAGE_URL "$PACKAGE_URL"
2560_ACEOF
2561
Martin v. Löwis11437992002-04-12 09:54:03 +00002562
2563# Let the site file select an alternate cache file if it wants to.
Benjamin Peterson82af01d2010-05-02 16:45:41 +00002564# Prefer an explicitly selected file to automatically selected ones.
2565ac_site_file1=NONE
2566ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002567if test -n "$CONFIG_SITE"; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +00002568 ac_site_file1=$CONFIG_SITE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002569elif test "x$prefix" != xNONE; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +00002570 ac_site_file1=$prefix/share/config.site
2571 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002572else
Benjamin Peterson82af01d2010-05-02 16:45:41 +00002573 ac_site_file1=$ac_default_prefix/share/config.site
2574 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002575fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +00002576for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002577do
Benjamin Peterson82af01d2010-05-02 16:45:41 +00002578 test "x$ac_site_file" = xNONE && continue
Benjamin Petersonf7155a32010-06-21 16:51:22 +00002579 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2580 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00002581$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002582 sed 's/^/| /' "$ac_site_file" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002583 . "$ac_site_file"
2584 fi
2585done
2586
2587if test -r "$cache_file"; then
Benjamin Petersonf7155a32010-06-21 16:51:22 +00002588 # Some versions of bash will fail to source /dev/null (special files
2589 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2590 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2591 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00002592$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002593 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002594 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2595 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002596 esac
2597 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002598else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00002599 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00002600$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002601 >$cache_file
2602fi
2603
2604# Check that the precious variables saved in the cache have kept the same
2605# value.
2606ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002607for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002608 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2609 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002610 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2611 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002612 case $ac_old_set,$ac_new_set in
2613 set,)
Benjamin Petersonf7155a32010-06-21 16:51:22 +00002614 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00002615$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 +00002616 ac_cache_corrupted=: ;;
2617 ,set)
Benjamin Petersonf7155a32010-06-21 16:51:22 +00002618 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00002619$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002620 ac_cache_corrupted=: ;;
2621 ,);;
2622 *)
2623 if test "x$ac_old_val" != "x$ac_new_val"; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +00002624 # differences in whitespace do not lead to failure.
2625 ac_old_val_w=`echo x $ac_old_val`
2626 ac_new_val_w=`echo x $ac_new_val`
2627 if test "$ac_old_val_w" != "$ac_new_val_w"; then
Benjamin Petersonf7155a32010-06-21 16:51:22 +00002628 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00002629$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2630 ac_cache_corrupted=:
2631 else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00002632 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00002633$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2634 eval $ac_var=\$ac_old_val
2635 fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +00002636 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00002637$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
Benjamin Petersonf7155a32010-06-21 16:51:22 +00002638 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00002639$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002640 fi;;
2641 esac
2642 # Pass precious variables to config.status.
2643 if test "$ac_new_set" = set; then
2644 case $ac_new_val in
Benjamin Peterson82af01d2010-05-02 16:45:41 +00002645 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002646 *) ac_arg=$ac_var=$ac_new_val ;;
2647 esac
2648 case " $ac_configure_args " in
2649 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Benjamin Petersonf7155a32010-06-21 16:51:22 +00002650 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002651 esac
2652 fi
2653done
2654if $ac_cache_corrupted; then
Benjamin Petersonf7155a32010-06-21 16:51:22 +00002655 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00002656$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Petersonf7155a32010-06-21 16:51:22 +00002657 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00002658$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Benjamin Petersonf7155a32010-06-21 16:51:22 +00002659 as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002660fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +00002661## -------------------- ##
2662## Main body of script. ##
2663## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002664
Guido van Rossum7f43da71994-08-01 12:15:30 +00002665ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002666ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002667ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2668ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2669ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002670
Guido van Rossum627b2d71993-12-24 10:39:16 +00002671
Michael W. Hudson54241132001-12-07 15:38:26 +00002672
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002673ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002674
2675
Martin v. Löwis11437992002-04-12 09:54:03 +00002676
Benjamin Petersond23f8222009-04-05 19:13:16 +00002677if test "$prefix" != "/"; then
2678 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2679fi
2680
2681
Martin v. Löwis11437992002-04-12 09:54:03 +00002682
2683
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002684# We don't use PACKAGE_ variables, and they cause conflicts
2685# with other autoconf-based packages that include Python.h
2686grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2687rm confdefs.h
2688mv confdefs.h.new confdefs.h
2689
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002690
Christian Heimes70e5cab2008-12-03 18:18:23 +00002691VERSION=3.1
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002692
Martin v. Löwis1142de32002-03-29 16:28:31 +00002693
2694SOVERSION=1.0
2695
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002696# The later defininition of _XOPEN_SOURCE disables certain features
2697# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2698
Benjamin Petersonf7155a32010-06-21 16:51:22 +00002699$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002700
2701
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002702# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2703# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2704# them.
2705
Benjamin Petersonf7155a32010-06-21 16:51:22 +00002706$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002707
2708
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002709# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2710# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2711# them.
2712
Benjamin Petersonf7155a32010-06-21 16:51:22 +00002713$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002714
2715
Martin v. Löwisd6320502004-08-12 13:45:08 +00002716# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2717# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
2718
Benjamin Petersonf7155a32010-06-21 16:51:22 +00002719$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00002720
2721
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002722# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2723# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2724# them.
2725
Benjamin Petersonf7155a32010-06-21 16:51:22 +00002726$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002727
2728
2729
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002730define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002731
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00002732# Arguments passed to configure.
2733
2734CONFIG_ARGS="$ac_configure_args"
2735
Benjamin Petersonf7155a32010-06-21 16:51:22 +00002736{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00002737$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002738# Check whether --enable-universalsdk was given.
Benjamin Petersonf7155a32010-06-21 16:51:22 +00002739if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002740 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00002741 case $enableval in
2742 yes)
2743 enableval=/Developer/SDKs/MacOSX10.4u.sdk
Ronald Oussorend5736812010-02-07 12:04:41 +00002744 if test ! -d "${enableval}"
2745 then
2746 enableval=/
2747 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002748 ;;
2749 esac
2750 case $enableval in
2751 no)
2752 UNIVERSALSDK=
2753 enable_universalsdk=
2754 ;;
2755 *)
2756 UNIVERSALSDK=$enableval
Ronald Oussorend5736812010-02-07 12:04:41 +00002757 if test ! -d "${UNIVERSALSDK}"
2758 then
Benjamin Petersonf7155a32010-06-21 16:51:22 +00002759 as_fn_error "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussorend5736812010-02-07 12:04:41 +00002760 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002761 ;;
2762 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002763
Ronald Oussorend5736812010-02-07 12:04:41 +00002764
Thomas Wouters477c8d52006-05-27 19:21:47 +00002765else
2766
2767 UNIVERSALSDK=
2768 enable_universalsdk=
2769
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002770fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002771
Ronald Oussorend5736812010-02-07 12:04:41 +00002772if test -n "${UNIVERSALSDK}"
2773then
Benjamin Petersonf7155a32010-06-21 16:51:22 +00002774 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00002775$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussorend5736812010-02-07 12:04:41 +00002776else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00002777 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00002778$as_echo "no" >&6; }
Ronald Oussorend5736812010-02-07 12:04:41 +00002779fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002780
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002781
Benjamin Peterson6794aa32008-07-16 20:33:37 +00002782
2783
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002784UNIVERSAL_ARCHS="32-bit"
Benjamin Petersone7e59c22010-03-23 21:05:56 +00002785
2786
Benjamin Petersonf7155a32010-06-21 16:51:22 +00002787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00002788$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002789
2790# Check whether --with-universal-archs was given.
Benjamin Petersonf7155a32010-06-21 16:51:22 +00002791if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002792 withval=$with_universal_archs;
Benjamin Petersonf7155a32010-06-21 16:51:22 +00002793 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00002794$as_echo "$withval" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002795 UNIVERSAL_ARCHS="$withval"
2796
2797else
2798
Benjamin Petersonf7155a32010-06-21 16:51:22 +00002799 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 32-bit" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00002800$as_echo "32-bit" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002801
2802fi
2803
2804
2805
2806
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002807
2808# Check whether --with-framework-name was given.
Benjamin Petersonf7155a32010-06-21 16:51:22 +00002809if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002810 withval=$with_framework_name;
2811 PYTHONFRAMEWORK=${withval}
2812 PYTHONFRAMEWORKDIR=${withval}.framework
2813 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
2814
2815else
2816
2817 PYTHONFRAMEWORK=Python
2818 PYTHONFRAMEWORKDIR=Python.framework
2819 PYTHONFRAMEWORKIDENTIFIER=org.python.python
2820
2821fi
2822
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002823# Check whether --enable-framework was given.
Benjamin Petersonf7155a32010-06-21 16:51:22 +00002824if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002825 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00002826 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00002827 yes)
Jack Jansene578a632001-08-15 01:27:14 +00002828 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00002829 esac
2830 case $enableval in
2831 no)
2832 PYTHONFRAMEWORK=
2833 PYTHONFRAMEWORKDIR=no-framework
2834 PYTHONFRAMEWORKPREFIX=
2835 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002836 FRAMEWORKINSTALLFIRST=
2837 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002838 FRAMEWORKALTINSTALLFIRST=
2839 FRAMEWORKALTINSTALLLAST=
2840 if test "x${prefix}" = "xNONE"; then
2841 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2842 else
2843 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2844 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00002845 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00002846 ;;
2847 *)
2848 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +00002849 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00002850 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00002851 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Benjamin Petersone7e59c22010-03-23 21:05:56 +00002852 case "${UNIVERSAL_ARCHS}" in
2853 all|3-way|intel)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002854 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps4way frameworkinstallunixtools4way"
Ronald Oussorene3918352009-03-30 18:00:28 +00002855 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps4way frameworkaltinstallunixtools4way"
Benjamin Petersone7e59c22010-03-23 21:05:56 +00002856 ;;
2857 *)
Ronald Oussorene3918352009-03-30 18:00:28 +00002858 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002859 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Benjamin Petersone7e59c22010-03-23 21:05:56 +00002860 ;;
2861 esac
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002862
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002863 if test "x${prefix}" = "xNONE" ; then
2864 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2865 else
2866 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2867 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00002868 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00002869
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002870 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00002871 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002872 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002873
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002874 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002875
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002876 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
2877
2878 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
2879
Jack Jansene578a632001-08-15 01:27:14 +00002880 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002881
Guido van Rossum563e7081996-09-10 18:20:48 +00002882else
Martin v. Löwis11437992002-04-12 09:54:03 +00002883
Jack Jansene578a632001-08-15 01:27:14 +00002884 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00002885 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00002886 PYTHONFRAMEWORKPREFIX=
2887 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002888 FRAMEWORKINSTALLFIRST=
2889 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002890 FRAMEWORKALTINSTALLFIRST=
2891 FRAMEWORKALTINSTALLLAST=
2892 if test "x${prefix}" = "xNONE" ; then
2893 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2894 else
2895 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2896 fi
Jack Jansene578a632001-08-15 01:27:14 +00002897 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002898
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002899 if test "$UNIVERSAL_ARCHS" = "all"
2900 then
2901 FRAMEWORKINSTALLLAST=update4wayuniversal
2902 FRAMEWORKALTINSTALLLAST=update4wayuniversal
2903 fi
2904
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002905fi
2906
Thomas Wouters477c8d52006-05-27 19:21:47 +00002907
2908
Michael W. Hudson54241132001-12-07 15:38:26 +00002909
2910
2911
2912
Jack Jansene578a632001-08-15 01:27:14 +00002913
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002914
2915
2916
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002917
Jack Jansene578a632001-08-15 01:27:14 +00002918##AC_ARG_WITH(dyld,
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00002919## AC_HELP_STRING(--with-dyld,
2920## Use (OpenStep|Rhapsody) dynamic linker))
Jack Jansene578a632001-08-15 01:27:14 +00002921##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002922# Set name for machine-dependent library files
2923
Benjamin Petersonf7155a32010-06-21 16:51:22 +00002924{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00002925$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002926if test -z "$MACHDEP"
2927then
Guido van Rossum563e7081996-09-10 18:20:48 +00002928 ac_sys_system=`uname -s`
Benjamin Petersona8332062009-09-11 22:36:27 +00002929 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00002930 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00002931 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002932 else
Guido van Rossum563e7081996-09-10 18:20:48 +00002933 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002934 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00002935 ac_md_system=`echo $ac_sys_system |
2936 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
2937 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00002938 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00002939 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00002940
Guido van Rossum07397971997-04-29 21:49:50 +00002941 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002942 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002943 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00002944 atheos*) MACHDEP="atheos";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00002945 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00002946 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002947 esac
2948fi
Guido van Rossum91922671997-10-09 20:24:13 +00002949
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002950# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
2951# disable features if it is defined, without any means to access these
2952# features as extensions. For these systems, we skip the definition of
2953# _XOPEN_SOURCE. Before adding a system to the list to gain access to
2954# some feature, make sure there is no alternative way to access this
2955# feature. Also, when using wildcards, make sure you have verified the
2956# need for not defining _XOPEN_SOURCE on all systems matching the
2957# wildcard, and that the wildcard does not include future systems
2958# (which may remove their limitations).
2959case $ac_sys_system/$ac_sys_release in
2960 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
2961 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00002962 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis4d0a20a2010-02-15 21:46:27 +00002963 # In addition, Stefan Krah confirms that issue #1244610 exists through
2964 # OpenBSD 4.6, but is fixed in 4.7.
2965 OpenBSD/2.* | OpenBSD/3.[0123456789] | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00002966 define_xopen_source=no
2967 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
2968 # also defined. This can be overridden by defining _BSD_SOURCE
2969 # As this has a different meaning on Linux, only define it on OpenBSD
2970
Benjamin Petersonf7155a32010-06-21 16:51:22 +00002971$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00002972
2973 ;;
Martin v. Löwis4d0a20a2010-02-15 21:46:27 +00002974 OpenBSD/4.[789])
Martin v. Löwisf6594222010-02-15 08:37:47 +00002975 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
2976 # also defined. This can be overridden by defining _BSD_SOURCE
2977 # As this has a different meaning on Linux, only define it on OpenBSD
2978
Benjamin Petersonf7155a32010-06-21 16:51:22 +00002979$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwisf6594222010-02-15 08:37:47 +00002980
2981 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00002982 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
2983 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
2984 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00002985 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 +00002986 define_xopen_source=no;;
Martin v. Löwisa9d71422003-03-28 18:43:31 +00002987 # On Solaris 2.6, sys/wait.h is inconsistent in the usage
2988 # of union __?sigval. Reported by Stuart Bishop.
2989 SunOS/5.6)
2990 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002991 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
2992 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00002993 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00002994 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002995 define_xopen_source=no;;
2996 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002997 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002998 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002999 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003000 # On FreeBSD 4, the math functions C89 does not cover are never defined
3001 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3002 FreeBSD/4.*)
3003 define_xopen_source=no;;
3004 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3005 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3006 # identifies itself as Darwin/7.*
3007 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3008 # disables platform specific features beyond repair.
3009 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3010 # has no effect, don't bother defining them
3011 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003012 define_xopen_source=no;;
Ronald Oussorend4be7a22010-03-09 06:41:58 +00003013 Darwin/1[0-9].*)
Ronald Oussoren095d2822010-03-08 07:03:14 +00003014 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003015 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3016 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3017 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003018 AIX/4)
3019 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003020 AIX/5)
3021 if test `uname -r` -eq 1; then
3022 define_xopen_source=no
3023 fi
3024 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003025 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3026 # defining NI_NUMERICHOST.
3027 QNX/6.3.2)
3028 define_xopen_source=no
3029 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003030
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003031esac
3032
3033if test $define_xopen_source = yes
3034then
Skip Montanarof0d5f792004-08-15 14:08:23 +00003035 # On Solaris w/ g++ it appears that _XOPEN_SOURCE has to be
3036 # defined precisely as g++ defines it
Martin v. Löwis7dece662005-11-26 11:38:24 +00003037 # Furthermore, on Solaris 10, XPG6 requires the use of a C99
3038 # compiler
Skip Montanarof0d5f792004-08-15 14:08:23 +00003039 case $ac_sys_system/$ac_sys_release in
Martin v. Löwis7dece662005-11-26 11:38:24 +00003040 SunOS/5.8|SunOS/5.9|SunOS/5.10)
Skip Montanarof0d5f792004-08-15 14:08:23 +00003041
Benjamin Petersonf7155a32010-06-21 16:51:22 +00003042$as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h
Skip Montanarof0d5f792004-08-15 14:08:23 +00003043
3044 ;;
3045 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003046
Benjamin Petersonf7155a32010-06-21 16:51:22 +00003047$as_echo "#define _XOPEN_SOURCE 600" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003048
Skip Montanarof0d5f792004-08-15 14:08:23 +00003049 ;;
3050 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003051
3052 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3053 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3054 # several APIs are not declared. Since this is also needed in some
3055 # cases for HP-UX, we define it globally.
Martin v. Löwis7dece662005-11-26 11:38:24 +00003056 # except for Solaris 10, where it must not be defined,
3057 # as it implies XPG4.2
3058 case $ac_sys_system/$ac_sys_release in
3059 SunOS/5.10)
3060 ;;
3061 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003062
Benjamin Petersonf7155a32010-06-21 16:51:22 +00003063$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003064
Martin v. Löwis7dece662005-11-26 11:38:24 +00003065 ;;
3066 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003067
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003068
Benjamin Petersonf7155a32010-06-21 16:51:22 +00003069$as_echo "#define _POSIX_C_SOURCE 200112L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003070
3071
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003072fi
3073
Guido van Rossum91922671997-10-09 20:24:13 +00003074#
3075# SGI compilers allow the specification of the both the ABI and the
3076# ISA on the command line. Depending on the values of these switches,
3077# different and often incompatable code will be generated.
3078#
3079# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3080# thus supply support for various ABI/ISA combinations. The MACHDEP
3081# variable is also adjusted.
3082#
3083
3084if test ! -z "$SGI_ABI"
3085then
3086 CC="cc $SGI_ABI"
3087 LDFLAGS="$SGI_ABI $LDFLAGS"
3088 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3089fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +00003090{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003091$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003092
Jack Jansen6b08a402004-06-03 12:41:45 +00003093# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3094# it may influence the way we can build extensions, so distutils
3095# needs to check it
3096
Thomas Wouters477c8d52006-05-27 19:21:47 +00003097
Jack Jansen6b08a402004-06-03 12:41:45 +00003098CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003099EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003100
Benjamin Petersonf7155a32010-06-21 16:51:22 +00003101{ $as_echo "$as_me:${as_lineno-$LINENO}: checking machine type as reported by uname -m" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003102$as_echo_n "checking machine type as reported by uname -m... " >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00003103ac_sys_machine=`uname -m`
Benjamin Petersonf7155a32010-06-21 16:51:22 +00003104{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_sys_machine" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003105$as_echo "$ac_sys_machine" >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00003106
Guido van Rossum627b2d71993-12-24 10:39:16 +00003107# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003108
3109# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3110# for debug/optimization stuff. BASECFLAGS is for flags that are required
3111# just to get things to compile and link. Users are free to override OPT
3112# when running configure or make. The build should not break if they do.
3113# BASECFLAGS should generally not be messed with, however.
3114
3115# XXX shouldn't some/most/all of this code be merged with the stuff later
3116# on that fiddles with OPT and BASECFLAGS?
Benjamin Petersonf7155a32010-06-21 16:51:22 +00003117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003118$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003119
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003120# Check whether --with-gcc was given.
Benjamin Petersonf7155a32010-06-21 16:51:22 +00003121if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003122 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003123 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003124 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003125 without_gcc=yes;;
3126 yes) CC=gcc
3127 without_gcc=no;;
3128 *) CC=$withval
3129 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003130 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003131else
Martin v. Löwis11437992002-04-12 09:54:03 +00003132
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003133 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003134 AIX*) CC=cc_r
3135 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003136 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003137 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003138fi
3139
Benjamin Petersonf7155a32010-06-21 16:51:22 +00003140{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003141$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003142
Guido van Rossum8b131c51995-03-09 14:10:13 +00003143# If the user switches compilers, we can't believe the cache
3144if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3145then
Benjamin Petersonf7155a32010-06-21 16:51:22 +00003146 as_fn_error "cached CC is different -- throw away $cache_file
3147(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003148fi
3149
Martin v. Löwis11437992002-04-12 09:54:03 +00003150ac_ext=c
3151ac_cpp='$CPP $CPPFLAGS'
3152ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3153ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3154ac_compiler_gnu=$ac_cv_c_compiler_gnu
3155if test -n "$ac_tool_prefix"; then
3156 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3157set dummy ${ac_tool_prefix}gcc; ac_word=$2
Benjamin Petersonf7155a32010-06-21 16:51:22 +00003158{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003159$as_echo_n "checking for $ac_word... " >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +00003160if test "${ac_cv_prog_CC+set}" = set; then :
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003161 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003162else
3163 if test -n "$CC"; then
3164 ac_cv_prog_CC="$CC" # Let the user override the test.
3165else
Martin v. Löwis11437992002-04-12 09:54:03 +00003166as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3167for as_dir in $PATH
3168do
3169 IFS=$as_save_IFS
3170 test -z "$as_dir" && as_dir=.
Benjamin Petersonf7155a32010-06-21 16:51:22 +00003171 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003172 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 +00003173 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Benjamin Petersonf7155a32010-06-21 16:51:22 +00003174 $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 +00003175 break 2
3176 fi
3177done
Benjamin Petersonf7155a32010-06-21 16:51:22 +00003178 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003179IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003180
Jack Jansendd19cf82001-12-06 22:36:17 +00003181fi
3182fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003183CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003184if test -n "$CC"; then
Benjamin Petersonf7155a32010-06-21 16:51:22 +00003185 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003186$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003187else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00003188 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003189$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003190fi
3191
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003192
Martin v. Löwis11437992002-04-12 09:54:03 +00003193fi
3194if test -z "$ac_cv_prog_CC"; then
3195 ac_ct_CC=$CC
3196 # Extract the first word of "gcc", so it can be a program name with args.
3197set dummy gcc; ac_word=$2
Benjamin Petersonf7155a32010-06-21 16:51:22 +00003198{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003199$as_echo_n "checking for $ac_word... " >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +00003200if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003201 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003202else
3203 if test -n "$ac_ct_CC"; then
3204 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3205else
3206as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3207for as_dir in $PATH
3208do
3209 IFS=$as_save_IFS
3210 test -z "$as_dir" && as_dir=.
Benjamin Petersonf7155a32010-06-21 16:51:22 +00003211 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003212 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 +00003213 ac_cv_prog_ac_ct_CC="gcc"
Benjamin Petersonf7155a32010-06-21 16:51:22 +00003214 $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 +00003215 break 2
3216 fi
3217done
Benjamin Petersonf7155a32010-06-21 16:51:22 +00003218 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003219IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003220
3221fi
3222fi
3223ac_ct_CC=$ac_cv_prog_ac_ct_CC
3224if test -n "$ac_ct_CC"; then
Benjamin Petersonf7155a32010-06-21 16:51:22 +00003225 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003226$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003227else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00003228 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003229$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003230fi
3231
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003232 if test "x$ac_ct_CC" = x; then
3233 CC=""
3234 else
3235 case $cross_compiling:$ac_tool_warned in
3236yes:)
Benjamin Petersonf7155a32010-06-21 16:51:22 +00003237{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003238$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003239ac_tool_warned=yes ;;
3240esac
3241 CC=$ac_ct_CC
3242 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003243else
3244 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003245fi
3246
Jack Jansendd19cf82001-12-06 22:36:17 +00003247if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003248 if test -n "$ac_tool_prefix"; then
3249 # 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 +00003250set dummy ${ac_tool_prefix}cc; ac_word=$2
Benjamin Petersonf7155a32010-06-21 16:51:22 +00003251{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003252$as_echo_n "checking for $ac_word... " >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +00003253if test "${ac_cv_prog_CC+set}" = set; then :
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003254 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003255else
3256 if test -n "$CC"; then
3257 ac_cv_prog_CC="$CC" # Let the user override the test.
3258else
Martin v. Löwis11437992002-04-12 09:54:03 +00003259as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3260for as_dir in $PATH
3261do
3262 IFS=$as_save_IFS
3263 test -z "$as_dir" && as_dir=.
Benjamin Petersonf7155a32010-06-21 16:51:22 +00003264 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003265 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 +00003266 ac_cv_prog_CC="${ac_tool_prefix}cc"
Benjamin Petersonf7155a32010-06-21 16:51:22 +00003267 $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 +00003268 break 2
3269 fi
3270done
Benjamin Petersonf7155a32010-06-21 16:51:22 +00003271 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003272IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003273
3274fi
3275fi
3276CC=$ac_cv_prog_CC
3277if test -n "$CC"; then
Benjamin Petersonf7155a32010-06-21 16:51:22 +00003278 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003279$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003280else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00003281 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003282$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003283fi
3284
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003285
Martin v. Löwis11437992002-04-12 09:54:03 +00003286 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003287fi
3288if test -z "$CC"; then
3289 # Extract the first word of "cc", so it can be a program name with args.
3290set dummy cc; ac_word=$2
Benjamin Petersonf7155a32010-06-21 16:51:22 +00003291{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003292$as_echo_n "checking for $ac_word... " >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +00003293if test "${ac_cv_prog_CC+set}" = set; then :
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003294 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003295else
3296 if test -n "$CC"; then
3297 ac_cv_prog_CC="$CC" # Let the user override the test.
3298else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003299 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003300as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3301for as_dir in $PATH
3302do
3303 IFS=$as_save_IFS
3304 test -z "$as_dir" && as_dir=.
Benjamin Petersonf7155a32010-06-21 16:51:22 +00003305 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003306 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 +00003307 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3308 ac_prog_rejected=yes
3309 continue
3310 fi
3311 ac_cv_prog_CC="cc"
Benjamin Petersonf7155a32010-06-21 16:51:22 +00003312 $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 +00003313 break 2
3314 fi
3315done
Benjamin Petersonf7155a32010-06-21 16:51:22 +00003316 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003317IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003318
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003319if test $ac_prog_rejected = yes; then
3320 # We found a bogon in the path, so make sure we never use it.
3321 set dummy $ac_cv_prog_CC
3322 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003323 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003324 # We chose a different compiler from the bogus one.
3325 # However, it has the same basename, so the bogon will be chosen
3326 # first if we set CC to just the basename; use the full file name.
3327 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003328 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003329 fi
3330fi
3331fi
3332fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003333CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003334if test -n "$CC"; then
Benjamin Petersonf7155a32010-06-21 16:51:22 +00003335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003336$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003337else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00003338 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003339$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003340fi
3341
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003342
Martin v. Löwis11437992002-04-12 09:54:03 +00003343fi
3344if test -z "$CC"; then
3345 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003346 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003347 do
3348 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3349set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Benjamin Petersonf7155a32010-06-21 16:51:22 +00003350{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003351$as_echo_n "checking for $ac_word... " >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +00003352if test "${ac_cv_prog_CC+set}" = set; then :
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003353 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003354else
3355 if test -n "$CC"; then
3356 ac_cv_prog_CC="$CC" # Let the user override the test.
3357else
Martin v. Löwis11437992002-04-12 09:54:03 +00003358as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3359for as_dir in $PATH
3360do
3361 IFS=$as_save_IFS
3362 test -z "$as_dir" && as_dir=.
Benjamin Petersonf7155a32010-06-21 16:51:22 +00003363 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003364 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 +00003365 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Benjamin Petersonf7155a32010-06-21 16:51:22 +00003366 $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 +00003367 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003368 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003369done
Benjamin Petersonf7155a32010-06-21 16:51:22 +00003370 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003371IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003372
3373fi
3374fi
3375CC=$ac_cv_prog_CC
3376if test -n "$CC"; then
Benjamin Petersonf7155a32010-06-21 16:51:22 +00003377 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003378$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003379else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00003380 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003381$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003382fi
3383
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003384
Martin v. Löwis11437992002-04-12 09:54:03 +00003385 test -n "$CC" && break
3386 done
3387fi
3388if test -z "$CC"; then
3389 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003390 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003391do
3392 # Extract the first word of "$ac_prog", so it can be a program name with args.
3393set dummy $ac_prog; ac_word=$2
Benjamin Petersonf7155a32010-06-21 16:51:22 +00003394{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003395$as_echo_n "checking for $ac_word... " >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +00003396if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003397 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003398else
3399 if test -n "$ac_ct_CC"; then
3400 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3401else
3402as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3403for as_dir in $PATH
3404do
3405 IFS=$as_save_IFS
3406 test -z "$as_dir" && as_dir=.
Benjamin Petersonf7155a32010-06-21 16:51:22 +00003407 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003408 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 +00003409 ac_cv_prog_ac_ct_CC="$ac_prog"
Benjamin Petersonf7155a32010-06-21 16:51:22 +00003410 $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 +00003411 break 2
3412 fi
3413done
Benjamin Petersonf7155a32010-06-21 16:51:22 +00003414 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003415IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003416
Martin v. Löwis11437992002-04-12 09:54:03 +00003417fi
3418fi
3419ac_ct_CC=$ac_cv_prog_ac_ct_CC
3420if test -n "$ac_ct_CC"; then
Benjamin Petersonf7155a32010-06-21 16:51:22 +00003421 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003422$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003423else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00003424 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003425$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003426fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003427
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003428
Martin v. Löwis11437992002-04-12 09:54:03 +00003429 test -n "$ac_ct_CC" && break
3430done
Michael W. Hudson54241132001-12-07 15:38:26 +00003431
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003432 if test "x$ac_ct_CC" = x; then
3433 CC=""
3434 else
3435 case $cross_compiling:$ac_tool_warned in
3436yes:)
Benjamin Petersonf7155a32010-06-21 16:51:22 +00003437{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003438$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003439ac_tool_warned=yes ;;
3440esac
3441 CC=$ac_ct_CC
3442 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003443fi
3444
3445fi
3446
3447
Benjamin Petersonf7155a32010-06-21 16:51:22 +00003448test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003449$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Petersonf7155a32010-06-21 16:51:22 +00003450as_fn_error "no acceptable C compiler found in \$PATH
3451See \`config.log' for more details." "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003452
3453# Provide some information about the compiler.
Benjamin Petersonf7155a32010-06-21 16:51:22 +00003454$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003455set X $ac_compile
3456ac_compiler=$2
Benjamin Petersonf7155a32010-06-21 16:51:22 +00003457for ac_option in --version -v -V -qversion; do
3458 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003459case "(($ac_try" in
3460 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3461 *) ac_try_echo=$ac_try;;
3462esac
Benjamin Petersonf7155a32010-06-21 16:51:22 +00003463eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3464$as_echo "$ac_try_echo"; } >&5
3465 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003466 ac_status=$?
Benjamin Petersonf7155a32010-06-21 16:51:22 +00003467 if test -s conftest.err; then
3468 sed '10a\
3469... rest of stderr output deleted ...
3470 10q' conftest.err >conftest.er1
3471 cat conftest.er1 >&5
3472 fi
3473 rm -f conftest.er1 conftest.err
3474 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3475 test $ac_status = 0; }
3476done
Martin v. Löwis11437992002-04-12 09:54:03 +00003477
Benjamin Petersonf7155a32010-06-21 16:51:22 +00003478cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003479/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003480
Martin v. Löwis11437992002-04-12 09:54:03 +00003481int
3482main ()
3483{
3484
3485 ;
3486 return 0;
3487}
3488_ACEOF
3489ac_clean_files_save=$ac_clean_files
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003490ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003491# Try to create an executable without -o first, disregard a.out.
3492# It will help us diagnose broken compilers, and finding out an intuition
3493# of exeext.
Benjamin Petersonf7155a32010-06-21 16:51:22 +00003494{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3495$as_echo_n "checking whether the C compiler works... " >&6; }
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003496ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3497
3498# The possible output files:
3499ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3500
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003501ac_rmfiles=
3502for ac_file in $ac_files
3503do
3504 case $ac_file in
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003505 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003506 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3507 esac
3508done
3509rm -f $ac_rmfiles
3510
Benjamin Petersonf7155a32010-06-21 16:51:22 +00003511if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003512case "(($ac_try" in
3513 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3514 *) ac_try_echo=$ac_try;;
3515esac
Benjamin Petersonf7155a32010-06-21 16:51:22 +00003516eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3517$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003518 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003519 ac_status=$?
Benjamin Petersonf7155a32010-06-21 16:51:22 +00003520 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3521 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003522 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3523# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3524# in a Makefile. We should not override ac_cv_exeext if it was cached,
3525# so that the user can short-circuit this test for compilers unknown to
3526# Autoconf.
3527for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003528do
3529 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003530 case $ac_file in
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003531 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003532 ;;
3533 [ab].out )
3534 # We found the default executable, but exeext='' is most
3535 # certainly right.
3536 break;;
3537 *.* )
Benjamin Petersonf7155a32010-06-21 16:51:22 +00003538 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003539 then :; else
3540 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3541 fi
3542 # We set ac_cv_exeext here because the later test for it is not
3543 # safe: cross compilers may not add the suffix if given an `-o'
3544 # argument, so we may need to know it at that point already.
3545 # Even if this section looks crufty: it has the advantage of
3546 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003547 break;;
3548 * )
3549 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003550 esac
3551done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003552test "$ac_cv_exeext" = no && ac_cv_exeext=
3553
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003554else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003555 ac_file=''
3556fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +00003557if test -z "$ac_file"; then :
3558 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3559$as_echo "no" >&6; }
3560$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003561sed 's/^/| /' conftest.$ac_ext >&5
3562
Benjamin Petersonf7155a32010-06-21 16:51:22 +00003563{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003564$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Petersonf7155a32010-06-21 16:51:22 +00003565{ as_fn_set_status 77
3566as_fn_error "C compiler cannot create executables
3567See \`config.log' for more details." "$LINENO" 5; }; }
3568else
3569 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003570$as_echo "yes" >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +00003571fi
3572{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3573$as_echo_n "checking for C compiler default output file name... " >&6; }
3574{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3575$as_echo "$ac_file" >&6; }
3576ac_exeext=$ac_cv_exeext
Martin v. Löwis11437992002-04-12 09:54:03 +00003577
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003578rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003579ac_clean_files=$ac_clean_files_save
Benjamin Petersonf7155a32010-06-21 16:51:22 +00003580{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003581$as_echo_n "checking for suffix of executables... " >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +00003582if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003583case "(($ac_try" in
3584 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3585 *) ac_try_echo=$ac_try;;
3586esac
Benjamin Petersonf7155a32010-06-21 16:51:22 +00003587eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3588$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003589 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003590 ac_status=$?
Benjamin Petersonf7155a32010-06-21 16:51:22 +00003591 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3592 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003593 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3594# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3595# work properly (i.e., refer to `conftest.exe'), while it won't with
3596# `rm'.
3597for ac_file in conftest.exe conftest conftest.*; do
3598 test -f "$ac_file" || continue
3599 case $ac_file in
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003600 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003601 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3602 break;;
3603 * ) break;;
3604 esac
3605done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003606else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00003607 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003608$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Petersonf7155a32010-06-21 16:51:22 +00003609as_fn_error "cannot compute suffix of executables: cannot compile and link
3610See \`config.log' for more details." "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003611fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +00003612rm -f conftest conftest$ac_cv_exeext
3613{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003614$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003615
3616rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003617EXEEXT=$ac_cv_exeext
3618ac_exeext=$EXEEXT
Benjamin Petersonf7155a32010-06-21 16:51:22 +00003619cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3620/* end confdefs.h. */
3621#include <stdio.h>
3622int
3623main ()
3624{
3625FILE *f = fopen ("conftest.out", "w");
3626 return ferror (f) || fclose (f) != 0;
3627
3628 ;
3629 return 0;
3630}
3631_ACEOF
3632ac_clean_files="$ac_clean_files conftest.out"
3633# Check that the compiler produces executables we can run. If not, either
3634# the compiler is broken, or we cross compile.
3635{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3636$as_echo_n "checking whether we are cross compiling... " >&6; }
3637if test "$cross_compiling" != yes; then
3638 { { ac_try="$ac_link"
3639case "(($ac_try" in
3640 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3641 *) ac_try_echo=$ac_try;;
3642esac
3643eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3644$as_echo "$ac_try_echo"; } >&5
3645 (eval "$ac_link") 2>&5
3646 ac_status=$?
3647 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3648 test $ac_status = 0; }
3649 if { ac_try='./conftest$ac_cv_exeext'
3650 { { case "(($ac_try" in
3651 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3652 *) ac_try_echo=$ac_try;;
3653esac
3654eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3655$as_echo "$ac_try_echo"; } >&5
3656 (eval "$ac_try") 2>&5
3657 ac_status=$?
3658 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3659 test $ac_status = 0; }; }; then
3660 cross_compiling=no
3661 else
3662 if test "$cross_compiling" = maybe; then
3663 cross_compiling=yes
3664 else
3665 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3666$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3667as_fn_error "cannot run C compiled programs.
3668If you meant to cross compile, use \`--host'.
3669See \`config.log' for more details." "$LINENO" 5; }
3670 fi
3671 fi
3672fi
3673{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3674$as_echo "$cross_compiling" >&6; }
3675
3676rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3677ac_clean_files=$ac_clean_files_save
3678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003679$as_echo_n "checking for suffix of object files... " >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +00003680if test "${ac_cv_objext+set}" = set; then :
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003681 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00003682else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00003683 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003684/* end confdefs.h. */
3685
3686int
3687main ()
3688{
3689
3690 ;
3691 return 0;
3692}
3693_ACEOF
3694rm -f conftest.o conftest.obj
Benjamin Petersonf7155a32010-06-21 16:51:22 +00003695if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003696case "(($ac_try" in
3697 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3698 *) ac_try_echo=$ac_try;;
3699esac
Benjamin Petersonf7155a32010-06-21 16:51:22 +00003700eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3701$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003702 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003703 ac_status=$?
Benjamin Petersonf7155a32010-06-21 16:51:22 +00003704 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3705 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003706 for ac_file in conftest.o conftest.obj conftest.*; do
3707 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00003708 case $ac_file in
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003709 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003710 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3711 break;;
3712 esac
3713done
3714else
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003715 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003716sed 's/^/| /' conftest.$ac_ext >&5
3717
Benjamin Petersonf7155a32010-06-21 16:51:22 +00003718{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003719$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Petersonf7155a32010-06-21 16:51:22 +00003720as_fn_error "cannot compute suffix of object files: cannot compile
3721See \`config.log' for more details." "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003722fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003723rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003724fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +00003725{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003726$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003727OBJEXT=$ac_cv_objext
3728ac_objext=$OBJEXT
Benjamin Petersonf7155a32010-06-21 16:51:22 +00003729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003730$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +00003731if test "${ac_cv_c_compiler_gnu+set}" = set; then :
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003732 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003733else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00003734 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003735/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003736
Martin v. Löwis11437992002-04-12 09:54:03 +00003737int
3738main ()
3739{
3740#ifndef __GNUC__
3741 choke me
3742#endif
3743
3744 ;
3745 return 0;
3746}
3747_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +00003748if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00003749 ac_compiler_gnu=yes
3750else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00003751 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003752fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003753rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003754ac_cv_c_compiler_gnu=$ac_compiler_gnu
3755
3756fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +00003757{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003758$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3759if test $ac_compiler_gnu = yes; then
3760 GCC=yes
3761else
3762 GCC=
3763fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003764ac_test_CFLAGS=${CFLAGS+set}
3765ac_save_CFLAGS=$CFLAGS
Benjamin Petersonf7155a32010-06-21 16:51:22 +00003766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003767$as_echo_n "checking whether $CC accepts -g... " >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +00003768if test "${ac_cv_prog_cc_g+set}" = set; then :
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003769 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003770else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003771 ac_save_c_werror_flag=$ac_c_werror_flag
3772 ac_c_werror_flag=yes
3773 ac_cv_prog_cc_g=no
3774 CFLAGS="-g"
Benjamin Petersonf7155a32010-06-21 16:51:22 +00003775 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003776/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003777
Martin v. Löwis11437992002-04-12 09:54:03 +00003778int
3779main ()
3780{
3781
3782 ;
3783 return 0;
3784}
3785_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +00003786if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00003787 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003788else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00003789 CFLAGS=""
3790 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003791/* end confdefs.h. */
3792
3793int
3794main ()
3795{
3796
3797 ;
3798 return 0;
3799}
3800_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +00003801if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003802
Benjamin Petersonf7155a32010-06-21 16:51:22 +00003803else
3804 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003805 CFLAGS="-g"
Benjamin Petersonf7155a32010-06-21 16:51:22 +00003806 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003807/* end confdefs.h. */
3808
3809int
3810main ()
3811{
3812
3813 ;
3814 return 0;
3815}
3816_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +00003817if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003818 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00003819fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003820rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003821fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003822rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3823fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003824rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3825 ac_c_werror_flag=$ac_save_c_werror_flag
3826fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +00003827{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003828$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003829if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003830 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003831elif test $ac_cv_prog_cc_g = yes; then
3832 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003833 CFLAGS="-g -O2"
3834 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003835 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003836 fi
3837else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003838 if test "$GCC" = yes; then
3839 CFLAGS="-O2"
3840 else
3841 CFLAGS=
3842 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003843fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +00003844{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003845$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +00003846if test "${ac_cv_prog_cc_c89+set}" = set; then :
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003847 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003848else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003849 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003850ac_save_CC=$CC
Benjamin Petersonf7155a32010-06-21 16:51:22 +00003851cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003852/* end confdefs.h. */
3853#include <stdarg.h>
3854#include <stdio.h>
3855#include <sys/types.h>
3856#include <sys/stat.h>
3857/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3858struct buf { int x; };
3859FILE * (*rcsopen) (struct buf *, struct stat *, int);
3860static char *e (p, i)
3861 char **p;
3862 int i;
3863{
3864 return p[i];
3865}
3866static char *f (char * (*g) (char **, int), char **p, ...)
3867{
3868 char *s;
3869 va_list v;
3870 va_start (v,p);
3871 s = g (p, va_arg (v,int));
3872 va_end (v);
3873 return s;
3874}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003875
3876/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3877 function prototypes and stuff, but not '\xHH' hex character constants.
3878 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003879 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003880 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3881 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003882 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003883int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3884
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003885/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3886 inside strings and character constants. */
3887#define FOO(x) 'x'
3888int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3889
Skip Montanaro6dead952003-09-25 14:50:04 +00003890int test (int i, double x);
3891struct s1 {int (*f) (int a);};
3892struct s2 {int (*f) (double a);};
3893int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3894int argc;
3895char **argv;
3896int
3897main ()
3898{
3899return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3900 ;
3901 return 0;
3902}
3903_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003904for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3905 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003906do
3907 CC="$ac_save_CC $ac_arg"
Benjamin Petersonf7155a32010-06-21 16:51:22 +00003908 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003909 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00003910fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003911rm -f core conftest.err conftest.$ac_objext
3912 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00003913done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003914rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003915CC=$ac_save_CC
3916
3917fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003918# AC_CACHE_VAL
3919case "x$ac_cv_prog_cc_c89" in
3920 x)
Benjamin Petersonf7155a32010-06-21 16:51:22 +00003921 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003922$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003923 xno)
Benjamin Petersonf7155a32010-06-21 16:51:22 +00003924 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003925$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003926 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003927 CC="$CC $ac_cv_prog_cc_c89"
Benjamin Petersonf7155a32010-06-21 16:51:22 +00003928 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003929$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003930esac
Benjamin Petersonf7155a32010-06-21 16:51:22 +00003931if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00003932
Benjamin Petersonf7155a32010-06-21 16:51:22 +00003933fi
Skip Montanaro6dead952003-09-25 14:50:04 +00003934
Martin v. Löwis11437992002-04-12 09:54:03 +00003935ac_ext=c
3936ac_cpp='$CPP $CPPFLAGS'
3937ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3938ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3939ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003940
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003941
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003942
3943
Benjamin Petersonf7155a32010-06-21 16:51:22 +00003944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003945$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003946
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003947# Check whether --with-cxx_main was given.
Benjamin Petersonf7155a32010-06-21 16:51:22 +00003948if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003949 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003950
3951 case $withval in
3952 no) with_cxx_main=no
3953 MAINCC='$(CC)';;
3954 yes) with_cxx_main=yes
3955 MAINCC='$(CXX)';;
3956 *) with_cxx_main=yes
3957 MAINCC=$withval
3958 if test -z "$CXX"
3959 then
3960 CXX=$withval
3961 fi;;
3962 esac
3963else
3964
3965 with_cxx_main=no
3966 MAINCC='$(CC)'
3967
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003968fi
3969
Benjamin Petersonf7155a32010-06-21 16:51:22 +00003970{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003971$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003972
3973preset_cxx="$CXX"
3974if test -z "$CXX"
3975then
3976 case "$CC" in
3977 gcc) # Extract the first word of "g++", so it can be a program name with args.
3978set dummy g++; ac_word=$2
Benjamin Petersonf7155a32010-06-21 16:51:22 +00003979{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003980$as_echo_n "checking for $ac_word... " >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +00003981if test "${ac_cv_path_CXX+set}" = set; then :
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003982 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003983else
3984 case $CXX in
3985 [\\/]* | ?:[\\/]*)
3986 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3987 ;;
3988 *)
3989 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3990for as_dir in notfound
3991do
3992 IFS=$as_save_IFS
3993 test -z "$as_dir" && as_dir=.
Benjamin Petersonf7155a32010-06-21 16:51:22 +00003994 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003995 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 +00003996 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Benjamin Petersonf7155a32010-06-21 16:51:22 +00003997 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003998 break 2
3999 fi
4000done
Benjamin Petersonf7155a32010-06-21 16:51:22 +00004001 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004002IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004003
4004 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
4005 ;;
4006esac
4007fi
4008CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004009if test -n "$CXX"; then
Benjamin Petersonf7155a32010-06-21 16:51:22 +00004010 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00004011$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004012else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00004013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00004014$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004015fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004016
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004017 ;;
4018 cc) # Extract the first word of "c++", so it can be a program name with args.
4019set dummy c++; ac_word=$2
Benjamin Petersonf7155a32010-06-21 16:51:22 +00004020{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00004021$as_echo_n "checking for $ac_word... " >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +00004022if test "${ac_cv_path_CXX+set}" = set; then :
Benjamin Peterson82af01d2010-05-02 16:45:41 +00004023 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004024else
4025 case $CXX in
4026 [\\/]* | ?:[\\/]*)
4027 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4028 ;;
4029 *)
4030 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4031for as_dir in notfound
4032do
4033 IFS=$as_save_IFS
4034 test -z "$as_dir" && as_dir=.
Benjamin Petersonf7155a32010-06-21 16:51:22 +00004035 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004036 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 +00004037 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Benjamin Petersonf7155a32010-06-21 16:51:22 +00004038 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004039 break 2
4040 fi
4041done
Benjamin Petersonf7155a32010-06-21 16:51:22 +00004042 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004043IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004044
4045 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
4046 ;;
4047esac
4048fi
4049CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004050if test -n "$CXX"; then
Benjamin Petersonf7155a32010-06-21 16:51:22 +00004051 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00004052$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004053else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00004054 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00004055$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004056fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004057
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004058 ;;
4059 esac
4060 if test "$CXX" = "notfound"
4061 then
4062 CXX=""
4063 fi
4064fi
4065if test -z "$CXX"
4066then
4067 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4068do
4069 # Extract the first word of "$ac_prog", so it can be a program name with args.
4070set dummy $ac_prog; ac_word=$2
Benjamin Petersonf7155a32010-06-21 16:51:22 +00004071{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00004072$as_echo_n "checking for $ac_word... " >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +00004073if test "${ac_cv_prog_CXX+set}" = set; then :
Benjamin Peterson82af01d2010-05-02 16:45:41 +00004074 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004075else
4076 if test -n "$CXX"; then
4077 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4078else
4079as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4080for as_dir in $PATH
4081do
4082 IFS=$as_save_IFS
4083 test -z "$as_dir" && as_dir=.
Benjamin Petersonf7155a32010-06-21 16:51:22 +00004084 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004085 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 +00004086 ac_cv_prog_CXX="$ac_prog"
Benjamin Petersonf7155a32010-06-21 16:51:22 +00004087 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004088 break 2
4089 fi
4090done
Benjamin Petersonf7155a32010-06-21 16:51:22 +00004091 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004092IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004093
4094fi
4095fi
4096CXX=$ac_cv_prog_CXX
4097if test -n "$CXX"; then
Benjamin Petersonf7155a32010-06-21 16:51:22 +00004098 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00004099$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004100else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00004101 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00004102$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004103fi
4104
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004105
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004106 test -n "$CXX" && break
4107done
4108test -n "$CXX" || CXX="notfound"
4109
4110 if test "$CXX" = "notfound"
4111 then
4112 CXX=""
4113 fi
4114fi
4115if test "$preset_cxx" != "$CXX"
4116then
Benjamin Petersonf7155a32010-06-21 16:51:22 +00004117 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004118
4119 By default, distutils will build C++ extension modules with \"$CXX\".
4120 If this is not intended, then set CXX on the configure command line.
4121 " >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00004122$as_echo "$as_me: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004123
4124 By default, distutils will build C++ extension modules with \"$CXX\".
4125 If this is not intended, then set CXX on the configure command line.
4126 " >&2;}
4127fi
4128
4129
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004130# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004131
4132ac_ext=c
4133ac_cpp='$CPP $CPPFLAGS'
4134ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4135ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4136ac_compiler_gnu=$ac_cv_c_compiler_gnu
Benjamin Petersonf7155a32010-06-21 16:51:22 +00004137{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00004138$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004139# On Suns, sometimes $CPP names a directory.
4140if test -n "$CPP" && test -d "$CPP"; then
4141 CPP=
4142fi
4143if test -z "$CPP"; then
Benjamin Petersonf7155a32010-06-21 16:51:22 +00004144 if test "${ac_cv_prog_CPP+set}" = set; then :
Benjamin Peterson82af01d2010-05-02 16:45:41 +00004145 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004146else
Martin v. Löwis11437992002-04-12 09:54:03 +00004147 # Double quotes because CPP needs to be expanded
4148 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4149 do
4150 ac_preproc_ok=false
4151for ac_c_preproc_warn_flag in '' yes
4152do
4153 # Use a header file that comes with gcc, so configuring glibc
4154 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004155 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4156 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004157 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004158 # not just through cpp. "Syntax error" is here to catch this case.
Benjamin Petersonf7155a32010-06-21 16:51:22 +00004159 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004160/* end confdefs.h. */
4161#ifdef __STDC__
4162# include <limits.h>
4163#else
4164# include <assert.h>
4165#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004166 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004167_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +00004168if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004169
Benjamin Petersonf7155a32010-06-21 16:51:22 +00004170else
Martin v. Löwis11437992002-04-12 09:54:03 +00004171 # Broken: fails on valid input.
4172continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004173fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004174rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004175
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004176 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004177 # can be detected and how.
Benjamin Petersonf7155a32010-06-21 16:51:22 +00004178 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004179/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004180#include <ac_nonexistent.h>
4181_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +00004182if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004183 # Broken: success on invalid input.
4184continue
4185else
Martin v. Löwis11437992002-04-12 09:54:03 +00004186 # Passes both tests.
4187ac_preproc_ok=:
4188break
4189fi
4190rm -f conftest.err conftest.$ac_ext
4191
4192done
4193# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4194rm -f conftest.err conftest.$ac_ext
Benjamin Petersonf7155a32010-06-21 16:51:22 +00004195if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004196 break
4197fi
4198
4199 done
4200 ac_cv_prog_CPP=$CPP
4201
4202fi
4203 CPP=$ac_cv_prog_CPP
4204else
4205 ac_cv_prog_CPP=$CPP
4206fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +00004207{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00004208$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004209ac_preproc_ok=false
4210for ac_c_preproc_warn_flag in '' yes
4211do
4212 # Use a header file that comes with gcc, so configuring glibc
4213 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004214 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4215 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004216 # On the NeXT, cc -E runs the code through the compiler's parser,
4217 # not just through cpp. "Syntax error" is here to catch this case.
Benjamin Petersonf7155a32010-06-21 16:51:22 +00004218 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004219/* end confdefs.h. */
4220#ifdef __STDC__
4221# include <limits.h>
4222#else
4223# include <assert.h>
4224#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004225 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004226_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +00004227if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004228
Benjamin Petersonf7155a32010-06-21 16:51:22 +00004229else
Martin v. Löwis11437992002-04-12 09:54:03 +00004230 # Broken: fails on valid input.
4231continue
4232fi
4233rm -f conftest.err conftest.$ac_ext
4234
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004235 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004236 # can be detected and how.
Benjamin Petersonf7155a32010-06-21 16:51:22 +00004237 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004238/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004239#include <ac_nonexistent.h>
4240_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +00004241if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004242 # Broken: success on invalid input.
4243continue
4244else
Martin v. Löwis11437992002-04-12 09:54:03 +00004245 # Passes both tests.
4246ac_preproc_ok=:
4247break
4248fi
4249rm -f conftest.err conftest.$ac_ext
4250
4251done
4252# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4253rm -f conftest.err conftest.$ac_ext
Benjamin Petersonf7155a32010-06-21 16:51:22 +00004254if $ac_preproc_ok; then :
4255
Martin v. Löwis11437992002-04-12 09:54:03 +00004256else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00004257 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00004258$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Petersonf7155a32010-06-21 16:51:22 +00004259as_fn_error "C preprocessor \"$CPP\" fails sanity check
4260See \`config.log' for more details." "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004261fi
4262
4263ac_ext=c
4264ac_cpp='$CPP $CPPFLAGS'
4265ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4266ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4267ac_compiler_gnu=$ac_cv_c_compiler_gnu
4268
4269
Benjamin Petersonf7155a32010-06-21 16:51:22 +00004270{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00004271$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +00004272if test "${ac_cv_path_GREP+set}" = set; then :
Benjamin Peterson82af01d2010-05-02 16:45:41 +00004273 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004274else
Benjamin Peterson82af01d2010-05-02 16:45:41 +00004275 if test -z "$GREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004276 ac_path_GREP_found=false
Benjamin Peterson82af01d2010-05-02 16:45:41 +00004277 # Loop through the user's path and test for each of PROGNAME-LIST
4278 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004279for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4280do
4281 IFS=$as_save_IFS
4282 test -z "$as_dir" && as_dir=.
Benjamin Petersonf7155a32010-06-21 16:51:22 +00004283 for ac_prog in grep ggrep; do
Benjamin Peterson82af01d2010-05-02 16:45:41 +00004284 for ac_exec_ext in '' $ac_executable_extensions; do
4285 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4286 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
4287# Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004288 # Check for GNU $ac_path_GREP
4289case `"$ac_path_GREP" --version 2>&1` in
4290*GNU*)
4291 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4292*)
4293 ac_count=0
Benjamin Peterson82af01d2010-05-02 16:45:41 +00004294 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004295 while :
4296 do
4297 cat "conftest.in" "conftest.in" >"conftest.tmp"
4298 mv "conftest.tmp" "conftest.in"
4299 cp "conftest.in" "conftest.nl"
Benjamin Peterson82af01d2010-05-02 16:45:41 +00004300 $as_echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004301 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4302 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Benjamin Petersonf7155a32010-06-21 16:51:22 +00004303 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004304 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4305 # Best one so far, save it but keep looking for a better one
4306 ac_cv_path_GREP="$ac_path_GREP"
4307 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00004308 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004309 # 10*(2^10) chars as input seems more than enough
4310 test $ac_count -gt 10 && break
4311 done
4312 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4313esac
4314
Benjamin Peterson82af01d2010-05-02 16:45:41 +00004315 $ac_path_GREP_found && break 3
4316 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004317 done
Benjamin Petersonf7155a32010-06-21 16:51:22 +00004318 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004319IFS=$as_save_IFS
Benjamin Peterson82af01d2010-05-02 16:45:41 +00004320 if test -z "$ac_cv_path_GREP"; then
Benjamin Petersonf7155a32010-06-21 16:51:22 +00004321 as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00004322 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004323else
4324 ac_cv_path_GREP=$GREP
4325fi
4326
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004327fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +00004328{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00004329$as_echo "$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004330 GREP="$ac_cv_path_GREP"
4331
4332
Benjamin Petersonf7155a32010-06-21 16:51:22 +00004333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00004334$as_echo_n "checking for egrep... " >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +00004335if test "${ac_cv_path_EGREP+set}" = set; then :
Benjamin Peterson82af01d2010-05-02 16:45:41 +00004336 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004337else
4338 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4339 then ac_cv_path_EGREP="$GREP -E"
4340 else
Benjamin Peterson82af01d2010-05-02 16:45:41 +00004341 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004342 ac_path_EGREP_found=false
Benjamin Peterson82af01d2010-05-02 16:45:41 +00004343 # Loop through the user's path and test for each of PROGNAME-LIST
4344 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004345for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4346do
4347 IFS=$as_save_IFS
4348 test -z "$as_dir" && as_dir=.
Benjamin Petersonf7155a32010-06-21 16:51:22 +00004349 for ac_prog in egrep; do
Benjamin Peterson82af01d2010-05-02 16:45:41 +00004350 for ac_exec_ext in '' $ac_executable_extensions; do
4351 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4352 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
4353# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004354 # Check for GNU $ac_path_EGREP
4355case `"$ac_path_EGREP" --version 2>&1` in
4356*GNU*)
4357 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4358*)
4359 ac_count=0
Benjamin Peterson82af01d2010-05-02 16:45:41 +00004360 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004361 while :
4362 do
4363 cat "conftest.in" "conftest.in" >"conftest.tmp"
4364 mv "conftest.tmp" "conftest.in"
4365 cp "conftest.in" "conftest.nl"
Benjamin Peterson82af01d2010-05-02 16:45:41 +00004366 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004367 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4368 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Benjamin Petersonf7155a32010-06-21 16:51:22 +00004369 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004370 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4371 # Best one so far, save it but keep looking for a better one
4372 ac_cv_path_EGREP="$ac_path_EGREP"
4373 ac_path_EGREP_max=$ac_count
4374 fi
4375 # 10*(2^10) chars as input seems more than enough
4376 test $ac_count -gt 10 && break
4377 done
4378 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4379esac
4380
Benjamin Peterson82af01d2010-05-02 16:45:41 +00004381 $ac_path_EGREP_found && break 3
4382 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004383 done
Benjamin Petersonf7155a32010-06-21 16:51:22 +00004384 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004385IFS=$as_save_IFS
Benjamin Peterson82af01d2010-05-02 16:45:41 +00004386 if test -z "$ac_cv_path_EGREP"; then
Benjamin Petersonf7155a32010-06-21 16:51:22 +00004387 as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00004388 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004389else
4390 ac_cv_path_EGREP=$EGREP
4391fi
4392
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004393 fi
4394fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +00004395{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00004396$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004397 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00004398
4399
Benjamin Petersonf7155a32010-06-21 16:51:22 +00004400{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00004401$as_echo_n "checking for ANSI C header files... " >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +00004402if test "${ac_cv_header_stdc+set}" = set; then :
Benjamin Peterson82af01d2010-05-02 16:45:41 +00004403 $as_echo_n "(cached) " >&6
4404else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00004405 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson82af01d2010-05-02 16:45:41 +00004406/* end confdefs.h. */
4407#include <stdlib.h>
4408#include <stdarg.h>
4409#include <string.h>
4410#include <float.h>
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004411
Benjamin Peterson82af01d2010-05-02 16:45:41 +00004412int
4413main ()
4414{
4415
4416 ;
4417 return 0;
4418}
4419_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +00004420if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson82af01d2010-05-02 16:45:41 +00004421 ac_cv_header_stdc=yes
4422else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00004423 ac_cv_header_stdc=no
Benjamin Peterson82af01d2010-05-02 16:45:41 +00004424fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +00004425rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4426
4427if test $ac_cv_header_stdc = yes; then
4428 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Benjamin Petersonf7155a32010-06-21 16:51:22 +00004429 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson82af01d2010-05-02 16:45:41 +00004430/* end confdefs.h. */
4431#include <string.h>
4432
4433_ACEOF
4434if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Benjamin Petersonf7155a32010-06-21 16:51:22 +00004435 $EGREP "memchr" >/dev/null 2>&1; then :
4436
Benjamin Peterson82af01d2010-05-02 16:45:41 +00004437else
4438 ac_cv_header_stdc=no
4439fi
4440rm -f conftest*
4441
4442fi
4443
4444if test $ac_cv_header_stdc = yes; then
4445 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Benjamin Petersonf7155a32010-06-21 16:51:22 +00004446 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson82af01d2010-05-02 16:45:41 +00004447/* end confdefs.h. */
4448#include <stdlib.h>
4449
4450_ACEOF
4451if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Benjamin Petersonf7155a32010-06-21 16:51:22 +00004452 $EGREP "free" >/dev/null 2>&1; then :
4453
Benjamin Peterson82af01d2010-05-02 16:45:41 +00004454else
4455 ac_cv_header_stdc=no
4456fi
4457rm -f conftest*
4458
4459fi
4460
4461if test $ac_cv_header_stdc = yes; then
4462 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Benjamin Petersonf7155a32010-06-21 16:51:22 +00004463 if test "$cross_compiling" = yes; then :
Benjamin Peterson82af01d2010-05-02 16:45:41 +00004464 :
4465else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00004466 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson82af01d2010-05-02 16:45:41 +00004467/* end confdefs.h. */
4468#include <ctype.h>
4469#include <stdlib.h>
4470#if ((' ' & 0x0FF) == 0x020)
4471# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4472# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4473#else
4474# define ISLOWER(c) \
4475 (('a' <= (c) && (c) <= 'i') \
4476 || ('j' <= (c) && (c) <= 'r') \
4477 || ('s' <= (c) && (c) <= 'z'))
4478# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4479#endif
4480
4481#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4482int
4483main ()
4484{
4485 int i;
4486 for (i = 0; i < 256; i++)
4487 if (XOR (islower (i), ISLOWER (i))
4488 || toupper (i) != TOUPPER (i))
4489 return 2;
4490 return 0;
4491}
4492_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +00004493if ac_fn_c_try_run "$LINENO"; then :
4494
Benjamin Peterson82af01d2010-05-02 16:45:41 +00004495else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00004496 ac_cv_header_stdc=no
Benjamin Peterson82af01d2010-05-02 16:45:41 +00004497fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +00004498rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4499 conftest.$ac_objext conftest.beam conftest.$ac_ext
Benjamin Peterson82af01d2010-05-02 16:45:41 +00004500fi
4501
Benjamin Peterson82af01d2010-05-02 16:45:41 +00004502fi
4503fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +00004504{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00004505$as_echo "$ac_cv_header_stdc" >&6; }
4506if test $ac_cv_header_stdc = yes; then
4507
Benjamin Petersonf7155a32010-06-21 16:51:22 +00004508$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Benjamin Peterson82af01d2010-05-02 16:45:41 +00004509
4510fi
4511
4512# On IRIX 5.3, sys/types and inttypes.h are conflicting.
Benjamin Peterson82af01d2010-05-02 16:45:41 +00004513for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4514 inttypes.h stdint.h unistd.h
Benjamin Petersonf7155a32010-06-21 16:51:22 +00004515do :
4516 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4517ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4518"
4519eval as_val=\$$as_ac_Header
4520 if test "x$as_val" = x""yes; then :
Benjamin Peterson82af01d2010-05-02 16:45:41 +00004521 cat >>confdefs.h <<_ACEOF
4522#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4523_ACEOF
4524
4525fi
4526
4527done
4528
4529
4530
Benjamin Petersonf7155a32010-06-21 16:51:22 +00004531 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
4532if test "x$ac_cv_header_minix_config_h" = x""yes; then :
Benjamin Peterson82af01d2010-05-02 16:45:41 +00004533 MINIX=yes
4534else
4535 MINIX=
4536fi
4537
4538
4539 if test "$MINIX" = yes; then
4540
Benjamin Petersonf7155a32010-06-21 16:51:22 +00004541$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
Benjamin Peterson82af01d2010-05-02 16:45:41 +00004542
4543
Benjamin Petersonf7155a32010-06-21 16:51:22 +00004544$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
Benjamin Peterson82af01d2010-05-02 16:45:41 +00004545
4546
Benjamin Petersonf7155a32010-06-21 16:51:22 +00004547$as_echo "#define _MINIX 1" >>confdefs.h
Benjamin Peterson82af01d2010-05-02 16:45:41 +00004548
4549 fi
4550
4551
Benjamin Petersonf7155a32010-06-21 16:51:22 +00004552 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00004553$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +00004554if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
Benjamin Peterson82af01d2010-05-02 16:45:41 +00004555 $as_echo_n "(cached) " >&6
4556else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00004557 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson82af01d2010-05-02 16:45:41 +00004558/* end confdefs.h. */
4559
4560# define __EXTENSIONS__ 1
4561 $ac_includes_default
4562int
4563main ()
4564{
4565
4566 ;
4567 return 0;
4568}
4569_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +00004570if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson82af01d2010-05-02 16:45:41 +00004571 ac_cv_safe_to_define___extensions__=yes
4572else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00004573 ac_cv_safe_to_define___extensions__=no
Benjamin Peterson82af01d2010-05-02 16:45:41 +00004574fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +00004575rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4576fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +00004577{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00004578$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4579 test $ac_cv_safe_to_define___extensions__ = yes &&
Benjamin Petersonf7155a32010-06-21 16:51:22 +00004580 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
Benjamin Peterson82af01d2010-05-02 16:45:41 +00004581
Benjamin Petersonf7155a32010-06-21 16:51:22 +00004582 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
Antoine Pitrou20327222009-05-24 20:39:11 +00004583
Benjamin Petersonf7155a32010-06-21 16:51:22 +00004584 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Benjamin Peterson82af01d2010-05-02 16:45:41 +00004585
Benjamin Petersonf7155a32010-06-21 16:51:22 +00004586 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
Benjamin Peterson82af01d2010-05-02 16:45:41 +00004587
Benjamin Petersonf7155a32010-06-21 16:51:22 +00004588 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4589
Antoine Pitrou20327222009-05-24 20:39:11 +00004590
4591
4592
4593# Check for unsupported systems
4594case $ac_sys_system/$ac_sys_release in
4595atheos*|Linux*/1*)
4596 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
4597 echo See README for details.
4598 exit 1;;
4599esac
4600
4601
Benjamin Petersonf7155a32010-06-21 16:51:22 +00004602{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00004603$as_echo_n "checking for --with-suffix... " >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004604
4605# Check whether --with-suffix was given.
Benjamin Petersonf7155a32010-06-21 16:51:22 +00004606if test "${with_suffix+set}" = set; then :
Antoine Pitrou20327222009-05-24 20:39:11 +00004607 withval=$with_suffix;
4608 case $withval in
4609 no) EXEEXT=;;
4610 yes) EXEEXT=.exe;;
4611 *) EXEEXT=$withval;;
4612 esac
4613fi
4614
Benjamin Petersonf7155a32010-06-21 16:51:22 +00004615{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00004616$as_echo "$EXEEXT" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004617
4618# Test whether we're running on a non-case-sensitive system, in which
4619# case we give a warning if no ext is given
4620
Benjamin Petersonf7155a32010-06-21 16:51:22 +00004621{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00004622$as_echo_n "checking for case-insensitive build directory... " >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004623if test ! -d CaseSensitiveTestDir; then
4624mkdir CaseSensitiveTestDir
4625fi
4626
4627if test -d casesensitivetestdir
4628then
Benjamin Petersonf7155a32010-06-21 16:51:22 +00004629 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00004630$as_echo "yes" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004631 BUILDEXEEXT=.exe
4632else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00004633 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00004634$as_echo "no" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004635 BUILDEXEEXT=$EXEEXT
4636fi
4637rmdir CaseSensitiveTestDir
4638
4639case $MACHDEP in
4640bsdos*)
4641 case $CC in
4642 gcc) CC="$CC -D_HAVE_BSDI";;
4643 esac;;
4644esac
4645
4646case $ac_sys_system in
4647hp*|HP*)
4648 case $CC in
4649 cc|*/cc) CC="$CC -Ae";;
4650 esac;;
Antoine Pitrou20327222009-05-24 20:39:11 +00004651SunOS*)
4652 # Some functions have a prototype only with that define, e.g. confstr
4653
Benjamin Petersonf7155a32010-06-21 16:51:22 +00004654$as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
Antoine Pitrou20327222009-05-24 20:39:11 +00004655
4656 ;;
4657esac
4658
4659
4660
Benjamin Petersonf7155a32010-06-21 16:51:22 +00004661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00004662$as_echo_n "checking LIBRARY... " >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004663if test -z "$LIBRARY"
4664then
4665 LIBRARY='libpython$(VERSION).a'
4666fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +00004667{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00004668$as_echo "$LIBRARY" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004669
4670# LDLIBRARY is the name of the library to link against (as opposed to the
4671# name of the library into which to insert object files). BLDLIBRARY is also
4672# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
4673# is blank as the main program is not linked directly against LDLIBRARY.
4674# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
4675# systems without shared libraries, LDLIBRARY is the same as LIBRARY
4676# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
4677# DLLLIBRARY is the shared (i.e., DLL) library.
4678#
4679# RUNSHARED is used to run shared python without installed libraries
4680#
4681# INSTSONAME is the name of the shared library that will be use to install
4682# on the system - some systems like version suffix, others don't
4683
4684
4685
4686
4687
4688
4689LDLIBRARY="$LIBRARY"
4690BLDLIBRARY='$(LDLIBRARY)'
4691INSTSONAME='$(LDLIBRARY)'
4692DLLLIBRARY=''
4693LDLIBRARYDIR=''
4694RUNSHARED=''
4695
4696# LINKCC is the command that links the python executable -- default is $(CC).
4697# If CXX is set, and if it is needed to link a main function that was
4698# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
4699# python might then depend on the C++ runtime
4700# This is altered for AIX in order to build the export list before
4701# linking.
4702
Benjamin Petersonf7155a32010-06-21 16:51:22 +00004703{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00004704$as_echo_n "checking LINKCC... " >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004705if test -z "$LINKCC"
4706then
4707 LINKCC='$(PURIFY) $(MAINCC)'
4708 case $ac_sys_system in
4709 AIX*)
4710 exp_extra="\"\""
4711 if test $ac_sys_release -ge 5 -o \
4712 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
4713 exp_extra="."
4714 fi
4715 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Antoine Pitrou20327222009-05-24 20:39:11 +00004716 QNX*)
4717 # qcc must be used because the other compilers do not
4718 # support -N.
4719 LINKCC=qcc;;
4720 esac
4721fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +00004722{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00004723$as_echo "$LINKCC" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004724
4725# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
4726# make sure we default having it set to "no": this is used by
4727# distutils.unixccompiler to know if it should add --enable-new-dtags
4728# to linker command lines, and failing to detect GNU ld simply results
4729# in the same bahaviour as before.
4730
Benjamin Petersonf7155a32010-06-21 16:51:22 +00004731{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00004732$as_echo_n "checking for GNU ld... " >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004733ac_prog=ld
4734if test "$GCC" = yes; then
4735 ac_prog=`$CC -print-prog-name=ld`
4736fi
4737case `"$ac_prog" -V 2>&1 < /dev/null` in
4738 *GNU*)
4739 GNULD=yes;;
4740 *)
4741 GNULD=no;;
4742esac
Benjamin Petersonf7155a32010-06-21 16:51:22 +00004743{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00004744$as_echo "$GNULD" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004745
Benjamin Petersonf7155a32010-06-21 16:51:22 +00004746{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00004747$as_echo_n "checking for --enable-shared... " >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004748# Check whether --enable-shared was given.
Benjamin Petersonf7155a32010-06-21 16:51:22 +00004749if test "${enable_shared+set}" = set; then :
Antoine Pitrou20327222009-05-24 20:39:11 +00004750 enableval=$enable_shared;
4751fi
4752
4753
4754if test -z "$enable_shared"
4755then
4756 case $ac_sys_system in
4757 CYGWIN* | atheos*)
4758 enable_shared="yes";;
4759 *)
4760 enable_shared="no";;
4761 esac
4762fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +00004763{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00004764$as_echo "$enable_shared" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004765
Benjamin Petersonf7155a32010-06-21 16:51:22 +00004766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00004767$as_echo_n "checking for --enable-profiling... " >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004768# Check whether --enable-profiling was given.
Benjamin Petersonf7155a32010-06-21 16:51:22 +00004769if test "${enable_profiling+set}" = set; then :
Antoine Pitrou20327222009-05-24 20:39:11 +00004770 enableval=$enable_profiling; ac_save_cc="$CC"
4771 CC="$CC -pg"
Benjamin Petersonf7155a32010-06-21 16:51:22 +00004772 if test "$cross_compiling" = yes; then :
Antoine Pitrou20327222009-05-24 20:39:11 +00004773 ac_enable_profiling="no"
4774else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00004775 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitrou20327222009-05-24 20:39:11 +00004776/* end confdefs.h. */
4777int main() { return 0; }
4778_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +00004779if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitrou20327222009-05-24 20:39:11 +00004780 ac_enable_profiling="yes"
4781else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00004782 ac_enable_profiling="no"
Antoine Pitrou20327222009-05-24 20:39:11 +00004783fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +00004784rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4785 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitrou20327222009-05-24 20:39:11 +00004786fi
4787
Antoine Pitrou20327222009-05-24 20:39:11 +00004788 CC="$ac_save_cc"
4789fi
4790
Benjamin Petersonf7155a32010-06-21 16:51:22 +00004791{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_profiling" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00004792$as_echo "$ac_enable_profiling" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004793
4794case "$ac_enable_profiling" in
4795 "yes")
4796 BASECFLAGS="-pg $BASECFLAGS"
4797 LDFLAGS="-pg $LDFLAGS"
4798 ;;
4799esac
4800
Benjamin Petersonf7155a32010-06-21 16:51:22 +00004801{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00004802$as_echo_n "checking LDLIBRARY... " >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004803
4804# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4805# library that we build, but we do not want to link against it (we
4806# will find it with a -framework option). For this reason there is an
4807# extra variable BLDLIBRARY against which Python and the extension
4808# modules are linked, BLDLIBRARY. This is normally the same as
4809# LDLIBRARY, but empty for MacOSX framework builds.
4810if test "$enable_framework"
4811then
4812 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
4813 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
4814 BLDLIBRARY=''
4815else
4816 BLDLIBRARY='$(LDLIBRARY)'
4817fi
4818
4819# Other platforms follow
4820if test $enable_shared = "yes"; then
4821
Benjamin Petersonf7155a32010-06-21 16:51:22 +00004822$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Antoine Pitrou20327222009-05-24 20:39:11 +00004823
4824 case $ac_sys_system in
4825 CYGWIN*)
4826 LDLIBRARY='libpython$(VERSION).dll.a'
4827 DLLLIBRARY='libpython$(VERSION).dll'
4828 ;;
4829 SunOS*)
4830 LDLIBRARY='libpython$(VERSION).so'
4831 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
4832 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4833 INSTSONAME="$LDLIBRARY".$SOVERSION
4834 ;;
4835 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
4836 LDLIBRARY='libpython$(VERSION).so'
4837 BLDLIBRARY='-L. -lpython$(VERSION)'
4838 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4839 case $ac_sys_system in
4840 FreeBSD*)
4841 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4842 ;;
4843 esac
4844 INSTSONAME="$LDLIBRARY".$SOVERSION
4845 ;;
4846 hp*|HP*)
4847 case `uname -m` in
4848 ia64)
4849 LDLIBRARY='libpython$(VERSION).so'
4850 ;;
4851 *)
4852 LDLIBRARY='libpython$(VERSION).sl'
4853 ;;
4854 esac
4855 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
4856 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
4857 ;;
4858 OSF*)
4859 LDLIBRARY='libpython$(VERSION).so'
4860 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
4861 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4862 ;;
4863 atheos*)
4864 LDLIBRARY='libpython$(VERSION).so'
4865 BLDLIBRARY='-L. -lpython$(VERSION)'
4866 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
4867 ;;
4868 Darwin*)
4869 LDLIBRARY='libpython$(VERSION).dylib'
4870 BLDLIBRARY='-L. -lpython$(VERSION)'
4871 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
4872 ;;
4873
4874 esac
4875else # shared is disabled
4876 case $ac_sys_system in
4877 CYGWIN*)
4878 BLDLIBRARY='$(LIBRARY)'
4879 LDLIBRARY='libpython$(VERSION).dll.a'
4880 ;;
4881 esac
4882fi
4883
Benjamin Petersonf7155a32010-06-21 16:51:22 +00004884{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00004885$as_echo "$LDLIBRARY" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004886
4887if test -n "$ac_tool_prefix"; then
4888 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4889set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Benjamin Petersonf7155a32010-06-21 16:51:22 +00004890{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00004891$as_echo_n "checking for $ac_word... " >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +00004892if test "${ac_cv_prog_RANLIB+set}" = set; then :
Benjamin Peterson82af01d2010-05-02 16:45:41 +00004893 $as_echo_n "(cached) " >&6
Antoine Pitrou20327222009-05-24 20:39:11 +00004894else
4895 if test -n "$RANLIB"; then
4896 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4897else
4898as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4899for as_dir in $PATH
4900do
4901 IFS=$as_save_IFS
4902 test -z "$as_dir" && as_dir=.
Benjamin Petersonf7155a32010-06-21 16:51:22 +00004903 for ac_exec_ext in '' $ac_executable_extensions; do
Antoine Pitrou20327222009-05-24 20:39:11 +00004904 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4905 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Benjamin Petersonf7155a32010-06-21 16:51:22 +00004906 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004907 break 2
4908 fi
4909done
Benjamin Petersonf7155a32010-06-21 16:51:22 +00004910 done
Antoine Pitrou20327222009-05-24 20:39:11 +00004911IFS=$as_save_IFS
4912
4913fi
4914fi
4915RANLIB=$ac_cv_prog_RANLIB
4916if test -n "$RANLIB"; then
Benjamin Petersonf7155a32010-06-21 16:51:22 +00004917 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00004918$as_echo "$RANLIB" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004919else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00004920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00004921$as_echo "no" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004922fi
4923
4924
4925fi
4926if test -z "$ac_cv_prog_RANLIB"; then
4927 ac_ct_RANLIB=$RANLIB
4928 # Extract the first word of "ranlib", so it can be a program name with args.
4929set dummy ranlib; ac_word=$2
Benjamin Petersonf7155a32010-06-21 16:51:22 +00004930{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00004931$as_echo_n "checking for $ac_word... " >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +00004932if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
Benjamin Peterson82af01d2010-05-02 16:45:41 +00004933 $as_echo_n "(cached) " >&6
Antoine Pitrou20327222009-05-24 20:39:11 +00004934else
4935 if test -n "$ac_ct_RANLIB"; then
4936 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4937else
4938as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4939for as_dir in $PATH
4940do
4941 IFS=$as_save_IFS
4942 test -z "$as_dir" && as_dir=.
Benjamin Petersonf7155a32010-06-21 16:51:22 +00004943 for ac_exec_ext in '' $ac_executable_extensions; do
Antoine Pitrou20327222009-05-24 20:39:11 +00004944 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4945 ac_cv_prog_ac_ct_RANLIB="ranlib"
Benjamin Petersonf7155a32010-06-21 16:51:22 +00004946 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004947 break 2
4948 fi
4949done
Benjamin Petersonf7155a32010-06-21 16:51:22 +00004950 done
Antoine Pitrou20327222009-05-24 20:39:11 +00004951IFS=$as_save_IFS
4952
4953fi
4954fi
4955ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4956if test -n "$ac_ct_RANLIB"; then
Benjamin Petersonf7155a32010-06-21 16:51:22 +00004957 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00004958$as_echo "$ac_ct_RANLIB" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004959else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00004960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00004961$as_echo "no" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004962fi
4963
4964 if test "x$ac_ct_RANLIB" = x; then
4965 RANLIB=":"
4966 else
4967 case $cross_compiling:$ac_tool_warned in
4968yes:)
Benjamin Petersonf7155a32010-06-21 16:51:22 +00004969{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00004970$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Antoine Pitrou20327222009-05-24 20:39:11 +00004971ac_tool_warned=yes ;;
4972esac
4973 RANLIB=$ac_ct_RANLIB
4974 fi
4975else
4976 RANLIB="$ac_cv_prog_RANLIB"
4977fi
4978
4979
4980for ac_prog in ar aal
4981do
4982 # Extract the first word of "$ac_prog", so it can be a program name with args.
4983set dummy $ac_prog; ac_word=$2
Benjamin Petersonf7155a32010-06-21 16:51:22 +00004984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00004985$as_echo_n "checking for $ac_word... " >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +00004986if test "${ac_cv_prog_AR+set}" = set; then :
Benjamin Peterson82af01d2010-05-02 16:45:41 +00004987 $as_echo_n "(cached) " >&6
Antoine Pitrou20327222009-05-24 20:39:11 +00004988else
4989 if test -n "$AR"; then
4990 ac_cv_prog_AR="$AR" # Let the user override the test.
4991else
4992as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4993for as_dir in $PATH
4994do
4995 IFS=$as_save_IFS
4996 test -z "$as_dir" && as_dir=.
Benjamin Petersonf7155a32010-06-21 16:51:22 +00004997 for ac_exec_ext in '' $ac_executable_extensions; do
Antoine Pitrou20327222009-05-24 20:39:11 +00004998 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4999 ac_cv_prog_AR="$ac_prog"
Benjamin Petersonf7155a32010-06-21 16:51:22 +00005000 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005001 break 2
5002 fi
5003done
Benjamin Petersonf7155a32010-06-21 16:51:22 +00005004 done
Antoine Pitrou20327222009-05-24 20:39:11 +00005005IFS=$as_save_IFS
5006
5007fi
5008fi
5009AR=$ac_cv_prog_AR
5010if test -n "$AR"; then
Benjamin Petersonf7155a32010-06-21 16:51:22 +00005011 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00005012$as_echo "$AR" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005013else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00005014 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00005015$as_echo "no" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005016fi
5017
5018
5019 test -n "$AR" && break
5020done
5021test -n "$AR" || AR="ar"
5022
5023
5024# tweak ARFLAGS only if the user didn't set it on the command line
5025
5026if test -z "$ARFLAGS"
5027then
5028 ARFLAGS="rc"
5029fi
5030
5031
5032# Extract the first word of "svnversion", so it can be a program name with args.
5033set dummy svnversion; ac_word=$2
Benjamin Petersonf7155a32010-06-21 16:51:22 +00005034{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00005035$as_echo_n "checking for $ac_word... " >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +00005036if test "${ac_cv_prog_SVNVERSION+set}" = set; then :
Benjamin Peterson82af01d2010-05-02 16:45:41 +00005037 $as_echo_n "(cached) " >&6
Antoine Pitrou20327222009-05-24 20:39:11 +00005038else
5039 if test -n "$SVNVERSION"; then
5040 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
5041else
5042as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5043for as_dir in $PATH
5044do
5045 IFS=$as_save_IFS
5046 test -z "$as_dir" && as_dir=.
Benjamin Petersonf7155a32010-06-21 16:51:22 +00005047 for ac_exec_ext in '' $ac_executable_extensions; do
Antoine Pitrou20327222009-05-24 20:39:11 +00005048 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5049 ac_cv_prog_SVNVERSION="found"
Benjamin Petersonf7155a32010-06-21 16:51:22 +00005050 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005051 break 2
5052 fi
5053done
Benjamin Petersonf7155a32010-06-21 16:51:22 +00005054 done
Antoine Pitrou20327222009-05-24 20:39:11 +00005055IFS=$as_save_IFS
5056
5057 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
5058fi
5059fi
5060SVNVERSION=$ac_cv_prog_SVNVERSION
5061if test -n "$SVNVERSION"; then
Benjamin Petersonf7155a32010-06-21 16:51:22 +00005062 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SVNVERSION" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00005063$as_echo "$SVNVERSION" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005064else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00005065 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00005066$as_echo "no" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005067fi
5068
5069
5070if test $SVNVERSION = found
5071then
5072 SVNVERSION="svnversion \$(srcdir)"
5073else
5074 SVNVERSION="echo Unversioned directory"
5075fi
5076
5077case $MACHDEP in
5078bsdos*|hp*|HP*)
5079 # install -d does not work on BSDI or HP-UX
5080 if test -z "$INSTALL"
5081 then
5082 INSTALL="${srcdir}/install-sh -c"
5083 fi
5084esac
5085ac_aux_dir=
5086for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
Benjamin Petersonf7155a32010-06-21 16:51:22 +00005087 for ac_t in install-sh install.sh shtool; do
5088 if test -f "$ac_dir/$ac_t"; then
5089 ac_aux_dir=$ac_dir
5090 ac_install_sh="$ac_aux_dir/$ac_t -c"
5091 break 2
5092 fi
5093 done
Antoine Pitrou20327222009-05-24 20:39:11 +00005094done
5095if test -z "$ac_aux_dir"; then
Benjamin Petersonf7155a32010-06-21 16:51:22 +00005096 as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
Antoine Pitrou20327222009-05-24 20:39:11 +00005097fi
5098
5099# These three variables are undocumented and unsupported,
5100# and are intended to be withdrawn in a future Autoconf release.
5101# They can cause serious problems if a builder's source tree is in a directory
5102# whose full name contains unusual characters.
5103ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
5104ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
5105ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
5106
5107
5108# Find a good install program. We prefer a C program (faster),
5109# so one script is as good as another. But avoid the broken or
5110# incompatible versions:
5111# SysV /etc/install, /usr/sbin/install
5112# SunOS /usr/etc/install
5113# IRIX /sbin/install
5114# AIX /bin/install
5115# AmigaOS /C/install, which installs bootblocks on floppy discs
5116# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5117# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5118# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5119# OS/2's system install, which has a completely different semantic
5120# ./install, which can be erroneously created by make from ./install.sh.
Benjamin Peterson82af01d2010-05-02 16:45:41 +00005121# Reject install programs that cannot install multiple files.
Benjamin Petersonf7155a32010-06-21 16:51:22 +00005122{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00005123$as_echo_n "checking for a BSD-compatible install... " >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005124if test -z "$INSTALL"; then
Benjamin Petersonf7155a32010-06-21 16:51:22 +00005125if test "${ac_cv_path_install+set}" = set; then :
Benjamin Peterson82af01d2010-05-02 16:45:41 +00005126 $as_echo_n "(cached) " >&6
Antoine Pitrou20327222009-05-24 20:39:11 +00005127else
5128 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5129for as_dir in $PATH
5130do
5131 IFS=$as_save_IFS
5132 test -z "$as_dir" && as_dir=.
Benjamin Petersonf7155a32010-06-21 16:51:22 +00005133 # Account for people who put trailing slashes in PATH elements.
5134case $as_dir/ in #((
5135 ./ | .// | /[cC]/* | \
Antoine Pitrou20327222009-05-24 20:39:11 +00005136 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Benjamin Petersonf7155a32010-06-21 16:51:22 +00005137 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Antoine Pitrou20327222009-05-24 20:39:11 +00005138 /usr/ucb/* ) ;;
5139 *)
5140 # OSF1 and SCO ODT 3.0 have their own names for install.
5141 # Don't use installbsd from OSF since it installs stuff as root
5142 # by default.
5143 for ac_prog in ginstall scoinst install; do
5144 for ac_exec_ext in '' $ac_executable_extensions; do
5145 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
5146 if test $ac_prog = install &&
5147 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5148 # AIX install. It has an incompatible calling convention.
5149 :
5150 elif test $ac_prog = install &&
5151 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5152 # program-specific install script used by HP pwplus--don't use.
5153 :
5154 else
Benjamin Peterson82af01d2010-05-02 16:45:41 +00005155 rm -rf conftest.one conftest.two conftest.dir
5156 echo one > conftest.one
5157 echo two > conftest.two
5158 mkdir conftest.dir
5159 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5160 test -s conftest.one && test -s conftest.two &&
5161 test -s conftest.dir/conftest.one &&
5162 test -s conftest.dir/conftest.two
5163 then
5164 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5165 break 3
5166 fi
Antoine Pitrou20327222009-05-24 20:39:11 +00005167 fi
5168 fi
5169 done
5170 done
5171 ;;
5172esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +00005173
Benjamin Petersonf7155a32010-06-21 16:51:22 +00005174 done
Antoine Pitrou20327222009-05-24 20:39:11 +00005175IFS=$as_save_IFS
5176
Benjamin Peterson82af01d2010-05-02 16:45:41 +00005177rm -rf conftest.one conftest.two conftest.dir
Antoine Pitrou20327222009-05-24 20:39:11 +00005178
5179fi
5180 if test "${ac_cv_path_install+set}" = set; then
5181 INSTALL=$ac_cv_path_install
5182 else
5183 # As a last resort, use the slow shell script. Don't cache a
5184 # value for INSTALL within a source directory, because that will
5185 # break other packages using the cache if that directory is
5186 # removed, or if the value is a relative name.
5187 INSTALL=$ac_install_sh
5188 fi
5189fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +00005190{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00005191$as_echo "$INSTALL" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005192
5193# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5194# It thinks the first close brace ends the variable substitution.
5195test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5196
5197test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
5198
5199test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5200
5201
5202# Not every filesystem supports hard links
5203
5204if test -z "$LN" ; then
5205 case $ac_sys_system in
5206 CYGWIN*) LN="ln -s";;
5207 atheos*) LN="ln -s";;
5208 *) LN=ln;;
5209 esac
5210fi
5211
5212# Check for --with-pydebug
Benjamin Petersonf7155a32010-06-21 16:51:22 +00005213{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00005214$as_echo_n "checking for --with-pydebug... " >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005215
5216# Check whether --with-pydebug was given.
Benjamin Petersonf7155a32010-06-21 16:51:22 +00005217if test "${with_pydebug+set}" = set; then :
Antoine Pitrou20327222009-05-24 20:39:11 +00005218 withval=$with_pydebug;
5219if test "$withval" != no
5220then
5221
Benjamin Petersonf7155a32010-06-21 16:51:22 +00005222$as_echo "#define Py_DEBUG 1" >>confdefs.h
Antoine Pitrou20327222009-05-24 20:39:11 +00005223
Benjamin Petersonf7155a32010-06-21 16:51:22 +00005224 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00005225$as_echo "yes" >&6; };
Antoine Pitrou20327222009-05-24 20:39:11 +00005226 Py_DEBUG='true'
Benjamin Petersonf7155a32010-06-21 16:51:22 +00005227else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00005228$as_echo "no" >&6; }; Py_DEBUG='false'
Antoine Pitrou20327222009-05-24 20:39:11 +00005229fi
5230else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00005231 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00005232$as_echo "no" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005233fi
5234
5235
5236# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
5237# merged with this chunk of code?
5238
5239# Optimizer/debugger flags
5240# ------------------------
5241# (The following bit of code is complicated enough - please keep things
5242# indented properly. Just pretend you're editing Python code. ;-)
5243
5244# There are two parallel sets of case statements below, one that checks to
5245# see if OPT was set and one that does BASECFLAGS setting based upon
5246# compiler and platform. BASECFLAGS tweaks need to be made even if the
5247# user set OPT.
5248
5249# tweak OPT based on compiler and platform, only if the user didn't set
5250# it on the command line
5251
Benjamin Petersone7e59c22010-03-23 21:05:56 +00005252if test "${OPT-unset}" = "unset"
Antoine Pitrou20327222009-05-24 20:39:11 +00005253then
5254 case $GCC in
5255 yes)
5256 if test "$CC" != 'g++' ; then
5257 STRICT_PROTO="-Wstrict-prototypes"
5258 fi
5259 # For gcc 4.x we need to use -fwrapv so lets check if its supported
5260 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
5261 WRAP="-fwrapv"
5262 fi
5263 case $ac_cv_prog_cc_g in
5264 yes)
5265 if test "$Py_DEBUG" = 'true' ; then
5266 # Optimization messes up debuggers, so turn it off for
5267 # debug builds.
5268 OPT="-g -Wall $STRICT_PROTO"
5269 else
5270 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
5271 fi
5272 ;;
5273 *)
5274 OPT="-O3 -Wall $STRICT_PROTO"
5275 ;;
5276 esac
5277 case $ac_sys_system in
5278 SCO_SV*) OPT="$OPT -m486 -DSCO5"
5279 ;;
5280 esac
5281 ;;
5282
5283 *)
5284 OPT="-O"
5285 ;;
5286 esac
Antoine Pitrou20327222009-05-24 20:39:11 +00005287fi
5288
5289
5290
5291# The -arch flags for universal builds on OSX
5292UNIVERSAL_ARCH_FLAGS=
5293
5294
5295# tweak BASECFLAGS based on compiler and platform
5296case $GCC in
5297yes)
Benjamin Petersonc2037d62010-06-21 17:04:07 +00005298 # Python doesn't violate C99 aliasing rules, but older versions of
5299 # GCC produce warnings for legal Python code. Enable
5300 # -fno-strict-aliasing on versions of GCC that support but produce
5301 # warnings. See Issue3326
5302 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
5303$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005304 ac_save_cc="$CC"
5305 CC="$CC -fno-strict-aliasing"
Benjamin Petersonc2037d62010-06-21 17:04:07 +00005306 save_CFLAGS="$CFLAGS"
5307 if test "${ac_cv_no_strict_aliasing+set}" = set; then :
5308 $as_echo_n "(cached) " >&6
Antoine Pitrou20327222009-05-24 20:39:11 +00005309else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00005310 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitrou20327222009-05-24 20:39:11 +00005311/* end confdefs.h. */
Benjamin Petersonc2037d62010-06-21 17:04:07 +00005312
5313
5314int
5315main ()
5316{
5317
5318 ;
5319 return 0;
5320}
5321
Antoine Pitrou20327222009-05-24 20:39:11 +00005322_ACEOF
Benjamin Petersonc2037d62010-06-21 17:04:07 +00005323if ac_fn_c_try_compile "$LINENO"; then :
5324
5325 CC="$ac_save_cc -fstrict-aliasing"
5326 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
5327 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5328/* end confdefs.h. */
5329
5330 void f(int **x) {}
5331int
5332main ()
5333{
5334double *x; f((int **) &x);
5335 ;
5336 return 0;
5337}
5338
5339_ACEOF
5340if ac_fn_c_try_compile "$LINENO"; then :
5341
5342 ac_cv_no_strict_aliasing=no
5343
Antoine Pitrou20327222009-05-24 20:39:11 +00005344else
Benjamin Petersonc2037d62010-06-21 17:04:07 +00005345
5346 ac_cv_no_strict_aliasing=yes
5347
Antoine Pitrou20327222009-05-24 20:39:11 +00005348fi
Benjamin Petersonc2037d62010-06-21 17:04:07 +00005349rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5350
5351else
5352
5353 ac_cv_no_strict_aliasing=no
5354
5355fi
5356rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitrou20327222009-05-24 20:39:11 +00005357fi
5358
Benjamin Petersonc2037d62010-06-21 17:04:07 +00005359 CFLAGS="$save_CFLAGS"
Antoine Pitrou20327222009-05-24 20:39:11 +00005360 CC="$ac_save_cc"
Benjamin Petersonc2037d62010-06-21 17:04:07 +00005361 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
5362$as_echo "$ac_cv_no_strict_aliasing" >&6; }
5363 if test $ac_cv_no_strict_aliasing = yes
Antoine Pitrou20327222009-05-24 20:39:11 +00005364 then
5365 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
5366 fi
5367
5368 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
5369 # support. Without this, treatment of subnormals doesn't follow
5370 # the standard.
5371 case $ac_sys_machine in
5372 alpha*)
5373 BASECFLAGS="$BASECFLAGS -mieee"
5374 ;;
5375 esac
5376
5377 case $ac_sys_system in
5378 SCO_SV*)
5379 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
5380 ;;
5381 # is there any other compiler on Darwin besides gcc?
5382 Darwin*)
5383 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
5384 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussoren79a93512010-04-18 19:08:47 +00005385 if test "${CC}" = gcc
5386 then
Benjamin Petersonf7155a32010-06-21 16:51:22 +00005387 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00005388$as_echo_n "checking which compiler should be used... " >&6; }
Ronald Oussoren79a93512010-04-18 19:08:47 +00005389 case "${UNIVERSALSDK}" in
5390 */MacOSX10.4u.sdk)
5391 # Build using 10.4 SDK, force usage of gcc when the
5392 # compiler is gcc, otherwise the user will get very
5393 # confusing error messages when building on OSX 10.6
5394 CC=gcc-4.0
5395 CPP=cpp-4.0
5396 ;;
5397 esac
Benjamin Petersonf7155a32010-06-21 16:51:22 +00005398 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00005399$as_echo "$CC" >&6; }
Ronald Oussoren79a93512010-04-18 19:08:47 +00005400 fi
Antoine Pitrou20327222009-05-24 20:39:11 +00005401
5402
5403 if test "${enable_universalsdk}"; then
5404 UNIVERSAL_ARCH_FLAGS=""
5405 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
Antoine Pitrou20327222009-05-24 20:39:11 +00005406 ARCH_RUN_32BIT=""
Benjamin Petersone7e59c22010-03-23 21:05:56 +00005407 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
Antoine Pitrou20327222009-05-24 20:39:11 +00005408
5409 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
Ronald Oussorend45ff2c2009-09-06 11:11:04 +00005410 ARCH_RUN_32BIT="true"
Benjamin Petersone7e59c22010-03-23 21:05:56 +00005411 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
Antoine Pitrou20327222009-05-24 20:39:11 +00005412
5413 elif test "$UNIVERSAL_ARCHS" = "all" ; then
Ronald Oussorenc8c89c42010-02-11 13:24:45 +00005414 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Benjamin Petersone7e59c22010-03-23 21:05:56 +00005415 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
5416 LIPO_32BIT_FLAGS="-extract i386 -extract ppc7400"
5417 LIPO_64BIT_FLAGS="-extract x86_64 -extract ppc64"
Antoine Pitrou20327222009-05-24 20:39:11 +00005418
Ronald Oussoren856624d2009-09-08 07:13:53 +00005419 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
Ronald Oussorenc8c89c42010-02-11 13:24:45 +00005420 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Benjamin Petersone7e59c22010-03-23 21:05:56 +00005421 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
5422 LIPO_32BIT_FLAGS="-extract i386"
5423 LIPO_64BIT_FLAGS="-extract x86_64"
Ronald Oussoren856624d2009-09-08 07:13:53 +00005424
5425 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
Ronald Oussorenc8c89c42010-02-11 13:24:45 +00005426 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Benjamin Petersone7e59c22010-03-23 21:05:56 +00005427 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
5428 LIPO_32BIT_FLAGS="-extract i386 -extract ppc7400"
5429 LIPO_64BIT_FLAGS="-extract x86_64"
Ronald Oussoren856624d2009-09-08 07:13:53 +00005430
Antoine Pitrou20327222009-05-24 20:39:11 +00005431 else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00005432 as_fn_error "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
Antoine Pitrou20327222009-05-24 20:39:11 +00005433
5434 fi
5435
5436
Ronald Oussoren79a93512010-04-18 19:08:47 +00005437 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
5438 if test "${UNIVERSALSDK}" != "/"
5439 then
5440 CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
5441 LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
5442 CPPFLAGSFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Antoine Pitrou20327222009-05-24 20:39:11 +00005443 fi
5444 fi
5445
5446 # Calculate the right deployment target for this build.
5447 #
5448 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
5449 if test ${cur_target} '>' 10.2; then
5450 cur_target=10.3
Ronald Oussorend45ff2c2009-09-06 11:11:04 +00005451 if test ${enable_universalsdk}; then
5452 if test "${UNIVERSAL_ARCHS}" = "all"; then
5453 # Ensure that the default platform for a
5454 # 4-way universal build is OSX 10.5,
5455 # that's the first OS release where
5456 # 4-way builds make sense.
5457 cur_target='10.5'
Ronald Oussoren856624d2009-09-08 07:13:53 +00005458
5459 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
5460 cur_target='10.5'
5461
5462 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
5463 cur_target='10.5'
5464
5465 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
5466 cur_target='10.5'
Ronald Oussorend45ff2c2009-09-06 11:11:04 +00005467 fi
5468 else
Ronald Oussoren175a8842010-02-11 13:40:06 +00005469 if test `/usr/bin/arch` = "i386"; then
Ronald Oussorend45ff2c2009-09-06 11:11:04 +00005470 # On Intel macs default to a deployment
5471 # target of 10.4, that's the first OSX
5472 # release with Intel support.
5473 cur_target="10.4"
5474 fi
5475 fi
Antoine Pitrou20327222009-05-24 20:39:11 +00005476 fi
5477 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
5478
5479 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
5480 # environment with a value that is the same as what we'll use
5481 # in the Makefile to ensure that we'll get the same compiler
5482 # environment during configure and build time.
5483 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
5484 export MACOSX_DEPLOYMENT_TARGET
5485 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
5486
5487 ;;
5488 OSF*)
5489 BASECFLAGS="$BASECFLAGS -mieee"
5490 ;;
5491 esac
5492 ;;
5493
5494*)
5495 case $ac_sys_system in
5496 OpenUNIX*|UnixWare*)
5497 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
5498 ;;
5499 OSF*)
5500 BASECFLAGS="$BASECFLAGS -ieee -std"
5501 ;;
5502 SCO_SV*)
5503 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
5504 ;;
5505 esac
5506 ;;
5507esac
5508
5509if test "$Py_DEBUG" = 'true'; then
5510 :
5511else
5512 OPT="-DNDEBUG $OPT"
5513fi
5514
5515if test "$ac_arch_flags"
5516then
5517 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
5518fi
5519
5520# disable check for icc since it seems to pass, but generates a warning
5521if test "$CC" = icc
5522then
5523 ac_cv_opt_olimit_ok=no
5524fi
5525
Benjamin Petersonf7155a32010-06-21 16:51:22 +00005526{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -OPT:Olimit=0" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00005527$as_echo_n "checking whether $CC accepts -OPT:Olimit=0... " >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +00005528if test "${ac_cv_opt_olimit_ok+set}" = set; then :
Benjamin Peterson82af01d2010-05-02 16:45:41 +00005529 $as_echo_n "(cached) " >&6
Antoine Pitrou20327222009-05-24 20:39:11 +00005530else
5531 ac_save_cc="$CC"
5532CC="$CC -OPT:Olimit=0"
Benjamin Petersonf7155a32010-06-21 16:51:22 +00005533if test "$cross_compiling" = yes; then :
Antoine Pitrou20327222009-05-24 20:39:11 +00005534 ac_cv_opt_olimit_ok=no
5535else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00005536 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitrou20327222009-05-24 20:39:11 +00005537/* end confdefs.h. */
5538int main() { return 0; }
5539_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +00005540if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitrou20327222009-05-24 20:39:11 +00005541 ac_cv_opt_olimit_ok=yes
5542else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00005543 ac_cv_opt_olimit_ok=no
Antoine Pitrou20327222009-05-24 20:39:11 +00005544fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +00005545rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5546 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitrou20327222009-05-24 20:39:11 +00005547fi
5548
Antoine Pitrou20327222009-05-24 20:39:11 +00005549CC="$ac_save_cc"
5550fi
5551
Benjamin Petersonf7155a32010-06-21 16:51:22 +00005552{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_opt_olimit_ok" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00005553$as_echo "$ac_cv_opt_olimit_ok" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005554if test $ac_cv_opt_olimit_ok = yes; then
5555 case $ac_sys_system in
5556 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
5557 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
5558 # environment?
5559 Darwin*)
5560 ;;
5561 *)
5562 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
5563 ;;
5564 esac
5565else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00005566 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Olimit 1500" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00005567$as_echo_n "checking whether $CC accepts -Olimit 1500... " >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +00005568 if test "${ac_cv_olimit_ok+set}" = set; then :
Benjamin Peterson82af01d2010-05-02 16:45:41 +00005569 $as_echo_n "(cached) " >&6
Antoine Pitrou20327222009-05-24 20:39:11 +00005570else
5571 ac_save_cc="$CC"
5572 CC="$CC -Olimit 1500"
Benjamin Petersonf7155a32010-06-21 16:51:22 +00005573 if test "$cross_compiling" = yes; then :
Antoine Pitrou20327222009-05-24 20:39:11 +00005574 ac_cv_olimit_ok=no
5575else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00005576 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitrou20327222009-05-24 20:39:11 +00005577/* end confdefs.h. */
5578int main() { return 0; }
5579_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +00005580if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitrou20327222009-05-24 20:39:11 +00005581 ac_cv_olimit_ok=yes
5582else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00005583 ac_cv_olimit_ok=no
Antoine Pitrou20327222009-05-24 20:39:11 +00005584fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +00005585rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5586 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitrou20327222009-05-24 20:39:11 +00005587fi
5588
Antoine Pitrou20327222009-05-24 20:39:11 +00005589 CC="$ac_save_cc"
5590fi
5591
Benjamin Petersonf7155a32010-06-21 16:51:22 +00005592 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_olimit_ok" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00005593$as_echo "$ac_cv_olimit_ok" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005594 if test $ac_cv_olimit_ok = yes; then
5595 BASECFLAGS="$BASECFLAGS -Olimit 1500"
5596 fi
5597fi
5598
5599# Check whether GCC supports PyArg_ParseTuple format
5600if test "$GCC" = "yes"
5601then
Benjamin Petersonf7155a32010-06-21 16:51:22 +00005602 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00005603$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005604 save_CFLAGS=$CFLAGS
5605 CFLAGS="$CFLAGS -Werror"
Benjamin Petersonf7155a32010-06-21 16:51:22 +00005606 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitrou20327222009-05-24 20:39:11 +00005607/* end confdefs.h. */
5608
5609 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
5610
5611int
5612main ()
5613{
5614
5615 ;
5616 return 0;
5617}
5618_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +00005619if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitrou20327222009-05-24 20:39:11 +00005620
Benjamin Petersonf7155a32010-06-21 16:51:22 +00005621$as_echo "#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1" >>confdefs.h
Antoine Pitrou20327222009-05-24 20:39:11 +00005622
Benjamin Petersonf7155a32010-06-21 16:51:22 +00005623 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00005624$as_echo "yes" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005625else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00005626 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00005627$as_echo "no" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005628
5629fi
Antoine Pitrou20327222009-05-24 20:39:11 +00005630rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5631 CFLAGS=$save_CFLAGS
5632fi
5633
5634# On some compilers, pthreads are available without further options
5635# (e.g. MacOS X). On some of these systems, the compiler will not
5636# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
5637# So we have to see first whether pthreads are available without
5638# options before we can check whether -Kpthread improves anything.
Benjamin Petersonf7155a32010-06-21 16:51:22 +00005639{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00005640$as_echo_n "checking whether pthreads are available without options... " >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +00005641if test "${ac_cv_pthread_is_default+set}" = set; then :
Benjamin Peterson82af01d2010-05-02 16:45:41 +00005642 $as_echo_n "(cached) " >&6
Antoine Pitrou20327222009-05-24 20:39:11 +00005643else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00005644 if test "$cross_compiling" = yes; then :
Antoine Pitrou20327222009-05-24 20:39:11 +00005645 ac_cv_pthread_is_default=no
5646else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00005647 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitrou20327222009-05-24 20:39:11 +00005648/* end confdefs.h. */
5649
5650#include <pthread.h>
5651
5652void* routine(void* p){return NULL;}
5653
5654int main(){
5655 pthread_t p;
5656 if(pthread_create(&p,NULL,routine,NULL)!=0)
5657 return 1;
5658 (void)pthread_detach(p);
5659 return 0;
5660}
5661
5662_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +00005663if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitrou20327222009-05-24 20:39:11 +00005664
5665 ac_cv_pthread_is_default=yes
5666 ac_cv_kthread=no
5667 ac_cv_pthread=no
5668
5669else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00005670 ac_cv_pthread_is_default=no
Antoine Pitrou20327222009-05-24 20:39:11 +00005671fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +00005672rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5673 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitrou20327222009-05-24 20:39:11 +00005674fi
5675
5676
Antoine Pitrou20327222009-05-24 20:39:11 +00005677fi
5678
Benjamin Petersonf7155a32010-06-21 16:51:22 +00005679{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00005680$as_echo "$ac_cv_pthread_is_default" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005681
5682
5683if test $ac_cv_pthread_is_default = yes
5684then
5685 ac_cv_kpthread=no
5686else
5687# -Kpthread, if available, provides the right #defines
5688# and linker options to make pthread_create available
5689# Some compilers won't report that they do not support -Kpthread,
5690# so we need to run a program to see whether it really made the
5691# function available.
Benjamin Petersonf7155a32010-06-21 16:51:22 +00005692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00005693$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +00005694if test "${ac_cv_kpthread+set}" = set; then :
Benjamin Peterson82af01d2010-05-02 16:45:41 +00005695 $as_echo_n "(cached) " >&6
Antoine Pitrou20327222009-05-24 20:39:11 +00005696else
5697 ac_save_cc="$CC"
5698CC="$CC -Kpthread"
Benjamin Petersonf7155a32010-06-21 16:51:22 +00005699if test "$cross_compiling" = yes; then :
Antoine Pitrou20327222009-05-24 20:39:11 +00005700 ac_cv_kpthread=no
5701else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00005702 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitrou20327222009-05-24 20:39:11 +00005703/* end confdefs.h. */
5704
5705#include <pthread.h>
5706
5707void* routine(void* p){return NULL;}
5708
5709int main(){
5710 pthread_t p;
5711 if(pthread_create(&p,NULL,routine,NULL)!=0)
5712 return 1;
5713 (void)pthread_detach(p);
5714 return 0;
5715}
5716
5717_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +00005718if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitrou20327222009-05-24 20:39:11 +00005719 ac_cv_kpthread=yes
5720else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00005721 ac_cv_kpthread=no
Antoine Pitrou20327222009-05-24 20:39:11 +00005722fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +00005723rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5724 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitrou20327222009-05-24 20:39:11 +00005725fi
5726
Antoine Pitrou20327222009-05-24 20:39:11 +00005727CC="$ac_save_cc"
5728fi
5729
Benjamin Petersonf7155a32010-06-21 16:51:22 +00005730{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00005731$as_echo "$ac_cv_kpthread" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005732fi
5733
5734if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
5735then
5736# -Kthread, if available, provides the right #defines
5737# and linker options to make pthread_create available
5738# Some compilers won't report that they do not support -Kthread,
5739# so we need to run a program to see whether it really made the
5740# function available.
Benjamin Petersonf7155a32010-06-21 16:51:22 +00005741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00005742$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +00005743if test "${ac_cv_kthread+set}" = set; then :
Benjamin Peterson82af01d2010-05-02 16:45:41 +00005744 $as_echo_n "(cached) " >&6
Antoine Pitrou20327222009-05-24 20:39:11 +00005745else
5746 ac_save_cc="$CC"
5747CC="$CC -Kthread"
Benjamin Petersonf7155a32010-06-21 16:51:22 +00005748if test "$cross_compiling" = yes; then :
Antoine Pitrou20327222009-05-24 20:39:11 +00005749 ac_cv_kthread=no
5750else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00005751 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitrou20327222009-05-24 20:39:11 +00005752/* end confdefs.h. */
5753
5754#include <pthread.h>
5755
5756void* routine(void* p){return NULL;}
5757
5758int main(){
5759 pthread_t p;
5760 if(pthread_create(&p,NULL,routine,NULL)!=0)
5761 return 1;
5762 (void)pthread_detach(p);
5763 return 0;
5764}
5765
5766_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +00005767if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitrou20327222009-05-24 20:39:11 +00005768 ac_cv_kthread=yes
5769else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00005770 ac_cv_kthread=no
Antoine Pitrou20327222009-05-24 20:39:11 +00005771fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +00005772rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5773 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitrou20327222009-05-24 20:39:11 +00005774fi
5775
Antoine Pitrou20327222009-05-24 20:39:11 +00005776CC="$ac_save_cc"
5777fi
5778
Benjamin Petersonf7155a32010-06-21 16:51:22 +00005779{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00005780$as_echo "$ac_cv_kthread" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005781fi
5782
5783if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
5784then
5785# -pthread, if available, provides the right #defines
5786# and linker options to make pthread_create available
5787# Some compilers won't report that they do not support -pthread,
5788# so we need to run a program to see whether it really made the
5789# function available.
Benjamin Petersonf7155a32010-06-21 16:51:22 +00005790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00005791$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +00005792if test "${ac_cv_thread+set}" = set; then :
Benjamin Peterson82af01d2010-05-02 16:45:41 +00005793 $as_echo_n "(cached) " >&6
Antoine Pitrou20327222009-05-24 20:39:11 +00005794else
5795 ac_save_cc="$CC"
5796CC="$CC -pthread"
Benjamin Petersonf7155a32010-06-21 16:51:22 +00005797if test "$cross_compiling" = yes; then :
Antoine Pitrou20327222009-05-24 20:39:11 +00005798 ac_cv_pthread=no
5799else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00005800 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitrou20327222009-05-24 20:39:11 +00005801/* end confdefs.h. */
5802
5803#include <pthread.h>
5804
5805void* routine(void* p){return NULL;}
5806
5807int main(){
5808 pthread_t p;
5809 if(pthread_create(&p,NULL,routine,NULL)!=0)
5810 return 1;
5811 (void)pthread_detach(p);
5812 return 0;
5813}
5814
5815_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +00005816if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitrou20327222009-05-24 20:39:11 +00005817 ac_cv_pthread=yes
5818else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00005819 ac_cv_pthread=no
Antoine Pitrou20327222009-05-24 20:39:11 +00005820fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +00005821rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5822 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitrou20327222009-05-24 20:39:11 +00005823fi
5824
Antoine Pitrou20327222009-05-24 20:39:11 +00005825CC="$ac_save_cc"
5826fi
5827
Benjamin Petersonf7155a32010-06-21 16:51:22 +00005828{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00005829$as_echo "$ac_cv_pthread" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005830fi
5831
5832# If we have set a CC compiler flag for thread support then
5833# check if it works for CXX, too.
5834ac_cv_cxx_thread=no
5835if test ! -z "$CXX"
5836then
Benjamin Petersonf7155a32010-06-21 16:51:22 +00005837{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00005838$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005839ac_save_cxx="$CXX"
5840
5841if test "$ac_cv_kpthread" = "yes"
5842then
5843 CXX="$CXX -Kpthread"
5844 ac_cv_cxx_thread=yes
5845elif test "$ac_cv_kthread" = "yes"
5846then
5847 CXX="$CXX -Kthread"
5848 ac_cv_cxx_thread=yes
5849elif test "$ac_cv_pthread" = "yes"
5850then
5851 CXX="$CXX -pthread"
5852 ac_cv_cxx_thread=yes
5853fi
5854
5855if test $ac_cv_cxx_thread = yes
5856then
5857 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5858 $CXX -c conftest.$ac_ext 2>&5
5859 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5860 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5861 then
5862 ac_cv_cxx_thread=yes
5863 else
5864 ac_cv_cxx_thread=no
5865 fi
5866 rm -fr conftest*
5867fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +00005868{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00005869$as_echo "$ac_cv_cxx_thread" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005870fi
5871CXX="$ac_save_cxx"
5872
5873
5874# checks for header files
Benjamin Petersonf7155a32010-06-21 16:51:22 +00005875{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00005876$as_echo_n "checking for ANSI C header files... " >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +00005877if test "${ac_cv_header_stdc+set}" = set; then :
Benjamin Peterson82af01d2010-05-02 16:45:41 +00005878 $as_echo_n "(cached) " >&6
Antoine Pitrou20327222009-05-24 20:39:11 +00005879else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00005880 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitrou20327222009-05-24 20:39:11 +00005881/* end confdefs.h. */
5882#include <stdlib.h>
5883#include <stdarg.h>
5884#include <string.h>
5885#include <float.h>
5886
5887int
5888main ()
5889{
5890
5891 ;
5892 return 0;
5893}
5894_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +00005895if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitrou20327222009-05-24 20:39:11 +00005896 ac_cv_header_stdc=yes
5897else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00005898 ac_cv_header_stdc=no
Antoine Pitrou20327222009-05-24 20:39:11 +00005899fi
Antoine Pitrou20327222009-05-24 20:39:11 +00005900rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5901
5902if test $ac_cv_header_stdc = yes; then
5903 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Benjamin Petersonf7155a32010-06-21 16:51:22 +00005904 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitrou20327222009-05-24 20:39:11 +00005905/* end confdefs.h. */
5906#include <string.h>
5907
5908_ACEOF
5909if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Benjamin Petersonf7155a32010-06-21 16:51:22 +00005910 $EGREP "memchr" >/dev/null 2>&1; then :
5911
Antoine Pitrou20327222009-05-24 20:39:11 +00005912else
5913 ac_cv_header_stdc=no
5914fi
Jesus Cea0f752ee2010-04-28 12:03:06 +00005915rm -f conftest*
Antoine Pitrou20327222009-05-24 20:39:11 +00005916
5917fi
5918
5919if test $ac_cv_header_stdc = yes; then
5920 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Benjamin Petersonf7155a32010-06-21 16:51:22 +00005921 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitrou20327222009-05-24 20:39:11 +00005922/* end confdefs.h. */
5923#include <stdlib.h>
5924
5925_ACEOF
5926if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Benjamin Petersonf7155a32010-06-21 16:51:22 +00005927 $EGREP "free" >/dev/null 2>&1; then :
5928
Antoine Pitrou20327222009-05-24 20:39:11 +00005929else
5930 ac_cv_header_stdc=no
5931fi
Jesus Cea0f752ee2010-04-28 12:03:06 +00005932rm -f conftest*
Antoine Pitrou20327222009-05-24 20:39:11 +00005933
5934fi
5935
5936if test $ac_cv_header_stdc = yes; then
5937 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Benjamin Petersonf7155a32010-06-21 16:51:22 +00005938 if test "$cross_compiling" = yes; then :
Antoine Pitrou20327222009-05-24 20:39:11 +00005939 :
5940else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00005941 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitrou20327222009-05-24 20:39:11 +00005942/* end confdefs.h. */
5943#include <ctype.h>
5944#include <stdlib.h>
5945#if ((' ' & 0x0FF) == 0x020)
5946# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5947# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5948#else
5949# define ISLOWER(c) \
5950 (('a' <= (c) && (c) <= 'i') \
5951 || ('j' <= (c) && (c) <= 'r') \
5952 || ('s' <= (c) && (c) <= 'z'))
5953# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5954#endif
5955
5956#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5957int
5958main ()
5959{
5960 int i;
5961 for (i = 0; i < 256; i++)
5962 if (XOR (islower (i), ISLOWER (i))
5963 || toupper (i) != TOUPPER (i))
5964 return 2;
5965 return 0;
5966}
5967_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +00005968if ac_fn_c_try_run "$LINENO"; then :
5969
Antoine Pitrou20327222009-05-24 20:39:11 +00005970else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00005971 ac_cv_header_stdc=no
Antoine Pitrou20327222009-05-24 20:39:11 +00005972fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +00005973rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5974 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitrou20327222009-05-24 20:39:11 +00005975fi
5976
Antoine Pitrou20327222009-05-24 20:39:11 +00005977fi
5978fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +00005979{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00005980$as_echo "$ac_cv_header_stdc" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005981if test $ac_cv_header_stdc = yes; then
5982
Benjamin Petersonf7155a32010-06-21 16:51:22 +00005983$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Antoine Pitrou20327222009-05-24 20:39:11 +00005984
5985fi
5986
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005987for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
5988fcntl.h grp.h \
Christian Heimesbbe741d2008-03-28 10:53:29 +00005989ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Thomas Wouters89f507f2006-12-13 04:49:30 +00005990shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00005991unistd.h utime.h \
Christian Heimes4fbc72b2008-03-22 00:47:35 +00005992sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
5993sys/lock.h sys/mkdev.h sys/modem.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005994sys/param.h sys/poll.h sys/select.h sys/socket.h sys/statvfs.h sys/stat.h \
Benjamin Petersonde9c8692008-07-01 18:23:09 +00005995sys/termio.h sys/time.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005996sys/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 +00005997sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Christian Heimes043d6f62008-01-07 17:19:16 +00005998bluetooth/bluetooth.h linux/tipc.h
Benjamin Petersonf7155a32010-06-21 16:51:22 +00005999do :
6000 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6001ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
6002eval as_val=\$$as_ac_Header
6003 if test "x$as_val" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006004 cat >>confdefs.h <<_ACEOF
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006005#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006006_ACEOF
6007
6008fi
6009
Guido van Rossum627b2d71993-12-24 10:39:16 +00006010done
6011
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006012ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006013for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006014 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006015{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006016$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006017if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then :
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006018 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006019else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006020 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006021/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006022#include <sys/types.h>
6023#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00006024
Martin v. Löwis11437992002-04-12 09:54:03 +00006025int
6026main ()
6027{
6028if ((DIR *) 0)
6029return 0;
6030 ;
6031 return 0;
6032}
6033_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006034if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006035 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00006036else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006037 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006038fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006039rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006040fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006041eval ac_res=\$$as_ac_Header
6042 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006043$as_echo "$ac_res" >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006044eval as_val=\$$as_ac_Header
6045 if test "x$as_val" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006046 cat >>confdefs.h <<_ACEOF
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006047#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006048_ACEOF
6049
6050ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00006051fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006052
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006053done
6054# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6055if test $ac_header_dirent = dirent.h; then
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006056 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006057$as_echo_n "checking for library containing opendir... " >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006058if test "${ac_cv_search_opendir+set}" = set; then :
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006059 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006060else
Martin v. Löwis11437992002-04-12 09:54:03 +00006061 ac_func_search_save_LIBS=$LIBS
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006062cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006063/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006064
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006065/* Override any GCC internal prototype to avoid an error.
6066 Use char because int might match the return type of a GCC
6067 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006068#ifdef __cplusplus
6069extern "C"
6070#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006071char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006072int
6073main ()
6074{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006075return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006076 ;
6077 return 0;
6078}
6079_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006080for ac_lib in '' dir; do
6081 if test -z "$ac_lib"; then
6082 ac_res="none required"
6083 else
6084 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006085 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006086 fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006087 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006088 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006089fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006090rm -f core conftest.err conftest.$ac_objext \
6091 conftest$ac_exeext
6092 if test "${ac_cv_search_opendir+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006093 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006094fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006095done
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006096if test "${ac_cv_search_opendir+set}" = set; then :
6097
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006098else
6099 ac_cv_search_opendir=no
6100fi
6101rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006102LIBS=$ac_func_search_save_LIBS
6103fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006104{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006105$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006106ac_res=$ac_cv_search_opendir
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006107if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006108 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00006109
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006110fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006111
Michael W. Hudson54241132001-12-07 15:38:26 +00006112else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006113 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006114$as_echo_n "checking for library containing opendir... " >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006115if test "${ac_cv_search_opendir+set}" = set; then :
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006116 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006117else
6118 ac_func_search_save_LIBS=$LIBS
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006119cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006120/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006121
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006122/* Override any GCC internal prototype to avoid an error.
6123 Use char because int might match the return type of a GCC
6124 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006125#ifdef __cplusplus
6126extern "C"
6127#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006128char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006129int
6130main ()
6131{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006132return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006133 ;
6134 return 0;
6135}
6136_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006137for ac_lib in '' x; do
6138 if test -z "$ac_lib"; then
6139 ac_res="none required"
6140 else
6141 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006142 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006143 fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006144 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006145 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006146fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006147rm -f core conftest.err conftest.$ac_objext \
6148 conftest$ac_exeext
6149 if test "${ac_cv_search_opendir+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006150 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006151fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006152done
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006153if test "${ac_cv_search_opendir+set}" = set; then :
6154
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006155else
6156 ac_cv_search_opendir=no
6157fi
6158rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006159LIBS=$ac_func_search_save_LIBS
6160fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006161{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006162$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006163ac_res=$ac_cv_search_opendir
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006164if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006165 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006166
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006167fi
6168
6169fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006170
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006171{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006172$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006173if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then :
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006174 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006175else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006176 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006177/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006178#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006179int
6180main ()
6181{
6182return makedev(0, 0);
6183 ;
6184 return 0;
6185}
6186_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006187if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006188 ac_cv_header_sys_types_h_makedev=yes
6189else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006190 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006191fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006192rm -f core conftest.err conftest.$ac_objext \
6193 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006194
6195fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006196{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006197$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006198
6199if test $ac_cv_header_sys_types_h_makedev = no; then
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006200ac_fn_c_check_header_mongrel "$LINENO" "sys/mkdev.h" "ac_cv_header_sys_mkdev_h" "$ac_includes_default"
6201if test "x$ac_cv_header_sys_mkdev_h" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006202
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006203$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006204
6205fi
6206
6207
6208
6209 if test $ac_cv_header_sys_mkdev_h = no; then
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006210 ac_fn_c_check_header_mongrel "$LINENO" "sys/sysmacros.h" "ac_cv_header_sys_sysmacros_h" "$ac_includes_default"
6211if test "x$ac_cv_header_sys_sysmacros_h" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006212
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006213$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006214
6215fi
6216
6217
6218 fi
6219fi
6220
Michael W. Hudson54241132001-12-07 15:38:26 +00006221
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006222# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006223for ac_header in term.h
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006224do :
6225 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006226#ifdef HAVE_CURSES_H
6227#include <curses.h>
6228#endif
6229
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006230"
6231if test "x$ac_cv_header_term_h" = x""yes; then :
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006232 cat >>confdefs.h <<_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006233#define HAVE_TERM_H 1
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006234_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006235
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006236fi
6237
6238done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006239
6240
Martin v. Löwis11017b12006-01-14 18:12:57 +00006241# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00006242for ac_header in linux/netlink.h
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006243do :
6244 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 +00006245#ifdef HAVE_ASM_TYPES_H
6246#include <asm/types.h>
6247#endif
6248#ifdef HAVE_SYS_SOCKET_H
6249#include <sys/socket.h>
6250#endif
6251
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006252"
6253if test "x$ac_cv_header_linux_netlink_h" = x""yes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00006254 cat >>confdefs.h <<_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006255#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006256_ACEOF
6257
6258fi
6259
6260done
6261
6262
Guido van Rossum627b2d71993-12-24 10:39:16 +00006263# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006264was_it_defined=no
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006265{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006266$as_echo_n "checking for clock_t in time.h... " >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006267cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006268/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006269#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006270
6271_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006272if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006273 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00006274 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006275else
Martin v. Löwis11437992002-04-12 09:54:03 +00006276
6277
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006278$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00006279
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006280
Guido van Rossum627b2d71993-12-24 10:39:16 +00006281fi
Jesus Cea0f752ee2010-04-28 12:03:06 +00006282rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006283
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006284{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006285$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006286
Neal Norwitz11690112002-07-30 01:08:28 +00006287# Check whether using makedev requires defining _OSF_SOURCE
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006288{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006289$as_echo_n "checking for makedev... " >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006290cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006291/* end confdefs.h. */
Jesus Cea0f752ee2010-04-28 12:03:06 +00006292
6293#if defined(MAJOR_IN_MKDEV)
6294#include <sys/mkdev.h>
6295#elif defined(MAJOR_IN_SYSMACROS)
6296#include <sys/sysmacros.h>
6297#else
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006298#include <sys/types.h>
Jesus Cea0f752ee2010-04-28 12:03:06 +00006299#endif
Neal Norwitz11690112002-07-30 01:08:28 +00006300int
6301main ()
6302{
6303 makedev(0, 0)
6304 ;
6305 return 0;
6306}
6307_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006308if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006309 ac_cv_has_makedev=yes
6310else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006311 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006312fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +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
Benjamin Petersonf7155a32010-06-21 16:51:22 +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
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006331if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006332 ac_cv_has_makedev=yes
6333else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006334 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006335fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +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
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006340$as_echo "#define _OSF_SOURCE 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006341
6342 fi
6343fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006344{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006345$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006346if test "$ac_cv_has_makedev" = "yes"; then
6347
Benjamin Petersonf7155a32010-06-21 16:51:22 +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
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006361$as_echo_n "checking Solaris LFS bug... " >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006362cat 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
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006377if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00006378 sol_lfs_bug=no
6379else
Benjamin Petersonf7155a32010-06-21 16:51:22 +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
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006383{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006384$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
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006393$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006394
6395
Benjamin Petersonf7155a32010-06-21 16:51:22 +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
Benjamin Petersonf7155a32010-06-21 16:51:22 +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
Benjamin Petersonf7155a32010-06-21 16:51:22 +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
Benjamin Petersonf7155a32010-06-21 16:51:22 +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
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006441{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006442$as_echo_n "checking return type of signal handlers... " >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006443if test "${ac_cv_type_signal+set}" = set; then :
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006444 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006445else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006446 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006447/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00006448#include <sys/types.h>
6449#include <signal.h>
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006450
Martin v. Löwis11437992002-04-12 09:54:03 +00006451int
6452main ()
6453{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006454return *(signal (0, 0)) (0) == 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00006455 ;
6456 return 0;
6457}
6458_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006459if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006460 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00006461else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006462 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00006463fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006464rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006465fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006466{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006467$as_echo "$ac_cv_type_signal" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006468
Martin v. Löwis11437992002-04-12 09:54:03 +00006469cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006470#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00006471_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006472
Michael W. Hudson54241132001-12-07 15:38:26 +00006473
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006474ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
6475if test "x$ac_cv_type_size_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006476
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006477else
Martin v. Löwis11437992002-04-12 09:54:03 +00006478
6479cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006480#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00006481_ACEOF
6482
6483fi
6484
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006485{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006486$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006487if test "${ac_cv_type_uid_t+set}" = set; then :
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006488 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006489else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006490 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006491/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006492#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006493
6494_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006495if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006496 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006497 ac_cv_type_uid_t=yes
6498else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006499 ac_cv_type_uid_t=no
6500fi
Jesus Cea0f752ee2010-04-28 12:03:06 +00006501rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006502
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006503fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006504{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006505$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00006506if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006507
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006508$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006509
6510
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006511$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006512
6513fi
6514
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006515ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
6516case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006517 no|yes) ;; #(
6518 *)
6519
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006520$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006521
6522
6523cat >>confdefs.h <<_ACEOF
6524#define uint32_t $ac_cv_c_uint32_t
6525_ACEOF
6526;;
6527 esac
6528
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006529ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
6530case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006531 no|yes) ;; #(
6532 *)
6533
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006534$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006535
6536
6537cat >>confdefs.h <<_ACEOF
6538#define uint64_t $ac_cv_c_uint64_t
6539_ACEOF
6540;;
6541 esac
6542
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006543ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
6544case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006545 no|yes) ;; #(
6546 *)
6547
6548cat >>confdefs.h <<_ACEOF
6549#define int32_t $ac_cv_c_int32_t
6550_ACEOF
6551;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00006552esac
6553
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006554ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
6555case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006556 no|yes) ;; #(
6557 *)
6558
6559cat >>confdefs.h <<_ACEOF
6560#define int64_t $ac_cv_c_int64_t
6561_ACEOF
6562;;
Benjamin Petersona8332062009-09-11 22:36:27 +00006563esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00006564
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006565ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
6566if test "x$ac_cv_type_ssize_t" = x""yes; then :
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006567
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006568$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00006569
6570fi
6571
Jack Jansendd19cf82001-12-06 22:36:17 +00006572
Michael W. Hudson54241132001-12-07 15:38:26 +00006573# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00006574# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006575# The cast to long int works around a bug in the HP C Compiler
6576# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6577# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6578# This bug is HP SR number 8606223364.
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006579{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006580$as_echo_n "checking size of int... " >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006581if test "${ac_cv_sizeof_int+set}" = set; then :
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006582 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006583else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006584 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 +00006585
Martin v. Löwis11437992002-04-12 09:54:03 +00006586else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006587 if test "$ac_cv_type_int" = yes; then
6588 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006589$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006590{ as_fn_set_status 77
6591as_fn_error "cannot compute sizeof (int)
6592See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006593 else
6594 ac_cv_sizeof_int=0
6595 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006596fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006597
Martin v. Löwis11437992002-04-12 09:54:03 +00006598fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006599{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006600$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006601
6602
6603
Martin v. Löwis11437992002-04-12 09:54:03 +00006604cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006605#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00006606_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006607
6608
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006609# The cast to long int works around a bug in the HP C Compiler
6610# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6611# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6612# This bug is HP SR number 8606223364.
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006613{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006614$as_echo_n "checking size of long... " >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006615if test "${ac_cv_sizeof_long+set}" = set; then :
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006616 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006617else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006618 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 +00006619
Martin v. Löwis11437992002-04-12 09:54:03 +00006620else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006621 if test "$ac_cv_type_long" = yes; then
6622 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006623$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006624{ as_fn_set_status 77
6625as_fn_error "cannot compute sizeof (long)
6626See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006627 else
6628 ac_cv_sizeof_long=0
6629 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006630fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006631
Martin v. Löwis11437992002-04-12 09:54:03 +00006632fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006633{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006634$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006635
6636
6637
Martin v. Löwis11437992002-04-12 09:54:03 +00006638cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006639#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006640_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006641
6642
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006643# The cast to long int works around a bug in the HP C Compiler
6644# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6645# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6646# This bug is HP SR number 8606223364.
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006648$as_echo_n "checking size of void *... " >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006649if test "${ac_cv_sizeof_void_p+set}" = set; then :
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006650 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006651else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006652 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 +00006653
Martin v. Löwis11437992002-04-12 09:54:03 +00006654else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006655 if test "$ac_cv_type_void_p" = yes; then
6656 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006657$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006658{ as_fn_set_status 77
6659as_fn_error "cannot compute sizeof (void *)
6660See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006661 else
6662 ac_cv_sizeof_void_p=0
6663 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006664fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006665
Martin v. Löwis11437992002-04-12 09:54:03 +00006666fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006667{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006668$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006669
6670
6671
Martin v. Löwis11437992002-04-12 09:54:03 +00006672cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006673#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00006674_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006675
6676
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006677# The cast to long int works around a bug in the HP C Compiler
6678# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6679# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6680# This bug is HP SR number 8606223364.
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006681{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006682$as_echo_n "checking size of short... " >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006683if test "${ac_cv_sizeof_short+set}" = set; then :
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006684 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006685else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006686 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 +00006687
Martin v. Löwis11437992002-04-12 09:54:03 +00006688else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006689 if test "$ac_cv_type_short" = yes; then
6690 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006691$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006692{ as_fn_set_status 77
6693as_fn_error "cannot compute sizeof (short)
6694See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006695 else
6696 ac_cv_sizeof_short=0
6697 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006698fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006699
Martin v. Löwis11437992002-04-12 09:54:03 +00006700fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006701{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006702$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006703
6704
6705
Martin v. Löwis11437992002-04-12 09:54:03 +00006706cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006707#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00006708_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006709
6710
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006711# The cast to long int works around a bug in the HP C Compiler
6712# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6713# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6714# This bug is HP SR number 8606223364.
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006716$as_echo_n "checking size of float... " >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006717if test "${ac_cv_sizeof_float+set}" = set; then :
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006718 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006719else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006720 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 +00006721
Martin v. Löwis11437992002-04-12 09:54:03 +00006722else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006723 if test "$ac_cv_type_float" = yes; then
6724 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006725$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006726{ as_fn_set_status 77
6727as_fn_error "cannot compute sizeof (float)
6728See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006729 else
6730 ac_cv_sizeof_float=0
6731 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006732fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006733
Martin v. Löwis11437992002-04-12 09:54:03 +00006734fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006735{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006736$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006737
6738
6739
Martin v. Löwis11437992002-04-12 09:54:03 +00006740cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006741#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00006742_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006743
6744
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006745# The cast to long int works around a bug in the HP C Compiler
6746# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6747# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6748# This bug is HP SR number 8606223364.
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006750$as_echo_n "checking size of double... " >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006751if test "${ac_cv_sizeof_double+set}" = set; then :
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006752 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006753else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006754 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 +00006755
Martin v. Löwis11437992002-04-12 09:54:03 +00006756else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006757 if test "$ac_cv_type_double" = yes; then
6758 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006759$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006760{ as_fn_set_status 77
6761as_fn_error "cannot compute sizeof (double)
6762See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006763 else
6764 ac_cv_sizeof_double=0
6765 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006766fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006767
Martin v. Löwis11437992002-04-12 09:54:03 +00006768fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006769{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006770$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006771
6772
6773
Martin v. Löwis11437992002-04-12 09:54:03 +00006774cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006775#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00006776_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006777
6778
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006779# The cast to long int works around a bug in the HP C Compiler
6780# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6781# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6782# This bug is HP SR number 8606223364.
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006783{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006784$as_echo_n "checking size of fpos_t... " >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006785if test "${ac_cv_sizeof_fpos_t+set}" = set; then :
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006786 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006787else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006788 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 +00006789
Martin v. Löwis11437992002-04-12 09:54:03 +00006790else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006791 if test "$ac_cv_type_fpos_t" = yes; then
6792 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006793$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006794{ as_fn_set_status 77
6795as_fn_error "cannot compute sizeof (fpos_t)
6796See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006797 else
6798 ac_cv_sizeof_fpos_t=0
6799 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006800fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006801
Martin v. Löwis11437992002-04-12 09:54:03 +00006802fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006803{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006804$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006805
6806
6807
Martin v. Löwis11437992002-04-12 09:54:03 +00006808cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006809#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00006810_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006811
Michael W. Hudson54241132001-12-07 15:38:26 +00006812
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006813# The cast to long int works around a bug in the HP C Compiler
6814# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6815# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6816# This bug is HP SR number 8606223364.
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006818$as_echo_n "checking size of size_t... " >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006819if test "${ac_cv_sizeof_size_t+set}" = set; then :
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006820 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00006821else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006822 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 +00006823
Martin v. Löwis18e16552006-02-15 17:27:45 +00006824else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006825 if test "$ac_cv_type_size_t" = yes; then
6826 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006827$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006828{ as_fn_set_status 77
6829as_fn_error "cannot compute sizeof (size_t)
6830See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006831 else
6832 ac_cv_sizeof_size_t=0
6833 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00006834fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006835
Martin v. Löwis18e16552006-02-15 17:27:45 +00006836fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006837{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006838$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006839
6840
6841
Martin v. Löwis18e16552006-02-15 17:27:45 +00006842cat >>confdefs.h <<_ACEOF
6843#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
6844_ACEOF
6845
6846
Christian Heimes400adb02008-02-01 08:12:03 +00006847# The cast to long int works around a bug in the HP C Compiler
6848# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6849# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6850# This bug is HP SR number 8606223364.
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006852$as_echo_n "checking size of pid_t... " >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006853if test "${ac_cv_sizeof_pid_t+set}" = set; then :
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006854 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00006855else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006856 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 +00006857
Christian Heimes400adb02008-02-01 08:12:03 +00006858else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006859 if test "$ac_cv_type_pid_t" = yes; then
6860 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006861$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006862{ as_fn_set_status 77
6863as_fn_error "cannot compute sizeof (pid_t)
6864See \`config.log' for more details." "$LINENO" 5; }; }
Christian Heimes400adb02008-02-01 08:12:03 +00006865 else
6866 ac_cv_sizeof_pid_t=0
6867 fi
6868fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006869
Christian Heimes400adb02008-02-01 08:12:03 +00006870fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006871{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006872$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00006873
6874
6875
6876cat >>confdefs.h <<_ACEOF
6877#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
6878_ACEOF
6879
6880
Michael W. Hudson54241132001-12-07 15:38:26 +00006881
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006882{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006883$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006884have_long_long=no
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006885cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006886/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006887
Martin v. Löwis11437992002-04-12 09:54:03 +00006888int
6889main ()
6890{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006891long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00006892 ;
6893 return 0;
6894}
6895_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006896if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006897
6898
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006899$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006900
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006901 have_long_long=yes
6902
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006903fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006904rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006905{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006906$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00006907if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006908# The cast to long int works around a bug in the HP C Compiler
6909# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6910# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6911# This bug is HP SR number 8606223364.
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006912{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006913$as_echo_n "checking size of long long... " >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006914if test "${ac_cv_sizeof_long_long+set}" = set; then :
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006915 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006916else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006917 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 +00006918
Martin v. Löwis11437992002-04-12 09:54:03 +00006919else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006920 if test "$ac_cv_type_long_long" = yes; then
6921 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006922$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006923{ as_fn_set_status 77
6924as_fn_error "cannot compute sizeof (long long)
6925See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006926 else
6927 ac_cv_sizeof_long_long=0
6928 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006929fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006930
Martin v. Löwis11437992002-04-12 09:54:03 +00006931fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006932{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006933$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006934
6935
6936
Martin v. Löwis11437992002-04-12 09:54:03 +00006937cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006938#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006939_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006940
Michael W. Hudson54241132001-12-07 15:38:26 +00006941
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006942fi
6943
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006945$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006946have_long_double=no
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006947cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006948/* end confdefs.h. */
6949
6950int
6951main ()
6952{
6953long double x; x = (long double)0;
6954 ;
6955 return 0;
6956}
6957_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006958if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006959
6960
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006961$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006962
6963 have_long_double=yes
6964
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006965fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006966rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006967{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006968$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006969if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006970# The cast to long int works around a bug in the HP C Compiler
6971# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6972# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6973# This bug is HP SR number 8606223364.
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006974{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006975$as_echo_n "checking size of long double... " >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006976if test "${ac_cv_sizeof_long_double+set}" = set; then :
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006977 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006978else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006979 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 +00006980
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006981else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006982 if test "$ac_cv_type_long_double" = yes; then
6983 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006984$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006985{ as_fn_set_status 77
6986as_fn_error "cannot compute sizeof (long double)
6987See \`config.log' for more details." "$LINENO" 5; }; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006988 else
6989 ac_cv_sizeof_long_double=0
6990 fi
6991fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006992
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006993fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +00006994{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006995$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006996
6997
6998
6999cat >>confdefs.h <<_ACEOF
7000#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
7001_ACEOF
7002
7003
7004fi
7005
7006
Benjamin Petersonf7155a32010-06-21 16:51:22 +00007007{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007008$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007009have_c99_bool=no
Benjamin Petersonf7155a32010-06-21 16:51:22 +00007010cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00007011/* end confdefs.h. */
7012
7013int
7014main ()
7015{
7016_Bool x; x = (_Bool)0;
7017 ;
7018 return 0;
7019}
7020_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +00007021if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00007022
7023
Benjamin Petersonf7155a32010-06-21 16:51:22 +00007024$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00007025
7026 have_c99_bool=yes
7027
Thomas Woutersb2137042007-02-01 18:02:27 +00007028fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007029rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Petersonf7155a32010-06-21 16:51:22 +00007030{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007031$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007032if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007033# The cast to long int works around a bug in the HP C Compiler
7034# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7035# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7036# This bug is HP SR number 8606223364.
Benjamin Petersonf7155a32010-06-21 16:51:22 +00007037{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007038$as_echo_n "checking size of _Bool... " >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +00007039if test "${ac_cv_sizeof__Bool+set}" = set; then :
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007040 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00007041else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00007042 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 +00007043
Thomas Woutersb2137042007-02-01 18:02:27 +00007044else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00007045 if test "$ac_cv_type__Bool" = yes; then
7046 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007047$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Petersonf7155a32010-06-21 16:51:22 +00007048{ as_fn_set_status 77
7049as_fn_error "cannot compute sizeof (_Bool)
7050See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007051 else
7052 ac_cv_sizeof__Bool=0
7053 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00007054fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +00007055
Thomas Woutersb2137042007-02-01 18:02:27 +00007056fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +00007057{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007058$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007059
7060
7061
Thomas Woutersb2137042007-02-01 18:02:27 +00007062cat >>confdefs.h <<_ACEOF
7063#define SIZEOF__BOOL $ac_cv_sizeof__Bool
7064_ACEOF
7065
7066
7067fi
7068
Benjamin Petersonf7155a32010-06-21 16:51:22 +00007069ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007070 #include <stdint.h>
7071 #endif
Benjamin Petersonf7155a32010-06-21 16:51:22 +00007072"
7073if test "x$ac_cv_type_uintptr_t" = x""yes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00007074
7075cat >>confdefs.h <<_ACEOF
7076#define HAVE_UINTPTR_T 1
7077_ACEOF
7078
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007079# The cast to long int works around a bug in the HP C Compiler
7080# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7081# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7082# This bug is HP SR number 8606223364.
Benjamin Petersonf7155a32010-06-21 16:51:22 +00007083{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007084$as_echo_n "checking size of uintptr_t... " >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +00007085if test "${ac_cv_sizeof_uintptr_t+set}" = set; then :
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007086 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007087else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00007088 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 +00007089
Martin v. Löwis11437992002-04-12 09:54:03 +00007090else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00007091 if test "$ac_cv_type_uintptr_t" = yes; then
7092 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007093$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Petersonf7155a32010-06-21 16:51:22 +00007094{ as_fn_set_status 77
7095as_fn_error "cannot compute sizeof (uintptr_t)
7096See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007097 else
7098 ac_cv_sizeof_uintptr_t=0
7099 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007100fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +00007101
Martin v. Löwis11437992002-04-12 09:54:03 +00007102fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +00007103{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007104$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007105
7106
7107
Martin v. Löwis11437992002-04-12 09:54:03 +00007108cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007109#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007110_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007111
Michael W. Hudson54241132001-12-07 15:38:26 +00007112
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007113fi
7114
Thomas Wouters89f507f2006-12-13 04:49:30 +00007115
7116
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007117# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
Benjamin Petersonf7155a32010-06-21 16:51:22 +00007118{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007119$as_echo_n "checking size of off_t... " >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +00007120if test "${ac_cv_sizeof_off_t+set}" = set; then :
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007121 $as_echo_n "(cached) " >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007122else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00007123 if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +00007124 ac_cv_sizeof_off_t=4
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007125else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00007126 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007127/* end confdefs.h. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007128#include <stdio.h>
7129#include <sys/types.h>
7130main()
7131{
7132 FILE *f=fopen("conftestval", "w");
7133 if (!f) exit(1);
7134 fprintf(f, "%d\n", sizeof(off_t));
7135 exit(0);
7136}
Martin v. Löwis11437992002-04-12 09:54:03 +00007137_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +00007138if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007139 ac_cv_sizeof_off_t=`cat conftestval`
7140else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00007141 ac_cv_sizeof_off_t=0
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007142fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +00007143rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7144 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007145fi
7146
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007147
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007148fi
7149
Benjamin Petersonf7155a32010-06-21 16:51:22 +00007150{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007151$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007152
7153cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007154#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007155_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007156
Michael W. Hudson54241132001-12-07 15:38:26 +00007157
Benjamin Petersonf7155a32010-06-21 16:51:22 +00007158{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007159$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinsonb87f0d02009-12-31 21:25:02 +00007160if test "$have_long_long" = yes
7161then
7162if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007163 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007164
Benjamin Petersonf7155a32010-06-21 16:51:22 +00007165$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007166
Benjamin Petersonf7155a32010-06-21 16:51:22 +00007167 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007168$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007169else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00007170 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007171$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007172fi
Mark Dickinsonb87f0d02009-12-31 21:25:02 +00007173else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00007174 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007175$as_echo "no" >&6; }
Mark Dickinsonb87f0d02009-12-31 21:25:02 +00007176fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007177
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007178# AC_CHECK_SIZEOF() doesn't include <time.h>.
Benjamin Petersonf7155a32010-06-21 16:51:22 +00007179{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007180$as_echo_n "checking size of time_t... " >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +00007181if test "${ac_cv_sizeof_time_t+set}" = set; then :
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007182 $as_echo_n "(cached) " >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007183else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00007184 if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +00007185 ac_cv_sizeof_time_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007186else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00007187 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007188/* end confdefs.h. */
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007189#include <stdio.h>
7190#include <time.h>
7191main()
7192{
7193 FILE *f=fopen("conftestval", "w");
7194 if (!f) exit(1);
7195 fprintf(f, "%d\n", sizeof(time_t));
7196 exit(0);
7197}
Martin v. Löwis11437992002-04-12 09:54:03 +00007198_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +00007199if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007200 ac_cv_sizeof_time_t=`cat conftestval`
7201else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00007202 ac_cv_sizeof_time_t=0
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007203fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +00007204rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7205 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007206fi
7207
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007208
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007209fi
7210
Benjamin Petersonf7155a32010-06-21 16:51:22 +00007211{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007212$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007213
7214cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007215#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007216_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007217
Michael W. Hudson54241132001-12-07 15:38:26 +00007218
7219
Trent Mick635f6fb2000-08-23 21:33:05 +00007220# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007221ac_save_cc="$CC"
7222if test "$ac_cv_kpthread" = "yes"
7223then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00007224elif test "$ac_cv_kthread" = "yes"
7225then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00007226elif test "$ac_cv_pthread" = "yes"
7227then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007228fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +00007229{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007230$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007231have_pthread_t=no
Benjamin Petersonf7155a32010-06-21 16:51:22 +00007232cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007233/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +00007234#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007235int
7236main ()
7237{
Guido van Rossum12580492000-09-24 16:47:19 +00007238pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007239 ;
7240 return 0;
7241}
7242_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +00007243if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00007244 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00007245fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007246rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Petersonf7155a32010-06-21 16:51:22 +00007247{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007248$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007249if test "$have_pthread_t" = yes ; then
7250 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
Benjamin Petersonf7155a32010-06-21 16:51:22 +00007251 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007252$as_echo_n "checking size of pthread_t... " >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +00007253 if test "${ac_cv_sizeof_pthread_t+set}" = set; then :
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007254 $as_echo_n "(cached) " >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00007255else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00007256 if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +00007257 ac_cv_sizeof_pthread_t=4
Trent Mick635f6fb2000-08-23 21:33:05 +00007258else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00007259 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007260/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +00007261#include <stdio.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00007262#include <pthread.h>
Trent Mick635f6fb2000-08-23 21:33:05 +00007263 main()
7264 {
7265 FILE *f=fopen("conftestval", "w");
7266 if (!f) exit(1);
7267 fprintf(f, "%d\n", sizeof(pthread_t));
7268 exit(0);
7269 }
Martin v. Löwis11437992002-04-12 09:54:03 +00007270_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +00007271if ac_fn_c_try_run "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00007272 ac_cv_sizeof_pthread_t=`cat conftestval`
7273else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00007274 ac_cv_sizeof_pthread_t=0
Trent Mick635f6fb2000-08-23 21:33:05 +00007275fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +00007276rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7277 conftest.$ac_objext conftest.beam conftest.$ac_ext
Trent Mick635f6fb2000-08-23 21:33:05 +00007278fi
7279
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007280
Trent Mick635f6fb2000-08-23 21:33:05 +00007281fi
7282
Benjamin Petersonf7155a32010-06-21 16:51:22 +00007283 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007284$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007285
7286cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007287#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007288_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007289
7290fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007291CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00007292
Michael W. Hudson54241132001-12-07 15:38:26 +00007293
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007294
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00007295
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007296case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007297 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007298 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
7299 ;;
7300 Darwin/*)
7301 OTHER_LIBTOOL_OPT=""
7302 ;;
7303esac
7304
7305
Ronald Oussorend45ff2c2009-09-06 11:11:04 +00007306ARCH_RUN_32BIT=""
7307
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007308case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007309 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00007310 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
7311 if test "${enable_universalsdk}"; then
7312 :
7313 else
Ronald Oussoren175a8842010-02-11 13:40:06 +00007314 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007315 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00007316 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007317 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00007318 Darwin/*)
Ronald Oussoren652f4de2010-02-07 11:54:03 +00007319 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007320 if test ${gcc_version} '<' 4.0
7321 then
7322 LIBTOOL_CRUFT="-lcc_dynamic"
7323 else
7324 LIBTOOL_CRUFT=""
7325 fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +00007326 if test "$cross_compiling" = yes; then :
Ronald Oussoren856624d2009-09-08 07:13:53 +00007327 ac_osx_32bit=yes
Ronald Oussorend45ff2c2009-09-06 11:11:04 +00007328else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00007329 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussorend45ff2c2009-09-06 11:11:04 +00007330/* end confdefs.h. */
Ronald Oussoren856624d2009-09-08 07:13:53 +00007331
Ronald Oussorend45ff2c2009-09-06 11:11:04 +00007332 #include <unistd.h>
7333 int main(int argc, char*argv[])
7334 {
7335 if (sizeof(long) == 4) {
7336 return 0;
7337 } else {
7338 return 1;
7339 }
Ronald Oussoren856624d2009-09-08 07:13:53 +00007340 }
7341
Ronald Oussorend45ff2c2009-09-06 11:11:04 +00007342_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +00007343if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussorend45ff2c2009-09-06 11:11:04 +00007344 ac_osx_32bit=yes
7345else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00007346 ac_osx_32bit=no
Ronald Oussorend45ff2c2009-09-06 11:11:04 +00007347fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +00007348rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7349 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussorend45ff2c2009-09-06 11:11:04 +00007350fi
7351
7352
Ronald Oussorend45ff2c2009-09-06 11:11:04 +00007353 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussoren175a8842010-02-11 13:40:06 +00007354 case `/usr/bin/arch` in
Ronald Oussorend45ff2c2009-09-06 11:11:04 +00007355 i386)
7356 MACOSX_DEFAULT_ARCH="i386"
7357 ;;
7358 ppc)
7359 MACOSX_DEFAULT_ARCH="ppc"
7360 ;;
7361 *)
Benjamin Petersonf7155a32010-06-21 16:51:22 +00007362 as_fn_error "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussorend45ff2c2009-09-06 11:11:04 +00007363 ;;
7364 esac
7365 else
Ronald Oussoren175a8842010-02-11 13:40:06 +00007366 case `/usr/bin/arch` in
Ronald Oussorend45ff2c2009-09-06 11:11:04 +00007367 i386)
7368 MACOSX_DEFAULT_ARCH="x86_64"
7369 ;;
7370 ppc)
7371 MACOSX_DEFAULT_ARCH="ppc64"
7372 ;;
7373 *)
Benjamin Petersonf7155a32010-06-21 16:51:22 +00007374 as_fn_error "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussorend45ff2c2009-09-06 11:11:04 +00007375 ;;
7376 esac
7377
7378 #ARCH_RUN_32BIT="true"
7379 fi
7380
7381 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00007382 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007383 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007384esac
7385
Benjamin Petersonf7155a32010-06-21 16:51:22 +00007386{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007387$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007388if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007389then
Skip Montanarodecc6a42003-01-01 20:07:49 +00007390 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00007391 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00007392 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007393
Benjamin Petersonf7155a32010-06-21 16:51:22 +00007394$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007395
Benjamin Petersonf7155a32010-06-21 16:51:22 +00007396 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007397$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00007398 if test $enable_shared = "yes"
7399 then
Benjamin Petersonf7155a32010-06-21 16:51:22 +00007400 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 +00007401 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007402else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00007403 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007404$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007405fi
7406
Benjamin Petersonf7155a32010-06-21 16:51:22 +00007407{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007408$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007409case $ac_sys_system/$ac_sys_release in
7410 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007411
Benjamin Petersonf7155a32010-06-21 16:51:22 +00007412$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007413
Benjamin Petersonf7155a32010-06-21 16:51:22 +00007414 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007415$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007416 ;;
7417 *)
Benjamin Petersonf7155a32010-06-21 16:51:22 +00007418 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007419$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007420 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007421esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007422
Guido van Rossum0a516c91994-09-12 10:58:40 +00007423# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00007424
Michael W. Hudson54241132001-12-07 15:38:26 +00007425
7426
7427
7428
Guido van Rossum0a516c91994-09-12 10:58:40 +00007429# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +00007430# -- usually .so, .sl on HP-UX, .dll on Cygwin
Benjamin Petersonf7155a32010-06-21 16:51:22 +00007431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SO" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007432$as_echo_n "checking SO... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007433if test -z "$SO"
7434then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007435 case $ac_sys_system in
Thomas Wouters477c8d52006-05-27 19:21:47 +00007436 hp*|HP*)
7437 case `uname -m` in
7438 ia64) SO=.so;;
7439 *) SO=.sl;;
7440 esac
7441 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00007442 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +00007443 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007444 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +00007445else
7446 # this might also be a termcap variable, see #610332
7447 echo
7448 echo '====================================================================='
7449 echo '+ +'
7450 echo '+ WARNING: You have set SO in your environment. +'
7451 echo '+ Do you really mean to change the extension for shared libraries? +'
7452 echo '+ Continuing in 10 seconds to let you to ponder. +'
7453 echo '+ +'
7454 echo '====================================================================='
7455 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +00007456fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +00007457{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SO" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007458$as_echo "$SO" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00007459
Georg Brandlb1441c72009-01-03 22:33:39 +00007460
Thomas Wouters477c8d52006-05-27 19:21:47 +00007461cat >>confdefs.h <<_ACEOF
7462#define SHLIB_EXT "$SO"
7463_ACEOF
7464
Guido van Rossum0a516c91994-09-12 10:58:40 +00007465# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00007466# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007467# (Shared libraries in this instance are shared modules to be loaded into
7468# Python, as opposed to building Python itself as a shared library.)
Benjamin Petersonf7155a32010-06-21 16:51:22 +00007469{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007470$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007471if test -z "$LDSHARED"
7472then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007473 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007474 AIX*)
7475 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00007476 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007477 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00007478 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00007479 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00007480 SunOS/5*)
Greg Ward57c9a6632000-05-26 12:22:54 +00007481 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +00007482 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +00007483 else LDSHARED='$(CC) -G';
Greg Ward57c9a6632000-05-26 12:22:54 +00007484 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007485 hp*|HP*)
7486 if test "$GCC" = "yes"
7487 then LDSHARED='$(CC) -shared'
7488 else LDSHARED='ld -b';
7489 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +00007490 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +00007491 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +00007492 LDSHARED='$(CC) $(LDFLAGS) -bundle'
7493 if test "$enable_framework" ; then
7494 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007495 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7496 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007497 else
7498 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00007499 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00007500 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007501 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Jack Jansene578a632001-08-15 01:27:14 +00007502 LDSHARED='$(CC) $(LDFLAGS) -bundle'
7503 if test "$enable_framework" ; then
7504 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007505 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7506 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007507 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00007508 # No framework, use the Python app as bundle-loader
7509 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00007510 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007511 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007512 Darwin/*)
7513 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
7514 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00007515
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007516 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +00007517 then
Thomas Wouters477c8d52006-05-27 19:21:47 +00007518 if test "${enable_universalsdk}"; then
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007519 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007520 fi
Jack Jansen6b08a402004-06-03 12:41:45 +00007521 LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup'
7522 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00007523 else
7524 LDSHARED='$(CC) $(LDFLAGS) -bundle'
7525 if test "$enable_framework" ; then
7526 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007527 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7528 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007529 else
7530 # No framework, use the Python app as bundle-loader
7531 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
7532 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
7533 fi
7534 fi
7535 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00007536 Linux*|GNU*|QNX*) LDSHARED='$(CC) -shared';;
Guido van Rossum458e7fa1999-09-17 15:40:40 +00007537 BSD/OS*/4*) LDSHARED="gcc -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007538 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00007539 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00007540 then
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007541 LDSHARED='$(CC) -shared ${LDFLAGS}'
Guido van Rossum0286ae82000-08-29 15:06:49 +00007542 else
7543 LDSHARED="ld -Bshareable ${LDFLAGS}"
7544 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007545 OpenBSD*)
7546 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7547 then
7548 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
7549 else
7550 case `uname -r` in
7551 [01].* | 2.[0-7] | 2.[0-7].*)
7552 LDSHARED="ld -Bshareable ${LDFLAGS}"
7553 ;;
7554 *)
7555 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
7556 ;;
7557 esac
7558 fi;;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007559 NetBSD*|DragonFly*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007560 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00007561 if test "$GCC" = "yes"
Martin v. Löwis79f3c532002-12-11 12:51:58 +00007562 then LDSHARED='$(CC) -shared'
7563 else LDSHARED='$(CC) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00007564 fi;;
Martin v. Löwis79f3c532002-12-11 12:51:58 +00007565 SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
Guido van Rossumaef734b2001-01-10 21:09:12 +00007566 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007567 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007568 *) LDSHARED="ld";;
7569 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007570fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +00007571{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007572$as_echo "$LDSHARED" >&6; }
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007573BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00007574# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007575# library (module) -- this is only needed for a few systems
Benjamin Petersonf7155a32010-06-21 16:51:22 +00007576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007577$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007578if test -z "$CCSHARED"
7579then
Guido van Rossum07397971997-04-29 21:49:50 +00007580 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00007581 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007582 then CCSHARED="-fPIC";
7583 elif test `uname -p` = sparc;
7584 then CCSHARED="-xcode=pic32";
7585 else CCSHARED="-Kpic";
7586 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00007587 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00007588 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00007589 else CCSHARED="+z";
7590 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007591 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007592 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007593 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007594 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00007595 if test "$GCC" = "yes"
7596 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00007597 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00007598 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007599 SCO_SV*)
7600 if test "$GCC" = "yes"
7601 then CCSHARED="-fPIC"
7602 else CCSHARED="-Kpic -belf"
7603 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007604 IRIX*/6*) case $CC in
7605 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00007606 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007607 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007608 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007609 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007610fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +00007611{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007612$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007613# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007614# the python executable -- this is only needed for a few systems
Benjamin Petersonf7155a32010-06-21 16:51:22 +00007615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007616$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007617if test -z "$LINKFORSHARED"
7618then
Guido van Rossum07397971997-04-29 21:49:50 +00007619 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007620 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007621 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00007622 LINKFORSHARED="-Wl,-E -Wl,+s";;
7623# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007624 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007625 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007626 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00007627 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00007628 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Jack Jansene578a632001-08-15 01:27:14 +00007629 if test "$enable_framework"
7630 then
Jack Jansenda49e192005-01-07 13:08:22 +00007631 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007632 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007633 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007634 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007635 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00007636 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007637 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00007638 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7639 then
7640 LINKFORSHARED="-Wl,--export-dynamic"
7641 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007642 SunOS/5*) case $CC in
7643 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00007644 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00007645 then
7646 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007647 fi;;
7648 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00007649 CYGWIN*)
7650 if test $enable_shared = "no"
7651 then
7652 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
7653 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00007654 QNX*)
7655 # -Wl,-E causes the symbols to be added to the dynamic
7656 # symbol table so that they can be found when a module
7657 # is loaded. -N 2048K causes the stack size to be set
7658 # to 2048 kilobytes so that the stack doesn't overflow
7659 # when running test_compile.py.
7660 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007661 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007662fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +00007663{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007664$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007665
Michael W. Hudson54241132001-12-07 15:38:26 +00007666
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00007667
Benjamin Petersonf7155a32010-06-21 16:51:22 +00007668{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007669$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007670if test ! "$LIBRARY" = "$LDLIBRARY"
7671then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00007672 case $ac_sys_system in
7673 CYGWIN*)
7674 # Cygwin needs CCSHARED when building extension DLLs
7675 # but not when building the interpreter DLL.
7676 CFLAGSFORSHARED='';;
7677 *)
7678 CFLAGSFORSHARED='$(CCSHARED)'
7679 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007680fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +00007681{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007682$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007683
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007684# SHLIBS are libraries (except -lc and -lm) to link to the python shared
7685# library (with --enable-shared).
7686# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007687# symbols, this must be set to $(LIBS) (expanded by make). We do this even
7688# if it is not required, since it creates a dependency of the shared library
7689# to LIBS. This, in turn, means that applications linking the shared libpython
7690# don't need to link LIBS explicitly. The default should be only changed
7691# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007692
Benjamin Petersonf7155a32010-06-21 16:51:22 +00007693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007694$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007695case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007696 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007697 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007698esac
Benjamin Petersonf7155a32010-06-21 16:51:22 +00007699{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007700$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007701
7702
Guido van Rossum627b2d71993-12-24 10:39:16 +00007703# checks for libraries
Benjamin Petersonf7155a32010-06-21 16:51:22 +00007704{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007705$as_echo_n "checking for dlopen in -ldl... " >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +00007706if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007707 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007708else
Martin v. Löwis11437992002-04-12 09:54:03 +00007709 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007710LIBS="-ldl $LIBS"
Benjamin Petersonf7155a32010-06-21 16:51:22 +00007711cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007712/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007713
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007714/* Override any GCC internal prototype to avoid an error.
7715 Use char because int might match the return type of a GCC
7716 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007717#ifdef __cplusplus
7718extern "C"
7719#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007720char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007721int
7722main ()
7723{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007724return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007725 ;
7726 return 0;
7727}
7728_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +00007729if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007730 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007731else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00007732 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007733fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +00007734rm -f core conftest.err conftest.$ac_objext \
7735 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007736LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007737fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +00007738{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007739$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +00007740if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007741 cat >>confdefs.h <<_ACEOF
7742#define HAVE_LIBDL 1
7743_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007744
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007745 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00007746
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007747fi
7748 # Dynamic linking for SunOS/Solaris and SYSV
Benjamin Petersonf7155a32010-06-21 16:51:22 +00007749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007750$as_echo_n "checking for shl_load in -ldld... " >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +00007751if test "${ac_cv_lib_dld_shl_load+set}" = set; then :
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007752 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007753else
Martin v. Löwis11437992002-04-12 09:54:03 +00007754 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007755LIBS="-ldld $LIBS"
Benjamin Petersonf7155a32010-06-21 16:51:22 +00007756cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007757/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007758
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007759/* Override any GCC internal prototype to avoid an error.
7760 Use char because int might match the return type of a GCC
7761 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007762#ifdef __cplusplus
7763extern "C"
7764#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007765char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007766int
7767main ()
7768{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007769return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007770 ;
7771 return 0;
7772}
7773_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +00007774if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007775 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007776else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00007777 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007778fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +00007779rm -f core conftest.err conftest.$ac_objext \
7780 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007781LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007782fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +00007783{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007784$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +00007785if test "x$ac_cv_lib_dld_shl_load" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007786 cat >>confdefs.h <<_ACEOF
7787#define HAVE_LIBDLD 1
7788_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007789
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007790 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007791
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007792fi
7793 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00007794
Georg Brandlb1441c72009-01-03 22:33:39 +00007795# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00007796if test "$with_threads" = "yes" -o -z "$with_threads"; then
Benjamin Petersonf7155a32010-06-21 16:51:22 +00007797 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007798$as_echo_n "checking for library containing sem_init... " >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +00007799if test "${ac_cv_search_sem_init+set}" = set; then :
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007800 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007801else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00007802 ac_func_search_save_LIBS=$LIBS
Benjamin Petersonf7155a32010-06-21 16:51:22 +00007803cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007804/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007805
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007806/* Override any GCC internal prototype to avoid an error.
7807 Use char because int might match the return type of a GCC
7808 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007809#ifdef __cplusplus
7810extern "C"
7811#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007812char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007813int
7814main ()
7815{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007816return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007817 ;
7818 return 0;
7819}
7820_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007821for ac_lib in '' pthread rt posix4; do
7822 if test -z "$ac_lib"; then
7823 ac_res="none required"
7824 else
7825 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007826 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007827 fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +00007828 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007829 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007830fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +00007831rm -f core conftest.err conftest.$ac_objext \
7832 conftest$ac_exeext
7833 if test "${ac_cv_search_sem_init+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007834 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007835fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007836done
Benjamin Petersonf7155a32010-06-21 16:51:22 +00007837if test "${ac_cv_search_sem_init+set}" = set; then :
7838
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007839else
7840 ac_cv_search_sem_init=no
7841fi
7842rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00007843LIBS=$ac_func_search_save_LIBS
7844fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +00007845{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007846$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007847ac_res=$ac_cv_search_sem_init
Benjamin Petersonf7155a32010-06-21 16:51:22 +00007848if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007849 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007850
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007851fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00007852 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00007853 # posix4 on Solaris 2.6
7854 # pthread (first!) on Linux
7855fi
7856
Martin v. Löwis19d17342003-06-14 21:03:05 +00007857# check if we need libintl for locale functions
Benjamin Petersonf7155a32010-06-21 16:51:22 +00007858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007859$as_echo_n "checking for textdomain in -lintl... " >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +00007860if test "${ac_cv_lib_intl_textdomain+set}" = set; then :
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007861 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00007862else
7863 ac_check_lib_save_LIBS=$LIBS
7864LIBS="-lintl $LIBS"
Benjamin Petersonf7155a32010-06-21 16:51:22 +00007865cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007866/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00007867
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007868/* Override any GCC internal prototype to avoid an error.
7869 Use char because int might match the return type of a GCC
7870 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00007871#ifdef __cplusplus
7872extern "C"
7873#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00007874char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00007875int
7876main ()
7877{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007878return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00007879 ;
7880 return 0;
7881}
7882_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +00007883if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00007884 ac_cv_lib_intl_textdomain=yes
7885else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00007886 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00007887fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +00007888rm -f core conftest.err conftest.$ac_objext \
7889 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00007890LIBS=$ac_check_lib_save_LIBS
7891fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +00007892{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007893$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +00007894if test "x$ac_cv_lib_intl_textdomain" = x""yes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00007895
Benjamin Petersonf7155a32010-06-21 16:51:22 +00007896$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00007897
Brett Cannonc6d936e2009-06-07 20:09:53 +00007898 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00007899fi
7900
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007901
7902# checks for system dependent C++ extensions support
7903case "$ac_sys_system" in
Benjamin Petersonf7155a32010-06-21 16:51:22 +00007904 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007905$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +00007906 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007907/* end confdefs.h. */
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007908#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00007909int
7910main ()
7911{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007912loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00007913 ;
7914 return 0;
7915}
7916_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +00007917if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007918
Benjamin Petersonf7155a32010-06-21 16:51:22 +00007919$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007920
Benjamin Petersonf7155a32010-06-21 16:51:22 +00007921 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007922$as_echo "yes" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007923else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00007924 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007925$as_echo "no" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007926fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +00007927rm -f core conftest.err conftest.$ac_objext \
7928 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007929 *) ;;
7930esac
7931
Guido van Rossum70c7f481998-03-26 18:44:10 +00007932# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Benjamin Petersonf7155a32010-06-21 16:51:22 +00007933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007934$as_echo_n "checking for t_open in -lnsl... " >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +00007935if test "${ac_cv_lib_nsl_t_open+set}" = set; then :
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007936 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007937else
Martin v. Löwis11437992002-04-12 09:54:03 +00007938 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007939LIBS="-lnsl $LIBS"
Benjamin Petersonf7155a32010-06-21 16:51:22 +00007940cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007941/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007942
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007943/* Override any GCC internal prototype to avoid an error.
7944 Use char because int might match the return type of a GCC
7945 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007946#ifdef __cplusplus
7947extern "C"
7948#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007949char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007950int
7951main ()
7952{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007953return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007954 ;
7955 return 0;
7956}
7957_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +00007958if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007959 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007960else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00007961 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007962fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +00007963rm -f core conftest.err conftest.$ac_objext \
7964 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007965LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007966fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +00007967{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007968$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +00007969if test "x$ac_cv_lib_nsl_t_open" = x""yes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007970 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007971fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00007972 # SVR4
Benjamin Petersonf7155a32010-06-21 16:51:22 +00007973{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007974$as_echo_n "checking for socket in -lsocket... " >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +00007975if test "${ac_cv_lib_socket_socket+set}" = set; then :
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007976 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007977else
Martin v. Löwis11437992002-04-12 09:54:03 +00007978 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007979LIBS="-lsocket $LIBS $LIBS"
Benjamin Petersonf7155a32010-06-21 16:51:22 +00007980cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007981/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007982
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007983/* Override any GCC internal prototype to avoid an error.
7984 Use char because int might match the return type of a GCC
7985 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007986#ifdef __cplusplus
7987extern "C"
7988#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007989char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007990int
7991main ()
7992{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007993return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007994 ;
7995 return 0;
7996}
7997_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +00007998if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007999 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008000else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008001 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008002fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008003rm -f core conftest.err conftest.$ac_objext \
8004 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008005LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008006fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008007{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008008$as_echo "$ac_cv_lib_socket_socket" >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008009if test "x$ac_cv_lib_socket_socket" = x""yes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00008010 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00008011fi
8012 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00008013
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008014{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008015$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008016
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008017# Check whether --with-libs was given.
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008018if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008019 withval=$with_libs;
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008020{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008021$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00008022LIBS="$withval $LIBS"
8023
8024else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008026$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008027fi
8028
Guido van Rossum7f43da71994-08-01 12:15:30 +00008029
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008030# Check for use of the system libffi library
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008032$as_echo_n "checking for --with-system-ffi... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008033
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008034# Check whether --with-system_ffi was given.
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008035if test "${with_system_ffi+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008036 withval=$with_system_ffi;
8037fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008038
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008039
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008040{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008041$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008042
Matthias Klose55708cc2009-04-30 08:06:49 +00008043# Check for --with-dbmliborder
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008045$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008046
8047# Check whether --with-dbmliborder was given.
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008048if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +00008049 withval=$with_dbmliborder;
8050if test x$with_dbmliborder = xyes
8051then
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008052as_fn_error "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008053else
8054 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
8055 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
8056 then
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008057 as_fn_error "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008058 fi
8059 done
8060fi
8061fi
8062
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008063{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008064$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008065
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00008066# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008067
8068
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008069{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008070$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008071
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008072# Check whether --with-signal-module was given.
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008073if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008074 withval=$with_signal_module;
8075fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008076
8077
8078if test -z "$with_signal_module"
8079then with_signal_module="yes"
8080fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008081{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008082$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008083
8084if test "${with_signal_module}" = "yes"; then
8085 USE_SIGNAL_MODULE=""
8086 SIGNAL_OBJS=""
8087else
8088 USE_SIGNAL_MODULE="#"
8089 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
8090fi
8091
Guido van Rossum3d15bd82001-01-10 18:53:48 +00008092# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00008093
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008094USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00008095
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dec-threads" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008097$as_echo_n "checking for --with-dec-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008098
Guido van Rossumec2f0731997-01-22 20:54:01 +00008099
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008100# Check whether --with-dec-threads was given.
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008101if test "${with_dec_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008102 withval=$with_dec_threads;
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008103{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008104$as_echo "$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +00008105LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00008106if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00008107 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00008108fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008109else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008110 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008111$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008112fi
8113
Martin v. Löwis11437992002-04-12 09:54:03 +00008114
8115# Templates for things AC_DEFINEd more than once.
8116# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00008117
8118
Martin v. Löwis11437992002-04-12 09:54:03 +00008119
8120
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008122$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008123
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008124# Check whether --with-threads was given.
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008125if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008126 withval=$with_threads;
8127fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008128
8129
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008130# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00008131
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008132# Check whether --with-thread was given.
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008133if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008134 withval=$with_thread; with_threads=$with_thread
8135fi
8136
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008137
8138if test -z "$with_threads"
8139then with_threads="yes"
8140fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008141{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008142$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008143
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008144
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008145if test "$with_threads" = "no"
8146then
8147 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008148elif test "$ac_cv_pthread_is_default" = yes
8149then
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008150 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008151
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008152 # Defining _REENTRANT on system with POSIX threads should not hurt.
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008153 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008154
8155 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00008156 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008157elif test "$ac_cv_kpthread" = "yes"
8158then
8159 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008160 if test "$ac_cv_cxx_thread" = "yes"; then
8161 CXX="$CXX -Kpthread"
8162 fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008163 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00008164
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008165 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008166 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008167elif test "$ac_cv_kthread" = "yes"
8168then
8169 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008170 if test "$ac_cv_cxx_thread" = "yes"; then
8171 CXX="$CXX -Kthread"
8172 fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008173 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008174
8175 posix_threads=yes
8176 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008177elif test "$ac_cv_pthread" = "yes"
8178then
8179 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008180 if test "$ac_cv_cxx_thread" = "yes"; then
8181 CXX="$CXX -pthread"
8182 fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008183 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008184
8185 posix_threads=yes
8186 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008187else
8188 if test ! -z "$with_threads" -a -d "$with_threads"
8189 then LDFLAGS="$LDFLAGS -L$with_threads"
8190 fi
8191 if test ! -z "$withval" -a -d "$withval"
8192 then LDFLAGS="$LDFLAGS -L$withval"
8193 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008194
8195 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00008196 # define _POSIX_THREADS in unistd.h. Some apparently don't
8197 # (e.g. gnu pth with pthread emulation)
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008198 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008199$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008200 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008201/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008202
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008203#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008204#ifdef _POSIX_THREADS
8205yes
8206#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008207
8208_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008209if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008210 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008211 unistd_defines_pthreads=yes
8212else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008213 unistd_defines_pthreads=no
8214fi
Jesus Cea0f752ee2010-04-28 12:03:06 +00008215rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008216
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008217 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008218$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008219
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008220 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00008221
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008222 ac_fn_c_check_header_mongrel "$LINENO" "cthreads.h" "ac_cv_header_cthreads_h" "$ac_includes_default"
8223if test "x$ac_cv_header_cthreads_h" = x""yes; then :
8224 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008225
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008226 $as_echo "#define C_THREADS 1" >>confdefs.h
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008227
Martin v. Löwis11437992002-04-12 09:54:03 +00008228
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008229$as_echo "#define HURD_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008230
8231 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008232 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008233else
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008234
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008235 ac_fn_c_check_header_mongrel "$LINENO" "mach/cthreads.h" "ac_cv_header_mach_cthreads_h" "$ac_includes_default"
8236if test "x$ac_cv_header_mach_cthreads_h" = x""yes; then :
8237 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008238
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008239 $as_echo "#define C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008240
Martin v. Löwis11437992002-04-12 09:54:03 +00008241
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008242$as_echo "#define MACH_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008243
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008244 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008245else
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008246
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008247 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pth" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008248$as_echo_n "checking for --with-pth... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008249
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008250# Check whether --with-pth was given.
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008251if test "${with_pth+set}" = set; then :
8252 withval=$with_pth; { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008253$as_echo "$withval" >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008254 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008255
8256
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008257$as_echo "#define HAVE_PTH 1" >>confdefs.h
Guido van Rossum9e8181b2000-09-19 00:46:46 +00008258
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00008259 LIBS="-lpth $LIBS"
8260 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +00008261else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008262 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008263$as_echo "no" >&6; }
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008264
8265 # Just looking for pthread_create in libpthread is not enough:
8266 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
8267 # So we really have to include pthread.h, and then link.
8268 _libs=$LIBS
8269 LIBS="$LIBS -lpthread"
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008270 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008271$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008272 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008273/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008274#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00008275
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008276void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00008277int
8278main ()
8279{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008280
8281pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00008282 ;
8283 return 0;
8284}
8285_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008286if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008287
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008288 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008289$as_echo "yes" >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008290 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00008291
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008292 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008293 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00008294else
Martin v. Löwis11437992002-04-12 09:54:03 +00008295
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008296 LIBS=$_libs
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008297 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
8298if test "x$ac_cv_func_pthread_detach" = x""yes; then :
8299 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00008300
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008301 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008302 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00008303else
Guido van Rossumad678af1998-10-02 14:42:15 +00008304
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008305 ac_fn_c_check_header_mongrel "$LINENO" "atheos/threads.h" "ac_cv_header_atheos_threads_h" "$ac_includes_default"
8306if test "x$ac_cv_header_atheos_threads_h" = x""yes; then :
8307 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008308
8309
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008310$as_echo "#define ATHEOS_THREADS 1" >>confdefs.h
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008311
8312 THREADOBJ="Python/thread.o"
8313else
8314
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008315 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008316$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008317if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then :
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008318 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008319else
Martin v. Löwis11437992002-04-12 09:54:03 +00008320 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008321LIBS="-lpthreads $LIBS"
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008322cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008323/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008324
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008325/* Override any GCC internal prototype to avoid an error.
8326 Use char because int might match the return type of a GCC
8327 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008328#ifdef __cplusplus
8329extern "C"
8330#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008331char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008332int
8333main ()
8334{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008335return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008336 ;
8337 return 0;
8338}
8339_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008340if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008341 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00008342else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008343 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00008344fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008345rm -f core conftest.err conftest.$ac_objext \
8346 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008347LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008348fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008349{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008350$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008351if test "x$ac_cv_lib_pthreads_pthread_create" = x""yes; then :
8352 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00008353
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008354 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008355 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008356 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00008357else
Greg Steinadf63d62000-07-05 10:38:09 +00008358
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008359 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008360$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008361if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then :
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008362 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00008363else
Martin v. Löwis11437992002-04-12 09:54:03 +00008364 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008365LIBS="-lc_r $LIBS"
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008366cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008367/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008368
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008369/* Override any GCC internal prototype to avoid an error.
8370 Use char because int might match the return type of a GCC
8371 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008372#ifdef __cplusplus
8373extern "C"
8374#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008375char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008376int
8377main ()
8378{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008379return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008380 ;
8381 return 0;
8382}
8383_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008384if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008385 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00008386else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008387 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00008388fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008389rm -f core conftest.err conftest.$ac_objext \
8390 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008391LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00008392fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008393{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008394$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008395if test "x$ac_cv_lib_c_r_pthread_create" = x""yes; then :
8396 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00008397
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008398 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008399 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008400 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008401else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008402
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008403 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008404$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008405if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then :
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008406 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008407else
Martin v. Löwis11437992002-04-12 09:54:03 +00008408 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008409LIBS="-lpthread $LIBS"
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008410cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008411/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008412
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008413/* Override any GCC internal prototype to avoid an error.
8414 Use char because int might match the return type of a GCC
8415 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008416#ifdef __cplusplus
8417extern "C"
8418#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008419char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008420int
8421main ()
8422{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008423return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008424 ;
8425 return 0;
8426}
8427_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008428if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008429 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008430else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008431 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008432fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008433rm -f core conftest.err conftest.$ac_objext \
8434 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008435LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008436fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008437{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008438$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008439if test "x$ac_cv_lib_pthread___pthread_create_system" = x""yes; then :
8440 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008441
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008442 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008443 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008444 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008445else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008446
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008447 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008448$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008449if test "${ac_cv_lib_cma_pthread_create+set}" = set; then :
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008450 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00008451else
Martin v. Löwis11437992002-04-12 09:54:03 +00008452 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008453LIBS="-lcma $LIBS"
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008454cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008455/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008456
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008457/* Override any GCC internal prototype to avoid an error.
8458 Use char because int might match the return type of a GCC
8459 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008460#ifdef __cplusplus
8461extern "C"
8462#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008463char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008464int
8465main ()
8466{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008467return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008468 ;
8469 return 0;
8470}
8471_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008472if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008473 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00008474else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008475 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00008476fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008477rm -f core conftest.err conftest.$ac_objext \
8478 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008479LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008480fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008481{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008482$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008483if test "x$ac_cv_lib_cma_pthread_create" = x""yes; then :
8484 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00008485
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008486 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008487 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008488 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00008489else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00008490
Martin v. Löwis130fb172001-07-19 11:00:41 +00008491 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00008492fi
8493
Guido van Rossum627b2d71993-12-24 10:39:16 +00008494
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008495fi
8496
Guido van Rossum0be3e491997-05-22 20:33:33 +00008497fi
8498
Guido van Rossum49545951997-12-02 19:28:29 +00008499fi
8500
Guido van Rossumb93a8621998-05-07 13:27:32 +00008501fi
8502
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008503
Michael W. Hudson54241132001-12-07 15:38:26 +00008504fi
8505
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008506fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008507rm -f core conftest.err conftest.$ac_objext \
8508 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008509fi
8510
Martin v. Löwis11437992002-04-12 09:54:03 +00008511fi
8512
8513
8514fi
8515
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008516
Michael W. Hudson54241132001-12-07 15:38:26 +00008517
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008518 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008519$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008520if test "${ac_cv_lib_mpc_usconfig+set}" = set; then :
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008521 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008522else
Martin v. Löwis11437992002-04-12 09:54:03 +00008523 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008524LIBS="-lmpc $LIBS"
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008525cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008526/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008527
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008528/* Override any GCC internal prototype to avoid an error.
8529 Use char because int might match the return type of a GCC
8530 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008531#ifdef __cplusplus
8532extern "C"
8533#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008534char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008535int
8536main ()
8537{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008538return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008539 ;
8540 return 0;
8541}
8542_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008543if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008544 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008545else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008546 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008547fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008548rm -f core conftest.err conftest.$ac_objext \
8549 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008550LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008551fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008552{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008553$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008554if test "x$ac_cv_lib_mpc_usconfig" = x""yes; then :
8555 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008556
Martin v. Löwis130fb172001-07-19 11:00:41 +00008557 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008558 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008559 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008560fi
8561
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008562
Neal Norwitza978ab02002-11-02 16:58:05 +00008563 if test "$posix_threads" != "yes"; then
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008564 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008565$as_echo_n "checking for thr_create in -lthread... " >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008566if test "${ac_cv_lib_thread_thr_create+set}" = set; then :
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008567 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008568else
Martin v. Löwis11437992002-04-12 09:54:03 +00008569 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008570LIBS="-lthread $LIBS"
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008571cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008572/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008573
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008574/* Override any GCC internal prototype to avoid an error.
8575 Use char because int might match the return type of a GCC
8576 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008577#ifdef __cplusplus
8578extern "C"
8579#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008580char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008581int
8582main ()
8583{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008584return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008585 ;
8586 return 0;
8587}
8588_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008589if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008590 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008591else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008592 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008593fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008594rm -f core conftest.err conftest.$ac_objext \
8595 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008596LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008597fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008598{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008599$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008600if test "x$ac_cv_lib_thread_thr_create" = x""yes; then :
8601 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008602
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008603 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008604 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008605 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008606fi
8607
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008608 fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008609
Martin v. Löwis130fb172001-07-19 11:00:41 +00008610 if test "$USE_THREAD_MODULE" != "#"
8611 then
8612 # If the above checks didn't disable threads, (at least) OSF1
8613 # needs this '-threads' argument during linking.
8614 case $ac_sys_system in
8615 OSF1) LDLAST=-threads;;
8616 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +00008617 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008618fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008619
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008620if test "$posix_threads" = "yes"; then
8621 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008622
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008623$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008624
8625 fi
8626
8627 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
8628 case $ac_sys_system/$ac_sys_release in
8629 SunOS/5.6)
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008630$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008631
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008632 ;;
8633 SunOS/5.8)
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008634$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008635
8636 ;;
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00008637 AIX/5)
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008638$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00008639
8640 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008641 esac
8642
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008643 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008644$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008645 if test "${ac_cv_pthread_system_supported+set}" = set; then :
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008646 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008647else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008648 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008649 ac_cv_pthread_system_supported=no
8650else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008651 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008652/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008653#include <pthread.h>
8654 void *foo(void *parm) {
8655 return NULL;
8656 }
8657 main() {
8658 pthread_attr_t attr;
8659 pthread_t id;
8660 if (pthread_attr_init(&attr)) exit(-1);
8661 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
8662 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
8663 exit(0);
8664 }
8665_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008666if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008667 ac_cv_pthread_system_supported=yes
8668else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008669 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008670fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008671rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8672 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008673fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008674
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008675
Guido van Rossum627b2d71993-12-24 10:39:16 +00008676fi
8677
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008678 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008679$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008680 if test "$ac_cv_pthread_system_supported" = "yes"; then
8681
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008682$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008683
8684 fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008685 for ac_func in pthread_sigmask
8686do :
8687 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
8688if test "x$ac_cv_func_pthread_sigmask" = x""yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008689 cat >>confdefs.h <<_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008690#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008691_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +00008692 case $ac_sys_system in
8693 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008694
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008695$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +00008696
8697 ;;
8698 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008699fi
8700done
8701
8702fi
8703
8704
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008705# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +00008706
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008707{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008708$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008709# Check whether --enable-ipv6 was given.
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008710if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008711 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008712 no)
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008713 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008714$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008715 ipv6=no
8716 ;;
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008717 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008718$as_echo "yes" >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008719 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008720
8721 ipv6=yes
8722 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008723 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008724else
Martin v. Löwis11437992002-04-12 09:54:03 +00008725
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008726 if test "$cross_compiling" = yes; then :
8727 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008728$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008729 ipv6=no
8730
8731else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008732 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008733/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008734 /* AF_INET6 available check */
8735#include <sys/types.h>
8736#include <sys/socket.h>
8737main()
8738{
8739 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
8740 exit(1);
8741 else
8742 exit(0);
8743}
8744
Martin v. Löwis11437992002-04-12 09:54:03 +00008745_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008746if ac_fn_c_try_run "$LINENO"; then :
8747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008748$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008749 ipv6=yes
8750else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008751 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008752$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008753 ipv6=no
8754fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008755rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8756 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008757fi
8758
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008759
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008760if test "$ipv6" = "yes"; then
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008761 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008762$as_echo_n "checking if RFC2553 API is available... " >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008763 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008764/* end confdefs.h. */
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008765#include <sys/types.h>
8766#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008767int
8768main ()
8769{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008770struct sockaddr_in6 x;
8771x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +00008772 ;
8773 return 0;
8774}
8775_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008776if ac_fn_c_try_compile "$LINENO"; then :
8777 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008778$as_echo "yes" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008779 ipv6=yes
8780else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008781 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008782$as_echo "no" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008783 ipv6=no
8784fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008785rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008786fi
8787
8788if test "$ipv6" = "yes"; then
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008789 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008790
8791fi
8792
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008793fi
8794
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008795
8796ipv6type=unknown
8797ipv6lib=none
8798ipv6trylibc=no
8799
8800if test "$ipv6" = "yes"; then
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008801 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008802$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +00008803 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
8804 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008805 case $i in
8806 inria)
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008807 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008808/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008809
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008810#include <netinet/in.h>
8811#ifdef IPV6_INRIA_VERSION
8812yes
8813#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008814_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008815if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008816 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00008817 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008818fi
Jesus Cea0f752ee2010-04-28 12:03:06 +00008819rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008820
8821 ;;
8822 kame)
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008823 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008824/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008825
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008826#include <netinet/in.h>
8827#ifdef __KAME__
8828yes
8829#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008830_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008831if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008832 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008833 ipv6type=$i;
8834 ipv6lib=inet6
8835 ipv6libdir=/usr/local/v6/lib
8836 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008837fi
Jesus Cea0f752ee2010-04-28 12:03:06 +00008838rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008839
8840 ;;
8841 linux-glibc)
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008842 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008843/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008844
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008845#include <features.h>
8846#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
8847yes
8848#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008849_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008850if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008851 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008852 ipv6type=$i;
8853 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008854fi
Jesus Cea0f752ee2010-04-28 12:03:06 +00008855rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008856
8857 ;;
8858 linux-inet6)
8859 if test -d /usr/inet6; then
8860 ipv6type=$i
8861 ipv6lib=inet6
8862 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +00008863 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008864 fi
8865 ;;
8866 solaris)
8867 if test -f /etc/netconfig; then
8868 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
8869 ipv6type=$i
8870 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008871 fi
8872 fi
8873 ;;
8874 toshiba)
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008875 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008876/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008877
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008878#include <sys/param.h>
8879#ifdef _TOSHIBA_INET6
8880yes
8881#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008882_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008883if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008884 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008885 ipv6type=$i;
8886 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00008887 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008888fi
Jesus Cea0f752ee2010-04-28 12:03:06 +00008889rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008890
8891 ;;
8892 v6d)
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008893 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008894/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008895
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008896#include </usr/local/v6/include/sys/v6config.h>
8897#ifdef __V6D__
8898yes
8899#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008900_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008901if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008902 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008903 ipv6type=$i;
8904 ipv6lib=v6;
8905 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +00008906 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008907fi
Jesus Cea0f752ee2010-04-28 12:03:06 +00008908rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008909
8910 ;;
8911 zeta)
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008912 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008913/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008914
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008915#include <sys/param.h>
8916#ifdef _ZETA_MINAMI_INET6
8917yes
8918#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008919_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008920if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008921 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008922 ipv6type=$i;
8923 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00008924 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008925fi
Jesus Cea0f752ee2010-04-28 12:03:06 +00008926rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008927
8928 ;;
8929 esac
8930 if test "$ipv6type" != "unknown"; then
8931 break
8932 fi
8933 done
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008934 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008935$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008936fi
8937
8938if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
8939 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
8940 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
8941 echo "using lib$ipv6lib"
8942 else
8943 if test $ipv6trylibc = "yes"; then
8944 echo "using libc"
8945 else
8946 echo 'Fatal: no $ipv6lib library found. cannot continue.'
8947 echo "You need to fetch lib$ipv6lib.a from appropriate"
8948 echo 'ipv6 kit and compile beforehand.'
8949 exit 1
8950 fi
8951 fi
8952fi
8953
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008954{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008955$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008956cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00008957/* end confdefs.h. */
8958#include <Carbon/Carbon.h>
8959int
8960main ()
8961{
8962FSIORefNum fRef = 0
8963 ;
8964 return 0;
8965}
8966_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008967if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00008968
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008969$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00008970
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008971 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008972$as_echo "yes" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00008973else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008975$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00008976
8977fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00008978rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8979
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00008980# Check for --with-doc-strings
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008981{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008982$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00008983
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008984# Check whether --with-doc-strings was given.
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008985if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008986 withval=$with_doc_strings;
8987fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00008988
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00008989
8990if test -z "$with_doc_strings"
8991then with_doc_strings="yes"
8992fi
8993if test "$with_doc_strings" != "no"
8994then
8995
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008996$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00008997
8998fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +00008999{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009000$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009001
Neil Schemenauera35c6882001-02-27 04:45:05 +00009002# Check for Python-specific malloc support
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009003{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009004$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009005
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009006# Check whether --with-tsc was given.
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009007if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009008 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009009if test "$withval" != no
9010then
9011
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009012$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009013
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009014 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009015$as_echo "yes" >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009016else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009017$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009018fi
9019else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009021$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009022fi
9023
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009024
9025# Check for Python-specific malloc support
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009026{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009027$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009028
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009029# Check whether --with-pymalloc was given.
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009030if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009031 withval=$with_pymalloc;
9032fi
Michael W. Hudson54241132001-12-07 15:38:26 +00009033
Neil Schemenauera35c6882001-02-27 04:45:05 +00009034
Neil Schemenauer16c22972002-03-22 15:34:49 +00009035if test -z "$with_pymalloc"
9036then with_pymalloc="yes"
9037fi
9038if test "$with_pymalloc" != "no"
9039then
Martin v. Löwis11437992002-04-12 09:54:03 +00009040
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009041$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +00009042
9043fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009044{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009045$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +00009046
Barry Warsawef82cd72000-06-30 16:21:01 +00009047# Check for --with-wctype-functions
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009048{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-wctype-functions" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009049$as_echo_n "checking for --with-wctype-functions... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009050
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009051# Check whether --with-wctype-functions was given.
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009052if test "${with_wctype_functions+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009053 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +00009054if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +00009055then
9056
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009057$as_echo "#define WANT_WCTYPE_FUNCTIONS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009058
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009059 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009060$as_echo "yes" >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009061else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009062$as_echo "no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +00009063fi
9064else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009065 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009066$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009067fi
9068
Barry Warsawef82cd72000-06-30 16:21:01 +00009069
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009070# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00009071
Guido van Rossum98935bf2001-09-05 19:13:16 +00009072DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +00009073
Guido van Rossume97ee181999-12-20 21:27:22 +00009074# the dlopen() function means we might want to use dynload_shlib.o. some
9075# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +00009076for ac_func in dlopen
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009077do :
9078 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
9079if test "x$ac_cv_func_dlopen" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009080 cat >>confdefs.h <<_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009081#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009082_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +00009083
Guido van Rossume97ee181999-12-20 21:27:22 +00009084fi
Thomas Wouters3a584202000-08-05 23:28:51 +00009085done
Guido van Rossume97ee181999-12-20 21:27:22 +00009086
Michael W. Hudson54241132001-12-07 15:38:26 +00009087
Guido van Rossume97ee181999-12-20 21:27:22 +00009088# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
9089# loading of modules.
9090
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009092$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009093if test -z "$DYNLOADFILE"
9094then
9095 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00009096 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
9097 if test "$ac_cv_func_dlopen" = yes
9098 then DYNLOADFILE="dynload_shlib.o"
9099 else DYNLOADFILE="dynload_aix.o"
9100 fi
9101 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +00009102 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009103 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
9104 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009105 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +00009106 *)
9107 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
9108 # out any dynamic loading
9109 if test "$ac_cv_func_dlopen" = yes
9110 then DYNLOADFILE="dynload_shlib.o"
9111 else DYNLOADFILE="dynload_stub.o"
9112 fi
9113 ;;
9114 esac
9115fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009116{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009117$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009118if test "$DYNLOADFILE" != "dynload_stub.o"
9119then
Martin v. Löwis11437992002-04-12 09:54:03 +00009120
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009121$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +00009122
9123fi
9124
Neil Schemenauer4e425612001-06-19 15:44:15 +00009125# MACHDEP_OBJS can be set to platform-specific object files needed by Python
9126
Michael W. Hudson54241132001-12-07 15:38:26 +00009127
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009129$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009130if test -z "$MACHDEP_OBJS"
9131then
Jack Jansene578a632001-08-15 01:27:14 +00009132 MACHDEP_OBJS=$extra_machdep_objs
9133else
9134 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +00009135fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009136{ $as_echo "$as_me:${as_lineno-$LINENO}: result: MACHDEP_OBJS" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009137$as_echo "MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009138
Guido van Rossum627b2d71993-12-24 10:39:16 +00009139# checks for library functions
Martin v. Löwis823725e2008-03-24 13:39:54 +00009140for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
9141 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +00009142 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwisc3001752005-01-23 09:27:24 +00009143 getpriority getpwent getspnam getspent getsid getwd \
Martin v. Löwis011e8422009-05-05 04:43:17 +00009144 kill killpg lchmod lchown lstat mbrtowc mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +00009145 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +00009146 putenv readlink realpath \
Benjamin Peterson965ce872009-04-05 21:24:58 +00009147 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
9148 setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +00009149 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Gregory P. Smith25523d22007-09-03 16:44:55 +00009150 sigaction siginterrupt sigrelse strftime strlcpy \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +00009151 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Martin v. Löwis113a0852009-05-29 17:25:39 +00009152 truncate uname unsetenv utimes waitpid wait3 wait4 \
9153 wcscoll wcsftime wcsxfrm _getpty
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009154do :
9155 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9156ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
9157eval as_val=\$$as_ac_var
9158 if test "x$as_val" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009159 cat >>confdefs.h <<_ACEOF
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009160#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009161_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00009162
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009163fi
9164done
9165
Michael W. Hudson54241132001-12-07 15:38:26 +00009166
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009167# For some functions, having a definition is not sufficient, since
9168# we want to take their address.
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009169{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009170$as_echo_n "checking for chroot... " >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009171cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009172/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009173#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009174int
9175main ()
9176{
9177void *x=chroot
9178 ;
9179 return 0;
9180}
9181_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009182if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009183
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009184$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009185
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009186 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009187$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009188else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009189 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009190$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009191
9192fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009193rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009194{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009195$as_echo_n "checking for link... " >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009196cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009197/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009198#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009199int
9200main ()
9201{
9202void *x=link
9203 ;
9204 return 0;
9205}
9206_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009207if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009208
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009209$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009210
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009211 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009212$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009213else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009214 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009215$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009216
9217fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009218rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009219{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009220$as_echo_n "checking for symlink... " >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009221cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009222/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009223#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009224int
9225main ()
9226{
9227void *x=symlink
9228 ;
9229 return 0;
9230}
9231_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009232if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009233
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009234$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009235
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009236 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009237$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009238else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009239 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009240$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009241
9242fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009243rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009245$as_echo_n "checking for fchdir... " >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009246cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009247/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009248#include <unistd.h>
9249int
9250main ()
9251{
9252void *x=fchdir
9253 ;
9254 return 0;
9255}
9256_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009257if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009258
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009259$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009260
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009261 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009262$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009263else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009264 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009265$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009266
9267fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009268rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009269{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009270$as_echo_n "checking for fsync... " >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009271cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009272/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009273#include <unistd.h>
9274int
9275main ()
9276{
9277void *x=fsync
9278 ;
9279 return 0;
9280}
9281_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009282if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009283
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009284$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009285
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009286 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009287$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009288else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009289 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009290$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009291
9292fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009293rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009294{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009295$as_echo_n "checking for fdatasync... " >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009296cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009297/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009298#include <unistd.h>
9299int
9300main ()
9301{
9302void *x=fdatasync
9303 ;
9304 return 0;
9305}
9306_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009307if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009308
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009309$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009310
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009311 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009312$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009313else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009314 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009315$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009316
9317fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009318rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009320$as_echo_n "checking for epoll... " >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009321cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009322/* end confdefs.h. */
9323#include <sys/epoll.h>
9324int
9325main ()
9326{
9327void *x=epoll_create
9328 ;
9329 return 0;
9330}
9331_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009332if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009333
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009334$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009335
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009336 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009337$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009338else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009339 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009340$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009341
9342fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009343rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009344{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009345$as_echo_n "checking for kqueue... " >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009346cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009347/* end confdefs.h. */
9348
9349#include <sys/types.h>
9350#include <sys/event.h>
9351
9352int
9353main ()
9354{
9355int x=kqueue()
9356 ;
9357 return 0;
9358}
9359_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009360if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009361
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009362$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009363
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009364 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009365$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009366else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009367 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009368$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009369
9370fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009371rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +00009372# On some systems (eg. FreeBSD 5), we would find a definition of the
9373# functions ctermid_r, setgroups in the library, but no prototype
9374# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
9375# address to avoid compiler warnings and potential miscompilations
9376# because of the missing prototypes.
9377
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009378{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009379$as_echo_n "checking for ctermid_r... " >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009380cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009381/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +00009382
9383#include "confdefs.h"
9384#include <stdio.h>
9385
Martin v. Löwisd5843682002-11-21 20:41:28 +00009386int
9387main ()
9388{
9389void* p = ctermid_r
9390 ;
9391 return 0;
9392}
9393_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009394if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +00009395
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009396$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +00009397
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009398 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009399$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009400else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009401 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009402$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009403
9404fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009405rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9406
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009407{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009408$as_echo_n "checking for flock... " >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009409cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009410/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009411
9412#include "confdefs.h"
9413#include <sys/file.h>
9414
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009415int
9416main ()
9417{
9418void* p = flock
9419 ;
9420 return 0;
9421}
9422_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009423if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009424
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009425$as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009426
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009427 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009428$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009429else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009430 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009431$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009432
9433fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009434rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9435
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009436{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009437$as_echo_n "checking for getpagesize... " >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009438cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009439/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009440
9441#include "confdefs.h"
9442#include <unistd.h>
9443
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009444int
9445main ()
9446{
9447void* p = getpagesize
9448 ;
9449 return 0;
9450}
9451_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009452if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009453
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009454$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009455
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009456 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009457$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009458else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009459 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009460$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009461
9462fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009463rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009464
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009465for ac_prog in true
9466do
9467 # Extract the first word of "$ac_prog", so it can be a program name with args.
9468set dummy $ac_prog; ac_word=$2
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009469{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009470$as_echo_n "checking for $ac_word... " >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009471if test "${ac_cv_prog_TRUE+set}" = set; then :
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009472 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009473else
9474 if test -n "$TRUE"; then
9475 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
9476else
9477as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9478for as_dir in $PATH
9479do
9480 IFS=$as_save_IFS
9481 test -z "$as_dir" && as_dir=.
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009482 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009483 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 +00009484 ac_cv_prog_TRUE="$ac_prog"
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009485 $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 +00009486 break 2
9487 fi
9488done
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009489 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009490IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009491
9492fi
9493fi
9494TRUE=$ac_cv_prog_TRUE
9495if test -n "$TRUE"; then
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009496 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009497$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009498else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009499 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009500$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009501fi
9502
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009503
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009504 test -n "$TRUE" && break
9505done
9506test -n "$TRUE" || TRUE="/bin/true"
9507
9508
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009509{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009510$as_echo_n "checking for inet_aton in -lc... " >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009511if test "${ac_cv_lib_c_inet_aton+set}" = set; then :
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009512 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009513else
9514 ac_check_lib_save_LIBS=$LIBS
9515LIBS="-lc $LIBS"
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009516cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009517/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009518
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009519/* Override any GCC internal prototype to avoid an error.
9520 Use char because int might match the return type of a GCC
9521 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009522#ifdef __cplusplus
9523extern "C"
9524#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009525char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009526int
9527main ()
9528{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009529return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009530 ;
9531 return 0;
9532}
9533_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009534if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009535 ac_cv_lib_c_inet_aton=yes
9536else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009537 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009538fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009539rm -f core conftest.err conftest.$ac_objext \
9540 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009541LIBS=$ac_check_lib_save_LIBS
9542fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009543{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009544$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009545if test "x$ac_cv_lib_c_inet_aton" = x""yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009546 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009547else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009548 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009549$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009550if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then :
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009551 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009552else
9553 ac_check_lib_save_LIBS=$LIBS
9554LIBS="-lresolv $LIBS"
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009555cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009556/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009557
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009558/* Override any GCC internal prototype to avoid an error.
9559 Use char because int might match the return type of a GCC
9560 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009561#ifdef __cplusplus
9562extern "C"
9563#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009564char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009565int
9566main ()
9567{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009568return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009569 ;
9570 return 0;
9571}
9572_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009573if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009574 ac_cv_lib_resolv_inet_aton=yes
9575else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009576 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009577fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009578rm -f core conftest.err conftest.$ac_objext \
9579 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009580LIBS=$ac_check_lib_save_LIBS
9581fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009582{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009583$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009584if test "x$ac_cv_lib_resolv_inet_aton" = x""yes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009585 cat >>confdefs.h <<_ACEOF
9586#define HAVE_LIBRESOLV 1
9587_ACEOF
9588
9589 LIBS="-lresolv $LIBS"
9590
9591fi
9592
9593
9594fi
9595
9596
Christian Heimesd0764e22007-12-04 15:00:33 +00009597# On Tru64, chflags seems to be present, but calling it will
9598# exit Python
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009599{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009600$as_echo_n "checking for chflags... " >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009601if test "${ac_cv_have_chflags+set}" = set; then :
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009602 $as_echo_n "(cached) " >&6
Benjamin Peterson08fd6722010-01-30 19:51:43 +00009603else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009604 if test "$cross_compiling" = yes; then :
Benjamin Peterson08fd6722010-01-30 19:51:43 +00009605 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +00009606else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009607 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +00009608/* end confdefs.h. */
Benjamin Peterson08fd6722010-01-30 19:51:43 +00009609[
Christian Heimesd0764e22007-12-04 15:00:33 +00009610#include <sys/stat.h>
9611#include <unistd.h>
9612int main(int argc, char*argv[])
9613{
9614 if(chflags(argv[0], 0) != 0)
9615 return 1;
9616 return 0;
9617}
Benjamin Peterson08fd6722010-01-30 19:51:43 +00009618]
Christian Heimesd0764e22007-12-04 15:00:33 +00009619_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009620if ac_fn_c_try_run "$LINENO"; then :
Benjamin Peterson08fd6722010-01-30 19:51:43 +00009621 ac_cv_have_chflags=yes
Christian Heimesd0764e22007-12-04 15:00:33 +00009622else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009623 ac_cv_have_chflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +00009624fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009625rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9626 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +00009627fi
9628
9629
Benjamin Peterson08fd6722010-01-30 19:51:43 +00009630fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009631{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009632$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Peterson08fd6722010-01-30 19:51:43 +00009633if test "$ac_cv_have_chflags" = cross ; then
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009634 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
9635if test "x$ac_cv_func_chflags" = x""yes; then :
Benjamin Peterson08fd6722010-01-30 19:51:43 +00009636 ac_cv_have_chflags="yes"
9637else
9638 ac_cv_have_chflags="no"
9639fi
9640
9641fi
9642if test "$ac_cv_have_chflags" = yes ; then
9643
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009644$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Benjamin Peterson08fd6722010-01-30 19:51:43 +00009645
9646fi
9647
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009649$as_echo_n "checking for lchflags... " >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009650if test "${ac_cv_have_lchflags+set}" = set; then :
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009651 $as_echo_n "(cached) " >&6
Benjamin Peterson08fd6722010-01-30 19:51:43 +00009652else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009653 if test "$cross_compiling" = yes; then :
Benjamin Peterson08fd6722010-01-30 19:51:43 +00009654 ac_cv_have_lchflags=cross
9655else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009656 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson08fd6722010-01-30 19:51:43 +00009657/* end confdefs.h. */
9658[
Christian Heimesd0764e22007-12-04 15:00:33 +00009659#include <sys/stat.h>
9660#include <unistd.h>
9661int main(int argc, char*argv[])
9662{
9663 if(lchflags(argv[0], 0) != 0)
9664 return 1;
9665 return 0;
9666}
Benjamin Peterson08fd6722010-01-30 19:51:43 +00009667]
Christian Heimesd0764e22007-12-04 15:00:33 +00009668_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009669if ac_fn_c_try_run "$LINENO"; then :
Benjamin Peterson08fd6722010-01-30 19:51:43 +00009670 ac_cv_have_lchflags=yes
Christian Heimesd0764e22007-12-04 15:00:33 +00009671else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009672 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +00009673fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009674rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9675 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +00009676fi
9677
9678
Benjamin Peterson08fd6722010-01-30 19:51:43 +00009679fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009680{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009681$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Peterson08fd6722010-01-30 19:51:43 +00009682if test "$ac_cv_have_lchflags" = cross ; then
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009683 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
9684if test "x$ac_cv_func_lchflags" = x""yes; then :
Benjamin Peterson08fd6722010-01-30 19:51:43 +00009685 ac_cv_have_lchflags="yes"
9686else
9687 ac_cv_have_lchflags="no"
9688fi
9689
9690fi
9691if test "$ac_cv_have_lchflags" = yes ; then
9692
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009693$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Benjamin Peterson08fd6722010-01-30 19:51:43 +00009694
9695fi
9696
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009697case $ac_sys_system/$ac_sys_release in
9698Darwin/*)
9699 _CUR_CFLAGS="${CFLAGS}"
9700 _CUR_LDFLAGS="${LDFLAGS}"
9701 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
9702 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
9703 ;;
9704esac
9705
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009707$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009708if test "${ac_cv_lib_z_inflateCopy+set}" = set; then :
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009709 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009710else
9711 ac_check_lib_save_LIBS=$LIBS
9712LIBS="-lz $LIBS"
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009713cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009714/* end confdefs.h. */
9715
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009716/* Override any GCC internal prototype to avoid an error.
9717 Use char because int might match the return type of a GCC
9718 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009719#ifdef __cplusplus
9720extern "C"
9721#endif
9722char inflateCopy ();
9723int
9724main ()
9725{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009726return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009727 ;
9728 return 0;
9729}
9730_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009731if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009732 ac_cv_lib_z_inflateCopy=yes
9733else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009734 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009735fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009736rm -f core conftest.err conftest.$ac_objext \
9737 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009738LIBS=$ac_check_lib_save_LIBS
9739fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009740{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009741$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009742if test "x$ac_cv_lib_z_inflateCopy" = x""yes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009743
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009744$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009745
9746fi
9747
9748
9749case $ac_sys_system/$ac_sys_release in
9750Darwin/*)
9751 CFLAGS="${_CUR_CFLAGS}"
9752 LDFLAGS="${_CUR_LDFLAGS}"
9753 ;;
9754esac
9755
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009756{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009757$as_echo_n "checking for hstrerror... " >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009758cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009759/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +00009760
9761#include "confdefs.h"
9762#include <netdb.h>
9763
Martin v. Löwise9416172003-05-03 10:12:45 +00009764int
9765main ()
9766{
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009767void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +00009768 ;
9769 return 0;
9770}
9771_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009772if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +00009773
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009774$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +00009775
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009776 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009777$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +00009778else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009779 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009780$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +00009781
9782fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009783rm -f core conftest.err conftest.$ac_objext \
9784 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009785
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009786{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009787$as_echo_n "checking for inet_aton... " >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009788cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009789/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +00009790
9791#include "confdefs.h"
Martin v. Löwis86d66262006-02-17 08:40:11 +00009792#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +00009793#include <sys/socket.h>
9794#include <netinet/in.h>
9795#include <arpa/inet.h>
9796
Martin v. Löwise9416172003-05-03 10:12:45 +00009797int
9798main ()
9799{
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009800void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +00009801 ;
9802 return 0;
9803}
9804_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009805if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +00009806
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009807$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +00009808
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009809 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009810$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +00009811else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009812 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009813$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +00009814
9815fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009816rm -f core conftest.err conftest.$ac_objext \
9817 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009818
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009820$as_echo_n "checking for inet_pton... " >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009821cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009822/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +00009823
9824#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +00009825#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +00009826#include <sys/socket.h>
9827#include <netinet/in.h>
9828#include <arpa/inet.h>
9829
Martin v. Löwise9416172003-05-03 10:12:45 +00009830int
9831main ()
9832{
9833void* p = inet_pton
9834 ;
9835 return 0;
9836}
9837_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009838if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +00009839
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009840$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +00009841
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009842 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009843$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +00009844else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009845 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009846$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +00009847
9848fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009849rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +00009850
Martin v. Löwisd6640d42003-07-06 09:29:52 +00009851# On some systems, setgroups is in unistd.h, on others, in grp.h
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009852{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009853$as_echo_n "checking for setgroups... " >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009854cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009855/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +00009856
9857#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +00009858#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +00009859#ifdef HAVE_GRP_H
9860#include <grp.h>
9861#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +00009862
Martin v. Löwisd5843682002-11-21 20:41:28 +00009863int
9864main ()
9865{
9866void* p = setgroups
9867 ;
9868 return 0;
9869}
9870_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009871if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +00009872
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009873$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +00009874
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009875 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009876$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009877else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009878 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009879$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009880
9881fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009882rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +00009883
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009884# check for openpty and forkpty
9885
9886for ac_func in openpty
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009887do :
9888 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
9889if test "x$ac_cv_func_openpty" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009890 cat >>confdefs.h <<_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009891#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009892_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009893
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009894else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009895 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009896$as_echo_n "checking for openpty in -lutil... " >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009897if test "${ac_cv_lib_util_openpty+set}" = set; then :
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009898 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +00009899else
Martin v. Löwis11437992002-04-12 09:54:03 +00009900 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +00009901LIBS="-lutil $LIBS"
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009902cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009903/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009904
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009905/* Override any GCC internal prototype to avoid an error.
9906 Use char because int might match the return type of a GCC
9907 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009908#ifdef __cplusplus
9909extern "C"
9910#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009911char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009912int
9913main ()
9914{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009915return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009916 ;
9917 return 0;
9918}
9919_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009920if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009921 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +00009922else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009923 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +00009924fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009925rm -f core conftest.err conftest.$ac_objext \
9926 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009927LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +00009928fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009929{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009930$as_echo "$ac_cv_lib_util_openpty" >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009931if test "x$ac_cv_lib_util_openpty" = x""yes; then :
9932 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +00009933 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +00009934else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009935 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009936$as_echo_n "checking for openpty in -lbsd... " >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009937if test "${ac_cv_lib_bsd_openpty+set}" = set; then :
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009938 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +00009939else
9940 ac_check_lib_save_LIBS=$LIBS
9941LIBS="-lbsd $LIBS"
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009942cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +00009943/* end confdefs.h. */
9944
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009945/* Override any GCC internal prototype to avoid an error.
9946 Use char because int might match the return type of a GCC
9947 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +00009948#ifdef __cplusplus
9949extern "C"
9950#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +00009951char openpty ();
9952int
9953main ()
9954{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009955return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +00009956 ;
9957 return 0;
9958}
9959_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009960if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +00009961 ac_cv_lib_bsd_openpty=yes
9962else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009963 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +00009964fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009965rm -f core conftest.err conftest.$ac_objext \
9966 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +00009967LIBS=$ac_check_lib_save_LIBS
9968fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009969{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009970$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009971if test "x$ac_cv_lib_bsd_openpty" = x""yes; then :
9972 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +00009973 LIBS="$LIBS -lbsd"
9974fi
9975
9976
9977fi
9978
Fred Drake8cef4cf2000-06-28 16:40:38 +00009979
9980fi
9981done
9982
9983for ac_func in forkpty
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009984do :
9985 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
9986if test "x$ac_cv_func_forkpty" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009987 cat >>confdefs.h <<_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009988#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009989_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00009990
Fred Drake8cef4cf2000-06-28 16:40:38 +00009991else
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009992 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009993$as_echo_n "checking for forkpty in -lutil... " >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009994if test "${ac_cv_lib_util_forkpty+set}" = set; then :
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009995 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +00009996else
Martin v. Löwis11437992002-04-12 09:54:03 +00009997 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +00009998LIBS="-lutil $LIBS"
Benjamin Petersonf7155a32010-06-21 16:51:22 +00009999cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010000/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010001
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010002/* Override any GCC internal prototype to avoid an error.
10003 Use char because int might match the return type of a GCC
10004 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010005#ifdef __cplusplus
10006extern "C"
10007#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010008char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010009int
10010main ()
10011{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010012return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010013 ;
10014 return 0;
10015}
10016_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +000010017if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010018 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010019else
Benjamin Petersonf7155a32010-06-21 16:51:22 +000010020 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010021fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +000010022rm -f core conftest.err conftest.$ac_objext \
10023 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010024LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010025fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +000010026{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010027$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +000010028if test "x$ac_cv_lib_util_forkpty" = x""yes; then :
10029 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010030 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010031else
Benjamin Petersonf7155a32010-06-21 16:51:22 +000010032 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010033$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +000010034if test "${ac_cv_lib_bsd_forkpty+set}" = set; then :
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010035 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010036else
10037 ac_check_lib_save_LIBS=$LIBS
10038LIBS="-lbsd $LIBS"
Benjamin Petersonf7155a32010-06-21 16:51:22 +000010039cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010040/* end confdefs.h. */
10041
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010042/* Override any GCC internal prototype to avoid an error.
10043 Use char because int might match the return type of a GCC
10044 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010045#ifdef __cplusplus
10046extern "C"
10047#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010048char forkpty ();
10049int
10050main ()
10051{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010052return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010053 ;
10054 return 0;
10055}
10056_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +000010057if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010058 ac_cv_lib_bsd_forkpty=yes
10059else
Benjamin Petersonf7155a32010-06-21 16:51:22 +000010060 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010061fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +000010062rm -f core conftest.err conftest.$ac_objext \
10063 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010064LIBS=$ac_check_lib_save_LIBS
10065fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +000010066{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010067$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +000010068if test "x$ac_cv_lib_bsd_forkpty" = x""yes; then :
10069 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010070 LIBS="$LIBS -lbsd"
10071fi
10072
10073
10074fi
10075
Fred Drake8cef4cf2000-06-28 16:40:38 +000010076
10077fi
10078done
10079
Jack Jansendd19cf82001-12-06 22:36:17 +000010080
Christian Heimesb186d002008-03-18 15:15:01 +000010081# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000010082for ac_func in memmove
Benjamin Petersonf7155a32010-06-21 16:51:22 +000010083do :
10084 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
10085if test "x$ac_cv_func_memmove" = x""yes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000010086 cat >>confdefs.h <<_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +000010087#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000010088_ACEOF
10089
10090fi
10091done
10092
10093
Michael W. Hudson54241132001-12-07 15:38:26 +000010094# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000010095for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Benjamin Petersonf7155a32010-06-21 16:51:22 +000010096do :
10097 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10098ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10099eval as_val=\$$as_ac_var
10100 if test "x$as_val" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010101 cat >>confdefs.h <<_ACEOF
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010102#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010103_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000010104
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010105fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000010106done
10107
Michael W. Hudson54241132001-12-07 15:38:26 +000010108
Christian Heimesb186d002008-03-18 15:15:01 +000010109for ac_func in dup2 getcwd strdup
Benjamin Petersonf7155a32010-06-21 16:51:22 +000010110do :
10111 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10112ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10113eval as_val=\$$as_ac_var
10114 if test "x$as_val" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010115 cat >>confdefs.h <<_ACEOF
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010116#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010117_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000010118
Martin v. Löwis1142de32002-03-29 16:28:31 +000010119else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010120 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000010121 *" $ac_func.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010122 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
10123 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010124esac
10125
Martin v. Löwis1142de32002-03-29 16:28:31 +000010126fi
10127done
10128
10129
10130for ac_func in getpgrp
Benjamin Petersonf7155a32010-06-21 16:51:22 +000010131do :
10132 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
10133if test "x$ac_cv_func_getpgrp" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010134 cat >>confdefs.h <<_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +000010135#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010136_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +000010137 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010138/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010139#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010140int
10141main ()
10142{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010143getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010144 ;
10145 return 0;
10146}
10147_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +000010148if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010149
Benjamin Petersonf7155a32010-06-21 16:51:22 +000010150$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010151
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010152
Guido van Rossum627b2d71993-12-24 10:39:16 +000010153fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010154rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010155
Guido van Rossum627b2d71993-12-24 10:39:16 +000010156fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010157done
Guido van Rossum627b2d71993-12-24 10:39:16 +000010158
Jack Jansen150753c2003-03-29 22:07:47 +000010159for ac_func in setpgrp
Benjamin Petersonf7155a32010-06-21 16:51:22 +000010160do :
10161 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
10162if test "x$ac_cv_func_setpgrp" = x""yes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000010163 cat >>confdefs.h <<_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +000010164#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000010165_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +000010166 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010167/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000010168#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000010169int
10170main ()
10171{
10172setpgrp(0,0);
10173 ;
10174 return 0;
10175}
10176_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +000010177if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010178
Benjamin Petersonf7155a32010-06-21 16:51:22 +000010179$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010180
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010181
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010182fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010183rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000010184
10185fi
10186done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010187
Thomas Wouters3a584202000-08-05 23:28:51 +000010188for ac_func in gettimeofday
Benjamin Petersonf7155a32010-06-21 16:51:22 +000010189do :
10190 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
10191if test "x$ac_cv_func_gettimeofday" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010192 cat >>confdefs.h <<_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +000010193#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010194_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +000010195 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010196/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010197#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010198int
10199main ()
10200{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010201gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010202 ;
10203 return 0;
10204}
10205_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +000010206if ac_fn_c_try_compile "$LINENO"; then :
10207
Guido van Rossum627b2d71993-12-24 10:39:16 +000010208else
Skip Montanaro6dead952003-09-25 14:50:04 +000010209
Benjamin Petersonf7155a32010-06-21 16:51:22 +000010210$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010211
Martin v. Löwis11437992002-04-12 09:54:03 +000010212
Guido van Rossum627b2d71993-12-24 10:39:16 +000010213fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010214rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010215
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010216fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010217done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010218
Michael W. Hudson54241132001-12-07 15:38:26 +000010219
Benjamin Petersonf7155a32010-06-21 16:51:22 +000010220{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010221$as_echo_n "checking for major... " >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +000010222cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010223/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010224
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010225#if defined(MAJOR_IN_MKDEV)
10226#include <sys/mkdev.h>
10227#elif defined(MAJOR_IN_SYSMACROS)
10228#include <sys/sysmacros.h>
10229#else
10230#include <sys/types.h>
10231#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010232
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010233int
10234main ()
10235{
10236
10237 makedev(major(0),minor(0));
10238
10239 ;
10240 return 0;
10241}
10242_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +000010243if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010244
10245
Benjamin Petersonf7155a32010-06-21 16:51:22 +000010246$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010247
Benjamin Petersonf7155a32010-06-21 16:51:22 +000010248 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010249$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010250
10251else
Skip Montanaro6dead952003-09-25 14:50:04 +000010252
Benjamin Petersonf7155a32010-06-21 16:51:22 +000010253 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010254$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010255
10256fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +000010257rm -f core conftest.err conftest.$ac_objext \
10258 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010259
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010260# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000010261# for [no]getaddrinfo in netdb.h.
Benjamin Petersonf7155a32010-06-21 16:51:22 +000010262{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010263$as_echo_n "checking for getaddrinfo... " >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +000010264cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010265/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010266
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010267#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010268#include <sys/socket.h>
10269#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010270#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010271
Martin v. Löwis11437992002-04-12 09:54:03 +000010272int
10273main ()
10274{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010275
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010276getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010277
Martin v. Löwis11437992002-04-12 09:54:03 +000010278 ;
10279 return 0;
10280}
10281_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +000010282if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010283
Benjamin Petersonf7155a32010-06-21 16:51:22 +000010284{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010285$as_echo "yes" >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +000010286{ $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010287$as_echo_n "checking getaddrinfo bug... " >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +000010288if test "$cross_compiling" = yes; then :
10289 { $as_echo "$as_me:${as_lineno-$LINENO}: result: buggy" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010290$as_echo "buggy" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010291buggygetaddrinfo=yes
10292else
Benjamin Petersonf7155a32010-06-21 16:51:22 +000010293 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010294/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010295
10296#include <sys/types.h>
10297#include <netdb.h>
10298#include <string.h>
10299#include <sys/socket.h>
10300#include <netinet/in.h>
10301
10302main()
10303{
10304 int passive, gaierr, inet4 = 0, inet6 = 0;
10305 struct addrinfo hints, *ai, *aitop;
10306 char straddr[INET6_ADDRSTRLEN], strport[16];
10307
10308 for (passive = 0; passive <= 1; passive++) {
10309 memset(&hints, 0, sizeof(hints));
10310 hints.ai_family = AF_UNSPEC;
10311 hints.ai_flags = passive ? AI_PASSIVE : 0;
10312 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000010313 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010314 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
10315 (void)gai_strerror(gaierr);
10316 goto bad;
10317 }
10318 for (ai = aitop; ai; ai = ai->ai_next) {
10319 if (ai->ai_addr == NULL ||
10320 ai->ai_addrlen == 0 ||
10321 getnameinfo(ai->ai_addr, ai->ai_addrlen,
10322 straddr, sizeof(straddr), strport, sizeof(strport),
10323 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
10324 goto bad;
10325 }
10326 switch (ai->ai_family) {
10327 case AF_INET:
10328 if (strcmp(strport, "54321") != 0) {
10329 goto bad;
10330 }
10331 if (passive) {
10332 if (strcmp(straddr, "0.0.0.0") != 0) {
10333 goto bad;
10334 }
10335 } else {
10336 if (strcmp(straddr, "127.0.0.1") != 0) {
10337 goto bad;
10338 }
10339 }
10340 inet4++;
10341 break;
10342 case AF_INET6:
10343 if (strcmp(strport, "54321") != 0) {
10344 goto bad;
10345 }
10346 if (passive) {
10347 if (strcmp(straddr, "::") != 0) {
10348 goto bad;
10349 }
10350 } else {
10351 if (strcmp(straddr, "::1") != 0) {
10352 goto bad;
10353 }
10354 }
10355 inet6++;
10356 break;
10357 case AF_UNSPEC:
10358 goto bad;
10359 break;
10360 default:
10361 /* another family support? */
10362 break;
10363 }
10364 }
10365 }
10366
10367 if (!(inet4 == 0 || inet4 == 2))
10368 goto bad;
10369 if (!(inet6 == 0 || inet6 == 2))
10370 goto bad;
10371
10372 if (aitop)
10373 freeaddrinfo(aitop);
10374 exit(0);
10375
10376 bad:
10377 if (aitop)
10378 freeaddrinfo(aitop);
10379 exit(1);
10380}
10381
Martin v. Löwis11437992002-04-12 09:54:03 +000010382_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +000010383if ac_fn_c_try_run "$LINENO"; then :
10384 { $as_echo "$as_me:${as_lineno-$LINENO}: result: good" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010385$as_echo "good" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010386buggygetaddrinfo=no
10387else
Benjamin Petersonf7155a32010-06-21 16:51:22 +000010388 { $as_echo "$as_me:${as_lineno-$LINENO}: result: buggy" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010389$as_echo "buggy" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010390buggygetaddrinfo=yes
10391fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +000010392rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10393 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010394fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010395
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010396else
Skip Montanaro6dead952003-09-25 14:50:04 +000010397
Benjamin Petersonf7155a32010-06-21 16:51:22 +000010398{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010399$as_echo "no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010400buggygetaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010401
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010402fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +000010403rm -f core conftest.err conftest.$ac_objext \
10404 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010405
10406if test "$buggygetaddrinfo" = "yes"; then
10407 if test "$ipv6" = "yes"; then
10408 echo 'Fatal: You must get working getaddrinfo() function.'
10409 echo ' or you can specify "--disable-ipv6"'.
10410 exit 1
10411 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010412else
Martin v. Löwis11437992002-04-12 09:54:03 +000010413
Benjamin Petersonf7155a32010-06-21 16:51:22 +000010414$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010415
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010416fi
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010417for ac_func in getnameinfo
Benjamin Petersonf7155a32010-06-21 16:51:22 +000010418do :
10419 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
10420if test "x$ac_cv_func_getnameinfo" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010421 cat >>confdefs.h <<_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +000010422#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010423_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010424
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010425fi
10426done
10427
Michael W. Hudson54241132001-12-07 15:38:26 +000010428
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010429# checks for structures
Benjamin Petersonf7155a32010-06-21 16:51:22 +000010430{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010431$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +000010432if test "${ac_cv_header_time+set}" = set; then :
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010433 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010434else
Benjamin Petersonf7155a32010-06-21 16:51:22 +000010435 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010436/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010437#include <sys/types.h>
10438#include <sys/time.h>
10439#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010440
Martin v. Löwis11437992002-04-12 09:54:03 +000010441int
10442main ()
10443{
10444if ((struct tm *) 0)
10445return 0;
10446 ;
10447 return 0;
10448}
10449_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +000010450if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010451 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000010452else
Benjamin Petersonf7155a32010-06-21 16:51:22 +000010453 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010454fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010455rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010456fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +000010457{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010458$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010459if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010460
Benjamin Petersonf7155a32010-06-21 16:51:22 +000010461$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010462
10463fi
10464
Benjamin Petersonf7155a32010-06-21 16:51:22 +000010465{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010466$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +000010467if test "${ac_cv_struct_tm+set}" = set; then :
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010468 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010469else
Benjamin Petersonf7155a32010-06-21 16:51:22 +000010470 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010471/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010472#include <sys/types.h>
10473#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010474
Martin v. Löwis11437992002-04-12 09:54:03 +000010475int
10476main ()
10477{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010478struct tm tm;
10479 int *p = &tm.tm_sec;
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010480 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000010481 ;
10482 return 0;
10483}
10484_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +000010485if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010486 ac_cv_struct_tm=time.h
10487else
Benjamin Petersonf7155a32010-06-21 16:51:22 +000010488 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010489fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010490rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010491fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +000010492{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010493$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010494if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010495
Benjamin Petersonf7155a32010-06-21 16:51:22 +000010496$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010497
10498fi
10499
Benjamin Petersonf7155a32010-06-21 16:51:22 +000010500ac_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 +000010501#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000010502
Benjamin Petersonf7155a32010-06-21 16:51:22 +000010503"
10504if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010505
10506cat >>confdefs.h <<_ACEOF
10507#define HAVE_STRUCT_TM_TM_ZONE 1
10508_ACEOF
10509
10510
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010511fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010512
Martin v. Löwis11437992002-04-12 09:54:03 +000010513if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
10514
Benjamin Petersonf7155a32010-06-21 16:51:22 +000010515$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010516
10517else
Benjamin Petersonf7155a32010-06-21 16:51:22 +000010518 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
10519"
10520if test "x$ac_cv_have_decl_tzname" = x""yes; then :
10521 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010522else
Benjamin Petersonf7155a32010-06-21 16:51:22 +000010523 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010524fi
10525
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010526cat >>confdefs.h <<_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +000010527#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010528_ACEOF
10529
Benjamin Petersonf7155a32010-06-21 16:51:22 +000010530 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010531$as_echo_n "checking for tzname... " >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +000010532if test "${ac_cv_var_tzname+set}" = set; then :
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010533 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010534else
Benjamin Petersonf7155a32010-06-21 16:51:22 +000010535 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010536/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010537#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010538#if !HAVE_DECL_TZNAME
10539extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000010540#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010541
Martin v. Löwis11437992002-04-12 09:54:03 +000010542int
10543main ()
10544{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010545return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000010546 ;
10547 return 0;
10548}
10549_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +000010550if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010551 ac_cv_var_tzname=yes
10552else
Benjamin Petersonf7155a32010-06-21 16:51:22 +000010553 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010554fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +000010555rm -f core conftest.err conftest.$ac_objext \
10556 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000010557fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +000010558{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010559$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010560 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010561
Benjamin Petersonf7155a32010-06-21 16:51:22 +000010562$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010563
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010564 fi
10565fi
10566
Benjamin Petersonf7155a32010-06-21 16:51:22 +000010567ac_fn_c_check_member "$LINENO" "struct stat" "st_rdev" "ac_cv_member_struct_stat_st_rdev" "$ac_includes_default"
10568if test "x$ac_cv_member_struct_stat_st_rdev" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010569
10570cat >>confdefs.h <<_ACEOF
10571#define HAVE_STRUCT_STAT_ST_RDEV 1
10572_ACEOF
10573
10574
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010575fi
10576
Benjamin Petersonf7155a32010-06-21 16:51:22 +000010577ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
10578if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000010579
Martin v. Löwis11437992002-04-12 09:54:03 +000010580cat >>confdefs.h <<_ACEOF
10581#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
10582_ACEOF
10583
10584
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010585fi
10586
Benjamin Petersonf7155a32010-06-21 16:51:22 +000010587ac_fn_c_check_member "$LINENO" "struct stat" "st_flags" "ac_cv_member_struct_stat_st_flags" "$ac_includes_default"
10588if test "x$ac_cv_member_struct_stat_st_flags" = x""yes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000010589
10590cat >>confdefs.h <<_ACEOF
10591#define HAVE_STRUCT_STAT_ST_FLAGS 1
10592_ACEOF
10593
10594
10595fi
10596
Benjamin Petersonf7155a32010-06-21 16:51:22 +000010597ac_fn_c_check_member "$LINENO" "struct stat" "st_gen" "ac_cv_member_struct_stat_st_gen" "$ac_includes_default"
10598if test "x$ac_cv_member_struct_stat_st_gen" = x""yes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000010599
10600cat >>confdefs.h <<_ACEOF
10601#define HAVE_STRUCT_STAT_ST_GEN 1
10602_ACEOF
10603
10604
10605fi
10606
Benjamin Petersonf7155a32010-06-21 16:51:22 +000010607ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtime" "ac_cv_member_struct_stat_st_birthtime" "$ac_includes_default"
10608if test "x$ac_cv_member_struct_stat_st_birthtime" = x""yes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000010609
10610cat >>confdefs.h <<_ACEOF
10611#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
10612_ACEOF
10613
10614
10615fi
10616
Benjamin Petersonf7155a32010-06-21 16:51:22 +000010617ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
10618if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000010619
Martin v. Löwis11437992002-04-12 09:54:03 +000010620cat >>confdefs.h <<_ACEOF
10621#define HAVE_STRUCT_STAT_ST_BLOCKS 1
10622_ACEOF
10623
10624
Benjamin Petersonf7155a32010-06-21 16:51:22 +000010625$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010626
10627else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010628 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000010629 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010630 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
10631 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010632esac
10633
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010634fi
10635
Michael W. Hudson54241132001-12-07 15:38:26 +000010636
Martin v. Löwis11437992002-04-12 09:54:03 +000010637
Benjamin Petersonf7155a32010-06-21 16:51:22 +000010638{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010639$as_echo_n "checking for time.h that defines altzone... " >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +000010640if test "${ac_cv_header_time_altzone+set}" = set; then :
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010641 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010642else
Benjamin Petersonf7155a32010-06-21 16:51:22 +000010643 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010644/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000010645#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010646int
10647main ()
10648{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010649return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000010650 ;
10651 return 0;
10652}
10653_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +000010654if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010655 ac_cv_header_time_altzone=yes
10656else
Benjamin Petersonf7155a32010-06-21 16:51:22 +000010657 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000010658fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010659rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10660fi
10661
Benjamin Petersonf7155a32010-06-21 16:51:22 +000010662{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010663$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010664if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010665
Benjamin Petersonf7155a32010-06-21 16:51:22 +000010666$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010667
10668fi
10669
Guido van Rossumda88dad1995-01-26 00:46:29 +000010670was_it_defined=no
Benjamin Petersonf7155a32010-06-21 16:51:22 +000010671{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010672$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +000010673cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010674/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000010675
10676#include <sys/types.h>
10677#include <sys/select.h>
10678#include <sys/time.h>
10679
Martin v. Löwis11437992002-04-12 09:54:03 +000010680int
10681main ()
10682{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010683;
Martin v. Löwis11437992002-04-12 09:54:03 +000010684 ;
10685 return 0;
10686}
10687_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +000010688if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010689
10690
Benjamin Petersonf7155a32010-06-21 16:51:22 +000010691$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000010692
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010693 was_it_defined=yes
10694
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010695fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010696rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Petersonf7155a32010-06-21 16:51:22 +000010697{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010698$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010699
Benjamin Petersonf7155a32010-06-21 16:51:22 +000010700{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010701$as_echo_n "checking for addrinfo... " >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +000010702if test "${ac_cv_struct_addrinfo+set}" = set; then :
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010703 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010704else
Benjamin Petersonf7155a32010-06-21 16:51:22 +000010705 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010706/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010707
10708# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010709int
10710main ()
10711{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010712struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000010713 ;
10714 return 0;
10715}
10716_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +000010717if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010718 ac_cv_struct_addrinfo=yes
10719else
Benjamin Petersonf7155a32010-06-21 16:51:22 +000010720 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010721fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010722rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10723fi
10724
Benjamin Petersonf7155a32010-06-21 16:51:22 +000010725{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010726$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010727if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010728
Benjamin Petersonf7155a32010-06-21 16:51:22 +000010729$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010730
10731fi
10732
Benjamin Petersonf7155a32010-06-21 16:51:22 +000010733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010734$as_echo_n "checking for sockaddr_storage... " >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +000010735if test "${ac_cv_struct_sockaddr_storage+set}" = set; then :
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010736 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010737else
Benjamin Petersonf7155a32010-06-21 16:51:22 +000010738 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010739/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010740
10741# include <sys/types.h>
10742# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010743int
10744main ()
10745{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010746struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000010747 ;
10748 return 0;
10749}
10750_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +000010751if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010752 ac_cv_struct_sockaddr_storage=yes
10753else
Benjamin Petersonf7155a32010-06-21 16:51:22 +000010754 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010755fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010756rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10757fi
10758
Benjamin Petersonf7155a32010-06-21 16:51:22 +000010759{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010760$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010761if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010762
Benjamin Petersonf7155a32010-06-21 16:51:22 +000010763$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010764
10765fi
10766
Guido van Rossum627b2d71993-12-24 10:39:16 +000010767# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000010768
Benjamin Petersonf7155a32010-06-21 16:51:22 +000010769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010770$as_echo_n "checking whether char is unsigned... " >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +000010771if test "${ac_cv_c_char_unsigned+set}" = set; then :
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010772 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000010773else
Benjamin Petersonf7155a32010-06-21 16:51:22 +000010774 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010775/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010776$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000010777int
10778main ()
10779{
10780static int test_array [1 - 2 * !(((char) -1) < 0)];
10781test_array [0] = 0
10782
10783 ;
10784 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000010785}
Martin v. Löwis11437992002-04-12 09:54:03 +000010786_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +000010787if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000010788 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000010789else
Benjamin Petersonf7155a32010-06-21 16:51:22 +000010790 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010791fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010792rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010793fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +000010794{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010795$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010796if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Benjamin Petersonf7155a32010-06-21 16:51:22 +000010797 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010798
10799fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000010800
Benjamin Petersonf7155a32010-06-21 16:51:22 +000010801{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010802$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +000010803if test "${ac_cv_c_const+set}" = set; then :
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010804 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000010805else
Benjamin Petersonf7155a32010-06-21 16:51:22 +000010806 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010807/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010808
Martin v. Löwis11437992002-04-12 09:54:03 +000010809int
10810main ()
10811{
10812/* FIXME: Include the comments suggested by Paul. */
10813#ifndef __cplusplus
10814 /* Ultrix mips cc rejects this. */
10815 typedef int charset[2];
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010816 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000010817 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010818 char const *const *pcpcc;
10819 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000010820 /* NEC SVR4.0.2 mips cc rejects this. */
10821 struct point {int x, y;};
10822 static struct point const zero = {0,0};
10823 /* AIX XL C 1.02.0.0 rejects this.
10824 It does not let you subtract one const X* pointer from another in
10825 an arm of an if-expression whose if-part is not a constant
10826 expression */
10827 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010828 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010829 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010830 ++pcpcc;
10831 ppc = (char**) pcpcc;
10832 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000010833 { /* SCO 3.2v4 cc rejects this. */
10834 char *t;
10835 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010836
Martin v. Löwis11437992002-04-12 09:54:03 +000010837 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010838 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010839 }
10840 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
10841 int x[] = {25, 17};
10842 const int *foo = &x[0];
10843 ++foo;
10844 }
10845 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
10846 typedef const int *iptr;
10847 iptr p = 0;
10848 ++p;
10849 }
10850 { /* AIX XL C 1.02.0.0 rejects this saying
10851 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
10852 struct s { int j; const int *ap[3]; };
10853 struct s *b; b->j = 5;
10854 }
10855 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
10856 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010857 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010858 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010859 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000010860#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000010861
Martin v. Löwis11437992002-04-12 09:54:03 +000010862 ;
10863 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000010864}
Martin v. Löwis11437992002-04-12 09:54:03 +000010865_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +000010866if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010867 ac_cv_c_const=yes
10868else
Benjamin Petersonf7155a32010-06-21 16:51:22 +000010869 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010870fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010871rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010872fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +000010873{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010874$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010875if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010876
Benjamin Petersonf7155a32010-06-21 16:51:22 +000010877$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010878
10879fi
10880
Michael W. Hudson54241132001-12-07 15:38:26 +000010881
Guido van Rossumda88dad1995-01-26 00:46:29 +000010882works=no
Benjamin Petersonf7155a32010-06-21 16:51:22 +000010883{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010884$as_echo_n "checking for working volatile... " >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +000010885cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010886/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010887
Martin v. Löwis11437992002-04-12 09:54:03 +000010888int
10889main ()
10890{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010891volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010892 ;
10893 return 0;
10894}
10895_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +000010896if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000010897 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000010898else
Skip Montanaro6dead952003-09-25 14:50:04 +000010899
Benjamin Petersonf7155a32010-06-21 16:51:22 +000010900$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010901
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010902
Guido van Rossum627b2d71993-12-24 10:39:16 +000010903fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010904rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Petersonf7155a32010-06-21 16:51:22 +000010905{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010906$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000010907
Guido van Rossumda88dad1995-01-26 00:46:29 +000010908works=no
Benjamin Petersonf7155a32010-06-21 16:51:22 +000010909{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010910$as_echo_n "checking for working signed char... " >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +000010911cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010912/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000010913
Martin v. Löwis11437992002-04-12 09:54:03 +000010914int
10915main ()
10916{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010917signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000010918 ;
10919 return 0;
10920}
10921_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +000010922if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000010923 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000010924else
Skip Montanaro6dead952003-09-25 14:50:04 +000010925
Benjamin Petersonf7155a32010-06-21 16:51:22 +000010926$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000010927
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010928
Guido van Rossum7f43da71994-08-01 12:15:30 +000010929fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010930rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Petersonf7155a32010-06-21 16:51:22 +000010931{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010932$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000010933
Guido van Rossumda88dad1995-01-26 00:46:29 +000010934have_prototypes=no
Benjamin Petersonf7155a32010-06-21 16:51:22 +000010935{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010936$as_echo_n "checking for prototypes... " >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +000010937cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010938/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000010939int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010940int
10941main ()
10942{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010943return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000010944 ;
10945 return 0;
10946}
10947_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +000010948if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010949
10950
Benjamin Petersonf7155a32010-06-21 16:51:22 +000010951$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000010952
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010953 have_prototypes=yes
10954
Guido van Rossum7f43da71994-08-01 12:15:30 +000010955fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010956rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Petersonf7155a32010-06-21 16:51:22 +000010957{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010958$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010959
Guido van Rossumda88dad1995-01-26 00:46:29 +000010960works=no
Benjamin Petersonf7155a32010-06-21 16:51:22 +000010961{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010962$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +000010963cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010964/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000010965
10966#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000010967int foo(int x, ...) {
10968 va_list va;
10969 va_start(va, x);
10970 va_arg(va, int);
10971 va_arg(va, char *);
10972 va_arg(va, double);
10973 return 0;
10974}
Guido van Rossum7f43da71994-08-01 12:15:30 +000010975
Martin v. Löwis11437992002-04-12 09:54:03 +000010976int
10977main ()
10978{
Guido van Rossum90eea071996-08-30 20:58:57 +000010979return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000010980 ;
10981 return 0;
10982}
10983_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +000010984if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010985
10986
Benjamin Petersonf7155a32010-06-21 16:51:22 +000010987$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000010988
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010989 works=yes
10990
Guido van Rossum627b2d71993-12-24 10:39:16 +000010991fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010992rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Petersonf7155a32010-06-21 16:51:22 +000010993{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010994$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010995
Martin v. Löwisd6320502004-08-12 13:45:08 +000010996# check for socketpair
Benjamin Petersonf7155a32010-06-21 16:51:22 +000010997{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010998$as_echo_n "checking for socketpair... " >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +000010999cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011000/* end confdefs.h. */
11001
11002#include <sys/types.h>
11003#include <sys/socket.h>
11004
11005int
11006main ()
11007{
11008void *x=socketpair
11009 ;
11010 return 0;
11011}
11012_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011013if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000011014
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011015$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000011016
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011017 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011018$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011019else
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011021$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011022
11023fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011024rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011025
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011026# check if sockaddr has sa_len member
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011027{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011028$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011029cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011030/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011031#include <sys/types.h>
11032#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011033int
11034main ()
11035{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011036struct sockaddr x;
11037x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011038 ;
11039 return 0;
11040}
11041_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011042if ac_fn_c_try_compile "$LINENO"; then :
11043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011044$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011045
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011046$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011047
11048else
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011049 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011050$as_echo "no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011051fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011052rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011053
Guido van Rossumda88dad1995-01-26 00:46:29 +000011054va_list_is_array=no
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011055{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011056$as_echo_n "checking whether va_list is an array... " >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011057cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011058/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011059
11060#ifdef HAVE_STDARG_PROTOTYPES
11061#include <stdarg.h>
11062#else
11063#include <varargs.h>
11064#endif
11065
Martin v. Löwis11437992002-04-12 09:54:03 +000011066int
11067main ()
11068{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011069va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000011070 ;
11071 return 0;
11072}
11073_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011074if ac_fn_c_try_compile "$LINENO"; then :
11075
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011076else
Skip Montanaro6dead952003-09-25 14:50:04 +000011077
Martin v. Löwis11437992002-04-12 09:54:03 +000011078
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011079$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011080
Guido van Rossumda88dad1995-01-26 00:46:29 +000011081 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011082
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011083fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011084rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011085{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011086$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011087
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011088# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000011089
11090
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011091ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
11092if test "x$ac_cv_func_gethostbyname_r" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011093
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011094 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000011095
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011096 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011097$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011098 OLD_CFLAGS=$CFLAGS
11099 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011100 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011101/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011102
11103# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011104
Martin v. Löwis11437992002-04-12 09:54:03 +000011105int
11106main ()
11107{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011108
11109 char *name;
11110 struct hostent *he, *res;
11111 char buffer[2048];
11112 int buflen = 2048;
11113 int h_errnop;
11114
11115 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011116
11117 ;
11118 return 0;
11119}
11120_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011121if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011122
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011123 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011124
Martin v. Löwis11437992002-04-12 09:54:03 +000011125
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011126$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011127
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011128 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011129$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011130
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011131else
Skip Montanaro6dead952003-09-25 14:50:04 +000011132
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011133 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011134$as_echo "no" >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011135 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011136$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011137 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011138/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011139
11140# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011141
Martin v. Löwis11437992002-04-12 09:54:03 +000011142int
11143main ()
11144{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011145
11146 char *name;
11147 struct hostent *he;
11148 char buffer[2048];
11149 int buflen = 2048;
11150 int h_errnop;
11151
11152 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011153
11154 ;
11155 return 0;
11156}
11157_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011158if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011159
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011160 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011161
Martin v. Löwis11437992002-04-12 09:54:03 +000011162
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011163$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011164
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011165 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011166$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011167
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011168else
Skip Montanaro6dead952003-09-25 14:50:04 +000011169
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011170 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011171$as_echo "no" >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011172 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011173$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011174 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011175/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011176
11177# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011178
Martin v. Löwis11437992002-04-12 09:54:03 +000011179int
11180main ()
11181{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011182
11183 char *name;
11184 struct hostent *he;
11185 struct hostent_data data;
11186
11187 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000011188
11189 ;
11190 return 0;
11191}
11192_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011193if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011194
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011195 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011196
Martin v. Löwis11437992002-04-12 09:54:03 +000011197
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011198$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011199
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011200 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011201$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011202
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011203else
Skip Montanaro6dead952003-09-25 14:50:04 +000011204
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011205 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011206$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011207
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011208fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011209rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011210
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011211fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011212rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011213
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011214fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011215rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011216 CFLAGS=$OLD_CFLAGS
11217
11218else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011219
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011220 for ac_func in gethostbyname
11221do :
11222 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
11223if test "x$ac_cv_func_gethostbyname" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011224 cat >>confdefs.h <<_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011225#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011226_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011227
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011228fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011229done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011230
Michael W. Hudson54241132001-12-07 15:38:26 +000011231
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011232fi
11233
Michael W. Hudson54241132001-12-07 15:38:26 +000011234
11235
11236
11237
11238
11239
Guido van Rossum627b2d71993-12-24 10:39:16 +000011240# checks for system services
11241# (none yet)
11242
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011243# Linux requires this for correct f.p. operations
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011244ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
11245if test "x$ac_cv_func___fpu_control" = x""yes; then :
11246
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011247else
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011248 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011249$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011250if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then :
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011251 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011252else
Martin v. Löwis11437992002-04-12 09:54:03 +000011253 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011254LIBS="-lieee $LIBS"
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011255cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011256/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011257
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011258/* Override any GCC internal prototype to avoid an error.
11259 Use char because int might match the return type of a GCC
11260 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011261#ifdef __cplusplus
11262extern "C"
11263#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011264char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011265int
11266main ()
11267{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011268return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011269 ;
11270 return 0;
11271}
11272_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011273if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011274 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011275else
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011276 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011277fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011278rm -f core conftest.err conftest.$ac_objext \
11279 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011280LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011281fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011282{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011283$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011284if test "x$ac_cv_lib_ieee___fpu_control" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011285 cat >>confdefs.h <<_ACEOF
11286#define HAVE_LIBIEEE 1
11287_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011288
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011289 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011290
Guido van Rossum627b2d71993-12-24 10:39:16 +000011291fi
11292
Michael W. Hudson54241132001-12-07 15:38:26 +000011293
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011294fi
11295
Michael W. Hudson54241132001-12-07 15:38:26 +000011296
Guido van Rossum7f253911997-05-09 02:42:48 +000011297# Check for --with-fpectl
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011298{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011299$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011300
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011301# Check whether --with-fpectl was given.
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011302if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011303 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000011304if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000011305then
11306
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011307$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011308
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011309 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011310$as_echo "yes" >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011311else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011312$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011313fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000011314else
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011316$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011317fi
11318
Guido van Rossum7f253911997-05-09 02:42:48 +000011319
Guido van Rossum7f43da71994-08-01 12:15:30 +000011320# check for --with-libm=...
11321
Guido van Rossum563e7081996-09-10 18:20:48 +000011322case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000011323Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000011324*) LIBM=-lm
11325esac
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011326{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011327$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011328
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011329# Check whether --with-libm was given.
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011330if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011331 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000011332if test "$withval" = no
11333then LIBM=
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011334 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011335$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011336elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011337then LIBM=$withval
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011338 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011339$as_echo "set LIBM=\"$withval\"" >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011340else as_fn_error "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011341fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011342else
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011344$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011345fi
11346
Guido van Rossum7f43da71994-08-01 12:15:30 +000011347
11348# check for --with-libc=...
11349
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011350{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011351$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011352
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011353# Check whether --with-libc was given.
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011354if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011355 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000011356if test "$withval" = no
11357then LIBC=
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011358 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011359$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011360elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011361then LIBC=$withval
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011362 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011363$as_echo "set LIBC=\"$withval\"" >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011364else as_fn_error "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011365fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011366else
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011367 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011368$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011369fi
11370
Guido van Rossum7f43da71994-08-01 12:15:30 +000011371
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011372# **************************************************
11373# * Check for various properties of floating point *
11374# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011375
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011376{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011377$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011378if test "${ac_cv_little_endian_double+set}" = set; then :
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011379 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011380else
11381
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011382if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011383 ac_cv_little_endian_double=no
11384else
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011385 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011386/* end confdefs.h. */
11387
11388#include <string.h>
11389int main() {
11390 double x = 9006104071832581.0;
11391 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
11392 return 0;
11393 else
11394 return 1;
11395}
11396
11397_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011398if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011399 ac_cv_little_endian_double=yes
11400else
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011401 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011402fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011403rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11404 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011405fi
11406
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011407fi
11408
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011409{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011410$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011411if test "$ac_cv_little_endian_double" = yes
11412then
11413
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011414$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011415
11416fi
11417
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011418{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011419$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011420if test "${ac_cv_big_endian_double+set}" = set; then :
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011421 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011422else
11423
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011424if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011425 ac_cv_big_endian_double=no
11426else
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011427 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011428/* end confdefs.h. */
11429
11430#include <string.h>
11431int main() {
11432 double x = 9006104071832581.0;
11433 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
11434 return 0;
11435 else
11436 return 1;
11437}
11438
11439_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011440if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011441 ac_cv_big_endian_double=yes
11442else
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011443 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011444fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011445rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11446 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011447fi
11448
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011449fi
11450
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011451{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011452$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011453if test "$ac_cv_big_endian_double" = yes
11454then
11455
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011456$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011457
11458fi
11459
11460# Some ARM platforms use a mixed-endian representation for doubles.
11461# While Python doesn't currently have full support for these platforms
11462# (see e.g., issue 1762561), we can at least make sure that float <-> string
11463# conversions work.
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011464{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011465$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011466if test "${ac_cv_mixed_endian_double+set}" = set; then :
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011467 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011468else
11469
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011470if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011471 ac_cv_mixed_endian_double=no
11472else
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011473 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011474/* end confdefs.h. */
11475
11476#include <string.h>
11477int main() {
11478 double x = 9006104071832581.0;
11479 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
11480 return 0;
11481 else
11482 return 1;
11483}
11484
11485_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011486if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011487 ac_cv_mixed_endian_double=yes
11488else
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011489 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011490fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011491rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11492 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011493fi
11494
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011495fi
11496
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011497{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011498$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011499if test "$ac_cv_mixed_endian_double" = yes
11500then
11501
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011502$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011503
11504fi
11505
Mark Dickinson7abf8d42009-04-18 20:17:52 +000011506# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000011507# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000011508# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000011509# rounding; this is a problem on x86, where the x87 FPU has a default
11510# rounding precision of 64 bits. For gcc/x86, we try to fix this by
11511# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011512if test "$GCC" = yes && test -n "`$CC -dM -E - </dev/null | grep i386`"
11513then
Mark Dickinson7abf8d42009-04-18 20:17:52 +000011514 # Check that it's okay to use gcc inline assembler to get and set
Mark Dickinson10683072009-04-18 21:18:19 +000011515 # x87 control word. It should be, but you never know...
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011516 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011517$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011518 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011519/* end confdefs.h. */
11520
11521int
11522main ()
11523{
11524
Mark Dickinson7abf8d42009-04-18 20:17:52 +000011525 unsigned short cw;
11526 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
11527 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011528
11529 ;
11530 return 0;
11531}
11532_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011533if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011534 have_gcc_asm_for_x87=yes
11535else
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011536 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011537fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011538rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011539 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011540$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinson7abf8d42009-04-18 20:17:52 +000011541 if test "$have_gcc_asm_for_x87" = yes
11542 then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011543
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011544$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011545
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011546 fi
11547fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011548
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011549# Detect whether system arithmetic is subject to x87-style double
11550# rounding issues. The result of this test has little meaning on non
11551# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
11552# mode is round-to-nearest and double rounding issues are present, and
11553# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011554{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011555$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011556# $BASECFLAGS may affect the result
11557ac_save_cc="$CC"
11558CC="$CC $BASECFLAGS"
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011559if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011560 ac_cv_x87_double_rounding=no
11561else
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011562 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011563/* end confdefs.h. */
11564
11565#include <stdlib.h>
11566#include <math.h>
11567int main() {
11568 volatile double x, y, z;
11569 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
11570 x = 0.99999999999999989; /* 1-2**-53 */
11571 y = 1./x;
11572 if (y != 1.)
11573 exit(0);
11574 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
11575 x = 1e16;
11576 y = 2.99999;
11577 z = x + y;
11578 if (z != 1e16+4.)
11579 exit(0);
11580 /* both tests show evidence of double rounding */
11581 exit(1);
11582}
11583
11584_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011585if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011586 ac_cv_x87_double_rounding=no
11587else
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011588 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011589fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011590rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11591 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011592fi
11593
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011594CC="$ac_save_cc"
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011595{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011596$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011597if test "$ac_cv_x87_double_rounding" = yes
11598then
11599
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011600$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011601
11602fi
11603
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011604# ************************************
11605# * Check for mathematical functions *
11606# ************************************
11607
11608LIBS_SAVE=$LIBS
11609LIBS="$LIBS $LIBM"
11610
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011611# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
11612# -0. on some architectures.
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011613{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011614$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011615if test "${ac_cv_tanh_preserves_zero_sign+set}" = set; then :
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011616 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011617else
11618
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011619if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011620 ac_cv_tanh_preserves_zero_sign=no
11621else
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011622 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011623/* end confdefs.h. */
11624
11625#include <math.h>
11626#include <stdlib.h>
11627int main() {
11628 /* return 0 if either negative zeros don't exist
11629 on this platform or if negative zeros exist
11630 and tanh(-0.) == -0. */
11631 if (atan2(0., -1.) == atan2(-0., -1.) ||
11632 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
11633 else exit(1);
11634}
11635
11636_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011637if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011638 ac_cv_tanh_preserves_zero_sign=yes
11639else
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011640 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011641fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011642rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11643 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011644fi
11645
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011646fi
11647
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011648{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011649$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011650if test "$ac_cv_tanh_preserves_zero_sign" = yes
11651then
11652
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011653$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011654
11655fi
11656
Mark Dickinsonf2537862009-04-18 13:58:18 +000011657for ac_func in acosh asinh atanh copysign expm1 finite hypot log1p round
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011658do :
11659 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11660ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11661eval as_val=\$$as_ac_var
11662 if test "x$as_val" = x""yes; then :
Christian Heimes99170a52007-12-19 02:07:34 +000011663 cat >>confdefs.h <<_ACEOF
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011664#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimes99170a52007-12-19 02:07:34 +000011665_ACEOF
11666
11667fi
11668done
11669
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011670ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
11671"
11672if test "x$ac_cv_have_decl_isinf" = x""yes; then :
11673 ac_have_decl=1
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011674else
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011675 ac_have_decl=0
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011676fi
11677
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011678cat >>confdefs.h <<_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011679#define HAVE_DECL_ISINF $ac_have_decl
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011680_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011681ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
11682"
11683if test "x$ac_cv_have_decl_isnan" = x""yes; then :
11684 ac_have_decl=1
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011685else
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011686 ac_have_decl=0
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011687fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011688
11689cat >>confdefs.h <<_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011690#define HAVE_DECL_ISNAN $ac_have_decl
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011691_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011692ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
11693"
11694if test "x$ac_cv_have_decl_isfinite" = x""yes; then :
11695 ac_have_decl=1
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011696else
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011697 ac_have_decl=0
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011698fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011699
11700cat >>confdefs.h <<_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011701#define HAVE_DECL_ISFINITE $ac_have_decl
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011702_ACEOF
11703
11704
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000011705LIBS=$LIBS_SAVE
11706
Mark Dickinson875ada42009-11-28 12:52:39 +000011707# For multiprocessing module, check that sem_open
11708# actually works. For FreeBSD versions <= 7.2,
11709# the kernel module that provides POSIX semaphores
11710# isn't loaded by default, so an attempt to call
11711# sem_open results in a 'Signal 12' error.
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011712{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011713$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011714if test "${ac_cv_posix_semaphores_enabled+set}" = set; then :
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011715 $as_echo_n "(cached) " >&6
Mark Dickinson875ada42009-11-28 12:52:39 +000011716else
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011717 if test "$cross_compiling" = yes; then :
Mark Dickinson875ada42009-11-28 12:52:39 +000011718 ac_cv_posix_semaphores_enabled=yes
11719else
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011720 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson875ada42009-11-28 12:52:39 +000011721/* end confdefs.h. */
11722
11723#include <unistd.h>
11724#include <fcntl.h>
11725#include <stdio.h>
11726#include <semaphore.h>
11727#include <sys/stat.h>
11728
11729int main(void) {
11730 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
11731 if (a == SEM_FAILED) {
11732 perror("sem_open");
11733 return 1;
11734 }
11735 sem_close(a);
Mark Dickinson62eda4d2009-12-13 21:18:16 +000011736 sem_unlink("/autoconf");
Mark Dickinson875ada42009-11-28 12:52:39 +000011737 return 0;
11738}
11739
11740_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011741if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson875ada42009-11-28 12:52:39 +000011742 ac_cv_posix_semaphores_enabled=yes
11743else
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011744 ac_cv_posix_semaphores_enabled=no
Mark Dickinson875ada42009-11-28 12:52:39 +000011745fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011746rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11747 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson875ada42009-11-28 12:52:39 +000011748fi
11749
11750
Mark Dickinson875ada42009-11-28 12:52:39 +000011751fi
11752
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011753{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011754$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinson875ada42009-11-28 12:52:39 +000011755if test $ac_cv_posix_semaphores_enabled = no
11756then
11757
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011758$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinson875ada42009-11-28 12:52:39 +000011759
11760fi
11761
Mark Dickinson10683072009-04-18 21:18:19 +000011762# Multiprocessing check for broken sem_getvalue
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011763{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011764$as_echo_n "checking for broken sem_getvalue... " >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011765if test "$cross_compiling" = yes; then :
11766 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011767$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011768as_fn_error "cannot run test program while cross compiling
11769See \`config.log' for more details." "$LINENO" 5; }
Mark Dickinson10683072009-04-18 21:18:19 +000011770else
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011771 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000011772/* end confdefs.h. */
11773
11774#include <unistd.h>
11775#include <fcntl.h>
11776#include <stdio.h>
11777#include <semaphore.h>
11778#include <sys/stat.h>
11779
11780int main(void){
Mark Dickinson62eda4d2009-12-13 21:18:16 +000011781 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000011782 int count;
11783 int res;
11784 if(a==SEM_FAILED){
11785 perror("sem_open");
11786 return 1;
11787
11788 }
11789 res = sem_getvalue(a, &count);
11790 sem_close(a);
Mark Dickinson62eda4d2009-12-13 21:18:16 +000011791 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000011792 return res==-1 ? 1 : 0;
11793}
11794
11795
11796_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011797if ac_fn_c_try_run "$LINENO"; then :
11798 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011799$as_echo "no" >&6; }
Mark Dickinson10683072009-04-18 21:18:19 +000011800else
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011801 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011802$as_echo "yes" >&6; }
Mark Dickinson10683072009-04-18 21:18:19 +000011803
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011804$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Mark Dickinson10683072009-04-18 21:18:19 +000011805
11806
11807fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011808rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11809 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000011810fi
11811
11812
Mark Dickinsonbd792642009-03-18 20:06:12 +000011813# determine what size digit to use for Python's longs
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011814{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011815$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000011816# Check whether --enable-big-digits was given.
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011817if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000011818 enableval=$enable_big_digits; case $enable_big_digits in
11819yes)
11820 enable_big_digits=30 ;;
11821no)
11822 enable_big_digits=15 ;;
1182315|30)
11824 ;;
11825*)
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011826 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 +000011827esac
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011828{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011829$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000011830
11831cat >>confdefs.h <<_ACEOF
11832#define PYLONG_BITS_IN_DIGIT $enable_big_digits
11833_ACEOF
11834
11835
11836else
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011837 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011838$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000011839fi
11840
11841
Guido van Rossumef2255b2000-03-10 22:30:29 +000011842# check for wchar.h
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011843ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
11844if test "x$ac_cv_header_wchar_h" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011845
11846
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011847$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011848
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011849 wchar_h="yes"
11850
Guido van Rossumef2255b2000-03-10 22:30:29 +000011851else
Martin v. Löwis11437992002-04-12 09:54:03 +000011852 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000011853
11854fi
11855
Michael W. Hudson54241132001-12-07 15:38:26 +000011856
Martin v. Löwis11437992002-04-12 09:54:03 +000011857
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000011858# determine wchar_t size
11859if test "$wchar_h" = yes
11860then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011861 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011862# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11863# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11864# This bug is HP SR number 8606223364.
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011865{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011866$as_echo_n "checking size of wchar_t... " >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011867if test "${ac_cv_sizeof_wchar_t+set}" = set; then :
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011868 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011869else
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011870 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
11871"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011872
Martin v. Löwis11437992002-04-12 09:54:03 +000011873else
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011874 if test "$ac_cv_type_wchar_t" = yes; then
11875 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011876$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011877{ as_fn_set_status 77
11878as_fn_error "cannot compute sizeof (wchar_t)
11879See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011880 else
11881 ac_cv_sizeof_wchar_t=0
11882 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011883fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011884
Martin v. Löwis11437992002-04-12 09:54:03 +000011885fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011886{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011887$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011888
11889
11890
Martin v. Löwis11437992002-04-12 09:54:03 +000011891cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000011892#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000011893_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000011894
Michael W. Hudson54241132001-12-07 15:38:26 +000011895
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000011896fi
11897
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011898{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011899$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000011900have_ucs4_tcl=no
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011901cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011902/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000011903
11904#include <tcl.h>
11905#if TCL_UTF_MAX != 6
11906# error "NOT UCS4_TCL"
11907#endif
11908int
11909main ()
11910{
11911
11912 ;
11913 return 0;
11914}
11915_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011916if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000011917
11918
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011919$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000011920
11921 have_ucs4_tcl=yes
11922
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000011923fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011924rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011925{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011926$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000011927
Skip Montanaro6dead952003-09-25 14:50:04 +000011928# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000011929if test "$wchar_h" = yes
11930then
11931 # check whether wchar_t is signed or not
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011932 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011933$as_echo_n "checking whether wchar_t is signed... " >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011934 if test "${ac_cv_wchar_t_signed+set}" = set; then :
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011935 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000011936else
11937
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011938 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000011939 ac_cv_wchar_t_signed=yes
11940else
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011941 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011942/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000011943
11944 #include <wchar.h>
11945 int main()
11946 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000011947 /* Success: exit code 0 */
11948 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000011949 }
11950
11951_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011952if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000011953 ac_cv_wchar_t_signed=yes
11954else
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011955 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000011956fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011957rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11958 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000011959fi
11960
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000011961fi
11962
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011963 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011964$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011965fi
11966
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011967{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what type to use for str" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011968$as_echo_n "checking what type to use for str... " >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000011969
11970# Check whether --with-wide-unicode was given.
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011971if test "${with_wide_unicode+set}" = set; then :
Georg Brandl52d168a2008-01-07 18:10:24 +000011972 withval=$with_wide_unicode;
11973if test "$withval" != no
11974then unicode_size="4"
11975else unicode_size="2"
11976fi
11977
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000011978else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011979
Georg Brandl52d168a2008-01-07 18:10:24 +000011980case "$have_ucs4_tcl" in
11981 yes) unicode_size="4" ;;
11982 *) unicode_size="2" ;;
11983esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000011984
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000011985fi
11986
Martin v. Löwis0036cba2002-04-12 09:58:45 +000011987
11988
Georg Brandl52d168a2008-01-07 18:10:24 +000011989case "$unicode_size" in
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011990 4) $as_echo "#define Py_UNICODE_SIZE 4" >>confdefs.h
Georg Brandl52d168a2008-01-07 18:10:24 +000011991 ;;
Benjamin Petersonf7155a32010-06-21 16:51:22 +000011992 *) $as_echo "#define Py_UNICODE_SIZE 2" >>confdefs.h
Georg Brandl52d168a2008-01-07 18:10:24 +000011993 ;;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000011994esac
11995
Michael W. Hudson54241132001-12-07 15:38:26 +000011996
Martin v. Löwis11437992002-04-12 09:54:03 +000011997
Georg Brandl52d168a2008-01-07 18:10:24 +000011998# wchar_t is only usable if it maps to an unsigned type
11999if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000012000 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000012001then
12002 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012003
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012004$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012005
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012006 $as_echo "#define PY_UNICODE_TYPE wchar_t" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012007
Georg Brandl52d168a2008-01-07 18:10:24 +000012008elif test "$ac_cv_sizeof_short" = "$unicode_size"
12009then
12010 PY_UNICODE_TYPE="unsigned short"
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012011 $as_echo "#define PY_UNICODE_TYPE unsigned short" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012012
Georg Brandl52d168a2008-01-07 18:10:24 +000012013elif test "$ac_cv_sizeof_long" = "$unicode_size"
12014then
12015 PY_UNICODE_TYPE="unsigned long"
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012016 $as_echo "#define PY_UNICODE_TYPE unsigned long" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012017
Georg Brandl52d168a2008-01-07 18:10:24 +000012018else
12019 PY_UNICODE_TYPE="no type found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012020fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012021{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PY_UNICODE_TYPE" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012022$as_echo "$PY_UNICODE_TYPE" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000012023
12024# check for endianness
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012025 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012026$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012027if test "${ac_cv_c_bigendian+set}" = set; then :
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012028 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000012029else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012030 ac_cv_c_bigendian=unknown
12031 # See if we're dealing with a universal compiler.
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012032 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012033/* end confdefs.h. */
12034#ifndef __APPLE_CC__
12035 not a universal capable compiler
12036 #endif
12037 typedef int dummy;
12038
12039_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012040if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012041
12042 # Check for potential -arch flags. It is not universal unless
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012043 # there are at least two -arch flags with different values.
12044 ac_arch=
12045 ac_prev=
12046 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12047 if test -n "$ac_prev"; then
12048 case $ac_word in
12049 i?86 | x86_64 | ppc | ppc64)
12050 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12051 ac_arch=$ac_word
12052 else
12053 ac_cv_c_bigendian=universal
12054 break
12055 fi
12056 ;;
12057 esac
12058 ac_prev=
12059 elif test "x$ac_word" = "x-arch"; then
12060 ac_prev=arch
12061 fi
12062 done
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012063fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012064rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12065 if test $ac_cv_c_bigendian = unknown; then
12066 # See if sys/param.h defines the BYTE_ORDER macro.
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012067 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012068/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012069#include <sys/types.h>
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012070 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012071
Martin v. Löwis11437992002-04-12 09:54:03 +000012072int
12073main ()
12074{
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012075#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12076 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12077 && LITTLE_ENDIAN)
12078 bogus endian macros
12079 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012080
12081 ;
12082 return 0;
12083}
12084_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012085if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012086 # It does; now see whether it defined to BIG_ENDIAN or not.
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012087 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012088/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012089#include <sys/types.h>
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012090 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012091
Martin v. Löwis11437992002-04-12 09:54:03 +000012092int
12093main ()
12094{
Guido van Rossumef2255b2000-03-10 22:30:29 +000012095#if BYTE_ORDER != BIG_ENDIAN
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012096 not big endian
12097 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012098
12099 ;
12100 return 0;
12101}
12102_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012103if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012104 ac_cv_c_bigendian=yes
12105else
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012106 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000012107fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012108rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012109fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012110rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12111 fi
12112 if test $ac_cv_c_bigendian = unknown; then
12113 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012114 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012115/* end confdefs.h. */
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012116#include <limits.h>
12117
Martin v. Löwis11437992002-04-12 09:54:03 +000012118int
12119main ()
12120{
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012121#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12122 bogus endian macros
12123 #endif
12124
Martin v. Löwis11437992002-04-12 09:54:03 +000012125 ;
12126 return 0;
12127}
12128_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012129if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012130 # It does; now see whether it defined to _BIG_ENDIAN or not.
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012131 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012132/* end confdefs.h. */
12133#include <limits.h>
12134
12135int
12136main ()
12137{
12138#ifndef _BIG_ENDIAN
12139 not big endian
12140 #endif
12141
12142 ;
12143 return 0;
12144}
12145_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012146if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012147 ac_cv_c_bigendian=yes
Benjamin Petersona8332062009-09-11 22:36:27 +000012148else
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012149 ac_cv_c_bigendian=no
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012150fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012151rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012152fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012153rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12154 fi
12155 if test $ac_cv_c_bigendian = unknown; then
12156 # Compile a test program.
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012157 if test "$cross_compiling" = yes; then :
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012158 # Try to guess by grepping values from an object file.
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012159 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012160/* end confdefs.h. */
12161short int ascii_mm[] =
12162 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12163 short int ascii_ii[] =
12164 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12165 int use_ascii (int i) {
12166 return ascii_mm[i] + ascii_ii[i];
12167 }
12168 short int ebcdic_ii[] =
12169 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12170 short int ebcdic_mm[] =
12171 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12172 int use_ebcdic (int i) {
12173 return ebcdic_mm[i] + ebcdic_ii[i];
12174 }
12175 extern int foo;
12176
12177int
12178main ()
12179{
12180return use_ascii (foo) == use_ebcdic (foo);
12181 ;
12182 return 0;
12183}
12184_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012185if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012186 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12187 ac_cv_c_bigendian=yes
12188 fi
12189 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12190 if test "$ac_cv_c_bigendian" = unknown; then
12191 ac_cv_c_bigendian=no
12192 else
12193 # finding both strings is unlikely to happen, but who knows?
12194 ac_cv_c_bigendian=unknown
12195 fi
12196 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012197fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012198rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012199else
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012200 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012201/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012202$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012203int
12204main ()
12205{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012206
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012207 /* Are we little or big endian? From Harbison&Steele. */
12208 union
12209 {
12210 long int l;
12211 char c[sizeof (long int)];
12212 } u;
12213 u.l = 1;
12214 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012215
12216 ;
12217 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000012218}
Martin v. Löwis11437992002-04-12 09:54:03 +000012219_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012220if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012221 ac_cv_c_bigendian=no
12222else
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012223 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000012224fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012225rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12226 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000012227fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012228
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012229 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012230fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012231{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012232$as_echo "$ac_cv_c_bigendian" >&6; }
12233 case $ac_cv_c_bigendian in #(
12234 yes)
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012235 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012236;; #(
12237 no)
12238 ;; #(
12239 universal)
12240
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012241$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012242
12243 ;; #(
12244 *)
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012245 as_fn_error "unknown endianness
12246 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012247 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000012248
Michael W. Hudson54241132001-12-07 15:38:26 +000012249
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012250# Check whether right shifting a negative integer extends the sign bit
12251# or fills with zeros (like the Cray J90, according to Tim Peters).
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012252{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012253$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012254if test "${ac_cv_rshift_extends_sign+set}" = set; then :
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012255 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000012256else
Martin v. Löwis11437992002-04-12 09:54:03 +000012257
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012258if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000012259 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012260else
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012261 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012262/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012263
12264int main()
12265{
Vladimir Marangozova6180282000-07-12 05:05:06 +000012266 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012267}
12268
Martin v. Löwis11437992002-04-12 09:54:03 +000012269_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012270if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000012271 ac_cv_rshift_extends_sign=yes
12272else
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012273 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000012274fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012275rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12276 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000012277fi
12278
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012279fi
12280
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012281{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012282$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000012283if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012284then
Martin v. Löwis11437992002-04-12 09:54:03 +000012285
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012286$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012287
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012288fi
12289
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012290# check for getc_unlocked and related locking functions
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012291{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012292$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012293if test "${ac_cv_have_getc_unlocked+set}" = set; then :
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012294 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012295else
Martin v. Löwis11437992002-04-12 09:54:03 +000012296
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012297cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012298/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012299#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012300int
12301main ()
12302{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012303
12304 FILE *f = fopen("/dev/null", "r");
12305 flockfile(f);
12306 getc_unlocked(f);
12307 funlockfile(f);
12308
Martin v. Löwis11437992002-04-12 09:54:03 +000012309 ;
12310 return 0;
12311}
12312_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012313if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012314 ac_cv_have_getc_unlocked=yes
12315else
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012316 ac_cv_have_getc_unlocked=no
12317fi
12318rm -f core conftest.err conftest.$ac_objext \
12319 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012320fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012321
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012322{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012323$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012324if test "$ac_cv_have_getc_unlocked" = yes
12325then
Martin v. Löwis11437992002-04-12 09:54:03 +000012326
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012327$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012328
12329fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012330
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012331# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000012332# save the value of LIBS so we don't actually link Python with readline
12333LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012334
Gregory P. Smith18820942008-09-07 06:24:49 +000012335# On some systems we need to link readline to a termcap compatible
12336# library. NOTE: Keep the precedence of listed libraries synchronised
12337# with setup.py.
12338py_cv_lib_readline=no
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012339{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012340$as_echo_n "checking how to link readline libs... " >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012341for py_libtermcap in "" ncursesw ncurses curses termcap; do
12342 if test -z "$py_libtermcap"; then
12343 READLINE_LIBS="-lreadline"
12344 else
12345 READLINE_LIBS="-lreadline -l$py_libtermcap"
12346 fi
12347 LIBS="$READLINE_LIBS $LIBS_no_readline"
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012348 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012349/* end confdefs.h. */
12350
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012351/* Override any GCC internal prototype to avoid an error.
12352 Use char because int might match the return type of a GCC
12353 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012354#ifdef __cplusplus
12355extern "C"
12356#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012357char readline ();
12358int
12359main ()
12360{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012361return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012362 ;
12363 return 0;
12364}
12365_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012366if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000012367 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012368fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012369rm -f core conftest.err conftest.$ac_objext \
12370 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000012371 if test $py_cv_lib_readline = yes; then
12372 break
12373 fi
12374done
12375# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
12376#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000012377if test $py_cv_lib_readline = no; then
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012379$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012380else
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012382$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012383
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012384$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012385
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012386fi
12387
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012388# check for readline 2.1
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012389{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012390$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012391if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then :
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012392 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012393else
12394 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012395LIBS="-lreadline $READLINE_LIBS $LIBS"
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012396cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012397/* end confdefs.h. */
12398
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012399/* Override any GCC internal prototype to avoid an error.
12400 Use char because int might match the return type of a GCC
12401 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012402#ifdef __cplusplus
12403extern "C"
12404#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012405char rl_callback_handler_install ();
12406int
12407main ()
12408{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012409return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012410 ;
12411 return 0;
12412}
12413_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012414if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012415 ac_cv_lib_readline_rl_callback_handler_install=yes
12416else
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012417 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012418fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012419rm -f core conftest.err conftest.$ac_objext \
12420 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012421LIBS=$ac_check_lib_save_LIBS
12422fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012423{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012424$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012425if test "x$ac_cv_lib_readline_rl_callback_handler_install" = x""yes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012426
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012427$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012428
12429fi
12430
12431
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012432# check for readline 2.2
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012433cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012434/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012435#include <readline/readline.h>
12436_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012437if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012438 have_readline=yes
12439else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012440 have_readline=no
12441fi
12442rm -f conftest.err conftest.$ac_ext
12443if test $have_readline = yes
12444then
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012445 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012446/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012447#include <readline/readline.h>
12448
12449_ACEOF
12450if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012451 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012452
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012453$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012454
12455fi
Jesus Cea0f752ee2010-04-28 12:03:06 +000012456rm -f conftest*
Antoine Pitrou37276002009-10-26 19:32:51 +000012457
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012458 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitrou37276002009-10-26 19:32:51 +000012459/* end confdefs.h. */
12460#include <readline/readline.h>
12461
12462_ACEOF
12463if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012464 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitrou37276002009-10-26 19:32:51 +000012465
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012466$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitrou37276002009-10-26 19:32:51 +000012467
12468fi
Jesus Cea0f752ee2010-04-28 12:03:06 +000012469rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012470
12471fi
12472
Martin v. Löwis0daad592001-09-30 21:09:59 +000012473# check for readline 4.0
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012474{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012475$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012476if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then :
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012477 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000012478else
Martin v. Löwis11437992002-04-12 09:54:03 +000012479 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012480LIBS="-lreadline $READLINE_LIBS $LIBS"
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012481cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012482/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012483
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012484/* Override any GCC internal prototype to avoid an error.
12485 Use char because int might match the return type of a GCC
12486 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012487#ifdef __cplusplus
12488extern "C"
12489#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012490char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012491int
12492main ()
12493{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012494return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012495 ;
12496 return 0;
12497}
12498_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012499if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012500 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000012501else
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012502 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000012503fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012504rm -f core conftest.err conftest.$ac_objext \
12505 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012506LIBS=$ac_check_lib_save_LIBS
12507fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012508{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012509$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012510if test "x$ac_cv_lib_readline_rl_pre_input_hook" = x""yes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012511
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012512$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000012513
Martin v. Löwis0daad592001-09-30 21:09:59 +000012514fi
12515
Michael W. Hudson54241132001-12-07 15:38:26 +000012516
Thomas Wouters89d996e2007-09-08 17:39:28 +000012517# also in 4.0
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012519$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012520if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then :
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012521 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000012522else
12523 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012524LIBS="-lreadline $READLINE_LIBS $LIBS"
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012525cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000012526/* end confdefs.h. */
12527
12528/* Override any GCC internal prototype to avoid an error.
12529 Use char because int might match the return type of a GCC
12530 builtin and then its argument prototype would still apply. */
12531#ifdef __cplusplus
12532extern "C"
12533#endif
12534char rl_completion_display_matches_hook ();
12535int
12536main ()
12537{
12538return rl_completion_display_matches_hook ();
12539 ;
12540 return 0;
12541}
12542_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012543if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000012544 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
12545else
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012546 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000012547fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012548rm -f core conftest.err conftest.$ac_objext \
12549 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000012550LIBS=$ac_check_lib_save_LIBS
12551fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012552{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012553$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012554if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = x""yes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000012555
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012556$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000012557
12558fi
12559
12560
Martin v. Löwis0daad592001-09-30 21:09:59 +000012561# check for readline 4.2
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012562{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012563$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012564if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then :
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012565 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000012566else
Martin v. Löwis11437992002-04-12 09:54:03 +000012567 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012568LIBS="-lreadline $READLINE_LIBS $LIBS"
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012569cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012570/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012571
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012572/* Override any GCC internal prototype to avoid an error.
12573 Use char because int might match the return type of a GCC
12574 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012575#ifdef __cplusplus
12576extern "C"
12577#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012578char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012579int
12580main ()
12581{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012582return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012583 ;
12584 return 0;
12585}
12586_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012587if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012588 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000012589else
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012590 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000012591fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012592rm -f core conftest.err conftest.$ac_objext \
12593 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012594LIBS=$ac_check_lib_save_LIBS
12595fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012596{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012597$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012598if test "x$ac_cv_lib_readline_rl_completion_matches" = x""yes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012599
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012600$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000012601
Guido van Rossum353ae582001-07-10 16:45:32 +000012602fi
12603
Jack Jansendd19cf82001-12-06 22:36:17 +000012604
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012605# also in readline 4.2
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012606cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012607/* end confdefs.h. */
12608#include <readline/readline.h>
12609_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012610if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012611 have_readline=yes
12612else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012613 have_readline=no
12614fi
12615rm -f conftest.err conftest.$ac_ext
12616if test $have_readline = yes
12617then
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012618 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012619/* end confdefs.h. */
12620#include <readline/readline.h>
12621
12622_ACEOF
12623if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012624 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012625
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012626$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012627
12628fi
Jesus Cea0f752ee2010-04-28 12:03:06 +000012629rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012630
12631fi
12632
Martin v. Löwis82bca632006-02-10 20:49:30 +000012633# End of readline checks: restore LIBS
12634LIBS=$LIBS_no_readline
12635
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012636{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012637$as_echo_n "checking for broken nice()... " >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012638if test "${ac_cv_broken_nice+set}" = set; then :
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012639 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000012640else
Martin v. Löwis11437992002-04-12 09:54:03 +000012641
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012642if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000012643 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012644else
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012645 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012646/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012647
12648int main()
12649{
12650 int val1 = nice(1);
12651 if (val1 != -1 && val1 == nice(2))
12652 exit(0);
12653 exit(1);
12654}
12655
Martin v. Löwis11437992002-04-12 09:54:03 +000012656_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012657if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012658 ac_cv_broken_nice=yes
12659else
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012660 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012661fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012662rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12663 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012664fi
12665
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012666fi
12667
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012668{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012669$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012670if test "$ac_cv_broken_nice" = yes
12671then
Martin v. Löwis11437992002-04-12 09:54:03 +000012672
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012673$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012674
12675fi
12676
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012677{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012678$as_echo_n "checking for broken poll()... " >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012679if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012680 ac_cv_broken_poll=no
12681else
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012682 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012683/* end confdefs.h. */
12684
12685#include <poll.h>
12686
12687int main (void)
12688 {
12689 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
12690
12691 close (42);
12692
12693 int poll_test = poll (&poll_struct, 1, 0);
12694
12695 if (poll_test < 0)
12696 {
12697 exit(0);
12698 }
12699 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
12700 {
12701 exit(0);
12702 }
12703 else
12704 {
12705 exit(1);
12706 }
12707 }
12708
12709_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012710if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012711 ac_cv_broken_poll=yes
12712else
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012713 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012714fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012715rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12716 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012717fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012718
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012719{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012720$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012721if test "$ac_cv_broken_poll" = yes
12722then
12723
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012724$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012725
12726fi
12727
Brett Cannon43802422005-02-10 20:48:03 +000012728# 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 +000012729# (which is not required by ISO C or UNIX spec) and/or if we support
12730# tzname[]
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012731ac_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 +000012732#include <$ac_cv_struct_tm>
12733
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012734"
12735if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then :
Brett Cannon43802422005-02-10 20:48:03 +000012736
12737cat >>confdefs.h <<_ACEOF
12738#define HAVE_STRUCT_TM_TM_ZONE 1
12739_ACEOF
12740
12741
12742fi
12743
12744if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
12745
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012746$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000012747
12748else
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012749 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
12750"
12751if test "x$ac_cv_have_decl_tzname" = x""yes; then :
12752 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012753else
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012754 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012755fi
12756
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012757cat >>confdefs.h <<_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012758#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012759_ACEOF
12760
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012761 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012762$as_echo_n "checking for tzname... " >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012763if test "${ac_cv_var_tzname+set}" = set; then :
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012764 $as_echo_n "(cached) " >&6
Brett Cannon43802422005-02-10 20:48:03 +000012765else
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012766 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000012767/* end confdefs.h. */
12768#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012769#if !HAVE_DECL_TZNAME
12770extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000012771#endif
12772
12773int
12774main ()
12775{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012776return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000012777 ;
12778 return 0;
12779}
12780_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012781if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000012782 ac_cv_var_tzname=yes
12783else
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012784 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000012785fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012786rm -f core conftest.err conftest.$ac_objext \
12787 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000012788fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012789{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012790$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000012791 if test $ac_cv_var_tzname = yes; then
12792
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012793$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000012794
12795 fi
12796fi
12797
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012798
Martin v. Löwis1d459062005-03-14 21:23:33 +000012799# check tzset(3) exists and works like we expect it to
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012800{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012801$as_echo_n "checking for working tzset()... " >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012802if test "${ac_cv_working_tzset+set}" = set; then :
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012803 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000012804else
12805
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012806if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000012807 ac_cv_working_tzset=no
12808else
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012809 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012810/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000012811
12812#include <stdlib.h>
12813#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000012814#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000012815
12816#if HAVE_TZNAME
12817extern char *tzname[];
12818#endif
12819
Guido van Rossumd11b62e2003-03-14 21:51:36 +000012820int main()
12821{
Brett Cannon18367812003-09-19 00:59:16 +000012822 /* Note that we need to ensure that not only does tzset(3)
12823 do 'something' with localtime, but it works as documented
12824 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000012825 This includes making sure that tzname is set properly if
12826 tm->tm_zone does not exist since it is the alternative way
12827 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000012828
12829 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000012830 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000012831 */
12832
Martin v. Löwis1d459062005-03-14 21:23:33 +000012833 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000012834 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
12835
Neal Norwitz7f2588c2003-04-11 15:35:53 +000012836 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000012837 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000012838 if (localtime(&groundhogday)->tm_hour != 0)
12839 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000012840#if HAVE_TZNAME
12841 /* For UTC, tzname[1] is sometimes "", sometimes " " */
12842 if (strcmp(tzname[0], "UTC") ||
12843 (tzname[1][0] != 0 && tzname[1][0] != ' '))
12844 exit(1);
12845#endif
Brett Cannon18367812003-09-19 00:59:16 +000012846
Neal Norwitz7f2588c2003-04-11 15:35:53 +000012847 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000012848 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000012849 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000012850 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000012851#if HAVE_TZNAME
12852 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
12853 exit(1);
12854#endif
Brett Cannon18367812003-09-19 00:59:16 +000012855
12856 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
12857 tzset();
12858 if (localtime(&groundhogday)->tm_hour != 11)
12859 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000012860#if HAVE_TZNAME
12861 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
12862 exit(1);
12863#endif
12864
12865#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000012866 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
12867 exit(1);
12868 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
12869 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000012870#endif
Brett Cannon18367812003-09-19 00:59:16 +000012871
Guido van Rossumd11b62e2003-03-14 21:51:36 +000012872 exit(0);
12873}
12874
12875_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012876if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000012877 ac_cv_working_tzset=yes
12878else
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012879 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000012880fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012881rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12882 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000012883fi
12884
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012885fi
12886
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012887{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012888$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000012889if test "$ac_cv_working_tzset" = yes
12890then
12891
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012892$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000012893
12894fi
12895
Martin v. Löwis94717ed2002-09-09 14:24:16 +000012896# Look for subsecond timestamps in struct stat
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012898$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012899if test "${ac_cv_stat_tv_nsec+set}" = set; then :
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012900 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000012901else
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012902 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012903/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000012904#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000012905int
12906main ()
12907{
12908
12909struct stat st;
12910st.st_mtim.tv_nsec = 1;
12911
12912 ;
12913 return 0;
12914}
12915_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012916if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000012917 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000012918else
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012919 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000012920fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012921rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12922fi
12923
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012924{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012925$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000012926if test "$ac_cv_stat_tv_nsec" = yes
12927then
12928
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012929$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000012930
12931fi
12932
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012933# Look for BSD style subsecond timestamps in struct stat
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012935$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012936if test "${ac_cv_stat_tv_nsec2+set}" = set; then :
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012937 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012938else
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012939 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012940/* end confdefs.h. */
12941#include <sys/stat.h>
12942int
12943main ()
12944{
12945
12946struct stat st;
12947st.st_mtimespec.tv_nsec = 1;
12948
12949 ;
12950 return 0;
12951}
12952_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012953if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012954 ac_cv_stat_tv_nsec2=yes
12955else
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012956 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012957fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012958rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12959fi
12960
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012961{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012962$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012963if test "$ac_cv_stat_tv_nsec2" = yes
12964then
12965
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012966$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012967
12968fi
12969
Jack Jansen666b1e72001-10-31 12:11:48 +000012970# On HP/UX 11.0, mvwdelch is a block with a return statement
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012971{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012972$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012973if test "${ac_cv_mvwdelch_is_expression+set}" = set; then :
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012974 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000012975else
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012976 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012977/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000012978#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012979int
12980main ()
12981{
Jack Jansen666b1e72001-10-31 12:11:48 +000012982
12983 int rtn;
12984 rtn = mvwdelch(0,0,0);
12985
Martin v. Löwis11437992002-04-12 09:54:03 +000012986 ;
12987 return 0;
12988}
12989_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012990if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000012991 ac_cv_mvwdelch_is_expression=yes
12992else
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012993 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000012994fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012995rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12996fi
12997
Benjamin Petersonf7155a32010-06-21 16:51:22 +000012998{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012999$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000013000
13001if test "$ac_cv_mvwdelch_is_expression" = yes
13002then
Martin v. Löwis11437992002-04-12 09:54:03 +000013003
Benjamin Petersonf7155a32010-06-21 16:51:22 +000013004$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013005
13006fi
13007
Benjamin Petersonf7155a32010-06-21 16:51:22 +000013008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013009$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +000013010if test "${ac_cv_window_has_flags+set}" = set; then :
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013011 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013012else
Benjamin Petersonf7155a32010-06-21 16:51:22 +000013013 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013014/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013015#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013016int
13017main ()
13018{
Jack Jansen666b1e72001-10-31 12:11:48 +000013019
13020 WINDOW *w;
13021 w->_flags = 0;
13022
Martin v. Löwis11437992002-04-12 09:54:03 +000013023 ;
13024 return 0;
13025}
13026_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +000013027if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013028 ac_cv_window_has_flags=yes
13029else
Benjamin Petersonf7155a32010-06-21 16:51:22 +000013030 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013031fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013032rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13033fi
13034
Benjamin Petersonf7155a32010-06-21 16:51:22 +000013035{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013036$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013037
Jack Jansen666b1e72001-10-31 12:11:48 +000013038
13039if test "$ac_cv_window_has_flags" = yes
13040then
Martin v. Löwis11437992002-04-12 09:54:03 +000013041
Benjamin Petersonf7155a32010-06-21 16:51:22 +000013042$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013043
13044fi
13045
Benjamin Petersonf7155a32010-06-21 16:51:22 +000013046{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013047$as_echo_n "checking for is_term_resized... " >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +000013048cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013049/* end confdefs.h. */
13050#include <curses.h>
13051int
13052main ()
13053{
13054void *x=is_term_resized
13055 ;
13056 return 0;
13057}
13058_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +000013059if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013060
Benjamin Petersonf7155a32010-06-21 16:51:22 +000013061$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013062
Benjamin Petersonf7155a32010-06-21 16:51:22 +000013063 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013064$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013065else
Benjamin Petersonf7155a32010-06-21 16:51:22 +000013066 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013067$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013068
13069fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013070rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13071
Benjamin Petersonf7155a32010-06-21 16:51:22 +000013072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013073$as_echo_n "checking for resize_term... " >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +000013074cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013075/* end confdefs.h. */
13076#include <curses.h>
13077int
13078main ()
13079{
13080void *x=resize_term
13081 ;
13082 return 0;
13083}
13084_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +000013085if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013086
Benjamin Petersonf7155a32010-06-21 16:51:22 +000013087$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013088
Benjamin Petersonf7155a32010-06-21 16:51:22 +000013089 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013090$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013091else
Benjamin Petersonf7155a32010-06-21 16:51:22 +000013092 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013093$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013094
13095fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013096rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13097
Benjamin Petersonf7155a32010-06-21 16:51:22 +000013098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013099$as_echo_n "checking for resizeterm... " >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +000013100cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013101/* end confdefs.h. */
13102#include <curses.h>
13103int
13104main ()
13105{
13106void *x=resizeterm
13107 ;
13108 return 0;
13109}
13110_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +000013111if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013112
Benjamin Petersonf7155a32010-06-21 16:51:22 +000013113$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013114
Benjamin Petersonf7155a32010-06-21 16:51:22 +000013115 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013116$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013117else
Benjamin Petersonf7155a32010-06-21 16:51:22 +000013118 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013119$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013120
13121fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013122rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13123
Benjamin Petersonf7155a32010-06-21 16:51:22 +000013124{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013125$as_echo_n "checking for /dev/ptmx... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013126
13127if test -r /dev/ptmx
13128then
Benjamin Petersonf7155a32010-06-21 16:51:22 +000013129 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013130$as_echo "yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013131
Benjamin Petersonf7155a32010-06-21 16:51:22 +000013132$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013133
Thomas Wouters89f507f2006-12-13 04:49:30 +000013134else
Benjamin Petersonf7155a32010-06-21 16:51:22 +000013135 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013136$as_echo "no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013137fi
13138
Benjamin Petersonf7155a32010-06-21 16:51:22 +000013139{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013140$as_echo_n "checking for /dev/ptc... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013141
13142if test -r /dev/ptc
13143then
Benjamin Petersonf7155a32010-06-21 16:51:22 +000013144 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013145$as_echo "yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013146
Benjamin Petersonf7155a32010-06-21 16:51:22 +000013147$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000013148
Thomas Wouters89f507f2006-12-13 04:49:30 +000013149else
Benjamin Petersonf7155a32010-06-21 16:51:22 +000013150 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013151$as_echo "no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013152fi
13153
Benjamin Petersonf7155a32010-06-21 16:51:22 +000013154{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013155$as_echo_n "checking for %zd printf() format support... " >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +000013156if test "$cross_compiling" = yes; then :
13157 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013158$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Petersonf7155a32010-06-21 16:51:22 +000013159as_fn_error "cannot run test program while cross compiling
13160See \`config.log' for more details." "$LINENO" 5; }
Thomas Wouters477c8d52006-05-27 19:21:47 +000013161else
Benjamin Petersonf7155a32010-06-21 16:51:22 +000013162 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000013163/* end confdefs.h. */
13164#include <stdio.h>
13165#include <stddef.h>
13166#include <string.h>
13167
Christian Heimes2c181612007-12-17 20:04:13 +000013168#ifdef HAVE_SYS_TYPES_H
13169#include <sys/types.h>
13170#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000013171
13172#ifdef HAVE_SSIZE_T
13173typedef ssize_t Py_ssize_t;
13174#elif SIZEOF_VOID_P == SIZEOF_LONG
13175typedef long Py_ssize_t;
13176#else
13177typedef int Py_ssize_t;
13178#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000013179
Christian Heimes2c181612007-12-17 20:04:13 +000013180int main()
13181{
13182 char buffer[256];
13183
Thomas Wouters477c8d52006-05-27 19:21:47 +000013184 if(sprintf(buffer, "%zd", (size_t)123) < 0)
13185 return 1;
13186
Thomas Wouters89f507f2006-12-13 04:49:30 +000013187 if (strcmp(buffer, "123"))
13188 return 1;
13189
13190 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
13191 return 1;
13192
13193 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000013194 return 1;
13195
13196 return 0;
13197}
13198_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +000013199if ac_fn_c_try_run "$LINENO"; then :
13200 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013201$as_echo "yes" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +000013202
Benjamin Petersonf7155a32010-06-21 16:51:22 +000013203$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Thomas Wouters477c8d52006-05-27 19:21:47 +000013204
13205else
Benjamin Petersonf7155a32010-06-21 16:51:22 +000013206 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013207$as_echo "no" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +000013208fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +000013209rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13210 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000013211fi
13212
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013213
Benjamin Petersonf7155a32010-06-21 16:51:22 +000013214ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013215#ifdef HAVE_SYS_TYPES_H
13216#include <sys/types.h>
13217#endif
13218#ifdef HAVE_SYS_SOCKET_H
13219#include <sys/socket.h>
13220#endif
13221
Benjamin Petersonf7155a32010-06-21 16:51:22 +000013222"
13223if test "x$ac_cv_type_socklen_t" = x""yes; then :
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013224
Martin v. Löwis11437992002-04-12 09:54:03 +000013225else
Guido van Rossum95713eb2000-05-18 20:53:31 +000013226
Benjamin Petersonf7155a32010-06-21 16:51:22 +000013227$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000013228
13229fi
13230
Michael W. Hudson54241132001-12-07 15:38:26 +000013231
Benjamin Petersonf7155a32010-06-21 16:51:22 +000013232{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013233$as_echo_n "checking for broken mbstowcs... " >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +000013234if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000013235 ac_cv_broken_mbstowcs=no
13236else
Benjamin Petersonf7155a32010-06-21 16:51:22 +000013237 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000013238/* end confdefs.h. */
13239
13240#include<stdlib.h>
13241int main() {
13242 size_t len = -1;
13243 const char *str = "text";
13244 len = mbstowcs(NULL, str, 0);
13245 return (len != 4);
13246}
13247
13248_ACEOF
Benjamin Petersonf7155a32010-06-21 16:51:22 +000013249if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000013250 ac_cv_broken_mbstowcs=no
13251else
Benjamin Petersonf7155a32010-06-21 16:51:22 +000013252 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000013253fi
Benjamin Petersonf7155a32010-06-21 16:51:22 +000013254rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13255 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000013256fi
13257
Benjamin Petersonf7155a32010-06-21 16:51:22 +000013258{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013259$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000013260if test "$ac_cv_broken_mbstowcs" = yes
13261then
13262
Benjamin Petersonf7155a32010-06-21 16:51:22 +000013263$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000013264
13265fi
13266
Antoine Pitroub52ec782009-01-25 16:34:23 +000013267# Check for --with-computed-gotos
Benjamin Petersonf7155a32010-06-21 16:51:22 +000013268{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013269$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013270
13271# Check whether --with-computed-gotos was given.
Benjamin Petersonf7155a32010-06-21 16:51:22 +000013272if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000013273 withval=$with_computed_gotos;
13274if test "$withval" != no
13275then
13276
Benjamin Petersonf7155a32010-06-21 16:51:22 +000013277$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000013278
Benjamin Petersonf7155a32010-06-21 16:51:22 +000013279 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013280$as_echo "yes" >&6; }
Benjamin Petersonf7155a32010-06-21 16:51:22 +000013281else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013282$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013283fi
13284else
Benjamin Petersonf7155a32010-06-21 16:51:22 +000013285 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013286$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013287fi
13288
13289
Ronald Oussoren1b2cad02009-11-19 17:30:05 +000013290if test $ac_sys_system = Darwin
13291then
13292 LIBS="$LIBS -framework CoreFoundation"
13293fi
13294
13295
Antoine Pitroub52ec782009-01-25 16:34:23 +000013296
Michael W. Hudson54241132001-12-07 15:38:26 +000013297
13298
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000013299for h in `(cd $srcdir;echo Python/thread_*.h)`
13300do
13301 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
13302done
13303
Michael W. Hudson54241132001-12-07 15:38:26 +000013304
Neal Norwitzd24499d2005-12-18 21:36:39 +000013305SRCDIRS="Parser Grammar Objects Python Modules Mac"
Benjamin Petersonf7155a32010-06-21 16:51:22 +000013306{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013307$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013308for dir in $SRCDIRS; do
13309 if test ! -d $dir; then
13310 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000013311 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013312done
Benjamin Petersonf7155a32010-06-21 16:51:22 +000013313{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013314$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000013315
Guido van Rossum627b2d71993-12-24 10:39:16 +000013316# generate output files
Antoine Pitrou20327222009-05-24 20:39:11 +000013317ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000013318
Martin v. Löwis11437992002-04-12 09:54:03 +000013319cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013320# This file is a shell script that caches the results of configure
13321# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000013322# scripts and configure runs, see configure's option --config-cache.
13323# It is not useful on other systems. If it contains results you don't
13324# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013325#
Martin v. Löwis11437992002-04-12 09:54:03 +000013326# config.status only pays attention to the cache file if you give it
13327# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013328#
Skip Montanaro6dead952003-09-25 14:50:04 +000013329# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000013330# loading this file, other *unset* `ac_cv_foo' will be assigned the
13331# following values.
13332
13333_ACEOF
13334
Guido van Rossumf78abae1997-01-21 22:02:36 +000013335# The following way of writing the cache mishandles newlines in values,
13336# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013337# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013338# Ultrix sh set writes to stderr and can't be redirected directly,
13339# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013340(
13341 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
13342 eval ac_val=\$$ac_var
13343 case $ac_val in #(
13344 *${as_nl}*)
13345 case $ac_var in #(
Benjamin Petersonf7155a32010-06-21 16:51:22 +000013346 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013347$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013348 esac
13349 case $ac_var in #(
13350 _ | IFS | as_nl) ;; #(
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013351 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
Benjamin Petersonf7155a32010-06-21 16:51:22 +000013352 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013353 esac ;;
13354 esac
13355 done
13356
Martin v. Löwis11437992002-04-12 09:54:03 +000013357 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013358 case $as_nl`(ac_space=' '; set) 2>&1` in #(
13359 *${as_nl}ac_space=\ *)
Benjamin Petersonf7155a32010-06-21 16:51:22 +000013360 # `set' does not quote correctly, so add quotes: double-quote
13361 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000013362 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013363 "s/'/'\\\\''/g;
13364 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013365 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000013366 *)
13367 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013368 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000013369 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013370 esac |
13371 sort
13372) |
Martin v. Löwis11437992002-04-12 09:54:03 +000013373 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013374 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000013375 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013376 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000013377 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
13378 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013379 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
13380 :end' >>confcache
13381if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
13382 if test -w "$cache_file"; then
13383 test "x$cache_file" != "x/dev/null" &&
Benjamin Petersonf7155a32010-06-21 16:51:22 +000013384 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013385$as_echo "$as_me: updating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000013386 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013387 else
Benjamin Petersonf7155a32010-06-21 16:51:22 +000013388 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013389$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013390 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013391fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013392rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000013393
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013394test "x$prefix" = xNONE && prefix=$ac_default_prefix
13395# Let make expand exec_prefix.
13396test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000013397
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013398DEFS=-DHAVE_CONFIG_H
13399
Skip Montanaro6dead952003-09-25 14:50:04 +000013400ac_libobjs=
13401ac_ltlibobjs=
13402for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
13403 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013404 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013405 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013406 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
13407 # will be set to the directory where LIBOBJS objects are built.
Benjamin Petersonf7155a32010-06-21 16:51:22 +000013408 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
13409 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000013410done
13411LIBOBJS=$ac_libobjs
13412
13413LTLIBOBJS=$ac_ltlibobjs
13414
13415
Martin v. Löwis11437992002-04-12 09:54:03 +000013416
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013417
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013418: ${CONFIG_STATUS=./config.status}
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013419ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000013420ac_clean_files_save=$ac_clean_files
13421ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Benjamin Petersonf7155a32010-06-21 16:51:22 +000013422{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013423$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
Benjamin Petersonf7155a32010-06-21 16:51:22 +000013424as_write_fail=0
13425cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000013426#! $SHELL
13427# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000013428# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013429# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000013430# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000013431
Martin v. Löwis11437992002-04-12 09:54:03 +000013432debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000013433ac_cs_recheck=false
13434ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000013435
Benjamin Petersonf7155a32010-06-21 16:51:22 +000013436SHELL=\${CONFIG_SHELL-$SHELL}
13437export SHELL
13438_ASEOF
13439cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
13440## -------------------- ##
13441## M4sh Initialization. ##
13442## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000013443
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013444# Be more Bourne compatible
13445DUALCASE=1; export DUALCASE # for MKS sh
Benjamin Petersonf7155a32010-06-21 16:51:22 +000013446if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013447 emulate sh
13448 NULLCMD=:
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013449 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000013450 # is contrary to our usage. Disable this feature.
13451 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013452 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013453else
Benjamin Petersonf7155a32010-06-21 16:51:22 +000013454 case `(set -o) 2>/dev/null` in #(
13455 *posix*) :
13456 set -o posix ;; #(
13457 *) :
13458 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013459esac
Michael W. Hudson54241132001-12-07 15:38:26 +000013460fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000013461
13462
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013463as_nl='
13464'
13465export as_nl
13466# Printing a long string crashes Solaris 7 /usr/bin/printf.
13467as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
13468as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
13469as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
Benjamin Petersonf7155a32010-06-21 16:51:22 +000013470# Prefer a ksh shell builtin over an external printf program on Solaris,
13471# but without wasting forks for bash or zsh.
13472if test -z "$BASH_VERSION$ZSH_VERSION" \
13473 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
13474 as_echo='print -r --'
13475 as_echo_n='print -rn --'
13476elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013477 as_echo='printf %s\n'
13478 as_echo_n='printf %s'
13479else
13480 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
13481 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
13482 as_echo_n='/usr/ucb/echo -n'
13483 else
13484 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
13485 as_echo_n_body='eval
13486 arg=$1;
Benjamin Petersonf7155a32010-06-21 16:51:22 +000013487 case $arg in #(
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013488 *"$as_nl"*)
13489 expr "X$arg" : "X\\(.*\\)$as_nl";
13490 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
13491 esac;
13492 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
13493 '
13494 export as_echo_n_body
13495 as_echo_n='sh -c $as_echo_n_body as_echo'
13496 fi
13497 export as_echo_body
13498 as_echo='sh -c $as_echo_body as_echo'
13499fi
13500
Martin v. Löwis11437992002-04-12 09:54:03 +000013501# The user is always right.
13502if test "${PATH_SEPARATOR+set}" != set; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013503 PATH_SEPARATOR=:
13504 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
13505 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
13506 PATH_SEPARATOR=';'
13507 }
Martin v. Löwis11437992002-04-12 09:54:03 +000013508fi
13509
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013510
13511# IFS
13512# We need space, tab and new line, in precisely that order. Quoting is
13513# there to prevent editors from complaining about space-tab.
13514# (If _AS_PATH_WALK were called with IFS unset, it would disable word
13515# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013516IFS=" "" $as_nl"
13517
13518# Find who we are. Look in the path if we contain no directory separator.
Benjamin Petersonf7155a32010-06-21 16:51:22 +000013519case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013520 *[\\/]* ) as_myself=$0 ;;
13521 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000013522for as_dir in $PATH
13523do
13524 IFS=$as_save_IFS
13525 test -z "$as_dir" && as_dir=.
Benjamin Petersonf7155a32010-06-21 16:51:22 +000013526 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
13527 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013528IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000013529
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013530 ;;
13531esac
13532# We did not find ourselves, most probably we were run as `sh COMMAND'
13533# in which case we are not to be found in the path.
13534if test "x$as_myself" = x; then
13535 as_myself=$0
13536fi
13537if test ! -f "$as_myself"; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013538 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
Benjamin Petersonf7155a32010-06-21 16:51:22 +000013539 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013540fi
13541
Benjamin Petersonf7155a32010-06-21 16:51:22 +000013542# Unset variables that we do not need and which cause bugs (e.g. in
13543# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
13544# suppresses any "Segmentation fault" message there. '((' could
13545# trigger a bug in pdksh 5.2.14.
13546for as_var in BASH_ENV ENV MAIL MAILPATH
13547do eval test x\${$as_var+set} = xset \
13548 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013549done
13550PS1='$ '
13551PS2='> '
13552PS4='+ '
13553
13554# NLS nuisances.
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013555LC_ALL=C
13556export LC_ALL
13557LANGUAGE=C
13558export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013559
Benjamin Petersonf7155a32010-06-21 16:51:22 +000013560# CDPATH.
13561(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
13562
13563
13564# as_fn_error ERROR [LINENO LOG_FD]
13565# ---------------------------------
13566# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
13567# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
13568# script with status $?, using 1 if that was 0.
13569as_fn_error ()
13570{
13571 as_status=$?; test $as_status -eq 0 && as_status=1
13572 if test "$3"; then
13573 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
13574 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
13575 fi
13576 $as_echo "$as_me: error: $1" >&2
13577 as_fn_exit $as_status
13578} # as_fn_error
13579
13580
13581# as_fn_set_status STATUS
13582# -----------------------
13583# Set $? to STATUS, without forking.
13584as_fn_set_status ()
13585{
13586 return $1
13587} # as_fn_set_status
13588
13589# as_fn_exit STATUS
13590# -----------------
13591# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
13592as_fn_exit ()
13593{
13594 set +e
13595 as_fn_set_status $1
13596 exit $1
13597} # as_fn_exit
13598
13599# as_fn_unset VAR
13600# ---------------
13601# Portably unset VAR.
13602as_fn_unset ()
13603{
13604 { eval $1=; unset $1;}
13605}
13606as_unset=as_fn_unset
13607# as_fn_append VAR VALUE
13608# ----------------------
13609# Append the text in VALUE to the end of the definition contained in VAR. Take
13610# advantage of any shell optimizations that allow amortized linear growth over
13611# repeated appends, instead of the typical quadratic growth present in naive
13612# implementations.
13613if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
13614 eval 'as_fn_append ()
13615 {
13616 eval $1+=\$2
13617 }'
13618else
13619 as_fn_append ()
13620 {
13621 eval $1=\$$1\$2
13622 }
13623fi # as_fn_append
13624
13625# as_fn_arith ARG...
13626# ------------------
13627# Perform arithmetic evaluation on the ARGs, and store the result in the
13628# global $as_val. Take advantage of shells that can avoid forks. The arguments
13629# must be portable across $(()) and expr.
13630if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
13631 eval 'as_fn_arith ()
13632 {
13633 as_val=$(( $* ))
13634 }'
13635else
13636 as_fn_arith ()
13637 {
13638 as_val=`expr "$@" || test $? -eq 1`
13639 }
13640fi # as_fn_arith
13641
13642
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013643if expr a : '\(a\)' >/dev/null 2>&1 &&
13644 test "X`expr 00001 : '.*\(...\)'`" = X001; then
13645 as_expr=expr
13646else
13647 as_expr=false
13648fi
13649
13650if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
13651 as_basename=basename
13652else
13653 as_basename=false
13654fi
13655
Benjamin Petersonf7155a32010-06-21 16:51:22 +000013656if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
13657 as_dirname=dirname
13658else
13659 as_dirname=false
13660fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013661
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013662as_me=`$as_basename -- "$0" ||
13663$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
13664 X"$0" : 'X\(//\)$' \| \
13665 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013666$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013667 sed '/^.*\/\([^/][^/]*\)\/*$/{
13668 s//\1/
13669 q
13670 }
13671 /^X\/\(\/\/\)$/{
13672 s//\1/
13673 q
13674 }
13675 /^X\/\(\/\).*/{
13676 s//\1/
13677 q
13678 }
13679 s/.*/./; q'`
13680
Benjamin Petersonf7155a32010-06-21 16:51:22 +000013681# Avoid depending upon Character Ranges.
13682as_cr_letters='abcdefghijklmnopqrstuvwxyz'
13683as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
13684as_cr_Letters=$as_cr_letters$as_cr_LETTERS
13685as_cr_digits='0123456789'
13686as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013687
13688ECHO_C= ECHO_N= ECHO_T=
Benjamin Petersonf7155a32010-06-21 16:51:22 +000013689case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013690-n*)
Benjamin Petersonf7155a32010-06-21 16:51:22 +000013691 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013692 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Benjamin Petersonf7155a32010-06-21 16:51:22 +000013693 xy) ECHO_C='\c';;
13694 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
13695 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013696 esac;;
13697*)
13698 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000013699esac
Martin v. Löwis11437992002-04-12 09:54:03 +000013700
13701rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013702if test -d conf$$.dir; then
13703 rm -f conf$$.dir/conf$$.file
13704else
13705 rm -f conf$$.dir
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013706 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013707fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013708if (echo >conf$$.file) 2>/dev/null; then
13709 if ln -s conf$$.file conf$$ 2>/dev/null; then
13710 as_ln_s='ln -s'
13711 # ... but there are two gotchas:
13712 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
13713 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
13714 # In both cases, we have to default to `cp -p'.
13715 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
13716 as_ln_s='cp -p'
13717 elif ln conf$$.file conf$$ 2>/dev/null; then
13718 as_ln_s=ln
13719 else
Martin v. Löwis11437992002-04-12 09:54:03 +000013720 as_ln_s='cp -p'
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013721 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013722else
13723 as_ln_s='cp -p'
13724fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013725rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
13726rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000013727
Benjamin Petersonf7155a32010-06-21 16:51:22 +000013728
13729# as_fn_mkdir_p
13730# -------------
13731# Create "$as_dir" as a directory, including parents if necessary.
13732as_fn_mkdir_p ()
13733{
13734
13735 case $as_dir in #(
13736 -*) as_dir=./$as_dir;;
13737 esac
13738 test -d "$as_dir" || eval $as_mkdir_p || {
13739 as_dirs=
13740 while :; do
13741 case $as_dir in #(
13742 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
13743 *) as_qdir=$as_dir;;
13744 esac
13745 as_dirs="'$as_qdir' $as_dirs"
13746 as_dir=`$as_dirname -- "$as_dir" ||
13747$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
13748 X"$as_dir" : 'X\(//\)[^/]' \| \
13749 X"$as_dir" : 'X\(//\)$' \| \
13750 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
13751$as_echo X"$as_dir" |
13752 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
13753 s//\1/
13754 q
13755 }
13756 /^X\(\/\/\)[^/].*/{
13757 s//\1/
13758 q
13759 }
13760 /^X\(\/\/\)$/{
13761 s//\1/
13762 q
13763 }
13764 /^X\(\/\).*/{
13765 s//\1/
13766 q
13767 }
13768 s/.*/./; q'`
13769 test -d "$as_dir" && break
13770 done
13771 test -z "$as_dirs" || eval "mkdir $as_dirs"
13772 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
13773
13774
13775} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000013776if mkdir -p . 2>/dev/null; then
Benjamin Petersonf7155a32010-06-21 16:51:22 +000013777 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000013778else
Skip Montanarof0d5f792004-08-15 14:08:23 +000013779 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000013780 as_mkdir_p=false
13781fi
13782
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013783if test -x / >/dev/null 2>&1; then
13784 as_test_x='test -x'
13785else
13786 if ls -dL / >/dev/null 2>&1; then
13787 as_ls_L_option=L
13788 else
13789 as_ls_L_option=
13790 fi
13791 as_test_x='
13792 eval sh -c '\''
13793 if test -d "$1"; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013794 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013795 else
Benjamin Petersonf7155a32010-06-21 16:51:22 +000013796 case $1 in #(
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013797 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013798 esac;
Benjamin Petersonf7155a32010-06-21 16:51:22 +000013799 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013800 ???[sx]*):;;*)false;;esac;fi
13801 '\'' sh
13802 '
13803fi
13804as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000013805
13806# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000013807as_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 +000013808
13809# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000013810as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000013811
13812
Martin v. Löwis11437992002-04-12 09:54:03 +000013813exec 6>&1
Benjamin Petersonf7155a32010-06-21 16:51:22 +000013814## ----------------------------------- ##
13815## Main body of $CONFIG_STATUS script. ##
13816## ----------------------------------- ##
13817_ASEOF
13818test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000013819
Benjamin Petersonf7155a32010-06-21 16:51:22 +000013820cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
13821# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000013822# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013823# values after options handling.
13824ac_log="
Christian Heimes70e5cab2008-12-03 18:18:23 +000013825This file was extended by python $as_me 3.1, which was
Benjamin Petersonf7155a32010-06-21 16:51:22 +000013826generated by GNU Autoconf 2.65. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000013827
13828 CONFIG_FILES = $CONFIG_FILES
13829 CONFIG_HEADERS = $CONFIG_HEADERS
13830 CONFIG_LINKS = $CONFIG_LINKS
13831 CONFIG_COMMANDS = $CONFIG_COMMANDS
13832 $ $0 $@
13833
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013834on `(hostname || uname -n) 2>/dev/null | sed 1q`
13835"
13836
Martin v. Löwis11437992002-04-12 09:54:03 +000013837_ACEOF
13838
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013839case $ac_config_files in *"
13840"*) set x $ac_config_files; shift; ac_config_files=$*;;
13841esac
13842
13843case $ac_config_headers in *"
13844"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
13845esac
13846
13847
13848cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000013849# Files that config.status was made for.
Martin v. Löwis113a0852009-05-29 17:25:39 +000013850config_files="$ac_config_files"
13851config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000013852
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013853_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000013854
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013855cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000013856ac_cs_usage="\
Benjamin Petersonf7155a32010-06-21 16:51:22 +000013857\`$as_me' instantiates files and other configuration actions
13858from templates according to the current configuration. Unless the files
13859and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000013860
Benjamin Petersonf7155a32010-06-21 16:51:22 +000013861Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000013862
13863 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013864 -V, --version print version number and configuration settings, then exit
Benjamin Petersonf7155a32010-06-21 16:51:22 +000013865 --config print configuration, then exit
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013866 -q, --quiet, --silent
13867 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000013868 -d, --debug don't remove temporary files
13869 --recheck update $as_me by reconfiguring in the same conditions
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013870 --file=FILE[:TEMPLATE]
13871 instantiate the configuration file FILE
13872 --header=FILE[:TEMPLATE]
13873 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000013874
13875Configuration files:
13876$config_files
13877
13878Configuration headers:
13879$config_headers
13880
Benjamin Petersonf7155a32010-06-21 16:51:22 +000013881Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013882
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013883_ACEOF
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013884cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Benjamin Petersonf7155a32010-06-21 16:51:22 +000013885ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000013886ac_cs_version="\\
Christian Heimes70e5cab2008-12-03 18:18:23 +000013887python config.status 3.1
Benjamin Petersonf7155a32010-06-21 16:51:22 +000013888configured by $0, generated by GNU Autoconf 2.65,
13889 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000013890
Benjamin Petersonf7155a32010-06-21 16:51:22 +000013891Copyright (C) 2009 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000013892This config.status script is free software; the Free Software Foundation
13893gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013894
13895ac_pwd='$ac_pwd'
13896srcdir='$srcdir'
13897INSTALL='$INSTALL'
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013898test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000013899_ACEOF
13900
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013901cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
13902# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000013903ac_need_defaults=:
13904while test $# != 0
13905do
13906 case $1 in
13907 --*=*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013908 ac_option=`expr "X$1" : 'X\([^=]*\)='`
13909 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000013910 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000013911 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013912 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000013913 ac_option=$1
13914 ac_optarg=$2
13915 ac_shift=shift
13916 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000013917 esac
13918
Skip Montanaro6dead952003-09-25 14:50:04 +000013919 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000013920 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000013921 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
13922 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013923 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013924 $as_echo "$ac_cs_version"; exit ;;
Benjamin Petersonf7155a32010-06-21 16:51:22 +000013925 --config | --confi | --conf | --con | --co | --c )
13926 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013927 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000013928 debug=: ;;
13929 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000013930 $ac_shift
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013931 case $ac_optarg in
13932 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
13933 esac
Benjamin Petersonf7155a32010-06-21 16:51:22 +000013934 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000013935 ac_need_defaults=false;;
13936 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000013937 $ac_shift
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013938 case $ac_optarg in
13939 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
13940 esac
Benjamin Petersonf7155a32010-06-21 16:51:22 +000013941 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000013942 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013943 --he | --h)
13944 # Conflict between --help and --header
Benjamin Petersonf7155a32010-06-21 16:51:22 +000013945 as_fn_error "ambiguous option: \`$1'
13946Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013947 --help | --hel | -h )
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013948 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000013949 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
13950 | -silent | --silent | --silen | --sile | --sil | --si | --s)
13951 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000013952
13953 # This is an error.
Benjamin Petersonf7155a32010-06-21 16:51:22 +000013954 -*) as_fn_error "unrecognized option: \`$1'
13955Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000013956
Benjamin Petersonf7155a32010-06-21 16:51:22 +000013957 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013958 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000013959
13960 esac
13961 shift
13962done
13963
Skip Montanaro6dead952003-09-25 14:50:04 +000013964ac_configure_extra_args=
13965
13966if $ac_cs_silent; then
13967 exec 6>/dev/null
13968 ac_configure_extra_args="$ac_configure_extra_args --silent"
13969fi
13970
13971_ACEOF
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013972cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000013973if \$ac_cs_recheck; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013974 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
13975 shift
13976 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
13977 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013978 export CONFIG_SHELL
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013979 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000013980fi
13981
Martin v. Löwis11437992002-04-12 09:54:03 +000013982_ACEOF
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013983cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013984exec 5>>config.log
13985{
13986 echo
13987 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
13988## Running $as_me. ##
13989_ASBOX
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013990 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013991} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013992
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013993_ACEOF
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013994cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013995_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000013996
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013997cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013998
13999# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000014000for ac_config_target in $ac_config_targets
14001do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014002 case $ac_config_target in
14003 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
14004 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
14005 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014006 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
14007 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014008 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
14009 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000014010 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014011
Benjamin Petersonf7155a32010-06-21 16:51:22 +000014012 *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014013 esac
14014done
14015
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014016
Martin v. Löwis11437992002-04-12 09:54:03 +000014017# If the user did not use the arguments to specify the items to instantiate,
14018# then the envvar interface is used. Set only those that are not.
14019# We use the long form for the default assignment because of an extremely
14020# bizarre bug on SunOS 4.1.3.
14021if $ac_need_defaults; then
14022 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
14023 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
14024fi
14025
Skip Montanaro6dead952003-09-25 14:50:04 +000014026# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014027# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000014028# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014029# Hook for its removal unless debugging.
14030# Note that there is a small window in which the directory will not be cleaned:
14031# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000014032$debug ||
14033{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014034 tmp=
14035 trap 'exit_status=$?
14036 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
14037' 0
Benjamin Petersonf7155a32010-06-21 16:51:22 +000014038 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000014039}
Martin v. Löwis11437992002-04-12 09:54:03 +000014040# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000014041
Martin v. Löwis11437992002-04-12 09:54:03 +000014042{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014043 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000014044 test -n "$tmp" && test -d "$tmp"
14045} ||
14046{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014047 tmp=./conf$$-$RANDOM
14048 (umask 077 && mkdir "$tmp")
Benjamin Petersonf7155a32010-06-21 16:51:22 +000014049} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000014050
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014051# Set up the scripts for CONFIG_FILES section.
14052# No need to generate them if there are no CONFIG_FILES.
14053# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014054if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014055
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014056
Benjamin Petersonf7155a32010-06-21 16:51:22 +000014057ac_cr=`echo X | tr X '\015'`
14058# On cygwin, bash can eat \r inside `` if the user requested igncr.
14059# But we know of no other shell where ac_cr would be empty at this
14060# point, so we can use a bashism as a fallback.
14061if test "x$ac_cr" = x; then
14062 eval ac_cr=\$\'\\r\'
14063fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014064ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
14065if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Benjamin Petersonf7155a32010-06-21 16:51:22 +000014066 ac_cs_awk_cr='\r'
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014067else
14068 ac_cs_awk_cr=$ac_cr
14069fi
14070
14071echo 'BEGIN {' >"$tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000014072_ACEOF
14073
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014074
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014075{
14076 echo "cat >conf$$subs.awk <<_ACEOF" &&
14077 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
14078 echo "_ACEOF"
14079} >conf$$subs.sh ||
Benjamin Petersonf7155a32010-06-21 16:51:22 +000014080 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014081ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014082ac_delim='%!_!# '
14083for ac_last_try in false false false false false :; do
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014084 . ./conf$$subs.sh ||
Benjamin Petersonf7155a32010-06-21 16:51:22 +000014085 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014086
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014087 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
14088 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014089 break
14090 elif $ac_last_try; then
Benjamin Petersonf7155a32010-06-21 16:51:22 +000014091 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014092 else
14093 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000014094 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014095done
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014096rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014097
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014098cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14099cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014100_ACEOF
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014101sed -n '
14102h
14103s/^/S["/; s/!.*/"]=/
14104p
14105g
14106s/^[^!]*!//
14107:repl
14108t repl
14109s/'"$ac_delim"'$//
14110t delim
14111:nl
14112h
Benjamin Petersonf7155a32010-06-21 16:51:22 +000014113s/\(.\{148\}\)..*/\1/
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014114t more1
14115s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
14116p
14117n
14118b repl
14119:more1
14120s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14121p
14122g
14123s/.\{148\}//
14124t nl
14125:delim
14126h
Benjamin Petersonf7155a32010-06-21 16:51:22 +000014127s/\(.\{148\}\)..*/\1/
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014128t more2
14129s/["\\]/\\&/g; s/^/"/; s/$/"/
14130p
14131b
14132:more2
14133s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14134p
14135g
14136s/.\{148\}//
14137t delim
14138' <conf$$subs.awk | sed '
14139/^[^""]/{
14140 N
14141 s/\n//
14142}
14143' >>$CONFIG_STATUS || ac_write_fail=1
14144rm -f conf$$subs.awk
14145cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14146_ACAWK
14147cat >>"\$tmp/subs1.awk" <<_ACAWK &&
14148 for (key in S) S_is_set[key] = 1
14149 FS = ""
14150
14151}
14152{
14153 line = $ 0
14154 nfields = split(line, field, "@")
14155 substed = 0
14156 len = length(field[1])
14157 for (i = 2; i < nfields; i++) {
14158 key = field[i]
14159 keylen = length(key)
14160 if (S_is_set[key]) {
14161 value = S[key]
14162 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
14163 len += length(value) + length(field[++i])
14164 substed = 1
14165 } else
14166 len += 1 + keylen
14167 }
14168
14169 print line
14170}
14171
14172_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014173_ACEOF
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014174cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14175if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
14176 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
14177else
14178 cat
14179fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
Benjamin Petersonf7155a32010-06-21 16:51:22 +000014180 || as_fn_error "could not setup config files machinery" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014181_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014182
14183# VPATH may cause trouble with some makes, so we remove $(srcdir),
14184# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
14185# trailing colons and then remove the whole line if VPATH becomes empty
14186# (actually we leave an empty line to preserve line numbers).
14187if test "x$srcdir" = x.; then
14188 ac_vpsub='/^[ ]*VPATH[ ]*=/{
14189s/:*\$(srcdir):*/:/
14190s/:*\${srcdir}:*/:/
14191s/:*@srcdir@:*/:/
14192s/^\([^=]*=[ ]*\):*/\1/
14193s/:*$//
14194s/^[^=]*=[ ]*$//
14195}'
14196fi
14197
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014198cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014199fi # test -n "$CONFIG_FILES"
14200
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014201# Set up the scripts for CONFIG_HEADERS section.
14202# No need to generate them if there are no CONFIG_HEADERS.
14203# This happens for instance with `./config.status Makefile'.
14204if test -n "$CONFIG_HEADERS"; then
14205cat >"$tmp/defines.awk" <<\_ACAWK ||
14206BEGIN {
14207_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014208
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014209# Transform confdefs.h into an awk script `defines.awk', embedded as
14210# here-document in config.status, that substitutes the proper values into
14211# config.h.in to produce config.h.
14212
14213# Create a delimiter string that does not exist in confdefs.h, to ease
14214# handling of long lines.
14215ac_delim='%!_!# '
14216for ac_last_try in false false :; do
14217 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
14218 if test -z "$ac_t"; then
14219 break
14220 elif $ac_last_try; then
Benjamin Petersonf7155a32010-06-21 16:51:22 +000014221 as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014222 else
14223 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
14224 fi
14225done
14226
14227# For the awk script, D is an array of macro values keyed by name,
14228# likewise P contains macro parameters if any. Preserve backslash
14229# newline sequences.
14230
14231ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
14232sed -n '
14233s/.\{148\}/&'"$ac_delim"'/g
14234t rset
14235:rset
14236s/^[ ]*#[ ]*define[ ][ ]*/ /
14237t def
14238d
14239:def
14240s/\\$//
14241t bsnl
14242s/["\\]/\\&/g
14243s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14244D["\1"]=" \3"/p
14245s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
14246d
14247:bsnl
14248s/["\\]/\\&/g
14249s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14250D["\1"]=" \3\\\\\\n"\\/p
14251t cont
14252s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
14253t cont
14254d
14255:cont
14256n
14257s/.\{148\}/&'"$ac_delim"'/g
14258t clear
14259:clear
14260s/\\$//
14261t bsnlc
14262s/["\\]/\\&/g; s/^/"/; s/$/"/p
14263d
14264:bsnlc
14265s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
14266b cont
14267' <confdefs.h | sed '
14268s/'"$ac_delim"'/"\\\
14269"/g' >>$CONFIG_STATUS || ac_write_fail=1
14270
14271cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14272 for (key in D) D_is_set[key] = 1
14273 FS = ""
14274}
14275/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
14276 line = \$ 0
14277 split(line, arg, " ")
14278 if (arg[1] == "#") {
14279 defundef = arg[2]
14280 mac1 = arg[3]
14281 } else {
14282 defundef = substr(arg[1], 2)
14283 mac1 = arg[2]
14284 }
14285 split(mac1, mac2, "(") #)
14286 macro = mac2[1]
14287 prefix = substr(line, 1, index(line, defundef) - 1)
14288 if (D_is_set[macro]) {
14289 # Preserve the white space surrounding the "#".
14290 print prefix "define", macro P[macro] D[macro]
14291 next
14292 } else {
14293 # Replace #undef with comments. This is necessary, for example,
14294 # in the case of _POSIX_SOURCE, which is predefined and required
14295 # on some systems where configure will not decide to define it.
14296 if (defundef == "undef") {
14297 print "/*", prefix defundef, macro, "*/"
14298 next
14299 }
14300 }
14301}
14302{ print }
14303_ACAWK
14304_ACEOF
14305cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Benjamin Petersonf7155a32010-06-21 16:51:22 +000014306 as_fn_error "could not setup config headers machinery" "$LINENO" 5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014307fi # test -n "$CONFIG_HEADERS"
14308
14309
14310eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
14311shift
14312for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014313do
14314 case $ac_tag in
14315 :[FHLC]) ac_mode=$ac_tag; continue;;
14316 esac
14317 case $ac_mode$ac_tag in
14318 :[FHL]*:*);;
Benjamin Petersonf7155a32010-06-21 16:51:22 +000014319 :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014320 :[FH]-) ac_tag=-:-;;
14321 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
14322 esac
14323 ac_save_IFS=$IFS
14324 IFS=:
14325 set x $ac_tag
14326 IFS=$ac_save_IFS
14327 shift
14328 ac_file=$1
14329 shift
14330
14331 case $ac_mode in
14332 :L) ac_source=$1;;
14333 :[FH])
14334 ac_file_inputs=
14335 for ac_f
14336 do
14337 case $ac_f in
14338 -) ac_f="$tmp/stdin";;
14339 *) # Look for the file first in the build tree, then in the source tree
14340 # (if the path is not absolute). The absolute path cannot be DOS-style,
14341 # because $ac_f cannot contain `:'.
14342 test -f "$ac_f" ||
14343 case $ac_f in
14344 [\\/$]*) false;;
14345 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
14346 esac ||
Benjamin Petersonf7155a32010-06-21 16:51:22 +000014347 as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014348 esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014349 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
Benjamin Petersonf7155a32010-06-21 16:51:22 +000014350 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014351 done
14352
14353 # Let's still pretend it is `configure' which instantiates (i.e., don't
14354 # use $as_me), people would be surprised to read:
14355 # /* config.h. Generated by config.status. */
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014356 configure_input='Generated from '`
14357 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
14358 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014359 if test x"$ac_file" != x-; then
14360 configure_input="$ac_file. $configure_input"
Benjamin Petersonf7155a32010-06-21 16:51:22 +000014361 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014362$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014363 fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014364 # Neutralize special characters interpreted by sed in replacement strings.
14365 case $configure_input in #(
14366 *\&* | *\|* | *\\* )
14367 ac_sed_conf_input=`$as_echo "$configure_input" |
14368 sed 's/[\\\\&|]/\\\\&/g'`;; #(
14369 *) ac_sed_conf_input=$configure_input;;
14370 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014371
14372 case $ac_tag in
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014373 *:-:* | *:-) cat >"$tmp/stdin" \
Benjamin Petersonf7155a32010-06-21 16:51:22 +000014374 || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014375 esac
14376 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014377 esac
14378
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014379 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000014380$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014381 X"$ac_file" : 'X\(//\)[^/]' \| \
14382 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014383 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014384$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014385 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14386 s//\1/
14387 q
14388 }
14389 /^X\(\/\/\)[^/].*/{
14390 s//\1/
14391 q
14392 }
14393 /^X\(\/\/\)$/{
14394 s//\1/
14395 q
14396 }
14397 /^X\(\/\).*/{
14398 s//\1/
14399 q
14400 }
14401 s/.*/./; q'`
Benjamin Petersonf7155a32010-06-21 16:51:22 +000014402 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000014403 ac_builddir=.
14404
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014405case "$ac_dir" in
14406.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
14407*)
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014408 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014409 # A ".." for each directory in $ac_dir_suffix.
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014410 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014411 case $ac_top_builddir_sub in
14412 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
14413 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
14414 esac ;;
14415esac
14416ac_abs_top_builddir=$ac_pwd
14417ac_abs_builddir=$ac_pwd$ac_dir_suffix
14418# for backward compatibility:
14419ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000014420
14421case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014422 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000014423 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014424 ac_top_srcdir=$ac_top_builddir_sub
14425 ac_abs_top_srcdir=$ac_pwd ;;
14426 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000014427 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014428 ac_top_srcdir=$srcdir
14429 ac_abs_top_srcdir=$srcdir ;;
14430 *) # Relative name.
14431 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
14432 ac_top_srcdir=$ac_top_build_prefix$srcdir
14433 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014434esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014435ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000014436
Martin v. Löwis11437992002-04-12 09:54:03 +000014437
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014438 case $ac_mode in
14439 :F)
14440 #
14441 # CONFIG_FILE
14442 #
Martin v. Löwis11437992002-04-12 09:54:03 +000014443
14444 case $INSTALL in
14445 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014446 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014447 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000014448_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014449
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014450cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014451# If the template does not know about datarootdir, expand it.
14452# FIXME: This hack should be removed a few years after 2.60.
14453ac_datarootdir_hack=; ac_datarootdir_seen=
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014454ac_sed_dataroot='
14455/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014456 p
14457 q
14458}
14459/@datadir@/p
14460/@docdir@/p
14461/@infodir@/p
14462/@localedir@/p
Benjamin Petersonf7155a32010-06-21 16:51:22 +000014463/@mandir@/p'
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014464case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014465*datarootdir*) ac_datarootdir_seen=yes;;
14466*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Benjamin Petersonf7155a32010-06-21 16:51:22 +000014467 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014468$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014469_ACEOF
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014470cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014471 ac_datarootdir_hack='
14472 s&@datadir@&$datadir&g
14473 s&@docdir@&$docdir&g
14474 s&@infodir@&$infodir&g
14475 s&@localedir@&$localedir&g
14476 s&@mandir@&$mandir&g
Benjamin Petersonf7155a32010-06-21 16:51:22 +000014477 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014478esac
14479_ACEOF
14480
14481# Neutralize VPATH when `$srcdir' = `.'.
14482# Shell code in configure.ac might set extrasub.
14483# FIXME: do we really want to maintain this feature?
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014484cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14485ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000014486$extrasub
14487_ACEOF
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014488cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014489:t
14490/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014491s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014492s&@top_builddir@&$ac_top_builddir_sub&;t t
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014493s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014494s&@srcdir@&$ac_srcdir&;t t
14495s&@abs_srcdir@&$ac_abs_srcdir&;t t
14496s&@top_srcdir@&$ac_top_srcdir&;t t
14497s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
14498s&@builddir@&$ac_builddir&;t t
14499s&@abs_builddir@&$ac_abs_builddir&;t t
14500s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
14501s&@INSTALL@&$ac_INSTALL&;t t
14502$ac_datarootdir_hack
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014503"
14504eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
Benjamin Petersonf7155a32010-06-21 16:51:22 +000014505 || as_fn_error "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014506
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014507test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
14508 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
14509 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
Benjamin Petersonf7155a32010-06-21 16:51:22 +000014510 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014511which seems to be undefined. Please make sure it is defined." >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014512$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014513which seems to be undefined. Please make sure it is defined." >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014514
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014515 rm -f "$tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000014516 case $ac_file in
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014517 -) cat "$tmp/out" && rm -f "$tmp/out";;
14518 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
14519 esac \
Benjamin Petersonf7155a32010-06-21 16:51:22 +000014520 || as_fn_error "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014521 ;;
14522 :H)
14523 #
14524 # CONFIG_HEADER
14525 #
Martin v. Löwis11437992002-04-12 09:54:03 +000014526 if test x"$ac_file" != x-; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014527 {
14528 $as_echo "/* $configure_input */" \
14529 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
14530 } >"$tmp/config.h" \
Benjamin Petersonf7155a32010-06-21 16:51:22 +000014531 || as_fn_error "could not create $ac_file" "$LINENO" 5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014532 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
Benjamin Petersonf7155a32010-06-21 16:51:22 +000014533 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014534$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000014535 else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014536 rm -f "$ac_file"
14537 mv "$tmp/config.h" "$ac_file" \
Benjamin Petersonf7155a32010-06-21 16:51:22 +000014538 || as_fn_error "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000014539 fi
14540 else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014541 $as_echo "/* $configure_input */" \
14542 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
Benjamin Petersonf7155a32010-06-21 16:51:22 +000014543 || as_fn_error "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000014544 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014545 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000014546
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014547
14548 esac
14549
14550done # for ac_tag
14551
Guido van Rossum627b2d71993-12-24 10:39:16 +000014552
Benjamin Petersonf7155a32010-06-21 16:51:22 +000014553as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000014554_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014555ac_clean_files=$ac_clean_files_save
14556
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014557test $ac_write_fail = 0 ||
Benjamin Petersonf7155a32010-06-21 16:51:22 +000014558 as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014559
Martin v. Löwis11437992002-04-12 09:54:03 +000014560
14561# configure is writing to config.log, and then calls config.status.
14562# config.status does its own redirection, appending to config.log.
14563# Unfortunately, on DOS this fails, as config.log is still kept open
14564# by configure, so config.status won't be able to write to it; its
14565# output is simply discarded. So we exec the FD to /dev/null,
14566# effectively closing config.log, so it can be properly (re)opened and
14567# appended to by config.status. When coming back to configure, we
14568# need to make the FD available again.
14569if test "$no_create" != yes; then
14570 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000014571 ac_config_status_args=
14572 test "$silent" = yes &&
14573 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000014574 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000014575 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000014576 exec 5>>config.log
14577 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
14578 # would make configure fail if this is the last instruction.
Benjamin Petersonf7155a32010-06-21 16:51:22 +000014579 $ac_cs_success || as_fn_exit $?
Martin v. Löwis11437992002-04-12 09:54:03 +000014580fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014581if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
Benjamin Petersonf7155a32010-06-21 16:51:22 +000014582 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014583$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
14584fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000014585
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014586
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014587echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014588if test ! -f Modules/Setup
14589then
14590 cp $srcdir/Modules/Setup.dist Modules/Setup
14591fi
14592
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014593echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014594if test ! -f Modules/Setup.local
14595then
14596 echo "# Edit this file for local setup changes" >Modules/Setup.local
14597fi
14598
14599echo "creating Makefile"
14600$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
14601 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000014602 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000014603mv config.c Modules