blob: a3f2a3e337085ac678412d0304776aad0799dc21 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Georg Brandl1ca2e792011-03-05 20:51:24 +01002# From configure.in Revision.
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Benjamin Peterson87cdb812011-05-31 18:26:08 -05004# Generated by GNU Autoconf 2.65 for python 3.3.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005#
Georg Brandle2e15612009-05-20 18:25:10 +00006# Report bugs to <http://bugs.python.org/>.
Martin v. Löwis1d459062005-03-14 21:23:33 +00007#
Matthias Kloseb9621712010-04-24 17:59:49 +00008#
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
Benjamin Peterson87cdb812011-05-31 18:26:08 -050010# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
11# Inc.
Matthias Kloseb9621712010-04-24 17:59:49 +000012#
13#
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014# This configure script is free software; the Free Software Foundation
15# gives unlimited permission to copy, distribute and modify it.
Matthias Kloseb9621712010-04-24 17:59:49 +000016## -------------------- ##
17## M4sh Initialization. ##
18## -------------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +000019
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020# Be more Bourne compatible
21DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000022if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000023 emulate sh
24 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000025 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000026 # is contrary to our usage. Disable this feature.
27 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000029else
Matthias Kloseb9621712010-04-24 17:59:49 +000030 case `(set -o) 2>/dev/null` in #(
31 *posix*) :
32 set -o posix ;; #(
33 *) :
34 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000035esac
Martin v. Löwis11437992002-04-12 09:54:03 +000036fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000037
38
Matthias Kloseb9621712010-04-24 17:59:49 +000039as_nl='
40'
41export as_nl
42# Printing a long string crashes Solaris 7 /usr/bin/printf.
43as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
44as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
45as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
46# Prefer a ksh shell builtin over an external printf program on Solaris,
47# but without wasting forks for bash or zsh.
48if test -z "$BASH_VERSION$ZSH_VERSION" \
49 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
50 as_echo='print -r --'
51 as_echo_n='print -rn --'
52elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
53 as_echo='printf %s\n'
54 as_echo_n='printf %s'
55else
56 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
57 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
58 as_echo_n='/usr/ucb/echo -n'
59 else
60 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
61 as_echo_n_body='eval
62 arg=$1;
63 case $arg in #(
64 *"$as_nl"*)
65 expr "X$arg" : "X\\(.*\\)$as_nl";
66 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
67 esac;
68 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
69 '
70 export as_echo_n_body
71 as_echo_n='sh -c $as_echo_n_body as_echo'
72 fi
73 export as_echo_body
74 as_echo='sh -c $as_echo_body as_echo'
75fi
Martin v. Löwis11437992002-04-12 09:54:03 +000076
77# The user is always right.
78if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000079 PATH_SEPARATOR=:
80 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
81 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
82 PATH_SEPARATOR=';'
83 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000084fi
Martin v. Löwis11437992002-04-12 09:54:03 +000085
Thomas Wouters47b49bf2007-08-30 22:15:33 +000086
87# IFS
88# We need space, tab and new line, in precisely that order. Quoting is
89# there to prevent editors from complaining about space-tab.
90# (If _AS_PATH_WALK were called with IFS unset, it would disable word
91# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000092IFS=" "" $as_nl"
93
94# Find who we are. Look in the path if we contain no directory separator.
Matthias Kloseb9621712010-04-24 17:59:49 +000095case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000096 *[\\/]* ) as_myself=$0 ;;
97 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000098for as_dir in $PATH
99do
100 IFS=$as_save_IFS
101 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +0000102 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
103 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000104IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +0000105
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000106 ;;
107esac
108# We did not find ourselves, most probably we were run as `sh COMMAND'
109# in which case we are not to be found in the path.
110if test "x$as_myself" = x; then
111 as_myself=$0
112fi
113if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000114 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
115 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000116fi
117
Matthias Kloseb9621712010-04-24 17:59:49 +0000118# Unset variables that we do not need and which cause bugs (e.g. in
119# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
120# suppresses any "Segmentation fault" message there. '((' could
121# trigger a bug in pdksh 5.2.14.
122for as_var in BASH_ENV ENV MAIL MAILPATH
123do eval test x\${$as_var+set} = xset \
124 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000125done
126PS1='$ '
127PS2='> '
128PS4='+ '
129
130# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +0000131LC_ALL=C
132export LC_ALL
133LANGUAGE=C
134export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000135
Matthias Kloseb9621712010-04-24 17:59:49 +0000136# CDPATH.
137(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
138
139if test "x$CONFIG_SHELL" = x; then
140 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
141 emulate sh
142 NULLCMD=:
143 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
144 # is contrary to our usage. Disable this feature.
145 alias -g '\${1+\"\$@\"}'='\"\$@\"'
146 setopt NO_GLOB_SUBST
147else
148 case \`(set -o) 2>/dev/null\` in #(
149 *posix*) :
150 set -o posix ;; #(
151 *) :
152 ;;
153esac
154fi
155"
156 as_required="as_fn_return () { (exit \$1); }
157as_fn_success () { as_fn_return 0; }
158as_fn_failure () { as_fn_return 1; }
159as_fn_ret_success () { return 0; }
160as_fn_ret_failure () { return 1; }
161
162exitcode=0
163as_fn_success || { exitcode=1; echo as_fn_success failed.; }
164as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
165as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
166as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
167if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
168
169else
170 exitcode=1; echo positional parameters were not saved.
171fi
172test x\$exitcode = x0 || exit 1"
173 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
174 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
175 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
176 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
177test \$(( 1 + 1 )) = 2 || exit 1"
178 if (eval "$as_required") 2>/dev/null; then :
179 as_have_required=yes
180else
181 as_have_required=no
182fi
183 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
184
185else
186 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
187as_found=false
188for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
189do
190 IFS=$as_save_IFS
191 test -z "$as_dir" && as_dir=.
192 as_found=:
193 case $as_dir in #(
194 /*)
195 for as_base in sh bash ksh sh5; do
196 # Try only shells that exist, to save several forks.
197 as_shell=$as_dir/$as_base
198 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
199 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
200 CONFIG_SHELL=$as_shell as_have_required=yes
201 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
202 break 2
203fi
204fi
205 done;;
206 esac
207 as_found=false
208done
209$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
210 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
211 CONFIG_SHELL=$SHELL as_have_required=yes
212fi; }
213IFS=$as_save_IFS
214
215
216 if test "x$CONFIG_SHELL" != x; then :
217 # We cannot yet assume a decent shell, so we have to provide a
218 # neutralization value for shells without unset; and this also
219 # works around shells that cannot unset nonexistent variables.
220 BASH_ENV=/dev/null
221 ENV=/dev/null
222 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
223 export CONFIG_SHELL
Benjamin Peterson316e02b2011-05-10 15:01:56 -0500224 exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
Matthias Kloseb9621712010-04-24 17:59:49 +0000225fi
226
227 if test x$as_have_required = xno; then :
228 $as_echo "$0: This script requires a shell more modern than all"
229 $as_echo "$0: the shells that I found on your system."
230 if test x${ZSH_VERSION+set} = xset ; then
231 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
232 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
233 else
234 $as_echo "$0: Please tell bug-autoconf@gnu.org and
235$0: http://bugs.python.org/ about your system, including
236$0: any error possibly output before this message. Then
237$0: install a modern shell, or manually run the script
238$0: under such a shell if you do have one."
239 fi
240 exit 1
241fi
242fi
243fi
244SHELL=${CONFIG_SHELL-/bin/sh}
245export SHELL
246# Unset more variables known to interfere with behavior of common tools.
247CLICOLOR_FORCE= GREP_OPTIONS=
248unset CLICOLOR_FORCE GREP_OPTIONS
249
250## --------------------- ##
251## M4sh Shell Functions. ##
252## --------------------- ##
253# as_fn_unset VAR
254# ---------------
255# Portably unset VAR.
256as_fn_unset ()
257{
258 { eval $1=; unset $1;}
259}
260as_unset=as_fn_unset
261
262# as_fn_set_status STATUS
263# -----------------------
264# Set $? to STATUS, without forking.
265as_fn_set_status ()
266{
267 return $1
268} # as_fn_set_status
269
270# as_fn_exit STATUS
271# -----------------
272# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
273as_fn_exit ()
274{
275 set +e
276 as_fn_set_status $1
277 exit $1
278} # as_fn_exit
279
280# as_fn_mkdir_p
281# -------------
282# Create "$as_dir" as a directory, including parents if necessary.
283as_fn_mkdir_p ()
284{
285
286 case $as_dir in #(
287 -*) as_dir=./$as_dir;;
288 esac
289 test -d "$as_dir" || eval $as_mkdir_p || {
290 as_dirs=
291 while :; do
292 case $as_dir in #(
293 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
294 *) as_qdir=$as_dir;;
295 esac
296 as_dirs="'$as_qdir' $as_dirs"
297 as_dir=`$as_dirname -- "$as_dir" ||
298$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
299 X"$as_dir" : 'X\(//\)[^/]' \| \
300 X"$as_dir" : 'X\(//\)$' \| \
301 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
302$as_echo X"$as_dir" |
303 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
304 s//\1/
305 q
306 }
307 /^X\(\/\/\)[^/].*/{
308 s//\1/
309 q
310 }
311 /^X\(\/\/\)$/{
312 s//\1/
313 q
314 }
315 /^X\(\/\).*/{
316 s//\1/
317 q
318 }
319 s/.*/./; q'`
320 test -d "$as_dir" && break
321 done
322 test -z "$as_dirs" || eval "mkdir $as_dirs"
Benjamin Peterson87cdb812011-05-31 18:26:08 -0500323 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +0000324
325
326} # as_fn_mkdir_p
327# as_fn_append VAR VALUE
328# ----------------------
329# Append the text in VALUE to the end of the definition contained in VAR. Take
330# advantage of any shell optimizations that allow amortized linear growth over
331# repeated appends, instead of the typical quadratic growth present in naive
332# implementations.
333if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
334 eval 'as_fn_append ()
335 {
336 eval $1+=\$2
337 }'
338else
339 as_fn_append ()
340 {
341 eval $1=\$$1\$2
342 }
343fi # as_fn_append
344
345# as_fn_arith ARG...
346# ------------------
347# Perform arithmetic evaluation on the ARGs, and store the result in the
348# global $as_val. Take advantage of shells that can avoid forks. The arguments
349# must be portable across $(()) and expr.
350if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
351 eval 'as_fn_arith ()
352 {
353 as_val=$(( $* ))
354 }'
355else
356 as_fn_arith ()
357 {
358 as_val=`expr "$@" || test $? -eq 1`
359 }
360fi # as_fn_arith
361
362
Benjamin Peterson87cdb812011-05-31 18:26:08 -0500363# as_fn_error ERROR [LINENO LOG_FD]
364# ---------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +0000365# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
366# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Benjamin Peterson87cdb812011-05-31 18:26:08 -0500367# script with status $?, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +0000368as_fn_error ()
369{
Benjamin Peterson87cdb812011-05-31 18:26:08 -0500370 as_status=$?; test $as_status -eq 0 && as_status=1
371 if test "$3"; then
372 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
373 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
Matthias Kloseb9621712010-04-24 17:59:49 +0000374 fi
Benjamin Peterson87cdb812011-05-31 18:26:08 -0500375 $as_echo "$as_me: error: $1" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +0000376 as_fn_exit $as_status
377} # as_fn_error
378
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000379if expr a : '\(a\)' >/dev/null 2>&1 &&
380 test "X`expr 00001 : '.*\(...\)'`" = X001; then
381 as_expr=expr
382else
383 as_expr=false
384fi
385
386if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
387 as_basename=basename
388else
389 as_basename=false
390fi
391
Matthias Kloseb9621712010-04-24 17:59:49 +0000392if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
393 as_dirname=dirname
394else
395 as_dirname=false
396fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000397
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000398as_me=`$as_basename -- "$0" ||
399$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
400 X"$0" : 'X\(//\)$' \| \
401 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000402$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000403 sed '/^.*\/\([^/][^/]*\)\/*$/{
404 s//\1/
405 q
406 }
407 /^X\/\(\/\/\)$/{
408 s//\1/
409 q
410 }
411 /^X\/\(\/\).*/{
412 s//\1/
413 q
414 }
415 s/.*/./; q'`
416
Matthias Kloseb9621712010-04-24 17:59:49 +0000417# Avoid depending upon Character Ranges.
418as_cr_letters='abcdefghijklmnopqrstuvwxyz'
419as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
420as_cr_Letters=$as_cr_letters$as_cr_LETTERS
421as_cr_digits='0123456789'
422as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000423
424
Matthias Kloseb9621712010-04-24 17:59:49 +0000425 as_lineno_1=$LINENO as_lineno_1a=$LINENO
426 as_lineno_2=$LINENO as_lineno_2a=$LINENO
427 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
428 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
429 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000430 sed -n '
431 p
432 /[$]LINENO/=
433 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +0000434 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000435 s/[$]LINENO.*/&-/
436 t lineno
437 b
438 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +0000439 N
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000440 :loop
441 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +0000442 t loop
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000443 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +0000444 ' >$as_me.lineno &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000445 chmod +x "$as_me.lineno" ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000446 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
Martin v. Löwis11437992002-04-12 09:54:03 +0000447
448 # Don't try to exec as it changes $[0], causing all sort of problems
449 # (the dirname of $[0] is not the place where we might find the
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000450 # original and so on. Autoconf is especially sensitive to this).
451 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +0000452 # Exit status is that of the last command.
453 exit
454}
455
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000456ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +0000457case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000458-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000459 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000460 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +0000461 xy) ECHO_C='\c';;
462 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
463 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000464 esac;;
465*)
466 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +0000467esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000468
Martin v. Löwis11437992002-04-12 09:54:03 +0000469rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000470if test -d conf$$.dir; then
471 rm -f conf$$.dir/conf$$.file
472else
473 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +0000474 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000475fi
Matthias Kloseb9621712010-04-24 17:59:49 +0000476if (echo >conf$$.file) 2>/dev/null; then
477 if ln -s conf$$.file conf$$ 2>/dev/null; then
478 as_ln_s='ln -s'
479 # ... but there are two gotchas:
480 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
481 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
482 # In both cases, we have to default to `cp -p'.
483 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
484 as_ln_s='cp -p'
485 elif ln conf$$.file conf$$ 2>/dev/null; then
486 as_ln_s=ln
487 else
Martin v. Löwis11437992002-04-12 09:54:03 +0000488 as_ln_s='cp -p'
Matthias Kloseb9621712010-04-24 17:59:49 +0000489 fi
Martin v. Löwis11437992002-04-12 09:54:03 +0000490else
491 as_ln_s='cp -p'
492fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000493rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
494rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +0000495
Skip Montanaro6dead952003-09-25 14:50:04 +0000496if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000497 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +0000498else
Skip Montanarof0d5f792004-08-15 14:08:23 +0000499 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +0000500 as_mkdir_p=false
501fi
502
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000503if test -x / >/dev/null 2>&1; then
504 as_test_x='test -x'
505else
506 if ls -dL / >/dev/null 2>&1; then
507 as_ls_L_option=L
508 else
509 as_ls_L_option=
510 fi
511 as_test_x='
512 eval sh -c '\''
513 if test -d "$1"; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000514 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000515 else
Matthias Kloseb9621712010-04-24 17:59:49 +0000516 case $1 in #(
517 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000518 esac;
Matthias Kloseb9621712010-04-24 17:59:49 +0000519 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000520 ???[sx]*):;;*)false;;esac;fi
521 '\'' sh
522 '
523fi
524as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +0000525
526# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000527as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000528
529# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000530as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000531
532
Matthias Kloseb9621712010-04-24 17:59:49 +0000533test -n "$DJDIR" || exec 7<&0 </dev/null
534exec 6>&1
Martin v. Löwis11437992002-04-12 09:54:03 +0000535
536# Name of the host.
Benjamin Peterson87cdb812011-05-31 18:26:08 -0500537# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
Martin v. Löwis11437992002-04-12 09:54:03 +0000538# so uname gets run too.
539ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
540
Martin v. Löwis11437992002-04-12 09:54:03 +0000541#
542# Initializations.
543#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000544ac_default_prefix=/usr/local
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000545ac_clean_files=
Skip Montanaro6dead952003-09-25 14:50:04 +0000546ac_config_libobj_dir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000547LIBOBJS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000548cross_compiling=no
549subdirs=
550MFLAGS=
551MAKEFLAGS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000552
Martin v. Löwis11437992002-04-12 09:54:03 +0000553# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000554PACKAGE_NAME='python'
555PACKAGE_TARNAME='python'
Georg Brandl3ebb6b32011-02-20 10:37:07 +0000556PACKAGE_VERSION='3.3'
557PACKAGE_STRING='python 3.3'
Georg Brandle2e15612009-05-20 18:25:10 +0000558PACKAGE_BUGREPORT='http://bugs.python.org/'
Matthias Kloseb9621712010-04-24 17:59:49 +0000559PACKAGE_URL=''
Martin v. Löwis11437992002-04-12 09:54:03 +0000560
561ac_unique_file="Include/object.h"
562# Factoring default headers for most tests.
563ac_includes_default="\
564#include <stdio.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000565#ifdef HAVE_SYS_TYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000566# include <sys/types.h>
567#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000568#ifdef HAVE_SYS_STAT_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000569# include <sys/stat.h>
570#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000571#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000572# include <stdlib.h>
573# include <stddef.h>
574#else
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000575# ifdef HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000576# include <stdlib.h>
577# endif
578#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000579#ifdef HAVE_STRING_H
580# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000581# include <memory.h>
582# endif
583# include <string.h>
584#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000585#ifdef HAVE_STRINGS_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000586# include <strings.h>
587#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000588#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000589# include <inttypes.h>
Thomas Wouters477c8d52006-05-27 19:21:47 +0000590#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000591#ifdef HAVE_STDINT_H
592# include <stdint.h>
593#endif
594#ifdef HAVE_UNISTD_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000595# include <unistd.h>
596#endif"
597
Matthias Kloseb9621712010-04-24 17:59:49 +0000598ac_subst_vars='LTLIBOBJS
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000599SRCDIRS
Matthias Kloseb9621712010-04-24 17:59:49 +0000600THREADHEADERS
Barry Warsaw35f3a2c2010-09-03 18:30:30 +0000601SOABI
Matthias Kloseb9621712010-04-24 17:59:49 +0000602LIBC
603LIBM
604HAVE_GETHOSTBYNAME
605HAVE_GETHOSTBYNAME_R
606HAVE_GETHOSTBYNAME_R_3_ARG
607HAVE_GETHOSTBYNAME_R_5_ARG
608HAVE_GETHOSTBYNAME_R_6_ARG
609LIBOBJS
610TRUE
611MACHDEP_OBJS
612DYNLOADFILE
613DLINCLDIR
614THREADOBJ
615LDLAST
616USE_THREAD_MODULE
617SIGNAL_OBJS
618USE_SIGNAL_MODULE
619LIBFFI_INCLUDEDIR
620PKG_CONFIG
621SHLIBS
622CFLAGSFORSHARED
623LINKFORSHARED
624CCSHARED
625BLDSHARED
626LDCXXSHARED
627LDSHARED
628SO
629LIBTOOL_CRUFT
630OTHER_LIBTOOL_OPT
631UNIVERSAL_ARCH_FLAGS
632BASECFLAGS
633OPT
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000634ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000635LN
636INSTALL_DATA
637INSTALL_SCRIPT
638INSTALL_PROGRAM
Benjamin Peterson87cdb812011-05-31 18:26:08 -0500639HAS_PYTHON
640DISABLE_ASDLGEN
Georg Brandl1ca2e792011-03-05 20:51:24 +0100641HAS_HG
642HGBRANCH
643HGTAG
644HGVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000645ARFLAGS
646AR
647RANLIB
Daniel Stutzbacha606faa2010-08-31 19:51:07 +0000648USE_INLINE
Matthias Kloseb9621712010-04-24 17:59:49 +0000649GNULD
650LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000651LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000652RUNSHARED
653INSTSONAME
654LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000655PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000656BLDLIBRARY
657DLLLIBRARY
658LDLIBRARY
659LIBRARY
660BUILDEXEEXT
661EGREP
662GREP
663CPP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200664NO_AS_NEEDED
Matthias Kloseb9621712010-04-24 17:59:49 +0000665MAINCC
666CXX
667OBJEXT
668EXEEXT
669ac_ct_CC
670CPPFLAGS
671LDFLAGS
672CFLAGS
673CC
674EXPORT_MACOSX_DEPLOYMENT_TARGET
675CONFIGURE_MACOSX_DEPLOYMENT_TARGET
676SGI_ABI
677MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000678FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000679FRAMEWORKUNIXTOOLSPREFIX
680FRAMEWORKALTINSTALLLAST
681FRAMEWORKALTINSTALLFIRST
682FRAMEWORKINSTALLLAST
683FRAMEWORKINSTALLFIRST
684PYTHONFRAMEWORKINSTALLDIR
685PYTHONFRAMEWORKPREFIX
686PYTHONFRAMEWORKDIR
687PYTHONFRAMEWORKIDENTIFIER
688PYTHONFRAMEWORK
689LIPO_32BIT_FLAGS
690ARCH_RUN_32BIT
691UNIVERSALSDK
692CONFIG_ARGS
693SOVERSION
694VERSION
695target_alias
696host_alias
697build_alias
698LIBS
699ECHO_T
700ECHO_N
701ECHO_C
702DEFS
703mandir
704localedir
705libdir
706psdir
707pdfdir
708dvidir
709htmldir
710infodir
711docdir
712oldincludedir
713includedir
714localstatedir
715sharedstatedir
716sysconfdir
717datadir
718datarootdir
719libexecdir
720sbindir
721bindir
722program_transform_name
723prefix
724exec_prefix
725PACKAGE_URL
726PACKAGE_BUGREPORT
727PACKAGE_STRING
728PACKAGE_VERSION
729PACKAGE_TARNAME
730PACKAGE_NAME
731PATH_SEPARATOR
732SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000733ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000734ac_user_opts='
735enable_option_checking
736enable_universalsdk
737with_universal_archs
738with_framework_name
739enable_framework
740with_gcc
741with_cxx_main
742with_suffix
743enable_shared
744enable_profiling
745with_pydebug
746with_libs
747with_system_expat
748with_system_ffi
Benjamin Peterson076ed002010-10-31 17:11:02 +0000749enable_loadable_sqlite_extensions
Matthias Kloseb9621712010-04-24 17:59:49 +0000750with_dbmliborder
751with_signal_module
Matthias Kloseb9621712010-04-24 17:59:49 +0000752with_threads
753with_thread
754enable_ipv6
755with_doc_strings
756with_tsc
757with_pymalloc
758with_valgrind
Matthias Kloseb9621712010-04-24 17:59:49 +0000759with_fpectl
760with_libm
761with_libc
762enable_big_digits
763with_wide_unicode
764with_computed_gotos
765'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000766 ac_precious_vars='build_alias
767host_alias
768target_alias
769CC
770CFLAGS
771LDFLAGS
772LIBS
773CPPFLAGS
Ross Lagerwall7807c352011-03-17 20:20:30 +0200774CPP'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000775
Guido van Rossum627b2d71993-12-24 10:39:16 +0000776
Guido van Rossum7f43da71994-08-01 12:15:30 +0000777# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000778ac_init_help=
779ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000780ac_unrecognized_opts=
781ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000782# The variables have the same names as the options, with
783# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000784cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000785exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000786no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000787no_recursion=
788prefix=NONE
789program_prefix=NONE
790program_suffix=NONE
791program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000792silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000793site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000794srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000795verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000796x_includes=NONE
797x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000798
799# Installation directory options.
800# These are left unexpanded so users can "make install exec_prefix=/foo"
801# and all the variables that are supposed to be based on exec_prefix
802# by default will actually change.
803# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000804# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000805bindir='${exec_prefix}/bin'
806sbindir='${exec_prefix}/sbin'
807libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000808datarootdir='${prefix}/share'
809datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000810sysconfdir='${prefix}/etc'
811sharedstatedir='${prefix}/com'
812localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000813includedir='${prefix}/include'
814oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000815docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
816infodir='${datarootdir}/info'
817htmldir='${docdir}'
818dvidir='${docdir}'
819pdfdir='${docdir}'
820psdir='${docdir}'
821libdir='${exec_prefix}/lib'
822localedir='${datarootdir}/locale'
823mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000824
Guido van Rossum7f43da71994-08-01 12:15:30 +0000825ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000826ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000827for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000828do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000829 # If the previous option needs an argument, assign it.
830 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000831 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000832 ac_prev=
833 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000834 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000835
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000836 case $ac_option in
Benjamin Peterson87cdb812011-05-31 18:26:08 -0500837 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
838 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000839 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000840
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000841 # Accept the important Cygnus configure options, so we can diagnose typos.
842
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000843 case $ac_dashdash$ac_option in
844 --)
845 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000846
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000847 -bindir | --bindir | --bindi | --bind | --bin | --bi)
848 ac_prev=bindir ;;
849 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000850 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000851
852 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000853 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000854 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000855 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000856
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000857 -cache-file | --cache-file | --cache-fil | --cache-fi \
858 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
859 ac_prev=cache_file ;;
860 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
861 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000862 cache_file=$ac_optarg ;;
863
864 --config-cache | -C)
865 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000866
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000867 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000868 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000869 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000870 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000871
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000872 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
873 | --dataroo | --dataro | --datar)
874 ac_prev=datarootdir ;;
875 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
876 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
877 datarootdir=$ac_optarg ;;
878
Guido van Rossum7f43da71994-08-01 12:15:30 +0000879 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000880 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000881 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000882 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Benjamin Peterson87cdb812011-05-31 18:26:08 -0500883 as_fn_error "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000884 ac_useropt_orig=$ac_useropt
885 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
886 case $ac_user_opts in
887 *"
888"enable_$ac_useropt"
889"*) ;;
890 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
891 ac_unrecognized_sep=', ';;
892 esac
893 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000894
895 -docdir | --docdir | --docdi | --doc | --do)
896 ac_prev=docdir ;;
897 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
898 docdir=$ac_optarg ;;
899
900 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
901 ac_prev=dvidir ;;
902 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
903 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000904
905 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000906 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000907 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000908 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Benjamin Peterson87cdb812011-05-31 18:26:08 -0500909 as_fn_error "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000910 ac_useropt_orig=$ac_useropt
911 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
912 case $ac_user_opts in
913 *"
914"enable_$ac_useropt"
915"*) ;;
916 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
917 ac_unrecognized_sep=', ';;
918 esac
919 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000920
Guido van Rossum7f43da71994-08-01 12:15:30 +0000921 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
922 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
923 | --exec | --exe | --ex)
924 ac_prev=exec_prefix ;;
925 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
926 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
927 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000928 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000929
930 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000931 # Obsolete; use --with-gas.
932 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000933
Martin v. Löwis11437992002-04-12 09:54:03 +0000934 -help | --help | --hel | --he | -h)
935 ac_init_help=long ;;
936 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
937 ac_init_help=recursive ;;
938 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
939 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000940
941 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000942 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000943 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000944 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000945
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000946 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
947 ac_prev=htmldir ;;
948 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
949 | --ht=*)
950 htmldir=$ac_optarg ;;
951
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000952 -includedir | --includedir | --includedi | --included | --include \
953 | --includ | --inclu | --incl | --inc)
954 ac_prev=includedir ;;
955 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
956 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000957 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000958
959 -infodir | --infodir | --infodi | --infod | --info | --inf)
960 ac_prev=infodir ;;
961 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000962 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000963
964 -libdir | --libdir | --libdi | --libd)
965 ac_prev=libdir ;;
966 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000967 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000968
969 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
970 | --libexe | --libex | --libe)
971 ac_prev=libexecdir ;;
972 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
973 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000974 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000975
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000976 -localedir | --localedir | --localedi | --localed | --locale)
977 ac_prev=localedir ;;
978 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
979 localedir=$ac_optarg ;;
980
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000981 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000982 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000983 ac_prev=localstatedir ;;
984 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000985 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000986 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000987
988 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
989 ac_prev=mandir ;;
990 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000991 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000992
Guido van Rossum7f43da71994-08-01 12:15:30 +0000993 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000994 # Obsolete; use --without-fp.
995 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000996
997 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +0000998 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000999 no_create=yes ;;
1000
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001001 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1002 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1003 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001004
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001005 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1006 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1007 | --oldin | --oldi | --old | --ol | --o)
1008 ac_prev=oldincludedir ;;
1009 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1010 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1011 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001012 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001013
Guido van Rossum7f43da71994-08-01 12:15:30 +00001014 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1015 ac_prev=prefix ;;
1016 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001017 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001018
1019 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1020 | --program-pre | --program-pr | --program-p)
1021 ac_prev=program_prefix ;;
1022 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1023 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001024 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001025
1026 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1027 | --program-suf | --program-su | --program-s)
1028 ac_prev=program_suffix ;;
1029 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1030 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001031 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001032
1033 -program-transform-name | --program-transform-name \
1034 | --program-transform-nam | --program-transform-na \
1035 | --program-transform-n | --program-transform- \
1036 | --program-transform | --program-transfor \
1037 | --program-transfo | --program-transf \
1038 | --program-trans | --program-tran \
1039 | --progr-tra | --program-tr | --program-t)
1040 ac_prev=program_transform_name ;;
1041 -program-transform-name=* | --program-transform-name=* \
1042 | --program-transform-nam=* | --program-transform-na=* \
1043 | --program-transform-n=* | --program-transform-=* \
1044 | --program-transform=* | --program-transfor=* \
1045 | --program-transfo=* | --program-transf=* \
1046 | --program-trans=* | --program-tran=* \
1047 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001048 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001049
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001050 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1051 ac_prev=pdfdir ;;
1052 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1053 pdfdir=$ac_optarg ;;
1054
1055 -psdir | --psdir | --psdi | --psd | --ps)
1056 ac_prev=psdir ;;
1057 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1058 psdir=$ac_optarg ;;
1059
Guido van Rossum7f43da71994-08-01 12:15:30 +00001060 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1061 | -silent | --silent | --silen | --sile | --sil)
1062 silent=yes ;;
1063
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001064 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1065 ac_prev=sbindir ;;
1066 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1067 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001068 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001069
1070 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1071 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1072 | --sharedst | --shareds | --shared | --share | --shar \
1073 | --sha | --sh)
1074 ac_prev=sharedstatedir ;;
1075 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1076 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1077 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1078 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001079 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001080
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001081 -site | --site | --sit)
1082 ac_prev=site ;;
1083 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001084 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001085
Guido van Rossum7f43da71994-08-01 12:15:30 +00001086 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1087 ac_prev=srcdir ;;
1088 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001089 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001090
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001091 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1092 | --syscon | --sysco | --sysc | --sys | --sy)
1093 ac_prev=sysconfdir ;;
1094 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1095 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001096 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001097
Guido van Rossum7f43da71994-08-01 12:15:30 +00001098 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001099 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001100 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001101 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001102
1103 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1104 verbose=yes ;;
1105
Martin v. Löwis11437992002-04-12 09:54:03 +00001106 -version | --version | --versio | --versi | --vers | -V)
1107 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001108
1109 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001110 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001111 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001112 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Benjamin Peterson87cdb812011-05-31 18:26:08 -05001113 as_fn_error "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001114 ac_useropt_orig=$ac_useropt
1115 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1116 case $ac_user_opts in
1117 *"
1118"with_$ac_useropt"
1119"*) ;;
1120 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1121 ac_unrecognized_sep=', ';;
1122 esac
1123 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001124
1125 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001126 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001127 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001128 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Benjamin Peterson87cdb812011-05-31 18:26:08 -05001129 as_fn_error "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001130 ac_useropt_orig=$ac_useropt
1131 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1132 case $ac_user_opts in
1133 *"
1134"with_$ac_useropt"
1135"*) ;;
1136 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1137 ac_unrecognized_sep=', ';;
1138 esac
1139 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001140
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001141 --x)
1142 # Obsolete; use --with-x.
1143 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001144
1145 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1146 | --x-incl | --x-inc | --x-in | --x-i)
1147 ac_prev=x_includes ;;
1148 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1149 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001150 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001151
1152 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1153 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1154 ac_prev=x_libraries ;;
1155 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1156 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001157 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001158
Benjamin Peterson87cdb812011-05-31 18:26:08 -05001159 -*) as_fn_error "unrecognized option: \`$ac_option'
1160Try \`$0 --help' for more information."
Guido van Rossum7f43da71994-08-01 12:15:30 +00001161 ;;
1162
Martin v. Löwis11437992002-04-12 09:54:03 +00001163 *=*)
1164 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1165 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001166 case $ac_envvar in #(
1167 '' | [0-9]* | *[!_$as_cr_alnum]* )
Benjamin Peterson87cdb812011-05-31 18:26:08 -05001168 as_fn_error "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001169 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001170 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001171 export $ac_envvar ;;
1172
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001173 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001174 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001175 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001176 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001177 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Benjamin Peterson316e02b2011-05-10 15:01:56 -05001178 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
Guido van Rossum7f43da71994-08-01 12:15:30 +00001179 ;;
1180
1181 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001182done
1183
Guido van Rossum7f43da71994-08-01 12:15:30 +00001184if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001185 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Benjamin Peterson87cdb812011-05-31 18:26:08 -05001186 as_fn_error "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001187fi
1188
Matthias Kloseb9621712010-04-24 17:59:49 +00001189if test -n "$ac_unrecognized_opts"; then
1190 case $enable_option_checking in
1191 no) ;;
Benjamin Peterson87cdb812011-05-31 18:26:08 -05001192 fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001193 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1194 esac
1195fi
1196
1197# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001198for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1199 datadir sysconfdir sharedstatedir localstatedir includedir \
1200 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1201 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001202do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001203 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001204 # Remove trailing slashes.
1205 case $ac_val in
1206 */ )
1207 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1208 eval $ac_var=\$ac_val;;
1209 esac
1210 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001211 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001212 [\\/$]* | ?:[\\/]* ) continue;;
1213 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001214 esac
Benjamin Peterson87cdb812011-05-31 18:26:08 -05001215 as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001216done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001217
Martin v. Löwis11437992002-04-12 09:54:03 +00001218# There might be people who depend on the old broken behavior: `$host'
1219# used to hold the argument of --host etc.
1220# FIXME: To remove some day.
1221build=$build_alias
1222host=$host_alias
1223target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001224
Martin v. Löwis11437992002-04-12 09:54:03 +00001225# FIXME: To remove some day.
1226if test "x$host_alias" != x; then
1227 if test "x$build_alias" = x; then
1228 cross_compiling=maybe
Benjamin Peterson87cdb812011-05-31 18:26:08 -05001229 $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
1230 If a cross compiler is detected then cross compile mode will be used." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001231 elif test "x$build_alias" != "x$host_alias"; then
1232 cross_compiling=yes
1233 fi
1234fi
1235
1236ac_tool_prefix=
1237test -n "$host_alias" && ac_tool_prefix=$host_alias-
1238
1239test "$silent" = yes && exec 6>/dev/null
1240
Guido van Rossum627b2d71993-12-24 10:39:16 +00001241
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001242ac_pwd=`pwd` && test -n "$ac_pwd" &&
1243ac_ls_di=`ls -di .` &&
1244ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Benjamin Peterson87cdb812011-05-31 18:26:08 -05001245 as_fn_error "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001246test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Benjamin Peterson87cdb812011-05-31 18:26:08 -05001247 as_fn_error "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001248
1249
Guido van Rossum627b2d71993-12-24 10:39:16 +00001250# Find the source files, if location was not specified.
1251if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001252 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001253 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001254 ac_confdir=`$as_dirname -- "$as_myself" ||
1255$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1256 X"$as_myself" : 'X\(//\)[^/]' \| \
1257 X"$as_myself" : 'X\(//\)$' \| \
1258 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1259$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001260 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1261 s//\1/
1262 q
1263 }
1264 /^X\(\/\/\)[^/].*/{
1265 s//\1/
1266 q
1267 }
1268 /^X\(\/\/\)$/{
1269 s//\1/
1270 q
1271 }
1272 /^X\(\/\).*/{
1273 s//\1/
1274 q
1275 }
1276 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001277 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001278 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001279 srcdir=..
1280 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001281else
1282 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001283fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001284if test ! -r "$srcdir/$ac_unique_file"; then
1285 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Benjamin Peterson87cdb812011-05-31 18:26:08 -05001286 as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001287fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001288ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1289ac_abs_confdir=`(
Benjamin Peterson87cdb812011-05-31 18:26:08 -05001290 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001291 pwd)`
1292# When building in place, set srcdir=.
1293if test "$ac_abs_confdir" = "$ac_pwd"; then
1294 srcdir=.
1295fi
1296# Remove unnecessary trailing slashes from srcdir.
1297# Double slashes in file names in object file debugging info
1298# mess up M-x gdb in Emacs.
1299case $srcdir in
1300*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1301esac
1302for ac_var in $ac_precious_vars; do
1303 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1304 eval ac_env_${ac_var}_value=\$${ac_var}
1305 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1306 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1307done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001308
Martin v. Löwis11437992002-04-12 09:54:03 +00001309#
1310# Report the --help message.
1311#
1312if test "$ac_init_help" = "long"; then
1313 # Omit some internal or obsolete options to make the list less imposing.
1314 # This message is too long to be a string in the A/UX 3.1 sh.
1315 cat <<_ACEOF
Georg Brandl3ebb6b32011-02-20 10:37:07 +00001316\`configure' configures python 3.3 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001317
1318Usage: $0 [OPTION]... [VAR=VALUE]...
1319
1320To assign environment variables (e.g., CC, CFLAGS...), specify them as
1321VAR=VALUE. See below for descriptions of some of the useful variables.
1322
1323Defaults for the options are specified in brackets.
1324
1325Configuration:
1326 -h, --help display this help and exit
1327 --help=short display options specific to this package
1328 --help=recursive display the short help of all the included packages
1329 -V, --version display version information and exit
Benjamin Peterson87cdb812011-05-31 18:26:08 -05001330 -q, --quiet, --silent do not print \`checking...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001331 --cache-file=FILE cache test results in FILE [disabled]
1332 -C, --config-cache alias for \`--cache-file=config.cache'
1333 -n, --no-create do not create output files
1334 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1335
Martin v. Löwis11437992002-04-12 09:54:03 +00001336Installation directories:
1337 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001338 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001339 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001340 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001341
1342By default, \`make install' will install all the files in
1343\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1344an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1345for instance \`--prefix=\$HOME'.
1346
1347For better control, use the options below.
1348
1349Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001350 --bindir=DIR user executables [EPREFIX/bin]
1351 --sbindir=DIR system admin executables [EPREFIX/sbin]
1352 --libexecdir=DIR program executables [EPREFIX/libexec]
1353 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1354 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1355 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1356 --libdir=DIR object code libraries [EPREFIX/lib]
1357 --includedir=DIR C header files [PREFIX/include]
1358 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1359 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1360 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1361 --infodir=DIR info documentation [DATAROOTDIR/info]
1362 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1363 --mandir=DIR man documentation [DATAROOTDIR/man]
1364 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1365 --htmldir=DIR html documentation [DOCDIR]
1366 --dvidir=DIR dvi documentation [DOCDIR]
1367 --pdfdir=DIR pdf documentation [DOCDIR]
1368 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001369_ACEOF
1370
1371 cat <<\_ACEOF
1372_ACEOF
1373fi
1374
1375if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001376 case $ac_init_help in
Georg Brandl3ebb6b32011-02-20 10:37:07 +00001377 short | recursive ) echo "Configuration of python 3.3:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001378 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001379 cat <<\_ACEOF
1380
1381Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001382 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001383 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1384 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001385 --enable-universalsdk[=SDKDIR]
Christian Heimes292d3512008-02-03 16:51:08 +00001386 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001387 --enable-framework[=INSTALLDIR]
1388 Build (MacOSX|Darwin) framework
1389 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001390 --enable-profiling enable C-level code profiling
Benjamin Peterson076ed002010-10-31 17:11:02 +00001391 --enable-loadable-sqlite-extensions
1392 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001393 --enable-ipv6 Enable ipv6 (with ipv4) support
1394 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001395 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001396 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001397
1398Optional Packages:
1399 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1400 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001401 --with-universal-archs=ARCH
1402 select architectures for universal build ("32-bit",
Ronald Oussoren3c064c12009-09-08 07:12:42 +00001403 "64-bit", "3-way", "intel" or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001404 --with-framework-name=FRAMEWORK
1405 specify an alternate name of the framework built
1406 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001407 --without-gcc never use gcc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001408 --with-cxx-main=<compiler>
1409 compile main() and link python executable with C++
1410 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001411 --with-suffix=.exe set executable suffix
1412 --with-pydebug build with Py_DEBUG defined
1413 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001414 --with-system-expat build pyexpat module using an installed expat
1415 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001416 --with-system-ffi build _ctypes module using an installed ffi library
Matthias Klose55708cc2009-04-30 08:06:49 +00001417 --with-dbmliborder=db1:db2:...
1418 order to check db backends for dbm. Valid value is a
1419 colon separated string with the backend names
1420 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001421 --with-signal-module disable/enable signal module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001422 --with(out)-threads[=DIRECTORY]
1423 disable/enable thread support
1424 --with(out)-thread[=DIRECTORY]
1425 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001426 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001427 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001428 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001429 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001430 --with-fpectl enable SIGFPE catching
1431 --with-libm=STRING math library
1432 --with-libc=STRING C library
Georg Brandl52d168a2008-01-07 18:10:24 +00001433 --with-wide-unicode Use 4-byte Unicode characters (default is 2 bytes)
Antoine Pitrou042b1282010-08-13 21:15:58 +00001434 --with(out)-computed-gotos
1435 Use computed gotos in evaluation loop (enabled by
1436 default on supported compilers)
Martin v. Löwis11437992002-04-12 09:54:03 +00001437
1438Some influential environment variables:
1439 CC C compiler command
1440 CFLAGS C compiler flags
1441 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1442 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001443 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001444 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001445 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001446 CPP C preprocessor
1447
1448Use these variables to override the choices made by `configure' or to help
1449it to find libraries and programs with nonstandard names/locations.
1450
Georg Brandle2e15612009-05-20 18:25:10 +00001451Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001452_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001453ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001454fi
1455
1456if test "$ac_init_help" = "recursive"; then
1457 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001458 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001459 test -d "$ac_dir" ||
1460 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1461 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001462 ac_builddir=.
1463
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001464case "$ac_dir" in
1465.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1466*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001467 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001468 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001469 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001470 case $ac_top_builddir_sub in
1471 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1472 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1473 esac ;;
1474esac
1475ac_abs_top_builddir=$ac_pwd
1476ac_abs_builddir=$ac_pwd$ac_dir_suffix
1477# for backward compatibility:
1478ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001479
1480case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001481 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001482 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001483 ac_top_srcdir=$ac_top_builddir_sub
1484 ac_abs_top_srcdir=$ac_pwd ;;
1485 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001486 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001487 ac_top_srcdir=$srcdir
1488 ac_abs_top_srcdir=$srcdir ;;
1489 *) # Relative name.
1490 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1491 ac_top_srcdir=$ac_top_build_prefix$srcdir
1492 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001493esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001494ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001495
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001496 cd "$ac_dir" || { ac_status=$?; continue; }
1497 # Check for guested configure.
1498 if test -f "$ac_srcdir/configure.gnu"; then
1499 echo &&
1500 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1501 elif test -f "$ac_srcdir/configure"; then
1502 echo &&
1503 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001504 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001505 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001506 fi || ac_status=$?
1507 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001508 done
1509fi
1510
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001511test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001512if $ac_init_version; then
1513 cat <<\_ACEOF
Georg Brandl3ebb6b32011-02-20 10:37:07 +00001514python configure 3.3
Benjamin Peterson87cdb812011-05-31 18:26:08 -05001515generated by GNU Autoconf 2.65
Martin v. Löwis11437992002-04-12 09:54:03 +00001516
Benjamin Peterson87cdb812011-05-31 18:26:08 -05001517Copyright (C) 2009 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001518This configure script is free software; the Free Software Foundation
1519gives unlimited permission to copy, distribute and modify it.
1520_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001521 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001522fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001523
1524## ------------------------ ##
1525## Autoconf initialization. ##
1526## ------------------------ ##
1527
1528# ac_fn_c_try_compile LINENO
1529# --------------------------
1530# Try to compile conftest.$ac_ext, and return whether this succeeded.
1531ac_fn_c_try_compile ()
1532{
1533 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1534 rm -f conftest.$ac_objext
1535 if { { ac_try="$ac_compile"
1536case "(($ac_try" in
1537 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1538 *) ac_try_echo=$ac_try;;
1539esac
1540eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1541$as_echo "$ac_try_echo"; } >&5
1542 (eval "$ac_compile") 2>conftest.err
1543 ac_status=$?
1544 if test -s conftest.err; then
1545 grep -v '^ *+' conftest.err >conftest.er1
1546 cat conftest.er1 >&5
1547 mv -f conftest.er1 conftest.err
1548 fi
1549 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1550 test $ac_status = 0; } && {
1551 test -z "$ac_c_werror_flag" ||
1552 test ! -s conftest.err
1553 } && test -s conftest.$ac_objext; then :
1554 ac_retval=0
1555else
1556 $as_echo "$as_me: failed program was:" >&5
1557sed 's/^/| /' conftest.$ac_ext >&5
1558
1559 ac_retval=1
1560fi
Benjamin Peterson316e02b2011-05-10 15:01:56 -05001561 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00001562 as_fn_set_status $ac_retval
1563
1564} # ac_fn_c_try_compile
1565
Matthias Kloseb9621712010-04-24 17:59:49 +00001566# ac_fn_c_try_link LINENO
1567# -----------------------
1568# Try to link conftest.$ac_ext, and return whether this succeeded.
1569ac_fn_c_try_link ()
1570{
1571 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1572 rm -f conftest.$ac_objext conftest$ac_exeext
1573 if { { ac_try="$ac_link"
1574case "(($ac_try" in
1575 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1576 *) ac_try_echo=$ac_try;;
1577esac
1578eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1579$as_echo "$ac_try_echo"; } >&5
1580 (eval "$ac_link") 2>conftest.err
1581 ac_status=$?
1582 if test -s conftest.err; then
1583 grep -v '^ *+' conftest.err >conftest.er1
1584 cat conftest.er1 >&5
1585 mv -f conftest.er1 conftest.err
1586 fi
1587 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1588 test $ac_status = 0; } && {
1589 test -z "$ac_c_werror_flag" ||
1590 test ! -s conftest.err
1591 } && test -s conftest$ac_exeext && {
1592 test "$cross_compiling" = yes ||
1593 $as_test_x conftest$ac_exeext
1594 }; then :
1595 ac_retval=0
1596else
1597 $as_echo "$as_me: failed program was:" >&5
1598sed 's/^/| /' conftest.$ac_ext >&5
1599
1600 ac_retval=1
1601fi
1602 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1603 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1604 # interfere with the next link command; also delete a directory that is
1605 # left behind by Apple's compiler. We do this before executing the actions.
1606 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Benjamin Peterson316e02b2011-05-10 15:01:56 -05001607 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00001608 as_fn_set_status $ac_retval
1609
1610} # ac_fn_c_try_link
1611
Matthias Kloseb9621712010-04-24 17:59:49 +00001612# ac_fn_c_try_cpp LINENO
1613# ----------------------
1614# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1615ac_fn_c_try_cpp ()
1616{
1617 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1618 if { { ac_try="$ac_cpp conftest.$ac_ext"
1619case "(($ac_try" in
1620 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1621 *) ac_try_echo=$ac_try;;
1622esac
1623eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1624$as_echo "$ac_try_echo"; } >&5
1625 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1626 ac_status=$?
1627 if test -s conftest.err; then
1628 grep -v '^ *+' conftest.err >conftest.er1
1629 cat conftest.er1 >&5
1630 mv -f conftest.er1 conftest.err
1631 fi
1632 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Benjamin Peterson87cdb812011-05-31 18:26:08 -05001633 test $ac_status = 0; } >/dev/null && {
Matthias Kloseb9621712010-04-24 17:59:49 +00001634 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1635 test ! -s conftest.err
1636 }; then :
1637 ac_retval=0
1638else
1639 $as_echo "$as_me: failed program was:" >&5
1640sed 's/^/| /' conftest.$ac_ext >&5
1641
1642 ac_retval=1
1643fi
Benjamin Peterson316e02b2011-05-10 15:01:56 -05001644 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00001645 as_fn_set_status $ac_retval
1646
1647} # ac_fn_c_try_cpp
1648
1649# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1650# -------------------------------------------------------
1651# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1652# the include files in INCLUDES and setting the cache variable VAR
1653# accordingly.
1654ac_fn_c_check_header_mongrel ()
1655{
1656 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Benjamin Peterson87cdb812011-05-31 18:26:08 -05001657 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001658 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1659$as_echo_n "checking for $2... " >&6; }
Benjamin Peterson87cdb812011-05-31 18:26:08 -05001660if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001661 $as_echo_n "(cached) " >&6
1662fi
1663eval ac_res=\$$3
1664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1665$as_echo "$ac_res" >&6; }
1666else
1667 # Is the header compilable?
1668{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1669$as_echo_n "checking $2 usability... " >&6; }
1670cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1671/* end confdefs.h. */
1672$4
1673#include <$2>
1674_ACEOF
1675if ac_fn_c_try_compile "$LINENO"; then :
1676 ac_header_compiler=yes
1677else
1678 ac_header_compiler=no
1679fi
1680rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1681{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1682$as_echo "$ac_header_compiler" >&6; }
1683
1684# Is the header present?
1685{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1686$as_echo_n "checking $2 presence... " >&6; }
1687cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1688/* end confdefs.h. */
1689#include <$2>
1690_ACEOF
1691if ac_fn_c_try_cpp "$LINENO"; then :
1692 ac_header_preproc=yes
1693else
1694 ac_header_preproc=no
1695fi
Benjamin Peterson87cdb812011-05-31 18:26:08 -05001696rm -f conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001697{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1698$as_echo "$ac_header_preproc" >&6; }
1699
1700# So? What about this header?
1701case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1702 yes:no: )
1703 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1704$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1705 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1706$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1707 ;;
1708 no:yes:* )
1709 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1710$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1711 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1712$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1713 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1714$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1715 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1716$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1717 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1718$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Benjamin Peterson87cdb812011-05-31 18:26:08 -05001719( cat <<\_ASBOX
1720## -------------------------------------- ##
Matthias Kloseb9621712010-04-24 17:59:49 +00001721## Report this to http://bugs.python.org/ ##
Benjamin Peterson87cdb812011-05-31 18:26:08 -05001722## -------------------------------------- ##
1723_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +00001724 ) | sed "s/^/$as_me: WARNING: /" >&2
1725 ;;
1726esac
1727 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1728$as_echo_n "checking for $2... " >&6; }
Benjamin Peterson87cdb812011-05-31 18:26:08 -05001729if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001730 $as_echo_n "(cached) " >&6
1731else
1732 eval "$3=\$ac_header_compiler"
1733fi
1734eval ac_res=\$$3
1735 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1736$as_echo "$ac_res" >&6; }
1737fi
Benjamin Peterson316e02b2011-05-10 15:01:56 -05001738 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00001739
1740} # ac_fn_c_check_header_mongrel
1741
1742# ac_fn_c_try_run LINENO
1743# ----------------------
1744# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1745# that executables *can* be run.
1746ac_fn_c_try_run ()
1747{
1748 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1749 if { { ac_try="$ac_link"
1750case "(($ac_try" in
1751 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1752 *) ac_try_echo=$ac_try;;
1753esac
1754eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1755$as_echo "$ac_try_echo"; } >&5
1756 (eval "$ac_link") 2>&5
1757 ac_status=$?
1758 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1759 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1760 { { case "(($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_try") 2>&5
1767 ac_status=$?
1768 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1769 test $ac_status = 0; }; }; then :
1770 ac_retval=0
1771else
1772 $as_echo "$as_me: program exited with status $ac_status" >&5
1773 $as_echo "$as_me: failed program was:" >&5
1774sed 's/^/| /' conftest.$ac_ext >&5
1775
1776 ac_retval=$ac_status
1777fi
1778 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Benjamin Peterson316e02b2011-05-10 15:01:56 -05001779 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00001780 as_fn_set_status $ac_retval
1781
1782} # ac_fn_c_try_run
1783
1784# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1785# -------------------------------------------------------
1786# Tests whether HEADER exists and can be compiled using the include files in
1787# INCLUDES, setting the cache variable VAR accordingly.
1788ac_fn_c_check_header_compile ()
1789{
1790 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1791 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1792$as_echo_n "checking for $2... " >&6; }
Benjamin Peterson87cdb812011-05-31 18:26:08 -05001793if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001794 $as_echo_n "(cached) " >&6
1795else
1796 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1797/* end confdefs.h. */
1798$4
1799#include <$2>
1800_ACEOF
1801if ac_fn_c_try_compile "$LINENO"; then :
1802 eval "$3=yes"
1803else
1804 eval "$3=no"
1805fi
1806rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1807fi
1808eval ac_res=\$$3
1809 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1810$as_echo "$ac_res" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05001811 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00001812
1813} # ac_fn_c_check_header_compile
1814
Matthias Kloseb9621712010-04-24 17:59:49 +00001815# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1816# -------------------------------------------
1817# Tests whether TYPE exists after having included INCLUDES, setting cache
1818# variable VAR accordingly.
1819ac_fn_c_check_type ()
1820{
1821 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1822 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1823$as_echo_n "checking for $2... " >&6; }
Benjamin Peterson87cdb812011-05-31 18:26:08 -05001824if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001825 $as_echo_n "(cached) " >&6
1826else
1827 eval "$3=no"
1828 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1829/* end confdefs.h. */
1830$4
1831int
1832main ()
1833{
1834if (sizeof ($2))
1835 return 0;
1836 ;
1837 return 0;
1838}
1839_ACEOF
1840if ac_fn_c_try_compile "$LINENO"; then :
1841 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1842/* end confdefs.h. */
1843$4
1844int
1845main ()
1846{
1847if (sizeof (($2)))
1848 return 0;
1849 ;
1850 return 0;
1851}
1852_ACEOF
1853if ac_fn_c_try_compile "$LINENO"; then :
1854
1855else
1856 eval "$3=yes"
1857fi
1858rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1859fi
1860rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1861fi
1862eval ac_res=\$$3
1863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1864$as_echo "$ac_res" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05001865 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00001866
1867} # ac_fn_c_check_type
1868
1869# ac_fn_c_find_uintX_t LINENO BITS VAR
1870# ------------------------------------
1871# Finds an unsigned integer type with width BITS, setting cache variable VAR
1872# accordingly.
1873ac_fn_c_find_uintX_t ()
1874{
1875 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1876 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1877$as_echo_n "checking for uint$2_t... " >&6; }
Benjamin Peterson87cdb812011-05-31 18:26:08 -05001878if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001879 $as_echo_n "(cached) " >&6
1880else
1881 eval "$3=no"
1882 # Order is important - never check a type that is potentially smaller
1883 # than half of the expected target width.
1884 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1885 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1886 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1887/* end confdefs.h. */
1888$ac_includes_default
1889int
1890main ()
1891{
1892static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
1893test_array [0] = 0
1894
1895 ;
1896 return 0;
1897}
1898_ACEOF
1899if ac_fn_c_try_compile "$LINENO"; then :
1900 case $ac_type in #(
1901 uint$2_t) :
1902 eval "$3=yes" ;; #(
1903 *) :
1904 eval "$3=\$ac_type" ;;
1905esac
1906fi
1907rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson87cdb812011-05-31 18:26:08 -05001908 eval as_val=\$$3
1909 if test "x$as_val" = x""no; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001910
1911else
1912 break
1913fi
1914 done
1915fi
1916eval ac_res=\$$3
1917 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1918$as_echo "$ac_res" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05001919 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00001920
1921} # ac_fn_c_find_uintX_t
1922
1923# ac_fn_c_find_intX_t LINENO BITS VAR
1924# -----------------------------------
1925# Finds a signed integer type with width BITS, setting cache variable VAR
1926# accordingly.
1927ac_fn_c_find_intX_t ()
1928{
1929 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1930 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
1931$as_echo_n "checking for int$2_t... " >&6; }
Benjamin Peterson87cdb812011-05-31 18:26:08 -05001932if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001933 $as_echo_n "(cached) " >&6
1934else
1935 eval "$3=no"
1936 # Order is important - never check a type that is potentially smaller
1937 # than half of the expected target width.
1938 for ac_type in int$2_t 'int' 'long int' \
1939 'long long int' 'short int' 'signed char'; do
1940 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1941/* end confdefs.h. */
1942$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001943 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00001944int
1945main ()
1946{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001947static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
Matthias Kloseb9621712010-04-24 17:59:49 +00001948test_array [0] = 0
1949
1950 ;
1951 return 0;
1952}
1953_ACEOF
1954if ac_fn_c_try_compile "$LINENO"; then :
1955 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1956/* end confdefs.h. */
1957$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001958 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00001959int
1960main ()
1961{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001962static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Kloseb9621712010-04-24 17:59:49 +00001963 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
1964test_array [0] = 0
1965
1966 ;
1967 return 0;
1968}
1969_ACEOF
1970if ac_fn_c_try_compile "$LINENO"; then :
1971
1972else
1973 case $ac_type in #(
1974 int$2_t) :
1975 eval "$3=yes" ;; #(
1976 *) :
1977 eval "$3=\$ac_type" ;;
1978esac
1979fi
1980rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1981fi
1982rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson87cdb812011-05-31 18:26:08 -05001983 eval as_val=\$$3
1984 if test "x$as_val" = x""no; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001985
1986else
1987 break
1988fi
1989 done
1990fi
1991eval ac_res=\$$3
1992 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1993$as_echo "$ac_res" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05001994 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00001995
1996} # ac_fn_c_find_intX_t
1997
1998# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1999# --------------------------------------------
2000# Tries to find the compile-time value of EXPR in a program that includes
2001# INCLUDES, setting VAR accordingly. Returns whether the value could be
2002# computed
2003ac_fn_c_compute_int ()
2004{
2005 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2006 if test "$cross_compiling" = yes; then
2007 # Depending upon the size, compute the lo and hi bounds.
2008cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2009/* end confdefs.h. */
2010$4
2011int
2012main ()
2013{
2014static int test_array [1 - 2 * !(($2) >= 0)];
2015test_array [0] = 0
2016
2017 ;
2018 return 0;
2019}
2020_ACEOF
2021if ac_fn_c_try_compile "$LINENO"; then :
2022 ac_lo=0 ac_mid=0
2023 while :; do
2024 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2025/* end confdefs.h. */
2026$4
2027int
2028main ()
2029{
2030static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2031test_array [0] = 0
2032
2033 ;
2034 return 0;
2035}
2036_ACEOF
2037if ac_fn_c_try_compile "$LINENO"; then :
2038 ac_hi=$ac_mid; break
2039else
2040 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2041 if test $ac_lo -le $ac_mid; then
2042 ac_lo= ac_hi=
2043 break
2044 fi
2045 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2046fi
2047rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2048 done
2049else
2050 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2051/* end confdefs.h. */
2052$4
2053int
2054main ()
2055{
2056static int test_array [1 - 2 * !(($2) < 0)];
2057test_array [0] = 0
2058
2059 ;
2060 return 0;
2061}
2062_ACEOF
2063if ac_fn_c_try_compile "$LINENO"; then :
2064 ac_hi=-1 ac_mid=-1
2065 while :; do
2066 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2067/* end confdefs.h. */
2068$4
2069int
2070main ()
2071{
2072static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2073test_array [0] = 0
2074
2075 ;
2076 return 0;
2077}
2078_ACEOF
2079if ac_fn_c_try_compile "$LINENO"; then :
2080 ac_lo=$ac_mid; break
2081else
2082 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2083 if test $ac_mid -le $ac_hi; then
2084 ac_lo= ac_hi=
2085 break
2086 fi
2087 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2088fi
2089rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2090 done
2091else
2092 ac_lo= ac_hi=
2093fi
2094rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2095fi
2096rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2097# Binary search between lo and hi bounds.
2098while test "x$ac_lo" != "x$ac_hi"; do
2099 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2100 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2101/* end confdefs.h. */
2102$4
2103int
2104main ()
2105{
2106static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2107test_array [0] = 0
2108
2109 ;
2110 return 0;
2111}
2112_ACEOF
2113if ac_fn_c_try_compile "$LINENO"; then :
2114 ac_hi=$ac_mid
2115else
2116 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2117fi
2118rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2119done
2120case $ac_lo in #((
2121?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2122'') ac_retval=1 ;;
2123esac
2124 else
2125 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2126/* end confdefs.h. */
2127$4
2128static long int longval () { return $2; }
2129static unsigned long int ulongval () { return $2; }
2130#include <stdio.h>
2131#include <stdlib.h>
2132int
2133main ()
2134{
2135
2136 FILE *f = fopen ("conftest.val", "w");
2137 if (! f)
2138 return 1;
2139 if (($2) < 0)
2140 {
2141 long int i = longval ();
2142 if (i != ($2))
2143 return 1;
2144 fprintf (f, "%ld", i);
2145 }
2146 else
2147 {
2148 unsigned long int i = ulongval ();
2149 if (i != ($2))
2150 return 1;
2151 fprintf (f, "%lu", i);
2152 }
2153 /* Do not output a trailing newline, as this causes \r\n confusion
2154 on some platforms. */
2155 return ferror (f) || fclose (f) != 0;
2156
2157 ;
2158 return 0;
2159}
2160_ACEOF
2161if ac_fn_c_try_run "$LINENO"; then :
2162 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2163else
2164 ac_retval=1
2165fi
2166rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2167 conftest.$ac_objext conftest.beam conftest.$ac_ext
2168rm -f conftest.val
2169
2170 fi
Benjamin Peterson316e02b2011-05-10 15:01:56 -05002171 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00002172 as_fn_set_status $ac_retval
2173
2174} # ac_fn_c_compute_int
2175
2176# ac_fn_c_check_func LINENO FUNC VAR
2177# ----------------------------------
2178# Tests whether FUNC exists, setting the cache variable VAR accordingly
2179ac_fn_c_check_func ()
2180{
2181 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2182 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2183$as_echo_n "checking for $2... " >&6; }
Benjamin Peterson87cdb812011-05-31 18:26:08 -05002184if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002185 $as_echo_n "(cached) " >&6
2186else
2187 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2188/* end confdefs.h. */
2189/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2190 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2191#define $2 innocuous_$2
2192
2193/* System header to define __stub macros and hopefully few prototypes,
2194 which can conflict with char $2 (); below.
2195 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2196 <limits.h> exists even on freestanding compilers. */
2197
2198#ifdef __STDC__
2199# include <limits.h>
2200#else
2201# include <assert.h>
2202#endif
2203
2204#undef $2
2205
2206/* Override any GCC internal prototype to avoid an error.
2207 Use char because int might match the return type of a GCC
2208 builtin and then its argument prototype would still apply. */
2209#ifdef __cplusplus
2210extern "C"
2211#endif
2212char $2 ();
2213/* The GNU C library defines this for functions which it implements
2214 to always fail with ENOSYS. Some functions are actually named
2215 something starting with __ and the normal name is an alias. */
2216#if defined __stub_$2 || defined __stub___$2
2217choke me
2218#endif
2219
2220int
2221main ()
2222{
2223return $2 ();
2224 ;
2225 return 0;
2226}
2227_ACEOF
2228if ac_fn_c_try_link "$LINENO"; then :
2229 eval "$3=yes"
2230else
2231 eval "$3=no"
2232fi
2233rm -f core conftest.err conftest.$ac_objext \
2234 conftest$ac_exeext conftest.$ac_ext
2235fi
2236eval ac_res=\$$3
2237 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2238$as_echo "$ac_res" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05002239 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00002240
2241} # ac_fn_c_check_func
2242
2243# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2244# ----------------------------------------------------
2245# Tries to find if the field MEMBER exists in type AGGR, after including
2246# INCLUDES, setting cache variable VAR accordingly.
2247ac_fn_c_check_member ()
2248{
2249 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2250 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2251$as_echo_n "checking for $2.$3... " >&6; }
Benjamin Peterson87cdb812011-05-31 18:26:08 -05002252if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002253 $as_echo_n "(cached) " >&6
2254else
2255 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2256/* end confdefs.h. */
2257$5
2258int
2259main ()
2260{
2261static $2 ac_aggr;
2262if (ac_aggr.$3)
2263return 0;
2264 ;
2265 return 0;
2266}
2267_ACEOF
2268if ac_fn_c_try_compile "$LINENO"; then :
2269 eval "$4=yes"
2270else
2271 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2272/* end confdefs.h. */
2273$5
2274int
2275main ()
2276{
2277static $2 ac_aggr;
2278if (sizeof ac_aggr.$3)
2279return 0;
2280 ;
2281 return 0;
2282}
2283_ACEOF
2284if ac_fn_c_try_compile "$LINENO"; then :
2285 eval "$4=yes"
2286else
2287 eval "$4=no"
2288fi
2289rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2290fi
2291rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2292fi
2293eval ac_res=\$$4
2294 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2295$as_echo "$ac_res" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05002296 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00002297
2298} # ac_fn_c_check_member
2299
Benjamin Peterson87cdb812011-05-31 18:26:08 -05002300# ac_fn_c_check_decl LINENO SYMBOL VAR
2301# ------------------------------------
2302# Tests whether SYMBOL is declared, setting cache variable VAR accordingly.
Matthias Kloseb9621712010-04-24 17:59:49 +00002303ac_fn_c_check_decl ()
2304{
2305 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Benjamin Peterson87cdb812011-05-31 18:26:08 -05002306 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $2 is declared" >&5
2307$as_echo_n "checking whether $2 is declared... " >&6; }
2308if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002309 $as_echo_n "(cached) " >&6
2310else
2311 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2312/* end confdefs.h. */
2313$4
2314int
2315main ()
2316{
Benjamin Peterson87cdb812011-05-31 18:26:08 -05002317#ifndef $2
2318 (void) $2;
Matthias Kloseb9621712010-04-24 17:59:49 +00002319#endif
2320
2321 ;
2322 return 0;
2323}
2324_ACEOF
2325if ac_fn_c_try_compile "$LINENO"; then :
2326 eval "$3=yes"
2327else
2328 eval "$3=no"
2329fi
2330rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2331fi
2332eval ac_res=\$$3
2333 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2334$as_echo "$ac_res" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05002335 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00002336
2337} # ac_fn_c_check_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002338cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002339This file contains any messages produced by compilers while
2340running configure, to aid debugging if configure makes a mistake.
2341
Georg Brandl3ebb6b32011-02-20 10:37:07 +00002342It was created by python $as_me 3.3, which was
Benjamin Peterson87cdb812011-05-31 18:26:08 -05002343generated by GNU Autoconf 2.65. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002344
2345 $ $0 $@
2346
2347_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002348exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002349{
2350cat <<_ASUNAME
2351## --------- ##
2352## Platform. ##
2353## --------- ##
2354
2355hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2356uname -m = `(uname -m) 2>/dev/null || echo unknown`
2357uname -r = `(uname -r) 2>/dev/null || echo unknown`
2358uname -s = `(uname -s) 2>/dev/null || echo unknown`
2359uname -v = `(uname -v) 2>/dev/null || echo unknown`
2360
2361/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2362/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2363
2364/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2365/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2366/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002367/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002368/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2369/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2370/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2371
2372_ASUNAME
2373
2374as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2375for as_dir in $PATH
2376do
2377 IFS=$as_save_IFS
2378 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002379 $as_echo "PATH: $as_dir"
2380 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002381IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002382
2383} >&5
2384
2385cat >&5 <<_ACEOF
2386
2387
2388## ----------- ##
2389## Core tests. ##
2390## ----------- ##
2391
2392_ACEOF
2393
2394
2395# Keep a trace of the command line.
2396# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002397# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002398# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002399# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002400ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002401ac_configure_args0=
2402ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002403ac_must_keep_next=false
2404for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002405do
Skip Montanaro6dead952003-09-25 14:50:04 +00002406 for ac_arg
2407 do
2408 case $ac_arg in
2409 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2410 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2411 | -silent | --silent | --silen | --sile | --sil)
2412 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002413 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002414 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002415 esac
2416 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002417 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002418 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002419 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002420 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002421 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002422 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002423 case $ac_arg in
2424 *=* | --config-cache | -C | -disable-* | --disable-* \
2425 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2426 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2427 | -with-* | --with-* | -without-* | --without-* | --x)
2428 case "$ac_configure_args0 " in
2429 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2430 esac
2431 ;;
2432 -* ) ac_must_keep_next=true ;;
2433 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002434 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002435 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002436 ;;
2437 esac
2438 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002439done
Matthias Kloseb9621712010-04-24 17:59:49 +00002440{ ac_configure_args0=; unset ac_configure_args0;}
2441{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002442
2443# When interrupted or exit'd, cleanup temporary files, and complete
2444# config.log. We remove comments because anyway the quotes in there
2445# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002446# WARNING: Use '\'' to represent an apostrophe within the trap.
2447# 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 +00002448trap 'exit_status=$?
2449 # Save into config.log some information that might help in debugging.
2450 {
2451 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002452
Benjamin Peterson87cdb812011-05-31 18:26:08 -05002453 cat <<\_ASBOX
2454## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002455## Cache variables. ##
Benjamin Peterson87cdb812011-05-31 18:26:08 -05002456## ---------------- ##
2457_ASBOX
Martin v. Löwis11437992002-04-12 09:54:03 +00002458 echo
2459 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002460(
2461 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2462 eval ac_val=\$$ac_var
2463 case $ac_val in #(
2464 *${as_nl}*)
2465 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002466 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2467$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002468 esac
2469 case $ac_var in #(
2470 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002471 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2472 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002473 esac ;;
2474 esac
2475 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002476 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002477 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2478 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002479 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002480 "s/'\''/'\''\\\\'\'''\''/g;
2481 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2482 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002483 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002484 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002485 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002486 esac |
2487 sort
2488)
Martin v. Löwis11437992002-04-12 09:54:03 +00002489 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002490
Benjamin Peterson87cdb812011-05-31 18:26:08 -05002491 cat <<\_ASBOX
2492## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002493## Output variables. ##
Benjamin Peterson87cdb812011-05-31 18:26:08 -05002494## ----------------- ##
2495_ASBOX
Skip Montanaro6dead952003-09-25 14:50:04 +00002496 echo
2497 for ac_var in $ac_subst_vars
2498 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002499 eval ac_val=\$$ac_var
2500 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002501 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002502 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002503 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002504 done | sort
2505 echo
2506
2507 if test -n "$ac_subst_files"; then
Benjamin Peterson87cdb812011-05-31 18:26:08 -05002508 cat <<\_ASBOX
2509## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002510## File substitutions. ##
Benjamin Peterson87cdb812011-05-31 18:26:08 -05002511## ------------------- ##
2512_ASBOX
Skip Montanaro6dead952003-09-25 14:50:04 +00002513 echo
2514 for ac_var in $ac_subst_files
2515 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002516 eval ac_val=\$$ac_var
2517 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002518 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002519 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002520 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002521 done | sort
2522 echo
2523 fi
2524
Martin v. Löwis11437992002-04-12 09:54:03 +00002525 if test -s confdefs.h; then
Benjamin Peterson87cdb812011-05-31 18:26:08 -05002526 cat <<\_ASBOX
2527## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002528## confdefs.h. ##
Benjamin Peterson87cdb812011-05-31 18:26:08 -05002529## ----------- ##
2530_ASBOX
Martin v. Löwis11437992002-04-12 09:54:03 +00002531 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002532 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002533 echo
2534 fi
2535 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002536 $as_echo "$as_me: caught signal $ac_signal"
2537 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002538 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002539 rm -f core *.core core.conftest.* &&
2540 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002541 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002542' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002543for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002544 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002545done
2546ac_signal=0
2547
2548# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002549rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002550
Matthias Kloseb9621712010-04-24 17:59:49 +00002551$as_echo "/* confdefs.h */" > confdefs.h
2552
Martin v. Löwis11437992002-04-12 09:54:03 +00002553# Predefined preprocessor variables.
2554
2555cat >>confdefs.h <<_ACEOF
2556#define PACKAGE_NAME "$PACKAGE_NAME"
2557_ACEOF
2558
Martin v. Löwis11437992002-04-12 09:54:03 +00002559cat >>confdefs.h <<_ACEOF
2560#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2561_ACEOF
2562
Martin v. Löwis11437992002-04-12 09:54:03 +00002563cat >>confdefs.h <<_ACEOF
2564#define PACKAGE_VERSION "$PACKAGE_VERSION"
2565_ACEOF
2566
Martin v. Löwis11437992002-04-12 09:54:03 +00002567cat >>confdefs.h <<_ACEOF
2568#define PACKAGE_STRING "$PACKAGE_STRING"
2569_ACEOF
2570
Martin v. Löwis11437992002-04-12 09:54:03 +00002571cat >>confdefs.h <<_ACEOF
2572#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2573_ACEOF
2574
Matthias Kloseb9621712010-04-24 17:59:49 +00002575cat >>confdefs.h <<_ACEOF
2576#define PACKAGE_URL "$PACKAGE_URL"
2577_ACEOF
2578
Martin v. Löwis11437992002-04-12 09:54:03 +00002579
2580# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002581# Prefer an explicitly selected file to automatically selected ones.
2582ac_site_file1=NONE
2583ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002584if test -n "$CONFIG_SITE"; then
Benjamin Peterson87cdb812011-05-31 18:26:08 -05002585 ac_site_file1=$CONFIG_SITE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002586elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002587 ac_site_file1=$prefix/share/config.site
2588 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002589else
Matthias Kloseb9621712010-04-24 17:59:49 +00002590 ac_site_file1=$ac_default_prefix/share/config.site
2591 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002592fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002593for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002594do
Matthias Kloseb9621712010-04-24 17:59:49 +00002595 test "x$ac_site_file" = xNONE && continue
2596 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2597 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2598$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002599 sed 's/^/| /' "$ac_site_file" >&5
Benjamin Peterson87cdb812011-05-31 18:26:08 -05002600 . "$ac_site_file"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002601 fi
2602done
2603
2604if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002605 # Some versions of bash will fail to source /dev/null (special files
2606 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2607 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2608 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2609$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002610 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002611 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2612 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002613 esac
2614 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002615else
Matthias Kloseb9621712010-04-24 17:59:49 +00002616 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2617$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002618 >$cache_file
2619fi
2620
2621# Check that the precious variables saved in the cache have kept the same
2622# value.
2623ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002624for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002625 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2626 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002627 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2628 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002629 case $ac_old_set,$ac_new_set in
2630 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002631 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2632$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 +00002633 ac_cache_corrupted=: ;;
2634 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002635 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2636$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002637 ac_cache_corrupted=: ;;
2638 ,);;
2639 *)
2640 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002641 # differences in whitespace do not lead to failure.
2642 ac_old_val_w=`echo x $ac_old_val`
2643 ac_new_val_w=`echo x $ac_new_val`
2644 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2645 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2646$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2647 ac_cache_corrupted=:
2648 else
2649 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2650$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2651 eval $ac_var=\$ac_old_val
2652 fi
2653 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2654$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2655 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2656$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002657 fi;;
2658 esac
2659 # Pass precious variables to config.status.
2660 if test "$ac_new_set" = set; then
2661 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002662 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002663 *) ac_arg=$ac_var=$ac_new_val ;;
2664 esac
2665 case " $ac_configure_args " in
2666 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002667 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002668 esac
2669 fi
2670done
2671if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002672 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2673$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2674 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2675$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Benjamin Peterson87cdb812011-05-31 18:26:08 -05002676 as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002677fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002678## -------------------- ##
2679## Main body of script. ##
2680## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002681
Guido van Rossum7f43da71994-08-01 12:15:30 +00002682ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002683ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002684ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2685ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2686ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002687
Guido van Rossum627b2d71993-12-24 10:39:16 +00002688
Michael W. Hudson54241132001-12-07 15:38:26 +00002689
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002690ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002691
2692
Martin v. Löwis11437992002-04-12 09:54:03 +00002693
Benjamin Petersond23f8222009-04-05 19:13:16 +00002694if test "$prefix" != "/"; then
2695 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2696fi
2697
2698
Martin v. Löwis11437992002-04-12 09:54:03 +00002699
2700
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002701# We don't use PACKAGE_ variables, and they cause conflicts
2702# with other autoconf-based packages that include Python.h
2703grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2704rm confdefs.h
2705mv confdefs.h.new confdefs.h
2706
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002707
Georg Brandl3ebb6b32011-02-20 10:37:07 +00002708VERSION=3.3
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002709
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002710# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002711
2712SOVERSION=1.0
2713
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002714# The later defininition of _XOPEN_SOURCE disables certain features
2715# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2716
Matthias Kloseb9621712010-04-24 17:59:49 +00002717$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002718
2719
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002720# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2721# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2722# them.
2723
Matthias Kloseb9621712010-04-24 17:59:49 +00002724$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002725
2726
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002727# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2728# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2729# them.
2730
Matthias Kloseb9621712010-04-24 17:59:49 +00002731$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002732
2733
Martin v. Löwisd6320502004-08-12 13:45:08 +00002734# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2735# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
2736
Matthias Kloseb9621712010-04-24 17:59:49 +00002737$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00002738
2739
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002740# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2741# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2742# them.
2743
Matthias Kloseb9621712010-04-24 17:59:49 +00002744$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002745
2746
2747
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002748define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002749
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00002750# Arguments passed to configure.
2751
2752CONFIG_ARGS="$ac_configure_args"
2753
Matthias Kloseb9621712010-04-24 17:59:49 +00002754{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
2755$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002756# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002757if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002758 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00002759 case $enableval in
2760 yes)
2761 enableval=/Developer/SDKs/MacOSX10.4u.sdk
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002762 if test ! -d "${enableval}"
2763 then
2764 enableval=/
2765 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002766 ;;
2767 esac
2768 case $enableval in
2769 no)
2770 UNIVERSALSDK=
2771 enable_universalsdk=
2772 ;;
2773 *)
2774 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002775 if test ! -d "${UNIVERSALSDK}"
2776 then
Benjamin Peterson87cdb812011-05-31 18:26:08 -05002777 as_fn_error "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002778 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002779 ;;
2780 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002781
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002782
Thomas Wouters477c8d52006-05-27 19:21:47 +00002783else
2784
2785 UNIVERSALSDK=
2786 enable_universalsdk=
2787
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002788fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002789
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002790if test -n "${UNIVERSALSDK}"
2791then
Matthias Kloseb9621712010-04-24 17:59:49 +00002792 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
2793$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002794else
Matthias Kloseb9621712010-04-24 17:59:49 +00002795 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2796$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002797fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002798
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002799
Benjamin Peterson6794aa32008-07-16 20:33:37 +00002800
2801
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002802UNIVERSAL_ARCHS="32-bit"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00002803
Matthias Kloseb9621712010-04-24 17:59:49 +00002804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
2805$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002806
2807# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002808if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002809 withval=$with_universal_archs;
Matthias Kloseb9621712010-04-24 17:59:49 +00002810 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
2811$as_echo "$withval" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002812 UNIVERSAL_ARCHS="$withval"
2813
2814else
2815
Matthias Kloseb9621712010-04-24 17:59:49 +00002816 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 32-bit" >&5
2817$as_echo "32-bit" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002818
2819fi
2820
2821
2822
2823
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002824
2825# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002826if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002827 withval=$with_framework_name;
2828 PYTHONFRAMEWORK=${withval}
2829 PYTHONFRAMEWORKDIR=${withval}.framework
2830 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
2831
2832else
2833
2834 PYTHONFRAMEWORK=Python
2835 PYTHONFRAMEWORKDIR=Python.framework
2836 PYTHONFRAMEWORKIDENTIFIER=org.python.python
2837
2838fi
2839
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002840# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002841if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002842 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00002843 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00002844 yes)
Jack Jansene578a632001-08-15 01:27:14 +00002845 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00002846 esac
2847 case $enableval in
2848 no)
2849 PYTHONFRAMEWORK=
2850 PYTHONFRAMEWORKDIR=no-framework
2851 PYTHONFRAMEWORKPREFIX=
2852 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002853 FRAMEWORKINSTALLFIRST=
2854 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002855 FRAMEWORKALTINSTALLFIRST=
2856 FRAMEWORKALTINSTALLLAST=
2857 if test "x${prefix}" = "xNONE"; then
2858 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2859 else
2860 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2861 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00002862 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00002863 ;;
2864 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002865 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00002866 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00002867 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00002868 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00002869 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
2870 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002871 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002872
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002873 if test "x${prefix}" = "xNONE" ; then
2874 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002875
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002876 else
2877 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2878 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002879
2880 case "${enableval}" in
2881 /System*)
2882 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2883 if test "${prefix}" = "NONE" ; then
2884 # See below
2885 FRAMEWORKUNIXTOOLSPREFIX="/usr"
2886 fi
2887 ;;
2888
2889 /Library*)
2890 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2891 ;;
2892
2893 */Library/Frameworks)
2894 MDIR="`dirname "${enableval}"`"
2895 MDIR="`dirname "${MDIR}"`"
2896 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
2897
2898 if test "${prefix}" = "NONE"; then
2899 # User hasn't specified the
2900 # --prefix option, but wants to install
2901 # the framework in a non-default location,
2902 # ensure that the compatibility links get
2903 # installed relative to that prefix as well
2904 # instead of in /usr/local.
2905 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
2906 fi
2907 ;;
2908
2909 *)
2910 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2911 ;;
2912 esac
2913
Jack Jansen127e56e2001-09-11 14:41:54 +00002914 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00002915
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002916 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00002917 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002918 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002919
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002920 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002921
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002922 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
2923
2924 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
2925
Jack Jansene578a632001-08-15 01:27:14 +00002926 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002927
Guido van Rossum563e7081996-09-10 18:20:48 +00002928else
Martin v. Löwis11437992002-04-12 09:54:03 +00002929
Jack Jansene578a632001-08-15 01:27:14 +00002930 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00002931 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00002932 PYTHONFRAMEWORKPREFIX=
2933 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002934 FRAMEWORKINSTALLFIRST=
2935 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002936 FRAMEWORKALTINSTALLFIRST=
2937 FRAMEWORKALTINSTALLLAST=
2938 if test "x${prefix}" = "xNONE" ; then
2939 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2940 else
2941 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2942 fi
Jack Jansene578a632001-08-15 01:27:14 +00002943 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002944
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002945
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002946fi
2947
Thomas Wouters477c8d52006-05-27 19:21:47 +00002948
2949
Michael W. Hudson54241132001-12-07 15:38:26 +00002950
2951
2952
2953
Jack Jansene578a632001-08-15 01:27:14 +00002954
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002955
2956
2957
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002958
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002959
Jack Jansene578a632001-08-15 01:27:14 +00002960##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00002961## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00002962## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00002963##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002964# Set name for machine-dependent library files
2965
Matthias Kloseb9621712010-04-24 17:59:49 +00002966{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
2967$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002968if test -z "$MACHDEP"
2969then
Guido van Rossum563e7081996-09-10 18:20:48 +00002970 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002971 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00002972 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00002973 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002974 else
Guido van Rossum563e7081996-09-10 18:20:48 +00002975 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002976 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00002977 ac_md_system=`echo $ac_sys_system |
2978 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
2979 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00002980 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00002981 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00002982
Guido van Rossum07397971997-04-29 21:49:50 +00002983 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002984 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002985 darwin*) MACHDEP="darwin";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00002986 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00002987 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002988 esac
2989fi
Guido van Rossum91922671997-10-09 20:24:13 +00002990
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002991# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
2992# disable features if it is defined, without any means to access these
2993# features as extensions. For these systems, we skip the definition of
2994# _XOPEN_SOURCE. Before adding a system to the list to gain access to
2995# some feature, make sure there is no alternative way to access this
2996# feature. Also, when using wildcards, make sure you have verified the
2997# need for not defining _XOPEN_SOURCE on all systems matching the
2998# wildcard, and that the wildcard does not include future systems
2999# (which may remove their limitations).
3000case $ac_sys_system/$ac_sys_release in
3001 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3002 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003003 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003004 # In addition, Stefan Krah confirms that issue #1244610 exists through
3005 # OpenBSD 4.6, but is fixed in 4.7.
3006 OpenBSD/2.* | OpenBSD/3.[0123456789] | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003007 define_xopen_source=no
3008 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3009 # also defined. This can be overridden by defining _BSD_SOURCE
3010 # As this has a different meaning on Linux, only define it on OpenBSD
3011
Matthias Kloseb9621712010-04-24 17:59:49 +00003012$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003013
3014 ;;
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003015 OpenBSD/4.[789])
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003016 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3017 # also defined. This can be overridden by defining _BSD_SOURCE
3018 # As this has a different meaning on Linux, only define it on OpenBSD
3019
Matthias Kloseb9621712010-04-24 17:59:49 +00003020$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003021
3022 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003023 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3024 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3025 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003026 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 +00003027 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003028 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3029 # request to enable features supported by the standard as a request
3030 # to disable features not supported by the standard. The best way
3031 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3032 # entirely and define __EXTENSIONS__ instead.
3033 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003034 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003035 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3036 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003037 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003038 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003039 define_xopen_source=no;;
3040 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003041 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003042 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003043 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003044 # On FreeBSD 4, the math functions C89 does not cover are never defined
3045 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3046 FreeBSD/4.*)
3047 define_xopen_source=no;;
3048 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3049 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3050 # identifies itself as Darwin/7.*
3051 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3052 # disables platform specific features beyond repair.
3053 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3054 # has no effect, don't bother defining them
3055 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003056 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003057 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003058 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003059 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3060 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3061 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003062 AIX/4)
3063 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003064 AIX/5)
3065 if test `uname -r` -eq 1; then
3066 define_xopen_source=no
3067 fi
3068 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003069 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3070 # defining NI_NUMERICHOST.
3071 QNX/6.3.2)
3072 define_xopen_source=no
3073 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003074
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003075esac
3076
3077if test $define_xopen_source = yes
3078then
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003079
Matthias Kloseb9621712010-04-24 17:59:49 +00003080$as_echo "#define _XOPEN_SOURCE 600" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003081
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003082
3083 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3084 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3085 # several APIs are not declared. Since this is also needed in some
3086 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003087
Matthias Kloseb9621712010-04-24 17:59:49 +00003088$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003089
3090
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003091
Matthias Kloseb9621712010-04-24 17:59:49 +00003092$as_echo "#define _POSIX_C_SOURCE 200112L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003093
3094
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003095fi
3096
Guido van Rossum91922671997-10-09 20:24:13 +00003097#
3098# SGI compilers allow the specification of the both the ABI and the
3099# ISA on the command line. Depending on the values of these switches,
3100# different and often incompatable code will be generated.
3101#
3102# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3103# thus supply support for various ABI/ISA combinations. The MACHDEP
3104# variable is also adjusted.
3105#
3106
3107if test ! -z "$SGI_ABI"
3108then
3109 CC="cc $SGI_ABI"
3110 LDFLAGS="$SGI_ABI $LDFLAGS"
3111 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3112fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003113{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3114$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003115
Jack Jansen6b08a402004-06-03 12:41:45 +00003116# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3117# it may influence the way we can build extensions, so distutils
3118# needs to check it
3119
Thomas Wouters477c8d52006-05-27 19:21:47 +00003120
Jack Jansen6b08a402004-06-03 12:41:45 +00003121CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003122EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003123
Matthias Kloseb9621712010-04-24 17:59:49 +00003124{ $as_echo "$as_me:${as_lineno-$LINENO}: checking machine type as reported by uname -m" >&5
3125$as_echo_n "checking machine type as reported by uname -m... " >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00003126ac_sys_machine=`uname -m`
Matthias Kloseb9621712010-04-24 17:59:49 +00003127{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_sys_machine" >&5
3128$as_echo "$ac_sys_machine" >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00003129
Guido van Rossum627b2d71993-12-24 10:39:16 +00003130# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003131
3132# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3133# for debug/optimization stuff. BASECFLAGS is for flags that are required
3134# just to get things to compile and link. Users are free to override OPT
3135# when running configure or make. The build should not break if they do.
3136# BASECFLAGS should generally not be messed with, however.
3137
3138# XXX shouldn't some/most/all of this code be merged with the stuff later
3139# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003140{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3141$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003142
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003143# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003144if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003145 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003146 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003147 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003148 without_gcc=yes;;
3149 yes) CC=gcc
3150 without_gcc=no;;
3151 *) CC=$withval
3152 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003153 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003154else
Martin v. Löwis11437992002-04-12 09:54:03 +00003155
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003156 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003157 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003158 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003159 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003160 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003161fi
3162
Matthias Kloseb9621712010-04-24 17:59:49 +00003163{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3164$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003165
Guido van Rossum8b131c51995-03-09 14:10:13 +00003166# If the user switches compilers, we can't believe the cache
3167if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3168then
Benjamin Peterson87cdb812011-05-31 18:26:08 -05003169 as_fn_error "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003170(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003171fi
3172
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003173# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3174# when the compiler supports them, but we don't always want -O2, and
3175# we set -g later.
3176if test -z "$CFLAGS"; then
3177 CFLAGS=
3178fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003179ac_ext=c
3180ac_cpp='$CPP $CPPFLAGS'
3181ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3182ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3183ac_compiler_gnu=$ac_cv_c_compiler_gnu
3184if test -n "$ac_tool_prefix"; then
3185 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3186set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3188$as_echo_n "checking for $ac_word... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05003189if test "${ac_cv_prog_CC+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003190 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003191else
3192 if test -n "$CC"; then
3193 ac_cv_prog_CC="$CC" # Let the user override the test.
3194else
Martin v. Löwis11437992002-04-12 09:54:03 +00003195as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3196for as_dir in $PATH
3197do
3198 IFS=$as_save_IFS
3199 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003200 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003201 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 +00003202 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003203 $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 +00003204 break 2
3205 fi
3206done
Matthias Kloseb9621712010-04-24 17:59:49 +00003207 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003208IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003209
Jack Jansendd19cf82001-12-06 22:36:17 +00003210fi
3211fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003212CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003213if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003214 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3215$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003216else
Matthias Kloseb9621712010-04-24 17:59:49 +00003217 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3218$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003219fi
3220
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003221
Martin v. Löwis11437992002-04-12 09:54:03 +00003222fi
3223if test -z "$ac_cv_prog_CC"; then
3224 ac_ct_CC=$CC
3225 # Extract the first word of "gcc", so it can be a program name with args.
3226set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003227{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3228$as_echo_n "checking for $ac_word... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05003229if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003230 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003231else
3232 if test -n "$ac_ct_CC"; then
3233 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3234else
3235as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3236for as_dir in $PATH
3237do
3238 IFS=$as_save_IFS
3239 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003240 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003241 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 +00003242 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003243 $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 +00003244 break 2
3245 fi
3246done
Matthias Kloseb9621712010-04-24 17:59:49 +00003247 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003248IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003249
3250fi
3251fi
3252ac_ct_CC=$ac_cv_prog_ac_ct_CC
3253if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003254 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3255$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003256else
Matthias Kloseb9621712010-04-24 17:59:49 +00003257 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3258$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003259fi
3260
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003261 if test "x$ac_ct_CC" = x; then
3262 CC=""
3263 else
3264 case $cross_compiling:$ac_tool_warned in
3265yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003266{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3267$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003268ac_tool_warned=yes ;;
3269esac
3270 CC=$ac_ct_CC
3271 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003272else
3273 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003274fi
3275
Jack Jansendd19cf82001-12-06 22:36:17 +00003276if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003277 if test -n "$ac_tool_prefix"; then
3278 # 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 +00003279set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003280{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3281$as_echo_n "checking for $ac_word... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05003282if test "${ac_cv_prog_CC+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003283 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003284else
3285 if test -n "$CC"; then
3286 ac_cv_prog_CC="$CC" # Let the user override the test.
3287else
Martin v. Löwis11437992002-04-12 09:54:03 +00003288as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3289for as_dir in $PATH
3290do
3291 IFS=$as_save_IFS
3292 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003293 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003294 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 +00003295 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003296 $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 +00003297 break 2
3298 fi
3299done
Matthias Kloseb9621712010-04-24 17:59:49 +00003300 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003301IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003302
3303fi
3304fi
3305CC=$ac_cv_prog_CC
3306if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003307 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3308$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003309else
Matthias Kloseb9621712010-04-24 17:59:49 +00003310 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3311$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003312fi
3313
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003314
Martin v. Löwis11437992002-04-12 09:54:03 +00003315 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003316fi
3317if test -z "$CC"; then
3318 # Extract the first word of "cc", so it can be a program name with args.
3319set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003320{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3321$as_echo_n "checking for $ac_word... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05003322if test "${ac_cv_prog_CC+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003323 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003324else
3325 if test -n "$CC"; then
3326 ac_cv_prog_CC="$CC" # Let the user override the test.
3327else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003328 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003329as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3330for as_dir in $PATH
3331do
3332 IFS=$as_save_IFS
3333 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003334 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003335 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 +00003336 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3337 ac_prog_rejected=yes
3338 continue
3339 fi
3340 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003341 $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 +00003342 break 2
3343 fi
3344done
Matthias Kloseb9621712010-04-24 17:59:49 +00003345 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003346IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003347
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003348if test $ac_prog_rejected = yes; then
3349 # We found a bogon in the path, so make sure we never use it.
3350 set dummy $ac_cv_prog_CC
3351 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003352 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003353 # We chose a different compiler from the bogus one.
3354 # However, it has the same basename, so the bogon will be chosen
3355 # first if we set CC to just the basename; use the full file name.
3356 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003357 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003358 fi
3359fi
3360fi
3361fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003362CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003363if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003364 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3365$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003366else
Matthias Kloseb9621712010-04-24 17:59:49 +00003367 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3368$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003369fi
3370
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003371
Martin v. Löwis11437992002-04-12 09:54:03 +00003372fi
3373if test -z "$CC"; then
3374 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003375 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003376 do
3377 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3378set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003379{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3380$as_echo_n "checking for $ac_word... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05003381if test "${ac_cv_prog_CC+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003382 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003383else
3384 if test -n "$CC"; then
3385 ac_cv_prog_CC="$CC" # Let the user override the test.
3386else
Martin v. Löwis11437992002-04-12 09:54:03 +00003387as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3388for as_dir in $PATH
3389do
3390 IFS=$as_save_IFS
3391 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003392 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003393 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 +00003394 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003395 $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 +00003396 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003397 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003398done
Matthias Kloseb9621712010-04-24 17:59:49 +00003399 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003400IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003401
3402fi
3403fi
3404CC=$ac_cv_prog_CC
3405if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003406 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3407$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003408else
Matthias Kloseb9621712010-04-24 17:59:49 +00003409 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3410$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003411fi
3412
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003413
Martin v. Löwis11437992002-04-12 09:54:03 +00003414 test -n "$CC" && break
3415 done
3416fi
3417if test -z "$CC"; then
3418 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003419 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003420do
3421 # Extract the first word of "$ac_prog", so it can be a program name with args.
3422set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003423{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3424$as_echo_n "checking for $ac_word... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05003425if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003426 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003427else
3428 if test -n "$ac_ct_CC"; then
3429 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3430else
3431as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3432for as_dir in $PATH
3433do
3434 IFS=$as_save_IFS
3435 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003436 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003437 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 +00003438 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003439 $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 +00003440 break 2
3441 fi
3442done
Matthias Kloseb9621712010-04-24 17:59:49 +00003443 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003444IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003445
Martin v. Löwis11437992002-04-12 09:54:03 +00003446fi
3447fi
3448ac_ct_CC=$ac_cv_prog_ac_ct_CC
3449if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003450 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3451$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003452else
Matthias Kloseb9621712010-04-24 17:59:49 +00003453 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3454$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003455fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003456
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003457
Martin v. Löwis11437992002-04-12 09:54:03 +00003458 test -n "$ac_ct_CC" && break
3459done
Michael W. Hudson54241132001-12-07 15:38:26 +00003460
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003461 if test "x$ac_ct_CC" = x; then
3462 CC=""
3463 else
3464 case $cross_compiling:$ac_tool_warned in
3465yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003466{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3467$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003468ac_tool_warned=yes ;;
3469esac
3470 CC=$ac_ct_CC
3471 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003472fi
3473
3474fi
3475
3476
Matthias Kloseb9621712010-04-24 17:59:49 +00003477test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3478$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson87cdb812011-05-31 18:26:08 -05003479as_fn_error "no acceptable C compiler found in \$PATH
3480See \`config.log' for more details." "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003481
3482# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003483$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3484set X $ac_compile
3485ac_compiler=$2
3486for ac_option in --version -v -V -qversion; do
3487 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003488case "(($ac_try" in
3489 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3490 *) ac_try_echo=$ac_try;;
3491esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003492eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3493$as_echo "$ac_try_echo"; } >&5
3494 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003495 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003496 if test -s conftest.err; then
3497 sed '10a\
3498... rest of stderr output deleted ...
3499 10q' conftest.err >conftest.er1
3500 cat conftest.er1 >&5
3501 fi
3502 rm -f conftest.er1 conftest.err
3503 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3504 test $ac_status = 0; }
3505done
Martin v. Löwis11437992002-04-12 09:54:03 +00003506
Matthias Kloseb9621712010-04-24 17:59:49 +00003507cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003508/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003509
Martin v. Löwis11437992002-04-12 09:54:03 +00003510int
3511main ()
3512{
3513
3514 ;
3515 return 0;
3516}
3517_ACEOF
3518ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003519ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003520# Try to create an executable without -o first, disregard a.out.
3521# It will help us diagnose broken compilers, and finding out an intuition
3522# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003523{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3524$as_echo_n "checking whether the C compiler works... " >&6; }
3525ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3526
3527# The possible output files:
3528ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3529
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003530ac_rmfiles=
3531for ac_file in $ac_files
3532do
3533 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003534 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003535 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3536 esac
3537done
3538rm -f $ac_rmfiles
3539
Matthias Kloseb9621712010-04-24 17:59:49 +00003540if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003541case "(($ac_try" in
3542 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3543 *) ac_try_echo=$ac_try;;
3544esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003545eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3546$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003547 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003548 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003549 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3550 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003551 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3552# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3553# in a Makefile. We should not override ac_cv_exeext if it was cached,
3554# so that the user can short-circuit this test for compilers unknown to
3555# Autoconf.
3556for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003557do
3558 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003559 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003560 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003561 ;;
3562 [ab].out )
3563 # We found the default executable, but exeext='' is most
3564 # certainly right.
3565 break;;
3566 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003567 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003568 then :; else
3569 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3570 fi
3571 # We set ac_cv_exeext here because the later test for it is not
3572 # safe: cross compilers may not add the suffix if given an `-o'
3573 # argument, so we may need to know it at that point already.
3574 # Even if this section looks crufty: it has the advantage of
3575 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003576 break;;
3577 * )
3578 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003579 esac
3580done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003581test "$ac_cv_exeext" = no && ac_cv_exeext=
3582
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003583else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003584 ac_file=''
3585fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003586if test -z "$ac_file"; then :
3587 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3588$as_echo "no" >&6; }
3589$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003590sed 's/^/| /' conftest.$ac_ext >&5
3591
Matthias Kloseb9621712010-04-24 17:59:49 +00003592{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3593$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson87cdb812011-05-31 18:26:08 -05003594{ as_fn_set_status 77
3595as_fn_error "C compiler cannot create executables
3596See \`config.log' for more details." "$LINENO" 5; }; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003597else
3598 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3599$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003600fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003601{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3602$as_echo_n "checking for C compiler default output file name... " >&6; }
3603{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3604$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003605ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003606
Matthias Kloseb9621712010-04-24 17:59:49 +00003607rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003608ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00003609{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3610$as_echo_n "checking for suffix of executables... " >&6; }
3611if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003612case "(($ac_try" in
3613 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3614 *) ac_try_echo=$ac_try;;
3615esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003616eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3617$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003618 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003619 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003620 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3621 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003622 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3623# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3624# work properly (i.e., refer to `conftest.exe'), while it won't with
3625# `rm'.
3626for ac_file in conftest.exe conftest conftest.*; do
3627 test -f "$ac_file" || continue
3628 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003629 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003630 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3631 break;;
3632 * ) break;;
3633 esac
3634done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003635else
Matthias Kloseb9621712010-04-24 17:59:49 +00003636 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3637$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson87cdb812011-05-31 18:26:08 -05003638as_fn_error "cannot compute suffix of executables: cannot compile and link
3639See \`config.log' for more details." "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003640fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003641rm -f conftest conftest$ac_cv_exeext
3642{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3643$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003644
3645rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003646EXEEXT=$ac_cv_exeext
3647ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003648cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3649/* end confdefs.h. */
3650#include <stdio.h>
3651int
3652main ()
3653{
3654FILE *f = fopen ("conftest.out", "w");
3655 return ferror (f) || fclose (f) != 0;
3656
3657 ;
3658 return 0;
3659}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003660_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003661ac_clean_files="$ac_clean_files conftest.out"
3662# Check that the compiler produces executables we can run. If not, either
3663# the compiler is broken, or we cross compile.
3664{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3665$as_echo_n "checking whether we are cross compiling... " >&6; }
3666if test "$cross_compiling" != yes; then
3667 { { ac_try="$ac_link"
3668case "(($ac_try" in
3669 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3670 *) ac_try_echo=$ac_try;;
3671esac
3672eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3673$as_echo "$ac_try_echo"; } >&5
3674 (eval "$ac_link") 2>&5
3675 ac_status=$?
3676 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3677 test $ac_status = 0; }
3678 if { ac_try='./conftest$ac_cv_exeext'
3679 { { case "(($ac_try" in
3680 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3681 *) ac_try_echo=$ac_try;;
3682esac
3683eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3684$as_echo "$ac_try_echo"; } >&5
3685 (eval "$ac_try") 2>&5
3686 ac_status=$?
3687 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3688 test $ac_status = 0; }; }; then
3689 cross_compiling=no
3690 else
3691 if test "$cross_compiling" = maybe; then
3692 cross_compiling=yes
3693 else
3694 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3695$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson87cdb812011-05-31 18:26:08 -05003696as_fn_error "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00003697If you meant to cross compile, use \`--host'.
Benjamin Peterson87cdb812011-05-31 18:26:08 -05003698See \`config.log' for more details." "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003699 fi
3700 fi
3701fi
3702{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3703$as_echo "$cross_compiling" >&6; }
3704
3705rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3706ac_clean_files=$ac_clean_files_save
3707{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3708$as_echo_n "checking for suffix of object files... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05003709if test "${ac_cv_objext+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003710 $as_echo_n "(cached) " >&6
3711else
3712 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003713/* end confdefs.h. */
3714
3715int
3716main ()
3717{
3718
3719 ;
3720 return 0;
3721}
3722_ACEOF
3723rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00003724if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003725case "(($ac_try" in
3726 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3727 *) ac_try_echo=$ac_try;;
3728esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003729eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3730$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003731 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003732 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003733 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3734 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003735 for ac_file in conftest.o conftest.obj conftest.*; do
3736 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00003737 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003738 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003739 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3740 break;;
3741 esac
3742done
3743else
Matthias Kloseb9621712010-04-24 17:59:49 +00003744 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003745sed 's/^/| /' conftest.$ac_ext >&5
3746
Matthias Kloseb9621712010-04-24 17:59:49 +00003747{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3748$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson87cdb812011-05-31 18:26:08 -05003749as_fn_error "cannot compute suffix of object files: cannot compile
3750See \`config.log' for more details." "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003751fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003752rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003753fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003754{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3755$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003756OBJEXT=$ac_cv_objext
3757ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003758{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3759$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05003760if test "${ac_cv_c_compiler_gnu+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003761 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003762else
Matthias Kloseb9621712010-04-24 17:59:49 +00003763 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003764/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003765
Martin v. Löwis11437992002-04-12 09:54:03 +00003766int
3767main ()
3768{
3769#ifndef __GNUC__
3770 choke me
3771#endif
3772
3773 ;
3774 return 0;
3775}
3776_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003777if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00003778 ac_compiler_gnu=yes
3779else
Matthias Kloseb9621712010-04-24 17:59:49 +00003780 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003781fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003782rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003783ac_cv_c_compiler_gnu=$ac_compiler_gnu
3784
3785fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003786{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3787$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3788if test $ac_compiler_gnu = yes; then
3789 GCC=yes
3790else
3791 GCC=
3792fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003793ac_test_CFLAGS=${CFLAGS+set}
3794ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00003795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3796$as_echo_n "checking whether $CC accepts -g... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05003797if test "${ac_cv_prog_cc_g+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003798 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003799else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003800 ac_save_c_werror_flag=$ac_c_werror_flag
3801 ac_c_werror_flag=yes
3802 ac_cv_prog_cc_g=no
3803 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00003804 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003805/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003806
Martin v. Löwis11437992002-04-12 09:54:03 +00003807int
3808main ()
3809{
3810
3811 ;
3812 return 0;
3813}
3814_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003815if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00003816 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003817else
Matthias Kloseb9621712010-04-24 17:59:49 +00003818 CFLAGS=""
3819 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003820/* end confdefs.h. */
3821
3822int
3823main ()
3824{
3825
3826 ;
3827 return 0;
3828}
3829_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003830if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003831
Matthias Kloseb9621712010-04-24 17:59:49 +00003832else
3833 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003834 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00003835 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003836/* end confdefs.h. */
3837
3838int
3839main ()
3840{
3841
3842 ;
3843 return 0;
3844}
3845_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003846if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003847 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00003848fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003849rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003850fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003851rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3852fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003853rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3854 ac_c_werror_flag=$ac_save_c_werror_flag
3855fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003856{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3857$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003858if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003859 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003860elif test $ac_cv_prog_cc_g = yes; then
3861 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003862 CFLAGS="-g -O2"
3863 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003864 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003865 fi
3866else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003867 if test "$GCC" = yes; then
3868 CFLAGS="-O2"
3869 else
3870 CFLAGS=
3871 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003872fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003873{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3874$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05003875if test "${ac_cv_prog_cc_c89+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003876 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003877else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003878 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003879ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00003880cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003881/* end confdefs.h. */
3882#include <stdarg.h>
3883#include <stdio.h>
3884#include <sys/types.h>
3885#include <sys/stat.h>
3886/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3887struct buf { int x; };
3888FILE * (*rcsopen) (struct buf *, struct stat *, int);
3889static char *e (p, i)
3890 char **p;
3891 int i;
3892{
3893 return p[i];
3894}
3895static char *f (char * (*g) (char **, int), char **p, ...)
3896{
3897 char *s;
3898 va_list v;
3899 va_start (v,p);
3900 s = g (p, va_arg (v,int));
3901 va_end (v);
3902 return s;
3903}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003904
3905/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3906 function prototypes and stuff, but not '\xHH' hex character constants.
3907 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003908 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003909 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3910 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003911 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003912int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3913
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003914/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3915 inside strings and character constants. */
3916#define FOO(x) 'x'
3917int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3918
Skip Montanaro6dead952003-09-25 14:50:04 +00003919int test (int i, double x);
3920struct s1 {int (*f) (int a);};
3921struct s2 {int (*f) (double a);};
3922int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3923int argc;
3924char **argv;
3925int
3926main ()
3927{
3928return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3929 ;
3930 return 0;
3931}
3932_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003933for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3934 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003935do
3936 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00003937 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003938 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00003939fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003940rm -f core conftest.err conftest.$ac_objext
3941 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00003942done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003943rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003944CC=$ac_save_CC
3945
3946fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003947# AC_CACHE_VAL
3948case "x$ac_cv_prog_cc_c89" in
3949 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00003950 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3951$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003952 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00003953 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3954$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003955 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003956 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00003957 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3958$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003959esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003960if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00003961
Matthias Kloseb9621712010-04-24 17:59:49 +00003962fi
Skip Montanaro6dead952003-09-25 14:50:04 +00003963
Martin v. Löwis11437992002-04-12 09:54:03 +00003964ac_ext=c
3965ac_cpp='$CPP $CPPFLAGS'
3966ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3967ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3968ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003969
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003970
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003971
3972
Matthias Kloseb9621712010-04-24 17:59:49 +00003973{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
3974$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003975
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003976# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003977if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003978 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003979
3980 case $withval in
3981 no) with_cxx_main=no
3982 MAINCC='$(CC)';;
3983 yes) with_cxx_main=yes
3984 MAINCC='$(CXX)';;
3985 *) with_cxx_main=yes
3986 MAINCC=$withval
3987 if test -z "$CXX"
3988 then
3989 CXX=$withval
3990 fi;;
3991 esac
3992else
3993
3994 with_cxx_main=no
3995 MAINCC='$(CC)'
3996
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003997fi
3998
Matthias Kloseb9621712010-04-24 17:59:49 +00003999{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4000$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004001
4002preset_cxx="$CXX"
4003if test -z "$CXX"
4004then
4005 case "$CC" in
4006 gcc) # Extract the first word of "g++", so it can be a program name with args.
4007set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4009$as_echo_n "checking for $ac_word... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05004010if test "${ac_cv_path_CXX+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004011 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004012else
4013 case $CXX in
4014 [\\/]* | ?:[\\/]*)
4015 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4016 ;;
4017 *)
4018 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4019for as_dir in notfound
4020do
4021 IFS=$as_save_IFS
4022 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004023 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004024 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 +00004025 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004026 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004027 break 2
4028 fi
4029done
Matthias Kloseb9621712010-04-24 17:59:49 +00004030 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004031IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004032
4033 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
4034 ;;
4035esac
4036fi
4037CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004038if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004039 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4040$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004041else
Matthias Kloseb9621712010-04-24 17:59:49 +00004042 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4043$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004044fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004045
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004046 ;;
4047 cc) # Extract the first word of "c++", so it can be a program name with args.
4048set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004049{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4050$as_echo_n "checking for $ac_word... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05004051if test "${ac_cv_path_CXX+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004052 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004053else
4054 case $CXX in
4055 [\\/]* | ?:[\\/]*)
4056 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4057 ;;
4058 *)
4059 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4060for as_dir in notfound
4061do
4062 IFS=$as_save_IFS
4063 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004064 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004065 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 +00004066 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004067 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004068 break 2
4069 fi
4070done
Matthias Kloseb9621712010-04-24 17:59:49 +00004071 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004072IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004073
4074 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
4075 ;;
4076esac
4077fi
4078CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004079if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004080 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4081$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004082else
Matthias Kloseb9621712010-04-24 17:59:49 +00004083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4084$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004085fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004086
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004087 ;;
4088 esac
4089 if test "$CXX" = "notfound"
4090 then
4091 CXX=""
4092 fi
4093fi
4094if test -z "$CXX"
4095then
4096 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4097do
4098 # Extract the first word of "$ac_prog", so it can be a program name with args.
4099set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004100{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4101$as_echo_n "checking for $ac_word... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05004102if test "${ac_cv_prog_CXX+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004103 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004104else
4105 if test -n "$CXX"; then
4106 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4107else
4108as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4109for as_dir in $PATH
4110do
4111 IFS=$as_save_IFS
4112 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004113 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004114 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 +00004115 ac_cv_prog_CXX="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00004116 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004117 break 2
4118 fi
4119done
Matthias Kloseb9621712010-04-24 17:59:49 +00004120 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004121IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004122
4123fi
4124fi
4125CXX=$ac_cv_prog_CXX
4126if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004127 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4128$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004129else
Matthias Kloseb9621712010-04-24 17:59:49 +00004130 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4131$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004132fi
4133
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004134
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004135 test -n "$CXX" && break
4136done
4137test -n "$CXX" || CXX="notfound"
4138
4139 if test "$CXX" = "notfound"
4140 then
4141 CXX=""
4142 fi
4143fi
4144if test "$preset_cxx" != "$CXX"
4145then
Matthias Kloseb9621712010-04-24 17:59:49 +00004146 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004147
4148 By default, distutils will build C++ extension modules with \"$CXX\".
4149 If this is not intended, then set CXX on the configure command line.
4150 " >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00004151$as_echo "$as_me: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004152
4153 By default, distutils will build C++ extension modules with \"$CXX\".
4154 If this is not intended, then set CXX on the configure command line.
4155 " >&2;}
4156fi
4157
4158
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004159{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
4160$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
4161save_LDFLAGS="$LDFLAGS"
4162LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00004163
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004164cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4165/* end confdefs.h. */
4166
4167int
4168main ()
4169{
4170
4171 ;
4172 return 0;
4173}
4174_ACEOF
4175if ac_fn_c_try_link "$LINENO"; then :
4176 NO_AS_NEEDED="-Wl,--no-as-needed"
4177 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4178$as_echo "yes" >&6; }
4179else
4180 NO_AS_NEEDED=""
4181 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4182$as_echo "no" >&6; }
4183fi
4184rm -f core conftest.err conftest.$ac_objext \
4185 conftest$ac_exeext conftest.$ac_ext
4186LDFLAGS="$save_LDFLAGS"
4187
4188
4189
4190# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004191ac_ext=c
4192ac_cpp='$CPP $CPPFLAGS'
4193ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4194ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4195ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Kloseb9621712010-04-24 17:59:49 +00004196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4197$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004198# On Suns, sometimes $CPP names a directory.
4199if test -n "$CPP" && test -d "$CPP"; then
4200 CPP=
4201fi
4202if test -z "$CPP"; then
Benjamin Peterson316e02b2011-05-10 15:01:56 -05004203 if test "${ac_cv_prog_CPP+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004204 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004205else
Martin v. Löwis11437992002-04-12 09:54:03 +00004206 # Double quotes because CPP needs to be expanded
4207 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4208 do
4209 ac_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öwis1d5ecb72001-08-09 10:29:44 +00004216 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004217 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +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
Matthias Kloseb9621712010-04-24 17:59:49 +00004227if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004228
Matthias Kloseb9621712010-04-24 17:59:49 +00004229else
Martin v. Löwis11437992002-04-12 09:54:03 +00004230 # Broken: fails on valid input.
4231continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004232fi
Benjamin Peterson87cdb812011-05-31 18:26:08 -05004233rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004234
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.
Matthias Kloseb9621712010-04-24 17:59:49 +00004237 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004238/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004239#include <ac_nonexistent.h>
4240_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +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
Benjamin Peterson87cdb812011-05-31 18:26:08 -05004249rm -f conftest.err conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004250
4251done
4252# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Benjamin Peterson87cdb812011-05-31 18:26:08 -05004253rm -f conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004254if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004255 break
4256fi
4257
4258 done
4259 ac_cv_prog_CPP=$CPP
4260
4261fi
4262 CPP=$ac_cv_prog_CPP
4263else
4264 ac_cv_prog_CPP=$CPP
4265fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004266{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4267$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004268ac_preproc_ok=false
4269for ac_c_preproc_warn_flag in '' yes
4270do
4271 # Use a header file that comes with gcc, so configuring glibc
4272 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004273 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4274 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004275 # On the NeXT, cc -E runs the code through the compiler's parser,
4276 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004277 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004278/* end confdefs.h. */
4279#ifdef __STDC__
4280# include <limits.h>
4281#else
4282# include <assert.h>
4283#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004284 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004285_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004286if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004287
Matthias Kloseb9621712010-04-24 17:59:49 +00004288else
Martin v. Löwis11437992002-04-12 09:54:03 +00004289 # Broken: fails on valid input.
4290continue
4291fi
Benjamin Peterson87cdb812011-05-31 18:26:08 -05004292rm -f conftest.err conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004293
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004294 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004295 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004296 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004297/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004298#include <ac_nonexistent.h>
4299_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004300if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004301 # Broken: success on invalid input.
4302continue
4303else
Martin v. Löwis11437992002-04-12 09:54:03 +00004304 # Passes both tests.
4305ac_preproc_ok=:
4306break
4307fi
Benjamin Peterson87cdb812011-05-31 18:26:08 -05004308rm -f conftest.err conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004309
4310done
4311# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Benjamin Peterson87cdb812011-05-31 18:26:08 -05004312rm -f conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004313if $ac_preproc_ok; then :
4314
Martin v. Löwis11437992002-04-12 09:54:03 +00004315else
Matthias Kloseb9621712010-04-24 17:59:49 +00004316 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4317$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson87cdb812011-05-31 18:26:08 -05004318as_fn_error "C preprocessor \"$CPP\" fails sanity check
4319See \`config.log' for more details." "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004320fi
4321
4322ac_ext=c
4323ac_cpp='$CPP $CPPFLAGS'
4324ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4325ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4326ac_compiler_gnu=$ac_cv_c_compiler_gnu
4327
4328
Matthias Kloseb9621712010-04-24 17:59:49 +00004329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4330$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05004331if test "${ac_cv_path_GREP+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004332 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004333else
Matthias Kloseb9621712010-04-24 17:59:49 +00004334 if test -z "$GREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004335 ac_path_GREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004336 # Loop through the user's path and test for each of PROGNAME-LIST
4337 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004338for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4339do
4340 IFS=$as_save_IFS
4341 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004342 for ac_prog in grep ggrep; do
4343 for ac_exec_ext in '' $ac_executable_extensions; do
4344 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4345 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
4346# Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004347 # Check for GNU $ac_path_GREP
4348case `"$ac_path_GREP" --version 2>&1` in
4349*GNU*)
4350 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4351*)
4352 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004353 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004354 while :
4355 do
4356 cat "conftest.in" "conftest.in" >"conftest.tmp"
4357 mv "conftest.tmp" "conftest.in"
4358 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00004359 $as_echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004360 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4361 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00004362 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004363 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4364 # Best one so far, save it but keep looking for a better one
4365 ac_cv_path_GREP="$ac_path_GREP"
4366 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00004367 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004368 # 10*(2^10) chars as input seems more than enough
4369 test $ac_count -gt 10 && break
4370 done
4371 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4372esac
4373
Matthias Kloseb9621712010-04-24 17:59:49 +00004374 $ac_path_GREP_found && break 3
4375 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004376 done
Matthias Kloseb9621712010-04-24 17:59:49 +00004377 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004378IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00004379 if test -z "$ac_cv_path_GREP"; then
Benjamin Peterson87cdb812011-05-31 18:26:08 -05004380 as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +00004381 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004382else
4383 ac_cv_path_GREP=$GREP
4384fi
4385
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004386fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004387{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4388$as_echo "$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004389 GREP="$ac_cv_path_GREP"
4390
4391
Matthias Kloseb9621712010-04-24 17:59:49 +00004392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4393$as_echo_n "checking for egrep... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05004394if test "${ac_cv_path_EGREP+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004395 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004396else
4397 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4398 then ac_cv_path_EGREP="$GREP -E"
4399 else
Matthias Kloseb9621712010-04-24 17:59:49 +00004400 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004401 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004402 # Loop through the user's path and test for each of PROGNAME-LIST
4403 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004404for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4405do
4406 IFS=$as_save_IFS
4407 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004408 for ac_prog in egrep; do
4409 for ac_exec_ext in '' $ac_executable_extensions; do
4410 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4411 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
4412# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004413 # Check for GNU $ac_path_EGREP
4414case `"$ac_path_EGREP" --version 2>&1` in
4415*GNU*)
4416 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4417*)
4418 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004419 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004420 while :
4421 do
4422 cat "conftest.in" "conftest.in" >"conftest.tmp"
4423 mv "conftest.tmp" "conftest.in"
4424 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00004425 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004426 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4427 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00004428 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004429 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4430 # Best one so far, save it but keep looking for a better one
4431 ac_cv_path_EGREP="$ac_path_EGREP"
4432 ac_path_EGREP_max=$ac_count
4433 fi
4434 # 10*(2^10) chars as input seems more than enough
4435 test $ac_count -gt 10 && break
4436 done
4437 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4438esac
4439
Matthias Kloseb9621712010-04-24 17:59:49 +00004440 $ac_path_EGREP_found && break 3
4441 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004442 done
Matthias Kloseb9621712010-04-24 17:59:49 +00004443 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004444IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00004445 if test -z "$ac_cv_path_EGREP"; then
Benjamin Peterson87cdb812011-05-31 18:26:08 -05004446 as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +00004447 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004448else
4449 ac_cv_path_EGREP=$EGREP
4450fi
4451
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004452 fi
4453fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004454{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4455$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004456 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00004457
4458
Matthias Kloseb9621712010-04-24 17:59:49 +00004459{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4460$as_echo_n "checking for ANSI C header files... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05004461if test "${ac_cv_header_stdc+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004462 $as_echo_n "(cached) " >&6
4463else
4464 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004465/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00004466#include <stdlib.h>
4467#include <stdarg.h>
4468#include <string.h>
4469#include <float.h>
4470
4471int
4472main ()
4473{
4474
4475 ;
4476 return 0;
4477}
4478_ACEOF
4479if ac_fn_c_try_compile "$LINENO"; then :
4480 ac_cv_header_stdc=yes
4481else
4482 ac_cv_header_stdc=no
4483fi
4484rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4485
4486if test $ac_cv_header_stdc = yes; then
4487 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4488 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4489/* end confdefs.h. */
4490#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004491
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004492_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004493if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00004494 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004495
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004496else
Matthias Kloseb9621712010-04-24 17:59:49 +00004497 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004498fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00004499rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004500
Matthias Kloseb9621712010-04-24 17:59:49 +00004501fi
4502
4503if test $ac_cv_header_stdc = yes; then
4504 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4505 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4506/* end confdefs.h. */
4507#include <stdlib.h>
4508
4509_ACEOF
4510if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4511 $EGREP "free" >/dev/null 2>&1; then :
4512
4513else
4514 ac_cv_header_stdc=no
4515fi
4516rm -f conftest*
4517
4518fi
4519
4520if test $ac_cv_header_stdc = yes; then
4521 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4522 if test "$cross_compiling" = yes; then :
4523 :
4524else
4525 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4526/* end confdefs.h. */
4527#include <ctype.h>
4528#include <stdlib.h>
4529#if ((' ' & 0x0FF) == 0x020)
4530# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4531# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4532#else
4533# define ISLOWER(c) \
4534 (('a' <= (c) && (c) <= 'i') \
4535 || ('j' <= (c) && (c) <= 'r') \
4536 || ('s' <= (c) && (c) <= 'z'))
4537# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4538#endif
4539
4540#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4541int
4542main ()
4543{
4544 int i;
4545 for (i = 0; i < 256; i++)
4546 if (XOR (islower (i), ISLOWER (i))
4547 || toupper (i) != TOUPPER (i))
4548 return 2;
4549 return 0;
4550}
4551_ACEOF
4552if ac_fn_c_try_run "$LINENO"; then :
4553
4554else
4555 ac_cv_header_stdc=no
4556fi
4557rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4558 conftest.$ac_objext conftest.beam conftest.$ac_ext
4559fi
4560
4561fi
4562fi
4563{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4564$as_echo "$ac_cv_header_stdc" >&6; }
4565if test $ac_cv_header_stdc = yes; then
4566
4567$as_echo "#define STDC_HEADERS 1" >>confdefs.h
4568
4569fi
4570
4571# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4572for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4573 inttypes.h stdint.h unistd.h
4574do :
4575 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4576ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4577"
Benjamin Peterson87cdb812011-05-31 18:26:08 -05004578eval as_val=\$$as_ac_Header
4579 if test "x$as_val" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004580 cat >>confdefs.h <<_ACEOF
4581#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4582_ACEOF
4583
4584fi
4585
4586done
4587
4588
4589
4590 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
Benjamin Peterson316e02b2011-05-10 15:01:56 -05004591if test "x$ac_cv_header_minix_config_h" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004592 MINIX=yes
4593else
4594 MINIX=
4595fi
4596
4597
4598 if test "$MINIX" = yes; then
4599
4600$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4601
4602
4603$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4604
4605
4606$as_echo "#define _MINIX 1" >>confdefs.h
4607
4608 fi
4609
4610
4611 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4612$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05004613if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004614 $as_echo_n "(cached) " >&6
4615else
4616 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4617/* end confdefs.h. */
4618
4619# define __EXTENSIONS__ 1
4620 $ac_includes_default
4621int
4622main ()
4623{
4624
4625 ;
4626 return 0;
4627}
4628_ACEOF
4629if ac_fn_c_try_compile "$LINENO"; then :
4630 ac_cv_safe_to_define___extensions__=yes
4631else
4632 ac_cv_safe_to_define___extensions__=no
4633fi
4634rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4635fi
4636{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4637$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4638 test $ac_cv_safe_to_define___extensions__ = yes &&
4639 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4640
4641 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4642
4643 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4644
4645 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4646
4647 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4648
4649
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004650
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004651# Check for unsupported systems
4652case $ac_sys_system/$ac_sys_release in
4653atheos*|Linux*/1*)
4654 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
4655 echo See README for details.
4656 exit 1;;
4657esac
4658
4659
Matthias Kloseb9621712010-04-24 17:59:49 +00004660{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
4661$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004662
4663# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004664if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004665 withval=$with_suffix;
4666 case $withval in
4667 no) EXEEXT=;;
4668 yes) EXEEXT=.exe;;
4669 *) EXEEXT=$withval;;
4670 esac
4671fi
4672
Matthias Kloseb9621712010-04-24 17:59:49 +00004673{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
4674$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004675
4676# Test whether we're running on a non-case-sensitive system, in which
4677# case we give a warning if no ext is given
4678
Matthias Kloseb9621712010-04-24 17:59:49 +00004679{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
4680$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004681if test ! -d CaseSensitiveTestDir; then
4682mkdir CaseSensitiveTestDir
4683fi
4684
4685if test -d casesensitivetestdir
4686then
Matthias Kloseb9621712010-04-24 17:59:49 +00004687 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4688$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004689 BUILDEXEEXT=.exe
4690else
Matthias Kloseb9621712010-04-24 17:59:49 +00004691 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4692$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004693 BUILDEXEEXT=$EXEEXT
4694fi
4695rmdir CaseSensitiveTestDir
4696
4697case $MACHDEP in
4698bsdos*)
4699 case $CC in
4700 gcc) CC="$CC -D_HAVE_BSDI";;
4701 esac;;
4702esac
4703
4704case $ac_sys_system in
4705hp*|HP*)
4706 case $CC in
4707 cc|*/cc) CC="$CC -Ae";;
4708 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004709esac
4710
4711
4712
Matthias Kloseb9621712010-04-24 17:59:49 +00004713{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
4714$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004715if test -z "$LIBRARY"
4716then
Barry Warsawf040d7d2010-10-18 17:09:07 +00004717 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004718fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004719{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
4720$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004721
4722# LDLIBRARY is the name of the library to link against (as opposed to the
4723# name of the library into which to insert object files). BLDLIBRARY is also
4724# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
4725# is blank as the main program is not linked directly against LDLIBRARY.
4726# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
4727# systems without shared libraries, LDLIBRARY is the same as LIBRARY
4728# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
4729# DLLLIBRARY is the shared (i.e., DLL) library.
4730#
4731# RUNSHARED is used to run shared python without installed libraries
4732#
4733# INSTSONAME is the name of the shared library that will be use to install
4734# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004735#
4736# LDVERSION is the shared library version number, normally the Python version
4737# with the ABI build flags appended.
4738
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004739
4740
4741
4742
4743
4744
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00004745
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004746LDLIBRARY="$LIBRARY"
4747BLDLIBRARY='$(LDLIBRARY)'
4748INSTSONAME='$(LDLIBRARY)'
4749DLLLIBRARY=''
4750LDLIBRARYDIR=''
4751RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00004752LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004753
4754# LINKCC is the command that links the python executable -- default is $(CC).
4755# If CXX is set, and if it is needed to link a main function that was
4756# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
4757# python might then depend on the C++ runtime
4758# This is altered for AIX in order to build the export list before
4759# linking.
4760
Matthias Kloseb9621712010-04-24 17:59:49 +00004761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
4762$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004763if test -z "$LINKCC"
4764then
4765 LINKCC='$(PURIFY) $(MAINCC)'
4766 case $ac_sys_system in
4767 AIX*)
4768 exp_extra="\"\""
4769 if test $ac_sys_release -ge 5 -o \
4770 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
4771 exp_extra="."
4772 fi
4773 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004774 QNX*)
4775 # qcc must be used because the other compilers do not
4776 # support -N.
4777 LINKCC=qcc;;
4778 esac
4779fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004780{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
4781$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004782
4783# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
4784# make sure we default having it set to "no": this is used by
4785# distutils.unixccompiler to know if it should add --enable-new-dtags
4786# to linker command lines, and failing to detect GNU ld simply results
4787# in the same bahaviour as before.
4788
Matthias Kloseb9621712010-04-24 17:59:49 +00004789{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
4790$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004791ac_prog=ld
4792if test "$GCC" = yes; then
4793 ac_prog=`$CC -print-prog-name=ld`
4794fi
4795case `"$ac_prog" -V 2>&1 < /dev/null` in
4796 *GNU*)
4797 GNULD=yes;;
4798 *)
4799 GNULD=no;;
4800esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004801{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
4802$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004803
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
4805$as_echo_n "checking for inline... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05004806if test "${ac_cv_c_inline+set}" = set; then :
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004807 $as_echo_n "(cached) " >&6
4808else
4809 ac_cv_c_inline=no
4810for ac_kw in inline __inline__ __inline; do
4811 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4812/* end confdefs.h. */
4813#ifndef __cplusplus
4814typedef int foo_t;
4815static $ac_kw foo_t static_foo () {return 0; }
4816$ac_kw foo_t foo () {return 0; }
4817#endif
4818
4819_ACEOF
4820if ac_fn_c_try_compile "$LINENO"; then :
4821 ac_cv_c_inline=$ac_kw
4822fi
4823rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4824 test "$ac_cv_c_inline" != no && break
4825done
4826
4827fi
4828{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
4829$as_echo "$ac_cv_c_inline" >&6; }
4830
4831case $ac_cv_c_inline in
4832 inline | yes) ;;
4833 *)
4834 case $ac_cv_c_inline in
4835 no) ac_val=;;
4836 *) ac_val=$ac_cv_c_inline;;
4837 esac
4838 cat >>confdefs.h <<_ACEOF
4839#ifndef __cplusplus
4840#define inline $ac_val
4841#endif
4842_ACEOF
4843 ;;
4844esac
4845
4846if test "$ac_cv_c_inline" != no ; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00004847
4848$as_echo "#define USE_INLINE 1" >>confdefs.h
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004849
4850
4851fi
4852
4853
Matthias Kloseb9621712010-04-24 17:59:49 +00004854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
4855$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004856# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004857if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004858 enableval=$enable_shared;
4859fi
4860
4861
4862if test -z "$enable_shared"
4863then
4864 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00004865 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004866 enable_shared="yes";;
4867 *)
4868 enable_shared="no";;
4869 esac
4870fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004871{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
4872$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004873
Matthias Kloseb9621712010-04-24 17:59:49 +00004874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
4875$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004876# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004877if test "${enable_profiling+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004878 enableval=$enable_profiling; ac_save_cc="$CC"
4879 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004880 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004881 ac_enable_profiling="no"
4882else
Matthias Kloseb9621712010-04-24 17:59:49 +00004883 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004884/* end confdefs.h. */
4885int main() { return 0; }
4886_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004887if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004888 ac_enable_profiling="yes"
4889else
Matthias Kloseb9621712010-04-24 17:59:49 +00004890 ac_enable_profiling="no"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004891fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004892rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4893 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004894fi
4895
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004896 CC="$ac_save_cc"
4897fi
4898
Matthias Kloseb9621712010-04-24 17:59:49 +00004899{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_profiling" >&5
4900$as_echo "$ac_enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004901
4902case "$ac_enable_profiling" in
4903 "yes")
4904 BASECFLAGS="-pg $BASECFLAGS"
4905 LDFLAGS="-pg $LDFLAGS"
4906 ;;
4907esac
4908
Matthias Kloseb9621712010-04-24 17:59:49 +00004909{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
4910$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004911
4912# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4913# library that we build, but we do not want to link against it (we
4914# will find it with a -framework option). For this reason there is an
4915# extra variable BLDLIBRARY against which Python and the extension
4916# modules are linked, BLDLIBRARY. This is normally the same as
4917# LDLIBRARY, but empty for MacOSX framework builds.
4918if test "$enable_framework"
4919then
4920 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
4921 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
4922 BLDLIBRARY=''
4923else
4924 BLDLIBRARY='$(LDLIBRARY)'
4925fi
4926
4927# Other platforms follow
4928if test $enable_shared = "yes"; then
4929
Matthias Kloseb9621712010-04-24 17:59:49 +00004930$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004931
4932 case $ac_sys_system in
4933 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004934 LDLIBRARY='libpython$(LDVERSION).dll.a'
4935 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004936 ;;
4937 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004938 LDLIBRARY='libpython$(LDVERSION).so'
4939 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004940 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4941 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004942 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00004943 then
4944 PY3LIBRARY=libpython3.so
4945 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004946 ;;
4947 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004948 LDLIBRARY='libpython$(LDVERSION).so'
4949 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004950 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4951 case $ac_sys_system in
4952 FreeBSD*)
4953 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4954 ;;
4955 esac
4956 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004957 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00004958 then
4959 PY3LIBRARY=libpython3.so
4960 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004961 ;;
4962 hp*|HP*)
4963 case `uname -m` in
4964 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004965 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004966 ;;
4967 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004968 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004969 ;;
4970 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004971 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004972 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
4973 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004974 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004975 LDLIBRARY='libpython$(LDVERSION).dylib'
4976 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004977 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
4978 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00004979 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004980 LDLIBRARY='libpython$(LDVERSION).so'
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00004981 RUNSHARED=LIBPATH=`pwd`:${LIBPATH}
4982 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004983
4984 esac
4985else # shared is disabled
4986 case $ac_sys_system in
4987 CYGWIN*)
4988 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004989 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004990 ;;
4991 esac
4992fi
4993
Matthias Kloseb9621712010-04-24 17:59:49 +00004994{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
4995$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004996
4997if test -n "$ac_tool_prefix"; then
4998 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4999set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005000{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5001$as_echo_n "checking for $ac_word... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05005002if test "${ac_cv_prog_RANLIB+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005003 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005004else
5005 if test -n "$RANLIB"; then
5006 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5007else
5008as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5009for as_dir in $PATH
5010do
5011 IFS=$as_save_IFS
5012 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005013 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005014 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5015 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005016 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005017 break 2
5018 fi
5019done
Matthias Kloseb9621712010-04-24 17:59:49 +00005020 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005021IFS=$as_save_IFS
5022
5023fi
5024fi
5025RANLIB=$ac_cv_prog_RANLIB
5026if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005027 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5028$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005029else
Matthias Kloseb9621712010-04-24 17:59:49 +00005030 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5031$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005032fi
5033
5034
5035fi
5036if test -z "$ac_cv_prog_RANLIB"; then
5037 ac_ct_RANLIB=$RANLIB
5038 # Extract the first word of "ranlib", so it can be a program name with args.
5039set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005040{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5041$as_echo_n "checking for $ac_word... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05005042if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005043 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005044else
5045 if test -n "$ac_ct_RANLIB"; then
5046 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5047else
5048as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5049for as_dir in $PATH
5050do
5051 IFS=$as_save_IFS
5052 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005053 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005054 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5055 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005056 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005057 break 2
5058 fi
5059done
Matthias Kloseb9621712010-04-24 17:59:49 +00005060 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005061IFS=$as_save_IFS
5062
5063fi
5064fi
5065ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5066if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005067 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5068$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005069else
Matthias Kloseb9621712010-04-24 17:59:49 +00005070 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5071$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005072fi
5073
5074 if test "x$ac_ct_RANLIB" = x; then
5075 RANLIB=":"
5076 else
5077 case $cross_compiling:$ac_tool_warned in
5078yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00005079{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5080$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005081ac_tool_warned=yes ;;
5082esac
5083 RANLIB=$ac_ct_RANLIB
5084 fi
5085else
5086 RANLIB="$ac_cv_prog_RANLIB"
5087fi
5088
5089
5090for ac_prog in ar aal
5091do
5092 # Extract the first word of "$ac_prog", so it can be a program name with args.
5093set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5095$as_echo_n "checking for $ac_word... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05005096if test "${ac_cv_prog_AR+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005097 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005098else
5099 if test -n "$AR"; then
5100 ac_cv_prog_AR="$AR" # Let the user override the test.
5101else
5102as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5103for as_dir in $PATH
5104do
5105 IFS=$as_save_IFS
5106 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005107 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005108 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5109 ac_cv_prog_AR="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005110 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005111 break 2
5112 fi
5113done
Matthias Kloseb9621712010-04-24 17:59:49 +00005114 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005115IFS=$as_save_IFS
5116
5117fi
5118fi
5119AR=$ac_cv_prog_AR
5120if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005121 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5122$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005123else
Matthias Kloseb9621712010-04-24 17:59:49 +00005124 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5125$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005126fi
5127
5128
5129 test -n "$AR" && break
5130done
5131test -n "$AR" || AR="ar"
5132
5133
5134# tweak ARFLAGS only if the user didn't set it on the command line
5135
5136if test -z "$ARFLAGS"
5137then
5138 ARFLAGS="rc"
5139fi
5140
5141
Georg Brandl1ca2e792011-03-05 20:51:24 +01005142
5143
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005144
5145if test -e $srcdir/.hg/00changelog.i
5146then
Georg Brandl1ca2e792011-03-05 20:51:24 +01005147# Extract the first word of "hg", so it can be a program name with args.
5148set dummy hg; ac_word=$2
5149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5150$as_echo_n "checking for $ac_word... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05005151if test "${ac_cv_prog_HAS_HG+set}" = set; then :
Georg Brandl1ca2e792011-03-05 20:51:24 +01005152 $as_echo_n "(cached) " >&6
5153else
5154 if test -n "$HAS_HG"; then
5155 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
5156else
5157as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5158for as_dir in $PATH
5159do
5160 IFS=$as_save_IFS
5161 test -z "$as_dir" && as_dir=.
5162 for ac_exec_ext in '' $ac_executable_extensions; do
5163 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5164 ac_cv_prog_HAS_HG="found"
5165 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5166 break 2
5167 fi
5168done
5169 done
5170IFS=$as_save_IFS
5171
5172 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
5173fi
5174fi
5175HAS_HG=$ac_cv_prog_HAS_HG
5176if test -n "$HAS_HG"; then
5177 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
5178$as_echo "$HAS_HG" >&6; }
5179else
5180 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5181$as_echo "no" >&6; }
5182fi
5183
5184
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005185else
5186HAS_HG=no-repository
5187fi
Georg Brandl1ca2e792011-03-05 20:51:24 +01005188if test $HAS_HG = found
5189then
5190 HGVERSION="hg id -i \$(srcdir)"
5191 HGTAG="hg id -t \$(srcdir)"
5192 HGBRANCH="hg id -b \$(srcdir)"
5193else
5194 HGVERSION=""
5195 HGTAG=""
5196 HGBRANCH=""
5197fi
5198
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005199
5200DISABLE_ASDLGEN=""
5201# Extract the first word of "python", so it can be a program name with args.
5202set dummy python; ac_word=$2
5203{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5204$as_echo_n "checking for $ac_word... " >&6; }
5205if test "${ac_cv_prog_HAS_PYTHON+set}" = set; then :
5206 $as_echo_n "(cached) " >&6
5207else
5208 if test -n "$HAS_PYTHON"; then
5209 ac_cv_prog_HAS_PYTHON="$HAS_PYTHON" # Let the user override the test.
5210else
5211as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5212for as_dir in $PATH
5213do
5214 IFS=$as_save_IFS
5215 test -z "$as_dir" && as_dir=.
5216 for ac_exec_ext in '' $ac_executable_extensions; do
5217 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5218 ac_cv_prog_HAS_PYTHON="found"
5219 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5220 break 2
5221 fi
5222done
5223 done
5224IFS=$as_save_IFS
5225
5226 test -z "$ac_cv_prog_HAS_PYTHON" && ac_cv_prog_HAS_PYTHON="not-found"
5227fi
5228fi
5229HAS_PYTHON=$ac_cv_prog_HAS_PYTHON
5230if test -n "$HAS_PYTHON"; then
5231 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_PYTHON" >&5
5232$as_echo "$HAS_PYTHON" >&6; }
5233else
5234 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5235$as_echo "no" >&6; }
5236fi
5237
5238
5239if test $HAS_HG != found -o $HAS_PYTHON != found
5240then
5241 DISABLE_ASDLGEN="@echo hg: $HAS_HG, python: $HAS_PYTHON! cannot run \$(srcdir)/Parser/asdl_c.py #"
5242fi
5243
5244
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005245case $MACHDEP in
5246bsdos*|hp*|HP*)
5247 # install -d does not work on BSDI or HP-UX
5248 if test -z "$INSTALL"
5249 then
5250 INSTALL="${srcdir}/install-sh -c"
5251 fi
5252esac
5253ac_aux_dir=
5254for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005255 for ac_t in install-sh install.sh shtool; do
5256 if test -f "$ac_dir/$ac_t"; then
5257 ac_aux_dir=$ac_dir
5258 ac_install_sh="$ac_aux_dir/$ac_t -c"
5259 break 2
5260 fi
5261 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005262done
5263if test -z "$ac_aux_dir"; then
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005264 as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005265fi
5266
5267# These three variables are undocumented and unsupported,
5268# and are intended to be withdrawn in a future Autoconf release.
5269# They can cause serious problems if a builder's source tree is in a directory
5270# whose full name contains unusual characters.
5271ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
5272ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
5273ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
5274
5275
5276# Find a good install program. We prefer a C program (faster),
5277# so one script is as good as another. But avoid the broken or
5278# incompatible versions:
5279# SysV /etc/install, /usr/sbin/install
5280# SunOS /usr/etc/install
5281# IRIX /sbin/install
5282# AIX /bin/install
5283# AmigaOS /C/install, which installs bootblocks on floppy discs
5284# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5285# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5286# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5287# OS/2's system install, which has a completely different semantic
5288# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00005289# Reject install programs that cannot install multiple files.
5290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
5291$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005292if test -z "$INSTALL"; then
Benjamin Peterson316e02b2011-05-10 15:01:56 -05005293if test "${ac_cv_path_install+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005294 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005295else
5296 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5297for as_dir in $PATH
5298do
5299 IFS=$as_save_IFS
5300 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005301 # Account for people who put trailing slashes in PATH elements.
5302case $as_dir/ in #((
5303 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005304 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00005305 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005306 /usr/ucb/* ) ;;
5307 *)
5308 # OSF1 and SCO ODT 3.0 have their own names for install.
5309 # Don't use installbsd from OSF since it installs stuff as root
5310 # by default.
5311 for ac_prog in ginstall scoinst install; do
5312 for ac_exec_ext in '' $ac_executable_extensions; do
5313 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
5314 if test $ac_prog = install &&
5315 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5316 # AIX install. It has an incompatible calling convention.
5317 :
5318 elif test $ac_prog = install &&
5319 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5320 # program-specific install script used by HP pwplus--don't use.
5321 :
5322 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005323 rm -rf conftest.one conftest.two conftest.dir
5324 echo one > conftest.one
5325 echo two > conftest.two
5326 mkdir conftest.dir
5327 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5328 test -s conftest.one && test -s conftest.two &&
5329 test -s conftest.dir/conftest.one &&
5330 test -s conftest.dir/conftest.two
5331 then
5332 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5333 break 3
5334 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005335 fi
5336 fi
5337 done
5338 done
5339 ;;
5340esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005341
5342 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005343IFS=$as_save_IFS
5344
Matthias Kloseb9621712010-04-24 17:59:49 +00005345rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005346
5347fi
5348 if test "${ac_cv_path_install+set}" = set; then
5349 INSTALL=$ac_cv_path_install
5350 else
5351 # As a last resort, use the slow shell script. Don't cache a
5352 # value for INSTALL within a source directory, because that will
5353 # break other packages using the cache if that directory is
5354 # removed, or if the value is a relative name.
5355 INSTALL=$ac_install_sh
5356 fi
5357fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005358{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
5359$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005360
5361# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5362# It thinks the first close brace ends the variable substitution.
5363test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5364
5365test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
5366
5367test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5368
5369
5370# Not every filesystem supports hard links
5371
5372if test -z "$LN" ; then
5373 case $ac_sys_system in
5374 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005375 *) LN=ln;;
5376 esac
5377fi
5378
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00005379# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005380
5381ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00005382
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005383# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00005384{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
5385$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005386
5387# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005388if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005389 withval=$with_pydebug;
5390if test "$withval" != no
5391then
5392
Matthias Kloseb9621712010-04-24 17:59:49 +00005393$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005394
Matthias Kloseb9621712010-04-24 17:59:49 +00005395 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5396$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005397 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005398 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00005399else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5400$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005401fi
5402else
Matthias Kloseb9621712010-04-24 17:59:49 +00005403 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5404$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005405fi
5406
5407
5408# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
5409# merged with this chunk of code?
5410
5411# Optimizer/debugger flags
5412# ------------------------
5413# (The following bit of code is complicated enough - please keep things
5414# indented properly. Just pretend you're editing Python code. ;-)
5415
5416# There are two parallel sets of case statements below, one that checks to
5417# see if OPT was set and one that does BASECFLAGS setting based upon
5418# compiler and platform. BASECFLAGS tweaks need to be made even if the
5419# user set OPT.
5420
5421# tweak OPT based on compiler and platform, only if the user didn't set
5422# it on the command line
5423
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00005424if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005425then
5426 case $GCC in
5427 yes)
5428 if test "$CC" != 'g++' ; then
5429 STRICT_PROTO="-Wstrict-prototypes"
5430 fi
5431 # For gcc 4.x we need to use -fwrapv so lets check if its supported
5432 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
5433 WRAP="-fwrapv"
5434 fi
5435 case $ac_cv_prog_cc_g in
5436 yes)
5437 if test "$Py_DEBUG" = 'true' ; then
5438 # Optimization messes up debuggers, so turn it off for
5439 # debug builds.
Mark Dickinsonb2153e92010-05-05 22:31:36 +00005440 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005441 else
5442 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
5443 fi
5444 ;;
5445 *)
5446 OPT="-O3 -Wall $STRICT_PROTO"
5447 ;;
5448 esac
5449 case $ac_sys_system in
5450 SCO_SV*) OPT="$OPT -m486 -DSCO5"
5451 ;;
5452 esac
5453 ;;
5454
5455 *)
5456 OPT="-O"
5457 ;;
5458 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005459fi
5460
5461
5462
5463# The -arch flags for universal builds on OSX
5464UNIVERSAL_ARCH_FLAGS=
5465
5466
5467# tweak BASECFLAGS based on compiler and platform
5468case $GCC in
5469yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005470 # Python doesn't violate C99 aliasing rules, but older versions of
5471 # GCC produce warnings for legal Python code. Enable
5472 # -fno-strict-aliasing on versions of GCC that support but produce
5473 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00005474 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
5475$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005476 ac_save_cc="$CC"
5477 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005478 save_CFLAGS="$CFLAGS"
Benjamin Peterson316e02b2011-05-10 15:01:56 -05005479 if test "${ac_cv_no_strict_aliasing+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005480 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00005481else
Matthias Kloseb9621712010-04-24 17:59:49 +00005482 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005483/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005484
Matthias Kloseb159a552010-04-25 21:00:44 +00005485
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005486int
5487main ()
5488{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005489
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005490 ;
5491 return 0;
5492}
Matthias Kloseb159a552010-04-25 21:00:44 +00005493
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005494_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005495if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00005496
5497 CC="$ac_save_cc -fstrict-aliasing"
5498 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
5499 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005500/* end confdefs.h. */
5501
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005502 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005503int
5504main ()
5505{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005506double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005507 ;
5508 return 0;
5509}
Matthias Kloseb159a552010-04-25 21:00:44 +00005510
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005511_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005512if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00005513
5514 ac_cv_no_strict_aliasing=no
5515
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005516else
Matthias Kloseb159a552010-04-25 21:00:44 +00005517
5518 ac_cv_no_strict_aliasing=yes
5519
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005520fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005521rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00005522
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005523else
Matthias Kloseb159a552010-04-25 21:00:44 +00005524
5525 ac_cv_no_strict_aliasing=no
5526
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005527fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005528rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00005529fi
5530
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005531 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005532 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00005533 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
5534$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005535 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005536 then
5537 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
5538 fi
5539
5540 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
5541 # support. Without this, treatment of subnormals doesn't follow
5542 # the standard.
5543 case $ac_sys_machine in
5544 alpha*)
5545 BASECFLAGS="$BASECFLAGS -mieee"
5546 ;;
5547 esac
5548
5549 case $ac_sys_system in
5550 SCO_SV*)
5551 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
5552 ;;
5553 # is there any other compiler on Darwin besides gcc?
5554 Darwin*)
5555 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
5556 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussoren666028b2010-04-18 19:07:43 +00005557 if test "${CC}" = gcc
5558 then
Matthias Kloseb9621712010-04-24 17:59:49 +00005559 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
5560$as_echo_n "checking which compiler should be used... " >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00005561 case "${UNIVERSALSDK}" in
5562 */MacOSX10.4u.sdk)
5563 # Build using 10.4 SDK, force usage of gcc when the
5564 # compiler is gcc, otherwise the user will get very
5565 # confusing error messages when building on OSX 10.6
5566 CC=gcc-4.0
5567 CPP=cpp-4.0
5568 ;;
5569 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005570 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5571$as_echo "$CC" >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00005572 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005573
5574
5575 if test "${enable_universalsdk}"; then
5576 UNIVERSAL_ARCH_FLAGS=""
5577 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
5578 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
5579 ARCH_RUN_32BIT=""
Benjamin Peterson99f03762010-04-11 22:15:28 +00005580 LIPO_32BIT_FLAGS=""
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005581 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
5582 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005583 LIPO_32BIT_FLAGS=""
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005584 ARCH_RUN_32BIT="true"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005585
5586 elif test "$UNIVERSAL_ARCHS" = "all" ; then
5587 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005588 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005589 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005590
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005591 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
5592 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005593 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005594 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005595
5596 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
5597 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005598 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005599 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005600
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005601 else
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005602 as_fn_error "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005603
5604 fi
5605
5606
Ronald Oussoren666028b2010-04-18 19:07:43 +00005607 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
5608 if test "${UNIVERSALSDK}" != "/"
5609 then
5610 CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
5611 LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren712979d2010-04-20 19:51:33 +00005612 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005613 fi
5614 fi
5615
5616 # Calculate the right deployment target for this build.
5617 #
5618 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
5619 if test ${cur_target} '>' 10.2; then
5620 cur_target=10.3
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005621 if test ${enable_universalsdk}; then
5622 if test "${UNIVERSAL_ARCHS}" = "all"; then
5623 # Ensure that the default platform for a
5624 # 4-way universal build is OSX 10.5,
5625 # that's the first OS release where
5626 # 4-way builds make sense.
5627 cur_target='10.5'
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005628
5629 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
5630 cur_target='10.5'
5631
5632 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
5633 cur_target='10.5'
5634
5635 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
5636 cur_target='10.5'
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005637 fi
5638 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00005639 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005640 # On Intel macs default to a deployment
5641 # target of 10.4, that's the first OSX
5642 # release with Intel support.
5643 cur_target="10.4"
5644 fi
5645 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005646 fi
5647 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
5648
5649 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
5650 # environment with a value that is the same as what we'll use
5651 # in the Makefile to ensure that we'll get the same compiler
5652 # environment during configure and build time.
5653 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
5654 export MACOSX_DEPLOYMENT_TARGET
5655 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
5656
5657 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005658 esac
5659 ;;
5660
5661*)
5662 case $ac_sys_system in
5663 OpenUNIX*|UnixWare*)
5664 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
5665 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005666 SCO_SV*)
5667 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
5668 ;;
5669 esac
5670 ;;
5671esac
5672
5673if test "$Py_DEBUG" = 'true'; then
5674 :
5675else
5676 OPT="-DNDEBUG $OPT"
5677fi
5678
5679if test "$ac_arch_flags"
5680then
5681 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
5682fi
5683
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005684# Check whether GCC supports PyArg_ParseTuple format
5685if test "$GCC" = "yes"
5686then
Matthias Kloseb9621712010-04-24 17:59:49 +00005687 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5
5688$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005689 save_CFLAGS=$CFLAGS
5690 CFLAGS="$CFLAGS -Werror"
Matthias Kloseb9621712010-04-24 17:59:49 +00005691 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005692/* end confdefs.h. */
5693
5694 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005695int
5696main ()
5697{
5698
5699 ;
5700 return 0;
5701}
Matthias Kloseb159a552010-04-25 21:00:44 +00005702
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005703_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005704if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005705
Matthias Kloseb159a552010-04-25 21:00:44 +00005706
Matthias Kloseb9621712010-04-24 17:59:49 +00005707$as_echo "#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005708
Matthias Kloseb159a552010-04-25 21:00:44 +00005709 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00005710$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00005711
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005712else
Matthias Kloseb159a552010-04-25 21:00:44 +00005713
5714 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00005715$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005716
5717fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005718rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5719 CFLAGS=$save_CFLAGS
5720fi
5721
5722# On some compilers, pthreads are available without further options
5723# (e.g. MacOS X). On some of these systems, the compiler will not
5724# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
5725# So we have to see first whether pthreads are available without
5726# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00005727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
5728$as_echo_n "checking whether pthreads are available without options... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05005729if test "${ac_cv_pthread_is_default+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005730 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005731else
Matthias Kloseb9621712010-04-24 17:59:49 +00005732 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005733 ac_cv_pthread_is_default=no
5734else
Matthias Kloseb9621712010-04-24 17:59:49 +00005735 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005736/* end confdefs.h. */
5737
5738#include <pthread.h>
5739
5740void* routine(void* p){return NULL;}
5741
5742int main(){
5743 pthread_t p;
5744 if(pthread_create(&p,NULL,routine,NULL)!=0)
5745 return 1;
5746 (void)pthread_detach(p);
5747 return 0;
5748}
5749
5750_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005751if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005752
5753 ac_cv_pthread_is_default=yes
5754 ac_cv_kthread=no
5755 ac_cv_pthread=no
5756
5757else
Matthias Kloseb9621712010-04-24 17:59:49 +00005758 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005759fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005760rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5761 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005762fi
5763
5764
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005765fi
5766
Matthias Kloseb9621712010-04-24 17:59:49 +00005767{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
5768$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005769
5770
5771if test $ac_cv_pthread_is_default = yes
5772then
5773 ac_cv_kpthread=no
5774else
5775# -Kpthread, if available, provides the right #defines
5776# and linker options to make pthread_create available
5777# Some compilers won't report that they do not support -Kpthread,
5778# so we need to run a program to see whether it really made the
5779# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005780{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
5781$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05005782if test "${ac_cv_kpthread+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005783 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005784else
5785 ac_save_cc="$CC"
5786CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005787if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005788 ac_cv_kpthread=no
5789else
Matthias Kloseb9621712010-04-24 17:59:49 +00005790 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005791/* end confdefs.h. */
5792
5793#include <pthread.h>
5794
5795void* routine(void* p){return NULL;}
5796
5797int main(){
5798 pthread_t p;
5799 if(pthread_create(&p,NULL,routine,NULL)!=0)
5800 return 1;
5801 (void)pthread_detach(p);
5802 return 0;
5803}
5804
5805_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005806if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005807 ac_cv_kpthread=yes
5808else
Matthias Kloseb9621712010-04-24 17:59:49 +00005809 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005810fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005811rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5812 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005813fi
5814
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005815CC="$ac_save_cc"
5816fi
5817
Matthias Kloseb9621712010-04-24 17:59:49 +00005818{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
5819$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005820fi
5821
5822if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
5823then
5824# -Kthread, if available, provides the right #defines
5825# and linker options to make pthread_create available
5826# Some compilers won't report that they do not support -Kthread,
5827# so we need to run a program to see whether it really made the
5828# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005829{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
5830$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05005831if test "${ac_cv_kthread+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005832 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005833else
5834 ac_save_cc="$CC"
5835CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005836if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005837 ac_cv_kthread=no
5838else
Matthias Kloseb9621712010-04-24 17:59:49 +00005839 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005840/* end confdefs.h. */
5841
5842#include <pthread.h>
5843
5844void* routine(void* p){return NULL;}
5845
5846int main(){
5847 pthread_t p;
5848 if(pthread_create(&p,NULL,routine,NULL)!=0)
5849 return 1;
5850 (void)pthread_detach(p);
5851 return 0;
5852}
5853
5854_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005855if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005856 ac_cv_kthread=yes
5857else
Matthias Kloseb9621712010-04-24 17:59:49 +00005858 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005859fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005860rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5861 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005862fi
5863
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005864CC="$ac_save_cc"
5865fi
5866
Matthias Kloseb9621712010-04-24 17:59:49 +00005867{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
5868$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005869fi
5870
5871if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
5872then
5873# -pthread, if available, provides the right #defines
5874# and linker options to make pthread_create available
5875# Some compilers won't report that they do not support -pthread,
5876# so we need to run a program to see whether it really made the
5877# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005878{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
5879$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05005880if test "${ac_cv_thread+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005881 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005882else
5883 ac_save_cc="$CC"
5884CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005885if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005886 ac_cv_pthread=no
5887else
Matthias Kloseb9621712010-04-24 17:59:49 +00005888 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005889/* end confdefs.h. */
5890
5891#include <pthread.h>
5892
5893void* routine(void* p){return NULL;}
5894
5895int main(){
5896 pthread_t p;
5897 if(pthread_create(&p,NULL,routine,NULL)!=0)
5898 return 1;
5899 (void)pthread_detach(p);
5900 return 0;
5901}
5902
5903_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005904if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005905 ac_cv_pthread=yes
5906else
Matthias Kloseb9621712010-04-24 17:59:49 +00005907 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005908fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005909rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5910 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005911fi
5912
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005913CC="$ac_save_cc"
5914fi
5915
Matthias Kloseb9621712010-04-24 17:59:49 +00005916{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
5917$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005918fi
5919
5920# If we have set a CC compiler flag for thread support then
5921# check if it works for CXX, too.
5922ac_cv_cxx_thread=no
5923if test ! -z "$CXX"
5924then
Matthias Kloseb9621712010-04-24 17:59:49 +00005925{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
5926$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005927ac_save_cxx="$CXX"
5928
5929if test "$ac_cv_kpthread" = "yes"
5930then
5931 CXX="$CXX -Kpthread"
5932 ac_cv_cxx_thread=yes
5933elif test "$ac_cv_kthread" = "yes"
5934then
5935 CXX="$CXX -Kthread"
5936 ac_cv_cxx_thread=yes
5937elif test "$ac_cv_pthread" = "yes"
5938then
5939 CXX="$CXX -pthread"
5940 ac_cv_cxx_thread=yes
5941fi
5942
5943if test $ac_cv_cxx_thread = yes
5944then
5945 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5946 $CXX -c conftest.$ac_ext 2>&5
5947 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5948 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5949 then
5950 ac_cv_cxx_thread=yes
5951 else
5952 ac_cv_cxx_thread=no
5953 fi
5954 rm -fr conftest*
5955fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005956{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
5957$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005958fi
5959CXX="$ac_save_cxx"
5960
5961
5962# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00005963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5964$as_echo_n "checking for ANSI C header files... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05005965if test "${ac_cv_header_stdc+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005966 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005967else
Matthias Kloseb9621712010-04-24 17:59:49 +00005968 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005969/* end confdefs.h. */
5970#include <stdlib.h>
5971#include <stdarg.h>
5972#include <string.h>
5973#include <float.h>
5974
5975int
5976main ()
5977{
5978
5979 ;
5980 return 0;
5981}
5982_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005983if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005984 ac_cv_header_stdc=yes
5985else
Matthias Kloseb9621712010-04-24 17:59:49 +00005986 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005987fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005988rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5989
5990if test $ac_cv_header_stdc = yes; then
5991 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00005992 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005993/* end confdefs.h. */
5994#include <string.h>
5995
5996_ACEOF
5997if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005998 $EGREP "memchr" >/dev/null 2>&1; then :
5999
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006000else
6001 ac_cv_header_stdc=no
6002fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006003rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006004
6005fi
6006
6007if test $ac_cv_header_stdc = yes; then
6008 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00006009 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006010/* end confdefs.h. */
6011#include <stdlib.h>
6012
6013_ACEOF
6014if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006015 $EGREP "free" >/dev/null 2>&1; then :
6016
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006017else
6018 ac_cv_header_stdc=no
6019fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006020rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006021
6022fi
6023
6024if test $ac_cv_header_stdc = yes; then
6025 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00006026 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006027 :
6028else
Matthias Kloseb9621712010-04-24 17:59:49 +00006029 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006030/* end confdefs.h. */
6031#include <ctype.h>
6032#include <stdlib.h>
6033#if ((' ' & 0x0FF) == 0x020)
6034# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6035# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6036#else
6037# define ISLOWER(c) \
6038 (('a' <= (c) && (c) <= 'i') \
6039 || ('j' <= (c) && (c) <= 'r') \
6040 || ('s' <= (c) && (c) <= 'z'))
6041# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6042#endif
6043
6044#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6045int
6046main ()
6047{
6048 int i;
6049 for (i = 0; i < 256; i++)
6050 if (XOR (islower (i), ISLOWER (i))
6051 || toupper (i) != TOUPPER (i))
6052 return 2;
6053 return 0;
6054}
6055_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006056if ac_fn_c_try_run "$LINENO"; then :
6057
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006058else
Matthias Kloseb9621712010-04-24 17:59:49 +00006059 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006060fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006061rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6062 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006063fi
6064
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006065fi
6066fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006067{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6068$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006069if test $ac_cv_header_stdc = yes; then
6070
Matthias Kloseb9621712010-04-24 17:59:49 +00006071$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006072
6073fi
6074
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006075for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
6076fcntl.h grp.h \
Christian Heimesbbe741d2008-03-28 10:53:29 +00006077ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Thomas Wouters89f507f2006-12-13 04:49:30 +00006078shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00006079unistd.h utime.h \
Christian Heimes4fbc72b2008-03-22 00:47:35 +00006080sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
6081sys/lock.h sys/mkdev.h sys/modem.h \
Georg Brandl941f9562011-02-25 15:21:47 +00006082sys/param.h sys/poll.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
6083sys/stat.h sys/termio.h sys/time.h \
6084sys/times.h sys/types.h sys/uio.h sys/un.h sys/utsname.h sys/wait.h pty.h \
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07006085libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Ronald Oussoren755740f2010-02-07 19:56:39 +00006086bluetooth/bluetooth.h linux/tipc.h spawn.h util.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006087do :
6088 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6089ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006090eval as_val=\$$as_ac_Header
6091 if test "x$as_val" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006092 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006093#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006094_ACEOF
6095
6096fi
6097
Guido van Rossum627b2d71993-12-24 10:39:16 +00006098done
6099
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006100ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006101for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00006102 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
6104$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006105if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006106 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006107else
Matthias Kloseb9621712010-04-24 17:59:49 +00006108 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006109/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006110#include <sys/types.h>
6111#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00006112
Martin v. Löwis11437992002-04-12 09:54:03 +00006113int
6114main ()
6115{
6116if ((DIR *) 0)
6117return 0;
6118 ;
6119 return 0;
6120}
6121_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006122if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006123 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00006124else
Matthias Kloseb9621712010-04-24 17:59:49 +00006125 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006126fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006127rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006128fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006129eval ac_res=\$$as_ac_Header
6130 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6131$as_echo "$ac_res" >&6; }
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006132eval as_val=\$$as_ac_Header
6133 if test "x$as_val" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006134 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006135#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006136_ACEOF
6137
6138ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00006139fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006140
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006141done
6142# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6143if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006144 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6145$as_echo_n "checking for library containing opendir... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006146if test "${ac_cv_search_opendir+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006147 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006148else
Martin v. Löwis11437992002-04-12 09:54:03 +00006149 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006150cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006151/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006152
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006153/* Override any GCC internal prototype to avoid an error.
6154 Use char because int might match the return type of a GCC
6155 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006156#ifdef __cplusplus
6157extern "C"
6158#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006159char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006160int
6161main ()
6162{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006163return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006164 ;
6165 return 0;
6166}
6167_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006168for ac_lib in '' dir; do
6169 if test -z "$ac_lib"; then
6170 ac_res="none required"
6171 else
6172 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006173 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006174 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006175 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006176 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006177fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006178rm -f core conftest.err conftest.$ac_objext \
6179 conftest$ac_exeext
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006180 if test "${ac_cv_search_opendir+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006181 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006182fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006183done
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006184if test "${ac_cv_search_opendir+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006185
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006186else
6187 ac_cv_search_opendir=no
6188fi
6189rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006190LIBS=$ac_func_search_save_LIBS
6191fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006192{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6193$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006194ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006195if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006196 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00006197
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006198fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006199
Michael W. Hudson54241132001-12-07 15:38:26 +00006200else
Matthias Kloseb9621712010-04-24 17:59:49 +00006201 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6202$as_echo_n "checking for library containing opendir... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006203if test "${ac_cv_search_opendir+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006204 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006205else
6206 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006207cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006208/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006209
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006210/* Override any GCC internal prototype to avoid an error.
6211 Use char because int might match the return type of a GCC
6212 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006213#ifdef __cplusplus
6214extern "C"
6215#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006216char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006217int
6218main ()
6219{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006220return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006221 ;
6222 return 0;
6223}
6224_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006225for ac_lib in '' x; do
6226 if test -z "$ac_lib"; then
6227 ac_res="none required"
6228 else
6229 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006230 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006231 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006232 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006233 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006234fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006235rm -f core conftest.err conftest.$ac_objext \
6236 conftest$ac_exeext
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006237 if test "${ac_cv_search_opendir+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006238 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006239fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006240done
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006241if test "${ac_cv_search_opendir+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006242
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006243else
6244 ac_cv_search_opendir=no
6245fi
6246rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006247LIBS=$ac_func_search_save_LIBS
6248fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006249{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6250$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006251ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006252if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006253 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006254
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006255fi
6256
6257fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006258
Matthias Kloseb9621712010-04-24 17:59:49 +00006259{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
6260$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006261if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006262 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006263else
Matthias Kloseb9621712010-04-24 17:59:49 +00006264 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006265/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006266#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006267int
6268main ()
6269{
6270return makedev(0, 0);
6271 ;
6272 return 0;
6273}
6274_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006275if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006276 ac_cv_header_sys_types_h_makedev=yes
6277else
Matthias Kloseb9621712010-04-24 17:59:49 +00006278 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006279fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006280rm -f core conftest.err conftest.$ac_objext \
6281 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006282
6283fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006284{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
6285$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006286
6287if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006288ac_fn_c_check_header_mongrel "$LINENO" "sys/mkdev.h" "ac_cv_header_sys_mkdev_h" "$ac_includes_default"
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006289if test "x$ac_cv_header_sys_mkdev_h" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006290
Matthias Kloseb9621712010-04-24 17:59:49 +00006291$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006292
6293fi
6294
6295
6296
6297 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006298 ac_fn_c_check_header_mongrel "$LINENO" "sys/sysmacros.h" "ac_cv_header_sys_sysmacros_h" "$ac_includes_default"
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006299if test "x$ac_cv_header_sys_sysmacros_h" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006300
Matthias Kloseb9621712010-04-24 17:59:49 +00006301$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006302
6303fi
6304
6305
6306 fi
6307fi
6308
Michael W. Hudson54241132001-12-07 15:38:26 +00006309
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07006310# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
6311for ac_header in net/if.h
6312do :
6313 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
6314#ifdef STDC_HEADERS
6315# include <stdlib.h>
6316# include <stddef.h>
6317#else
6318# ifdef HAVE_STDLIB_H
6319# include <stdlib.h>
6320# endif
6321#endif
6322#ifdef HAVE_SYS_SOCKET_H
6323# include <sys/socket.h>
6324#endif
6325
6326"
6327if test "x$ac_cv_header_net_if_h" = x""yes; then :
6328 cat >>confdefs.h <<_ACEOF
6329#define HAVE_NET_IF_H 1
6330_ACEOF
6331
6332fi
6333
6334done
6335
6336
6337
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006338# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006339for ac_header in term.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006340do :
6341 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006342#ifdef HAVE_CURSES_H
6343#include <curses.h>
6344#endif
6345
Matthias Kloseb9621712010-04-24 17:59:49 +00006346"
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006347if test "x$ac_cv_header_term_h" = x""yes; then :
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006348 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006349#define HAVE_TERM_H 1
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006350_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006351
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006352fi
6353
6354done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006355
6356
Martin v. Löwis11017b12006-01-14 18:12:57 +00006357# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00006358for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006359do :
6360 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 +00006361#ifdef HAVE_ASM_TYPES_H
6362#include <asm/types.h>
6363#endif
6364#ifdef HAVE_SYS_SOCKET_H
6365#include <sys/socket.h>
6366#endif
6367
Matthias Kloseb9621712010-04-24 17:59:49 +00006368"
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006369if test "x$ac_cv_header_linux_netlink_h" = x""yes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00006370 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006371#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006372_ACEOF
6373
6374fi
6375
6376done
6377
6378
Guido van Rossum627b2d71993-12-24 10:39:16 +00006379# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006380was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006381{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
6382$as_echo_n "checking for clock_t in time.h... " >&6; }
6383cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006384/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006385#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006386
6387_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006388if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006389 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00006390 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006391else
Martin v. Löwis11437992002-04-12 09:54:03 +00006392
6393
Matthias Kloseb9621712010-04-24 17:59:49 +00006394$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00006395
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006396
Guido van Rossum627b2d71993-12-24 10:39:16 +00006397fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006398rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006399
Matthias Kloseb9621712010-04-24 17:59:49 +00006400{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
6401$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006402
Matthias Kloseb9621712010-04-24 17:59:49 +00006403{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
6404$as_echo_n "checking for makedev... " >&6; }
6405cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006406/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00006407
Jesus Cea740f53a2010-04-28 11:35:30 +00006408#if defined(MAJOR_IN_MKDEV)
6409#include <sys/mkdev.h>
6410#elif defined(MAJOR_IN_SYSMACROS)
6411#include <sys/sysmacros.h>
6412#else
6413#include <sys/types.h>
6414#endif
6415
Neal Norwitz11690112002-07-30 01:08:28 +00006416int
6417main ()
6418{
Jesus Cea740f53a2010-04-28 11:35:30 +00006419
6420 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00006421 ;
6422 return 0;
6423}
Matthias Kloseb159a552010-04-25 21:00:44 +00006424
Neal Norwitz11690112002-07-30 01:08:28 +00006425_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006426if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006427 ac_cv_has_makedev=yes
6428else
Matthias Kloseb9621712010-04-24 17:59:49 +00006429 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006430fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006431rm -f core conftest.err conftest.$ac_objext \
6432 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006433{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
6434$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006435if test "$ac_cv_has_makedev" = "yes"; then
6436
Matthias Kloseb9621712010-04-24 17:59:49 +00006437$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006438
6439fi
6440
Martin v. Löwis399a6892002-10-04 10:22:02 +00006441# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6442# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6443# defined, but the compiler does not support pragma redefine_extname,
6444# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6445# structures (such as rlimit64) without declaring them. As a
6446# work-around, disable LFS on such configurations
6447
6448use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00006449{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
6450$as_echo_n "checking Solaris LFS bug... " >&6; }
6451cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006452/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006453
6454#define _LARGEFILE_SOURCE 1
6455#define _FILE_OFFSET_BITS 64
6456#include <sys/resource.h>
6457
Martin v. Löwis399a6892002-10-04 10:22:02 +00006458int
6459main ()
6460{
6461struct rlimit foo;
6462 ;
6463 return 0;
6464}
6465_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006466if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00006467 sol_lfs_bug=no
6468else
Matthias Kloseb9621712010-04-24 17:59:49 +00006469 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006470fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006471rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006472{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
6473$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006474if test "$sol_lfs_bug" = "yes"; then
6475 use_lfs=no
6476fi
6477
6478if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006479# Two defines needed to enable largefile support on various platforms
6480# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00006481case $ac_sys_system/$ac_sys_release in
6482AIX*)
6483
6484$as_echo "#define _LARGE_FILES 1" >>confdefs.h
6485
6486 ;;
6487esac
Guido van Rossum810cc512001-09-09 23:51:39 +00006488
Matthias Kloseb9621712010-04-24 17:59:49 +00006489$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006490
6491
Matthias Kloseb9621712010-04-24 17:59:49 +00006492$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00006493
Martin v. Löwis399a6892002-10-04 10:22:02 +00006494fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006495
Guido van Rossum84e7b241996-08-19 21:59:00 +00006496# Add some code to confdefs.h so that the test for off_t works on SCO
6497cat >> confdefs.h <<\EOF
6498#if defined(SCO_DS)
6499#undef _OFF_T
6500#endif
6501EOF
6502
Guido van Rossumef2255b2000-03-10 22:30:29 +00006503# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00006504ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006505if test "x$ac_cv_type_mode_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006506
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006507else
Martin v. Löwis11437992002-04-12 09:54:03 +00006508
6509cat >>confdefs.h <<_ACEOF
6510#define mode_t int
6511_ACEOF
6512
6513fi
6514
Matthias Kloseb9621712010-04-24 17:59:49 +00006515ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006516if test "x$ac_cv_type_off_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006517
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006518else
Martin v. Löwis11437992002-04-12 09:54:03 +00006519
6520cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006521#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006522_ACEOF
6523
6524fi
6525
Matthias Kloseb9621712010-04-24 17:59:49 +00006526ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006527if test "x$ac_cv_type_pid_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006528
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006529else
Martin v. Löwis11437992002-04-12 09:54:03 +00006530
6531cat >>confdefs.h <<_ACEOF
6532#define pid_t int
6533_ACEOF
6534
6535fi
6536
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006537
Martin v. Löwis11437992002-04-12 09:54:03 +00006538cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00006539#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00006540_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006541
Matthias Kloseb9621712010-04-24 17:59:49 +00006542ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006543if test "x$ac_cv_type_size_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006544
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006545else
Martin v. Löwis11437992002-04-12 09:54:03 +00006546
6547cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006548#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00006549_ACEOF
6550
6551fi
6552
Matthias Kloseb9621712010-04-24 17:59:49 +00006553{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
6554$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006555if test "${ac_cv_type_uid_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006556 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006557else
Matthias Kloseb9621712010-04-24 17:59:49 +00006558 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006559/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006560#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006561
6562_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006563if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006564 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006565 ac_cv_type_uid_t=yes
6566else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006567 ac_cv_type_uid_t=no
6568fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006569rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006570
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006571fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006572{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
6573$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00006574if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006575
Matthias Kloseb9621712010-04-24 17:59:49 +00006576$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006577
6578
Matthias Kloseb9621712010-04-24 17:59:49 +00006579$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006580
6581fi
6582
Matthias Kloseb9621712010-04-24 17:59:49 +00006583ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
6584case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006585 no|yes) ;; #(
6586 *)
6587
Matthias Kloseb9621712010-04-24 17:59:49 +00006588$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006589
6590
6591cat >>confdefs.h <<_ACEOF
6592#define uint32_t $ac_cv_c_uint32_t
6593_ACEOF
6594;;
6595 esac
6596
Matthias Kloseb9621712010-04-24 17:59:49 +00006597ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
6598case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006599 no|yes) ;; #(
6600 *)
6601
Matthias Kloseb9621712010-04-24 17:59:49 +00006602$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006603
6604
6605cat >>confdefs.h <<_ACEOF
6606#define uint64_t $ac_cv_c_uint64_t
6607_ACEOF
6608;;
6609 esac
6610
Matthias Kloseb9621712010-04-24 17:59:49 +00006611ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
6612case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006613 no|yes) ;; #(
6614 *)
6615
6616cat >>confdefs.h <<_ACEOF
6617#define int32_t $ac_cv_c_int32_t
6618_ACEOF
6619;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00006620esac
6621
Matthias Kloseb9621712010-04-24 17:59:49 +00006622ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
6623case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006624 no|yes) ;; #(
6625 *)
6626
6627cat >>confdefs.h <<_ACEOF
6628#define int64_t $ac_cv_c_int64_t
6629_ACEOF
6630;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006631esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00006632
Matthias Kloseb9621712010-04-24 17:59:49 +00006633ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006634if test "x$ac_cv_type_ssize_t" = x""yes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006635
Matthias Kloseb9621712010-04-24 17:59:49 +00006636$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00006637
6638fi
6639
Jack Jansendd19cf82001-12-06 22:36:17 +00006640
Michael W. Hudson54241132001-12-07 15:38:26 +00006641# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00006642# ANSI C requires sizeof(char) == 1, so no need to check it
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.
Matthias Kloseb9621712010-04-24 17:59:49 +00006647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
6648$as_echo_n "checking size of int... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006649if test "${ac_cv_sizeof_int+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006650 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006651else
Matthias Kloseb9621712010-04-24 17:59:49 +00006652 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 +00006653
Martin v. Löwis11437992002-04-12 09:54:03 +00006654else
Matthias Kloseb9621712010-04-24 17:59:49 +00006655 if test "$ac_cv_type_int" = yes; then
6656 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6657$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006658{ as_fn_set_status 77
6659as_fn_error "cannot compute sizeof (int)
6660See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006661 else
6662 ac_cv_sizeof_int=0
6663 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006664fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006665
Martin v. Löwis11437992002-04-12 09:54:03 +00006666fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006667{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
6668$as_echo "$ac_cv_sizeof_int" >&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 Rossumccaf3b61996-12-06 21:19:16 +00006673#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00006674_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +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.
Matthias Kloseb9621712010-04-24 17:59:49 +00006681{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
6682$as_echo_n "checking size of long... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006683if test "${ac_cv_sizeof_long+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006684 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006685else
Matthias Kloseb9621712010-04-24 17:59:49 +00006686 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 +00006687
Martin v. Löwis11437992002-04-12 09:54:03 +00006688else
Matthias Kloseb9621712010-04-24 17:59:49 +00006689 if test "$ac_cv_type_long" = yes; then
6690 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6691$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006692{ as_fn_set_status 77
6693as_fn_error "cannot compute sizeof (long)
6694See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006695 else
6696 ac_cv_sizeof_long=0
6697 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006698fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006699
Martin v. Löwis11437992002-04-12 09:54:03 +00006700fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006701{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
6702$as_echo "$ac_cv_sizeof_long" >&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 Rossumccaf3b61996-12-06 21:19:16 +00006707#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006708_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +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.
Matthias Kloseb9621712010-04-24 17:59:49 +00006715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
6716$as_echo_n "checking size of void *... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006717if test "${ac_cv_sizeof_void_p+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006718 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006719else
Matthias Kloseb9621712010-04-24 17:59:49 +00006720 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 +00006721
Martin v. Löwis11437992002-04-12 09:54:03 +00006722else
Matthias Kloseb9621712010-04-24 17:59:49 +00006723 if test "$ac_cv_type_void_p" = yes; then
6724 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6725$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006726{ as_fn_set_status 77
6727as_fn_error "cannot compute sizeof (void *)
6728See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006729 else
6730 ac_cv_sizeof_void_p=0
6731 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006732fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006733
Martin v. Löwis11437992002-04-12 09:54:03 +00006734fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006735{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
6736$as_echo "$ac_cv_sizeof_void_p" >&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 Rossumad678af1998-10-02 14:42:15 +00006741#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00006742_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +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.
Matthias Kloseb9621712010-04-24 17:59:49 +00006749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
6750$as_echo_n "checking size of short... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006751if test "${ac_cv_sizeof_short+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006752 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006753else
Matthias Kloseb9621712010-04-24 17:59:49 +00006754 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 +00006755
Martin v. Löwis11437992002-04-12 09:54:03 +00006756else
Matthias Kloseb9621712010-04-24 17:59:49 +00006757 if test "$ac_cv_type_short" = yes; then
6758 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6759$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006760{ as_fn_set_status 77
6761as_fn_error "cannot compute sizeof (short)
6762See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006763 else
6764 ac_cv_sizeof_short=0
6765 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006766fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006767
Martin v. Löwis11437992002-04-12 09:54:03 +00006768fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006769{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
6770$as_echo "$ac_cv_sizeof_short" >&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_SHORT $ac_cv_sizeof_short
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.
Matthias Kloseb9621712010-04-24 17:59:49 +00006783{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
6784$as_echo_n "checking size of float... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006785if test "${ac_cv_sizeof_float+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006786 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006787else
Matthias Kloseb9621712010-04-24 17:59:49 +00006788 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 +00006789
Martin v. Löwis11437992002-04-12 09:54:03 +00006790else
Matthias Kloseb9621712010-04-24 17:59:49 +00006791 if test "$ac_cv_type_float" = yes; then
6792 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6793$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006794{ as_fn_set_status 77
6795as_fn_error "cannot compute sizeof (float)
6796See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006797 else
6798 ac_cv_sizeof_float=0
6799 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006800fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006801
Martin v. Löwis11437992002-04-12 09:54:03 +00006802fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006803{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
6804$as_echo "$ac_cv_sizeof_float" >&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 Rossumef2255b2000-03-10 22:30:29 +00006809#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00006810_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006811
6812
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.
Matthias Kloseb9621712010-04-24 17:59:49 +00006817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
6818$as_echo_n "checking size of double... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006819if test "${ac_cv_sizeof_double+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006820 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006821else
Matthias Kloseb9621712010-04-24 17:59:49 +00006822 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 +00006823
Martin v. Löwis11437992002-04-12 09:54:03 +00006824else
Matthias Kloseb9621712010-04-24 17:59:49 +00006825 if test "$ac_cv_type_double" = yes; then
6826 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6827$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006828{ as_fn_set_status 77
6829as_fn_error "cannot compute sizeof (double)
6830See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006831 else
6832 ac_cv_sizeof_double=0
6833 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006834fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006835
Martin v. Löwis11437992002-04-12 09:54:03 +00006836fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006837{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
6838$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006839
6840
6841
Martin v. Löwis11437992002-04-12 09:54:03 +00006842cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006843#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00006844_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006845
6846
Thomas Wouters47b49bf2007-08-30 22:15:33 +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.
Matthias Kloseb9621712010-04-24 17:59:49 +00006851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
6852$as_echo_n "checking size of fpos_t... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006853if test "${ac_cv_sizeof_fpos_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006854 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006855else
Matthias Kloseb9621712010-04-24 17:59:49 +00006856 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 +00006857
Martin v. Löwis11437992002-04-12 09:54:03 +00006858else
Matthias Kloseb9621712010-04-24 17:59:49 +00006859 if test "$ac_cv_type_fpos_t" = yes; then
6860 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6861$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006862{ as_fn_set_status 77
6863as_fn_error "cannot compute sizeof (fpos_t)
6864See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006865 else
6866 ac_cv_sizeof_fpos_t=0
6867 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006868fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006869
Martin v. Löwis11437992002-04-12 09:54:03 +00006870fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006871{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
6872$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006873
6874
6875
Martin v. Löwis11437992002-04-12 09:54:03 +00006876cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006877#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00006878_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006879
Michael W. Hudson54241132001-12-07 15:38:26 +00006880
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006881# The cast to long int works around a bug in the HP C Compiler
6882# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6883# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6884# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006885{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
6886$as_echo_n "checking size of size_t... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006887if test "${ac_cv_sizeof_size_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006888 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00006889else
Matthias Kloseb9621712010-04-24 17:59:49 +00006890 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 +00006891
Martin v. Löwis18e16552006-02-15 17:27:45 +00006892else
Matthias Kloseb9621712010-04-24 17:59:49 +00006893 if test "$ac_cv_type_size_t" = yes; then
6894 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6895$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006896{ as_fn_set_status 77
6897as_fn_error "cannot compute sizeof (size_t)
6898See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006899 else
6900 ac_cv_sizeof_size_t=0
6901 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00006902fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006903
Martin v. Löwis18e16552006-02-15 17:27:45 +00006904fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006905{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
6906$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006907
6908
6909
Martin v. Löwis18e16552006-02-15 17:27:45 +00006910cat >>confdefs.h <<_ACEOF
6911#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
6912_ACEOF
6913
6914
Christian Heimes400adb02008-02-01 08:12:03 +00006915# The cast to long int works around a bug in the HP C Compiler
6916# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6917# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6918# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006919{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
6920$as_echo_n "checking size of pid_t... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006921if test "${ac_cv_sizeof_pid_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006922 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00006923else
Matthias Kloseb9621712010-04-24 17:59:49 +00006924 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 +00006925
Christian Heimes400adb02008-02-01 08:12:03 +00006926else
Matthias Kloseb9621712010-04-24 17:59:49 +00006927 if test "$ac_cv_type_pid_t" = yes; then
6928 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6929$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006930{ as_fn_set_status 77
6931as_fn_error "cannot compute sizeof (pid_t)
6932See \`config.log' for more details." "$LINENO" 5; }; }
Christian Heimes400adb02008-02-01 08:12:03 +00006933 else
6934 ac_cv_sizeof_pid_t=0
6935 fi
6936fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006937
Christian Heimes400adb02008-02-01 08:12:03 +00006938fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006939{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
6940$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00006941
6942
6943
6944cat >>confdefs.h <<_ACEOF
6945#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
6946_ACEOF
6947
6948
Michael W. Hudson54241132001-12-07 15:38:26 +00006949
Matthias Kloseb9621712010-04-24 17:59:49 +00006950{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
6951$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006952have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006953cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006954/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006955
Martin v. Löwis11437992002-04-12 09:54:03 +00006956int
6957main ()
6958{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006959long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00006960 ;
6961 return 0;
6962}
6963_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006964if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006965
6966
Matthias Kloseb9621712010-04-24 17:59:49 +00006967$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006968
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006969 have_long_long=yes
6970
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006971fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006972rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006973{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
6974$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00006975if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006976# The cast to long int works around a bug in the HP C Compiler
6977# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6978# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6979# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
6981$as_echo_n "checking size of long long... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006982if test "${ac_cv_sizeof_long_long+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006983 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006984else
Matthias Kloseb9621712010-04-24 17:59:49 +00006985 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 +00006986
Martin v. Löwis11437992002-04-12 09:54:03 +00006987else
Matthias Kloseb9621712010-04-24 17:59:49 +00006988 if test "$ac_cv_type_long_long" = yes; then
6989 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6990$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006991{ as_fn_set_status 77
6992as_fn_error "cannot compute sizeof (long long)
6993See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006994 else
6995 ac_cv_sizeof_long_long=0
6996 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006997fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006998
Martin v. Löwis11437992002-04-12 09:54:03 +00006999fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007000{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
7001$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007002
7003
7004
Martin v. Löwis11437992002-04-12 09:54:03 +00007005cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007006#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007007_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007008
Michael W. Hudson54241132001-12-07 15:38:26 +00007009
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007010fi
7011
Matthias Kloseb9621712010-04-24 17:59:49 +00007012{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
7013$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007014have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007015cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007016/* end confdefs.h. */
7017
7018int
7019main ()
7020{
7021long double x; x = (long double)0;
7022 ;
7023 return 0;
7024}
7025_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007026if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007027
7028
Matthias Kloseb9621712010-04-24 17:59:49 +00007029$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007030
7031 have_long_double=yes
7032
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007033fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007034rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007035{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
7036$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007037if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007038# The cast to long int works around a bug in the HP C Compiler
7039# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7040# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7041# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007042{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
7043$as_echo_n "checking size of long double... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05007044if test "${ac_cv_sizeof_long_double+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007045 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007046else
Matthias Kloseb9621712010-04-24 17:59:49 +00007047 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 +00007048
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007049else
Matthias Kloseb9621712010-04-24 17:59:49 +00007050 if test "$ac_cv_type_long_double" = yes; then
7051 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7052$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson87cdb812011-05-31 18:26:08 -05007053{ as_fn_set_status 77
7054as_fn_error "cannot compute sizeof (long double)
7055See \`config.log' for more details." "$LINENO" 5; }; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007056 else
7057 ac_cv_sizeof_long_double=0
7058 fi
7059fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007060
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007061fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007062{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
7063$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007064
7065
7066
7067cat >>confdefs.h <<_ACEOF
7068#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
7069_ACEOF
7070
7071
7072fi
7073
7074
Matthias Kloseb9621712010-04-24 17:59:49 +00007075{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
7076$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007077have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007078cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00007079/* end confdefs.h. */
7080
7081int
7082main ()
7083{
7084_Bool x; x = (_Bool)0;
7085 ;
7086 return 0;
7087}
7088_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007089if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00007090
7091
Matthias Kloseb9621712010-04-24 17:59:49 +00007092$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00007093
7094 have_c99_bool=yes
7095
Thomas Woutersb2137042007-02-01 18:02:27 +00007096fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007097rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007098{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
7099$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007100if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007101# The cast to long int works around a bug in the HP C Compiler
7102# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7103# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7104# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007105{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
7106$as_echo_n "checking size of _Bool... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05007107if test "${ac_cv_sizeof__Bool+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007108 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00007109else
Matthias Kloseb9621712010-04-24 17:59:49 +00007110 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 +00007111
Thomas Woutersb2137042007-02-01 18:02:27 +00007112else
Matthias Kloseb9621712010-04-24 17:59:49 +00007113 if test "$ac_cv_type__Bool" = yes; then
7114 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7115$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson87cdb812011-05-31 18:26:08 -05007116{ as_fn_set_status 77
7117as_fn_error "cannot compute sizeof (_Bool)
7118See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007119 else
7120 ac_cv_sizeof__Bool=0
7121 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00007122fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007123
Thomas Woutersb2137042007-02-01 18:02:27 +00007124fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007125{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
7126$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007127
7128
7129
Thomas Woutersb2137042007-02-01 18:02:27 +00007130cat >>confdefs.h <<_ACEOF
7131#define SIZEOF__BOOL $ac_cv_sizeof__Bool
7132_ACEOF
7133
7134
7135fi
7136
Matthias Kloseb9621712010-04-24 17:59:49 +00007137ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00007138 #include <stdint.h>
7139 #endif
Antoine Pitrou1bf29b72010-10-10 08:10:16 +00007140 #ifdef HAVE_INTTYPES_H
7141 #include <inttypes.h>
7142 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00007143"
Benjamin Peterson316e02b2011-05-10 15:01:56 -05007144if test "x$ac_cv_type_uintptr_t" = x""yes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00007145
7146cat >>confdefs.h <<_ACEOF
7147#define HAVE_UINTPTR_T 1
7148_ACEOF
7149
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007150# The cast to long int works around a bug in the HP C Compiler
7151# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7152# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7153# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007154{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
7155$as_echo_n "checking size of uintptr_t... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05007156if test "${ac_cv_sizeof_uintptr_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007157 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007158else
Matthias Kloseb9621712010-04-24 17:59:49 +00007159 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 +00007160
Martin v. Löwis11437992002-04-12 09:54:03 +00007161else
Matthias Kloseb9621712010-04-24 17:59:49 +00007162 if test "$ac_cv_type_uintptr_t" = yes; then
7163 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7164$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson87cdb812011-05-31 18:26:08 -05007165{ as_fn_set_status 77
7166as_fn_error "cannot compute sizeof (uintptr_t)
7167See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007168 else
7169 ac_cv_sizeof_uintptr_t=0
7170 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007171fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007172
Martin v. Löwis11437992002-04-12 09:54:03 +00007173fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007174{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
7175$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007176
7177
7178
Martin v. Löwis11437992002-04-12 09:54:03 +00007179cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007180#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007181_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007182
Michael W. Hudson54241132001-12-07 15:38:26 +00007183
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007184fi
7185
Thomas Wouters89f507f2006-12-13 04:49:30 +00007186
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007187# The cast to long int works around a bug in the HP C Compiler
7188# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7189# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7190# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007191{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
7192$as_echo_n "checking size of off_t... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05007193if test "${ac_cv_sizeof_off_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007194 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007195else
Matthias Kloseb9621712010-04-24 17:59:49 +00007196 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007197#ifdef HAVE_SYS_TYPES_H
7198#include <sys/types.h>
7199#endif
7200
Matthias Kloseb9621712010-04-24 17:59:49 +00007201"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007202
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007203else
Matthias Kloseb9621712010-04-24 17:59:49 +00007204 if test "$ac_cv_type_off_t" = yes; then
7205 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7206$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson87cdb812011-05-31 18:26:08 -05007207{ as_fn_set_status 77
7208as_fn_error "cannot compute sizeof (off_t)
7209See \`config.log' for more details." "$LINENO" 5; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007210 else
7211 ac_cv_sizeof_off_t=0
7212 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007213fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007214
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007215fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007216{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
7217$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007218
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007219
7220
Martin v. Löwis11437992002-04-12 09:54:03 +00007221cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007222#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007223_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007224
Michael W. Hudson54241132001-12-07 15:38:26 +00007225
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007226
Matthias Kloseb9621712010-04-24 17:59:49 +00007227{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
7228$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007229if test "$have_long_long" = yes
7230then
7231if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007232 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007233
Matthias Kloseb9621712010-04-24 17:59:49 +00007234$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007235
Matthias Kloseb9621712010-04-24 17:59:49 +00007236 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7237$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007238else
Matthias Kloseb9621712010-04-24 17:59:49 +00007239 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7240$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007241fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00007242else
Matthias Kloseb9621712010-04-24 17:59:49 +00007243 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7244$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007245fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007246
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007247# The cast to long int works around a bug in the HP C Compiler
7248# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7249# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7250# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007251{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
7252$as_echo_n "checking size of time_t... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05007253if test "${ac_cv_sizeof_time_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007254 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007255else
Matthias Kloseb9621712010-04-24 17:59:49 +00007256 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007257#ifdef HAVE_SYS_TYPES_H
7258#include <sys/types.h>
7259#endif
7260#ifdef HAVE_TIME_H
7261#include <time.h>
7262#endif
7263
Matthias Kloseb9621712010-04-24 17:59:49 +00007264"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007265
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007266else
Matthias Kloseb9621712010-04-24 17:59:49 +00007267 if test "$ac_cv_type_time_t" = yes; then
7268 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7269$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson87cdb812011-05-31 18:26:08 -05007270{ as_fn_set_status 77
7271as_fn_error "cannot compute sizeof (time_t)
7272See \`config.log' for more details." "$LINENO" 5; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007273 else
7274 ac_cv_sizeof_time_t=0
7275 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007276fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007277
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007278fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007279{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
7280$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007281
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007282
7283
Martin v. Löwis11437992002-04-12 09:54:03 +00007284cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007285#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007286_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007287
Michael W. Hudson54241132001-12-07 15:38:26 +00007288
7289
Trent Mick635f6fb2000-08-23 21:33:05 +00007290# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007291ac_save_cc="$CC"
7292if test "$ac_cv_kpthread" = "yes"
7293then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00007294elif test "$ac_cv_kthread" = "yes"
7295then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00007296elif test "$ac_cv_pthread" = "yes"
7297then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007298fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007299
Matthias Kloseb9621712010-04-24 17:59:49 +00007300{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
7301$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007302have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007303cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007304/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007305
7306 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007307int
7308main ()
7309{
Guido van Rossum12580492000-09-24 16:47:19 +00007310pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007311 ;
7312 return 0;
7313}
Matthias Kloseb159a552010-04-25 21:00:44 +00007314
Martin v. Löwis11437992002-04-12 09:54:03 +00007315_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007316if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00007317 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00007318fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007319rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007320{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
7321$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007322if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007323 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007324# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7325# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7326# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007327{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
7328$as_echo_n "checking size of pthread_t... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05007329if test "${ac_cv_sizeof_pthread_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007330 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007331else
Matthias Kloseb9621712010-04-24 17:59:49 +00007332 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007333#ifdef HAVE_PTHREAD_H
7334#include <pthread.h>
7335#endif
7336
Matthias Kloseb9621712010-04-24 17:59:49 +00007337"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007338
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007339else
Matthias Kloseb9621712010-04-24 17:59:49 +00007340 if test "$ac_cv_type_pthread_t" = yes; then
7341 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7342$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson87cdb812011-05-31 18:26:08 -05007343{ as_fn_set_status 77
7344as_fn_error "cannot compute sizeof (pthread_t)
7345See \`config.log' for more details." "$LINENO" 5; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007346 else
7347 ac_cv_sizeof_pthread_t=0
7348 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00007349fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007350
Trent Mick635f6fb2000-08-23 21:33:05 +00007351fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007352{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
7353$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007354
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007355
7356
Martin v. Löwis11437992002-04-12 09:54:03 +00007357cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007358#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007359_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007360
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007361
Trent Mick635f6fb2000-08-23 21:33:05 +00007362fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007363CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00007364
Michael W. Hudson54241132001-12-07 15:38:26 +00007365
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007366case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007367 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007368 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
7369 ;;
7370 Darwin/*)
7371 OTHER_LIBTOOL_OPT=""
7372 ;;
7373esac
7374
7375
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007376ARCH_RUN_32BIT=""
7377
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007378case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007379 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00007380 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
7381 if test "${enable_universalsdk}"; then
7382 :
7383 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007384 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007385 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00007386 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007387 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00007388 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00007389 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007390 if test ${gcc_version} '<' 4.0
7391 then
7392 LIBTOOL_CRUFT="-lcc_dynamic"
7393 else
7394 LIBTOOL_CRUFT=""
7395 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007396 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007397 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007398else
Matthias Kloseb9621712010-04-24 17:59:49 +00007399 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007400/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007401
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007402 #include <unistd.h>
7403 int main(int argc, char*argv[])
7404 {
7405 if (sizeof(long) == 4) {
7406 return 0;
7407 } else {
7408 return 1;
7409 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007410 }
7411
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007412_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007413if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007414 ac_osx_32bit=yes
7415else
Matthias Kloseb9621712010-04-24 17:59:49 +00007416 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007417fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007418rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7419 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007420fi
7421
7422
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007423 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007424 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007425 i386)
7426 MACOSX_DEFAULT_ARCH="i386"
7427 ;;
7428 ppc)
7429 MACOSX_DEFAULT_ARCH="ppc"
7430 ;;
7431 *)
Benjamin Peterson87cdb812011-05-31 18:26:08 -05007432 as_fn_error "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007433 ;;
7434 esac
7435 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007436 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007437 i386)
7438 MACOSX_DEFAULT_ARCH="x86_64"
7439 ;;
7440 ppc)
7441 MACOSX_DEFAULT_ARCH="ppc64"
7442 ;;
7443 *)
Benjamin Peterson87cdb812011-05-31 18:26:08 -05007444 as_fn_error "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007445 ;;
7446 esac
7447
7448 #ARCH_RUN_32BIT="true"
7449 fi
7450
7451 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00007452 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007453 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007454esac
7455
Matthias Kloseb9621712010-04-24 17:59:49 +00007456{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
7457$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007458if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007459then
Skip Montanarodecc6a42003-01-01 20:07:49 +00007460 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00007461 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00007462 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007463
Matthias Kloseb9621712010-04-24 17:59:49 +00007464$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007465
Matthias Kloseb9621712010-04-24 17:59:49 +00007466 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7467$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00007468 if test $enable_shared = "yes"
7469 then
Benjamin Peterson87cdb812011-05-31 18:26:08 -05007470 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 +00007471 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007472else
Matthias Kloseb9621712010-04-24 17:59:49 +00007473 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7474$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007475fi
7476
Matthias Kloseb9621712010-04-24 17:59:49 +00007477{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
7478$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007479case $ac_sys_system/$ac_sys_release in
7480 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007481
Matthias Kloseb9621712010-04-24 17:59:49 +00007482$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007483
Matthias Kloseb9621712010-04-24 17:59:49 +00007484 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
7485$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007486 ;;
7487 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00007488 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7489$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007490 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007491esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007492
Guido van Rossum0a516c91994-09-12 10:58:40 +00007493# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00007494
Michael W. Hudson54241132001-12-07 15:38:26 +00007495
7496
7497
7498
Benjamin Peterson99f03762010-04-11 22:15:28 +00007499
Thomas Wouters477c8d52006-05-27 19:21:47 +00007500
Georg Brandlb1441c72009-01-03 22:33:39 +00007501
Thomas Wouters477c8d52006-05-27 19:21:47 +00007502cat >>confdefs.h <<_ACEOF
7503#define SHLIB_EXT "$SO"
7504_ACEOF
7505
Guido van Rossum0a516c91994-09-12 10:58:40 +00007506# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00007507# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007508# (Shared libraries in this instance are shared modules to be loaded into
7509# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00007510{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
7511$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007512if test -z "$LDSHARED"
7513then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007514 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007515 AIX*)
Georg Brandl9a829be2011-02-15 15:44:51 +00007516 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00007517 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007518 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00007519 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00007520 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00007521 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007522 if test "$GCC" = "yes" ; then
7523 LDSHARED='$(CC) -shared'
7524 LDCXXSHARED='$(CXX) -shared'
7525 else
7526 LDSHARED='$(CC) -G'
7527 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00007528 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007529 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007530 if test "$GCC" = "yes" ; then
7531 LDSHARED='$(CC) -shared'
7532 LDCXXSHARED='$(CXX) -shared'
7533 else
7534 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007535 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00007536 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007537 LDSHARED='$(CC) -bundle'
7538 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00007539 if test "$enable_framework" ; then
7540 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007541 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7542 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007543 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007544 else
7545 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00007546 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00007547 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00007548 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007549 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007550 LDSHARED='$(CC) -bundle'
7551 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00007552 if test "$enable_framework" ; then
7553 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007554 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7555 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007556 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007557 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00007558 # No framework, use the Python app as bundle-loader
7559 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00007560 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007561 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007562 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007563 Darwin/*)
7564 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
7565 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00007566
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007567 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +00007568 then
Thomas Wouters477c8d52006-05-27 19:21:47 +00007569 if test "${enable_universalsdk}"; then
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007570 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007571 fi
Antoine Pitroud4958c22010-10-13 17:01:10 +00007572 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
7573 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
Jack Jansen6b08a402004-06-03 12:41:45 +00007574 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00007575 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00007576 LDSHARED='$(CC) -bundle'
7577 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00007578 if test "$enable_framework" ; then
7579 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007580 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7581 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007582 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007583 else
7584 # No framework, use the Python app as bundle-loader
7585 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
7586 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007587 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007588 fi
7589 fi
7590 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007591 Linux*|GNU*|QNX*)
7592 LDSHARED='$(CC) -shared'
7593 LDCXXSHARED='$(CXX) -shared';;
7594 BSD/OS*/4*)
7595 LDSHARED="gcc -shared"
7596 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007597 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00007598 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00007599 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00007600 LDSHARED='$(CC) -shared'
7601 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00007602 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00007603 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00007604 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007605 OpenBSD*)
7606 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7607 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00007608 LDSHARED='$(CC) -shared $(CCSHARED)'
7609 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007610 else
7611 case `uname -r` in
7612 [01].* | 2.[0-7] | 2.[0-7].*)
7613 LDSHARED="ld -Bshareable ${LDFLAGS}"
7614 ;;
7615 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007616 LDSHARED='$(CC) -shared $(CCSHARED)'
7617 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007618 ;;
7619 esac
7620 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007621 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00007622 LDSHARED='$(CC) -shared'
7623 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007624 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007625 if test "$GCC" = "yes" ; then
7626 LDSHARED='$(CC) -shared'
7627 LDCXXSHARED='$(CXX) -shared'
7628 else
7629 LDSHARED='$(CC) -G'
7630 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00007631 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007632 SCO_SV*)
7633 LDSHARED='$(CC) -Wl,-G,-Bexport'
7634 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
7635 CYGWIN*)
7636 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
7637 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007638 *) LDSHARED="ld";;
7639 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007640fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007641{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
7642$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00007643LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007644BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00007645# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007646# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
7648$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007649if test -z "$CCSHARED"
7650then
Guido van Rossum07397971997-04-29 21:49:50 +00007651 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00007652 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007653 then CCSHARED="-fPIC";
7654 elif test `uname -p` = sparc;
7655 then CCSHARED="-xcode=pic32";
7656 else CCSHARED="-Kpic";
7657 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00007658 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00007659 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00007660 else CCSHARED="+z";
7661 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007662 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007663 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007664 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007665 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00007666 if test "$GCC" = "yes"
7667 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00007668 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00007669 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007670 SCO_SV*)
7671 if test "$GCC" = "yes"
7672 then CCSHARED="-fPIC"
7673 else CCSHARED="-Kpic -belf"
7674 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007675 IRIX*/6*) case $CC in
7676 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00007677 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007678 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007679 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007680fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007681{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
7682$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007683# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007684# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007685{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
7686$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007687if test -z "$LINKFORSHARED"
7688then
Guido van Rossum07397971997-04-29 21:49:50 +00007689 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007690 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007691 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00007692 LINKFORSHARED="-Wl,-E -Wl,+s";;
7693# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007694 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007695 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007696 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00007697 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00007698 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Jack Jansene578a632001-08-15 01:27:14 +00007699 if test "$enable_framework"
7700 then
Jack Jansenda49e192005-01-07 13:08:22 +00007701 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007702 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007703 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007704 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007705 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00007706 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007707 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00007708 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7709 then
7710 LINKFORSHARED="-Wl,--export-dynamic"
7711 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007712 SunOS/5*) case $CC in
7713 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00007714 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00007715 then
7716 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007717 fi;;
7718 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00007719 CYGWIN*)
7720 if test $enable_shared = "no"
7721 then
7722 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
7723 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00007724 QNX*)
7725 # -Wl,-E causes the symbols to be added to the dynamic
7726 # symbol table so that they can be found when a module
7727 # is loaded. -N 2048K causes the stack size to be set
7728 # to 2048 kilobytes so that the stack doesn't overflow
7729 # when running test_compile.py.
7730 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007731 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007732fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007733{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
7734$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007735
Michael W. Hudson54241132001-12-07 15:38:26 +00007736
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00007737
Matthias Kloseb9621712010-04-24 17:59:49 +00007738{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
7739$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007740if test ! "$LIBRARY" = "$LDLIBRARY"
7741then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00007742 case $ac_sys_system in
7743 CYGWIN*)
7744 # Cygwin needs CCSHARED when building extension DLLs
7745 # but not when building the interpreter DLL.
7746 CFLAGSFORSHARED='';;
7747 *)
7748 CFLAGSFORSHARED='$(CCSHARED)'
7749 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007750fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007751{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
7752$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007753
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007754# SHLIBS are libraries (except -lc and -lm) to link to the python shared
7755# library (with --enable-shared).
7756# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007757# symbols, this must be set to $(LIBS) (expanded by make). We do this even
7758# if it is not required, since it creates a dependency of the shared library
7759# to LIBS. This, in turn, means that applications linking the shared libpython
7760# don't need to link LIBS explicitly. The default should be only changed
7761# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007762
Matthias Kloseb9621712010-04-24 17:59:49 +00007763{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
7764$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007765case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007766 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007767 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007768esac
Matthias Kloseb9621712010-04-24 17:59:49 +00007769{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
7770$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007771
7772
Guido van Rossum627b2d71993-12-24 10:39:16 +00007773# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00007774{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
7775$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05007776if test "${ac_cv_lib_sendfile_sendfile+set}" = set; then :
Georg Brandl941f9562011-02-25 15:21:47 +00007777 $as_echo_n "(cached) " >&6
7778else
7779 ac_check_lib_save_LIBS=$LIBS
7780LIBS="-lsendfile $LIBS"
7781cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7782/* end confdefs.h. */
7783
7784/* Override any GCC internal prototype to avoid an error.
7785 Use char because int might match the return type of a GCC
7786 builtin and then its argument prototype would still apply. */
7787#ifdef __cplusplus
7788extern "C"
7789#endif
7790char sendfile ();
7791int
7792main ()
7793{
7794return sendfile ();
7795 ;
7796 return 0;
7797}
7798_ACEOF
7799if ac_fn_c_try_link "$LINENO"; then :
7800 ac_cv_lib_sendfile_sendfile=yes
7801else
7802 ac_cv_lib_sendfile_sendfile=no
7803fi
7804rm -f core conftest.err conftest.$ac_objext \
7805 conftest$ac_exeext conftest.$ac_ext
7806LIBS=$ac_check_lib_save_LIBS
7807fi
7808{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
7809$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05007810if test "x$ac_cv_lib_sendfile_sendfile" = x""yes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00007811 cat >>confdefs.h <<_ACEOF
7812#define HAVE_LIBSENDFILE 1
7813_ACEOF
7814
7815 LIBS="-lsendfile $LIBS"
7816
7817fi
7818
Matthias Kloseb9621712010-04-24 17:59:49 +00007819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
7820$as_echo_n "checking for dlopen in -ldl... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05007821if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007822 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007823else
Martin v. Löwis11437992002-04-12 09:54:03 +00007824 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007825LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007826cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007827/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007828
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007829/* Override any GCC internal prototype to avoid an error.
7830 Use char because int might match the return type of a GCC
7831 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007832#ifdef __cplusplus
7833extern "C"
7834#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007835char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007836int
7837main ()
7838{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007839return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007840 ;
7841 return 0;
7842}
7843_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007844if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007845 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007846else
Matthias Kloseb9621712010-04-24 17:59:49 +00007847 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007848fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007849rm -f core conftest.err conftest.$ac_objext \
7850 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007851LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007852fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007853{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
7854$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05007855if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007856 cat >>confdefs.h <<_ACEOF
7857#define HAVE_LIBDL 1
7858_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007859
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007860 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00007861
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007862fi
7863 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00007864{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
7865$as_echo_n "checking for shl_load in -ldld... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05007866if test "${ac_cv_lib_dld_shl_load+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007867 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007868else
Martin v. Löwis11437992002-04-12 09:54:03 +00007869 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007870LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007871cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007872/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007873
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007874/* Override any GCC internal prototype to avoid an error.
7875 Use char because int might match the return type of a GCC
7876 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007877#ifdef __cplusplus
7878extern "C"
7879#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007880char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007881int
7882main ()
7883{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007884return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007885 ;
7886 return 0;
7887}
7888_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007889if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007890 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007891else
Matthias Kloseb9621712010-04-24 17:59:49 +00007892 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007893fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007894rm -f core conftest.err conftest.$ac_objext \
7895 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007896LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007897fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007898{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
7899$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05007900if test "x$ac_cv_lib_dld_shl_load" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007901 cat >>confdefs.h <<_ACEOF
7902#define HAVE_LIBDLD 1
7903_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007904
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007905 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007906
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007907fi
7908 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00007909
Georg Brandlb1441c72009-01-03 22:33:39 +00007910# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00007911if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007912 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
7913$as_echo_n "checking for library containing sem_init... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05007914if test "${ac_cv_search_sem_init+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007915 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007916else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00007917 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007918cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007919/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007920
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007921/* Override any GCC internal prototype to avoid an error.
7922 Use char because int might match the return type of a GCC
7923 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007924#ifdef __cplusplus
7925extern "C"
7926#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007927char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007928int
7929main ()
7930{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007931return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007932 ;
7933 return 0;
7934}
7935_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007936for ac_lib in '' pthread rt posix4; do
7937 if test -z "$ac_lib"; then
7938 ac_res="none required"
7939 else
7940 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007941 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007942 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007943 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007944 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007945fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007946rm -f core conftest.err conftest.$ac_objext \
7947 conftest$ac_exeext
Benjamin Peterson316e02b2011-05-10 15:01:56 -05007948 if test "${ac_cv_search_sem_init+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007949 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007950fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007951done
Benjamin Peterson316e02b2011-05-10 15:01:56 -05007952if test "${ac_cv_search_sem_init+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007953
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007954else
7955 ac_cv_search_sem_init=no
7956fi
7957rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00007958LIBS=$ac_func_search_save_LIBS
7959fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007960{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
7961$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007962ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00007963if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007964 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007965
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007966fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00007967 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00007968 # posix4 on Solaris 2.6
7969 # pthread (first!) on Linux
7970fi
7971
Martin v. Löwis19d17342003-06-14 21:03:05 +00007972# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00007973{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
7974$as_echo_n "checking for textdomain in -lintl... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05007975if test "${ac_cv_lib_intl_textdomain+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007976 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00007977else
7978 ac_check_lib_save_LIBS=$LIBS
7979LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007980cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007981/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +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öwis19d17342003-06-14 21:03:05 +00007986#ifdef __cplusplus
7987extern "C"
7988#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00007989char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00007990int
7991main ()
7992{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007993return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00007994 ;
7995 return 0;
7996}
7997_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007998if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00007999 ac_cv_lib_intl_textdomain=yes
8000else
Matthias Kloseb9621712010-04-24 17:59:49 +00008001 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00008002fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008003rm -f core conftest.err conftest.$ac_objext \
8004 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00008005LIBS=$ac_check_lib_save_LIBS
8006fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008007{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
8008$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008009if test "x$ac_cv_lib_intl_textdomain" = x""yes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008010
Matthias Kloseb9621712010-04-24 17:59:49 +00008011$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00008012
Brett Cannonc6d936e2009-06-07 20:09:53 +00008013 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00008014fi
8015
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008016
8017# checks for system dependent C++ extensions support
8018case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00008019 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
8020$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
8021 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008022/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008023
Georg Brandl59e87bd2011-02-15 19:48:59 +00008024 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008025int
8026main ()
8027{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008028loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00008029 ;
8030 return 0;
8031}
Matthias Kloseb159a552010-04-25 21:00:44 +00008032
Martin v. Löwis11437992002-04-12 09:54:03 +00008033_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008034if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008035
Matthias Kloseb159a552010-04-25 21:00:44 +00008036
Matthias Kloseb9621712010-04-24 17:59:49 +00008037$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008038
Matthias Kloseb159a552010-04-25 21:00:44 +00008039 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008040$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008041
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008042else
Matthias Kloseb159a552010-04-25 21:00:44 +00008043
8044 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008045$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008046
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008047fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008048rm -f core conftest.err conftest.$ac_objext \
8049 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008050 *) ;;
8051esac
8052
Guido van Rossum70c7f481998-03-26 18:44:10 +00008053# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00008054{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
8055$as_echo_n "checking for t_open in -lnsl... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008056if test "${ac_cv_lib_nsl_t_open+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008057 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008058else
Martin v. Löwis11437992002-04-12 09:54:03 +00008059 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008060LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008061cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008062/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008063
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008064/* Override any GCC internal prototype to avoid an error.
8065 Use char because int might match the return type of a GCC
8066 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008067#ifdef __cplusplus
8068extern "C"
8069#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008070char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008071int
8072main ()
8073{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008074return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008075 ;
8076 return 0;
8077}
8078_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008079if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008080 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008081else
Matthias Kloseb9621712010-04-24 17:59:49 +00008082 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008083fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008084rm -f core conftest.err conftest.$ac_objext \
8085 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008086LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008087fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008088{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
8089$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008090if test "x$ac_cv_lib_nsl_t_open" = x""yes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008091 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008092fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00008093 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00008094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
8095$as_echo_n "checking for socket in -lsocket... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008096if test "${ac_cv_lib_socket_socket+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008097 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008098else
Martin v. Löwis11437992002-04-12 09:54:03 +00008099 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008100LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008101cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008102/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008103
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008104/* Override any GCC internal prototype to avoid an error.
8105 Use char because int might match the return type of a GCC
8106 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008107#ifdef __cplusplus
8108extern "C"
8109#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008110char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008111int
8112main ()
8113{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008114return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008115 ;
8116 return 0;
8117}
8118_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008119if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008120 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008121else
Matthias Kloseb9621712010-04-24 17:59:49 +00008122 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008123fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008124rm -f core conftest.err conftest.$ac_objext \
8125 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008126LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008127fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008128{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
8129$as_echo "$ac_cv_lib_socket_socket" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008130if test "x$ac_cv_lib_socket_socket" = x""yes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00008131 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00008132fi
8133 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00008134
Matthias Kloseb9621712010-04-24 17:59:49 +00008135{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
8136$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008137
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008138# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008139if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008140 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00008141{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8142$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00008143LIBS="$withval $LIBS"
8144
8145else
Matthias Kloseb9621712010-04-24 17:59:49 +00008146 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8147$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008148fi
8149
Guido van Rossum7f43da71994-08-01 12:15:30 +00008150
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008151if test -n "$ac_tool_prefix"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008152 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
8153set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008154{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8155$as_echo_n "checking for $ac_word... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008156if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008157 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008158else
8159 case $PKG_CONFIG in
8160 [\\/]* | ?:[\\/]*)
8161 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8162 ;;
8163 *)
8164 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8165for as_dir in $PATH
8166do
8167 IFS=$as_save_IFS
8168 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008169 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Petersond78735d2010-01-01 16:04:23 +00008170 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8171 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008172 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008173 break 2
8174 fi
8175done
Matthias Kloseb9621712010-04-24 17:59:49 +00008176 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008177IFS=$as_save_IFS
8178
8179 ;;
8180esac
8181fi
8182PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8183if test -n "$PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008184 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8185$as_echo "$PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008186else
Matthias Kloseb9621712010-04-24 17:59:49 +00008187 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8188$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008189fi
8190
8191
8192fi
8193if test -z "$ac_cv_path_PKG_CONFIG"; then
8194 ac_pt_PKG_CONFIG=$PKG_CONFIG
8195 # Extract the first word of "pkg-config", so it can be a program name with args.
8196set dummy pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8198$as_echo_n "checking for $ac_word... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008199if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008200 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008201else
8202 case $ac_pt_PKG_CONFIG in
8203 [\\/]* | ?:[\\/]*)
8204 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
8205 ;;
8206 *)
8207 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8208for as_dir in $PATH
8209do
8210 IFS=$as_save_IFS
8211 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008212 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Petersond78735d2010-01-01 16:04:23 +00008213 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8214 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008215 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008216 break 2
8217 fi
8218done
Matthias Kloseb9621712010-04-24 17:59:49 +00008219 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008220IFS=$as_save_IFS
8221
8222 ;;
8223esac
8224fi
8225ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
8226if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008227 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
8228$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008229else
Matthias Kloseb9621712010-04-24 17:59:49 +00008230 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8231$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008232fi
8233
8234 if test "x$ac_pt_PKG_CONFIG" = x; then
8235 PKG_CONFIG=""
8236 else
8237 case $cross_compiling:$ac_tool_warned in
8238yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00008239{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8240$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Petersond78735d2010-01-01 16:04:23 +00008241ac_tool_warned=yes ;;
8242esac
8243 PKG_CONFIG=$ac_pt_PKG_CONFIG
8244 fi
8245else
8246 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
8247fi
8248
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008249
8250# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00008251{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
8252$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008253
8254# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008255if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008256 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00008257else
8258 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008259fi
8260
8261
Matthias Kloseb9621712010-04-24 17:59:49 +00008262{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
8263$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008264
8265# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00008266{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
8267$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008268
8269# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008270if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008271 withval=$with_system_ffi;
Benjamin Peterson79263252010-10-31 16:50:44 +00008272else
8273 with_system_ffi="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008274fi
8275
8276
8277if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008278 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
8279else
8280 LIBFFI_INCLUDEDIR=""
8281fi
8282
8283
Matthias Kloseb9621712010-04-24 17:59:49 +00008284{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
8285$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008286
Benjamin Peterson076ed002010-10-31 17:11:02 +00008287# Check for support for loadable sqlite extensions
8288{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
8289$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
8290# Check whether --enable-loadable-sqlite-extensions was given.
8291if test "${enable_loadable_sqlite_extensions+set}" = set; then :
8292 enableval=$enable_loadable_sqlite_extensions;
8293else
8294 enable_loadable_sqlite_extensions="no"
8295fi
8296
8297
8298{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
8299$as_echo "$enable_loadable_sqlite_extensions" >&6; }
8300
Matthias Klose55708cc2009-04-30 08:06:49 +00008301# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +00008302{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
8303$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008304
8305# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008306if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +00008307 withval=$with_dbmliborder;
8308if test x$with_dbmliborder = xyes
8309then
Benjamin Peterson87cdb812011-05-31 18:26:08 -05008310as_fn_error "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008311else
8312 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
8313 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
8314 then
Benjamin Peterson87cdb812011-05-31 18:26:08 -05008315 as_fn_error "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008316 fi
8317 done
8318fi
8319fi
8320
Matthias Kloseb9621712010-04-24 17:59:49 +00008321{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
8322$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008323
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00008324# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008325
8326
Matthias Kloseb9621712010-04-24 17:59:49 +00008327{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
8328$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008329
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008330# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008331if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008332 withval=$with_signal_module;
8333fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008334
8335
8336if test -z "$with_signal_module"
8337then with_signal_module="yes"
8338fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008339{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
8340$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008341
8342if test "${with_signal_module}" = "yes"; then
8343 USE_SIGNAL_MODULE=""
8344 SIGNAL_OBJS=""
8345else
8346 USE_SIGNAL_MODULE="#"
8347 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
8348fi
8349
Guido van Rossum3d15bd82001-01-10 18:53:48 +00008350# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00008351
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008352USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00008353
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008354
Martin v. Löwis11437992002-04-12 09:54:03 +00008355
8356# Templates for things AC_DEFINEd more than once.
8357# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00008358
8359
Martin v. Löwis11437992002-04-12 09:54:03 +00008360
8361
Matthias Kloseb9621712010-04-24 17:59:49 +00008362{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
8363$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008364
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008365# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008366if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008367 withval=$with_threads;
8368fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008369
8370
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008371# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00008372
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008373# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008374if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008375 withval=$with_thread; with_threads=$with_thread
8376fi
8377
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008378
8379if test -z "$with_threads"
8380then with_threads="yes"
8381fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008382{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
8383$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008384
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008385
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008386if test "$with_threads" = "no"
8387then
8388 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008389elif test "$ac_cv_pthread_is_default" = yes
8390then
Matthias Kloseb9621712010-04-24 17:59:49 +00008391 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008392
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008393 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +00008394 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008395
8396 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00008397 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008398elif test "$ac_cv_kpthread" = "yes"
8399then
8400 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008401 if test "$ac_cv_cxx_thread" = "yes"; then
8402 CXX="$CXX -Kpthread"
8403 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008404 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00008405
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008406 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008407 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008408elif test "$ac_cv_kthread" = "yes"
8409then
8410 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008411 if test "$ac_cv_cxx_thread" = "yes"; then
8412 CXX="$CXX -Kthread"
8413 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008414 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008415
8416 posix_threads=yes
8417 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008418elif test "$ac_cv_pthread" = "yes"
8419then
8420 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008421 if test "$ac_cv_cxx_thread" = "yes"; then
8422 CXX="$CXX -pthread"
8423 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008424 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008425
8426 posix_threads=yes
8427 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008428else
8429 if test ! -z "$with_threads" -a -d "$with_threads"
8430 then LDFLAGS="$LDFLAGS -L$with_threads"
8431 fi
8432 if test ! -z "$withval" -a -d "$withval"
8433 then LDFLAGS="$LDFLAGS -L$withval"
8434 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008435
8436 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00008437 # define _POSIX_THREADS in unistd.h. Some apparently don't
8438 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +00008439 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
8440$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
8441 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008442/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008443
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008444#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008445#ifdef _POSIX_THREADS
8446yes
8447#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008448
8449_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008450if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008451 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008452 unistd_defines_pthreads=yes
8453else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008454 unistd_defines_pthreads=no
8455fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008456rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008457
Matthias Kloseb9621712010-04-24 17:59:49 +00008458 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
8459$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008460
Matthias Kloseb9621712010-04-24 17:59:49 +00008461 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00008462
Matthias Kloseb9621712010-04-24 17:59:49 +00008463 ac_fn_c_check_header_mongrel "$LINENO" "cthreads.h" "ac_cv_header_cthreads_h" "$ac_includes_default"
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008464if test "x$ac_cv_header_cthreads_h" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008465 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008466
Matthias Kloseb9621712010-04-24 17:59:49 +00008467 $as_echo "#define C_THREADS 1" >>confdefs.h
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008468
Martin v. Löwis11437992002-04-12 09:54:03 +00008469
Matthias Kloseb9621712010-04-24 17:59:49 +00008470$as_echo "#define HURD_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008471
8472 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008473 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008474else
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008475
Matthias Kloseb9621712010-04-24 17:59:49 +00008476 ac_fn_c_check_header_mongrel "$LINENO" "mach/cthreads.h" "ac_cv_header_mach_cthreads_h" "$ac_includes_default"
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008477if test "x$ac_cv_header_mach_cthreads_h" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008478 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008479
Matthias Kloseb9621712010-04-24 17:59:49 +00008480 $as_echo "#define C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008481
Martin v. Löwis11437992002-04-12 09:54:03 +00008482
Matthias Kloseb9621712010-04-24 17:59:49 +00008483$as_echo "#define MACH_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008484
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008485 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008486else
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008487
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008488 # Just looking for pthread_create in libpthread is not enough:
8489 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
8490 # So we really have to include pthread.h, and then link.
8491 _libs=$LIBS
8492 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00008493 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
8494$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
8495 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008496/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008497#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00008498
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008499void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00008500int
8501main ()
8502{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008503
8504pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00008505 ;
8506 return 0;
8507}
8508_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008509if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008510
Matthias Kloseb9621712010-04-24 17:59:49 +00008511 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8512$as_echo "yes" >&6; }
8513 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00008514
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008515 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008516 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00008517else
Martin v. Löwis11437992002-04-12 09:54:03 +00008518
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008519 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +00008520 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008521if test "x$ac_cv_func_pthread_detach" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008522 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00008523
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008524 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008525 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00008526else
Guido van Rossumad678af1998-10-02 14:42:15 +00008527
Matthias Kloseb9621712010-04-24 17:59:49 +00008528 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
8529$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008530if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008531 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008532else
Martin v. Löwis11437992002-04-12 09:54:03 +00008533 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008534LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008535cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008536/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008537
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008538/* Override any GCC internal prototype to avoid an error.
8539 Use char because int might match the return type of a GCC
8540 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008541#ifdef __cplusplus
8542extern "C"
8543#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008544char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008545int
8546main ()
8547{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008548return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008549 ;
8550 return 0;
8551}
8552_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008553if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008554 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00008555else
Matthias Kloseb9621712010-04-24 17:59:49 +00008556 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00008557fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008558rm -f core conftest.err conftest.$ac_objext \
8559 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008560LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008561fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008562{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
8563$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008564if test "x$ac_cv_lib_pthreads_pthread_create" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008565 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00008566
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008567 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008568 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008569 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00008570else
Greg Steinadf63d62000-07-05 10:38:09 +00008571
Matthias Kloseb9621712010-04-24 17:59:49 +00008572 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
8573$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008574if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008575 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00008576else
Martin v. Löwis11437992002-04-12 09:54:03 +00008577 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008578LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008579cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008580/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008581
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008582/* Override any GCC internal prototype to avoid an error.
8583 Use char because int might match the return type of a GCC
8584 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008585#ifdef __cplusplus
8586extern "C"
8587#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008588char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008589int
8590main ()
8591{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008592return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008593 ;
8594 return 0;
8595}
8596_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008597if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008598 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00008599else
Matthias Kloseb9621712010-04-24 17:59:49 +00008600 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00008601fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008602rm -f core conftest.err conftest.$ac_objext \
8603 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008604LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00008605fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008606{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
8607$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008608if test "x$ac_cv_lib_c_r_pthread_create" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008609 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00008610
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008611 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008612 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008613 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008614else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008615
Matthias Kloseb9621712010-04-24 17:59:49 +00008616 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
8617$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008618if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008619 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008620else
Martin v. Löwis11437992002-04-12 09:54:03 +00008621 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008622LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008623cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008624/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008625
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008626/* Override any GCC internal prototype to avoid an error.
8627 Use char because int might match the return type of a GCC
8628 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008629#ifdef __cplusplus
8630extern "C"
8631#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008632char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008633int
8634main ()
8635{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008636return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008637 ;
8638 return 0;
8639}
8640_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008641if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008642 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008643else
Matthias Kloseb9621712010-04-24 17:59:49 +00008644 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008645fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008646rm -f core conftest.err conftest.$ac_objext \
8647 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008648LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008649fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008650{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
8651$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008652if test "x$ac_cv_lib_pthread___pthread_create_system" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008653 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008654
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008655 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008656 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008657 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008658else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008659
Matthias Kloseb9621712010-04-24 17:59:49 +00008660 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
8661$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008662if test "${ac_cv_lib_cma_pthread_create+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008663 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00008664else
Martin v. Löwis11437992002-04-12 09:54:03 +00008665 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008666LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008667cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008668/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008669
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008670/* Override any GCC internal prototype to avoid an error.
8671 Use char because int might match the return type of a GCC
8672 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008673#ifdef __cplusplus
8674extern "C"
8675#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008676char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008677int
8678main ()
8679{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008680return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008681 ;
8682 return 0;
8683}
8684_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008685if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008686 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00008687else
Matthias Kloseb9621712010-04-24 17:59:49 +00008688 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00008689fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008690rm -f core conftest.err conftest.$ac_objext \
8691 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008692LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008693fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008694{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
8695$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008696if test "x$ac_cv_lib_cma_pthread_create" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008697 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00008698
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008699 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008700 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008701 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00008702else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00008703
Martin v. Löwis130fb172001-07-19 11:00:41 +00008704 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00008705fi
8706
Guido van Rossum627b2d71993-12-24 10:39:16 +00008707
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008708fi
8709
Guido van Rossum0be3e491997-05-22 20:33:33 +00008710fi
8711
Guido van Rossum49545951997-12-02 19:28:29 +00008712fi
8713
Guido van Rossumb93a8621998-05-07 13:27:32 +00008714fi
8715
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008716fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008717rm -f core conftest.err conftest.$ac_objext \
8718 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008719fi
8720
Martin v. Löwis11437992002-04-12 09:54:03 +00008721
8722fi
8723
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008724
Michael W. Hudson54241132001-12-07 15:38:26 +00008725
Matthias Kloseb9621712010-04-24 17:59:49 +00008726 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
8727$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008728if test "${ac_cv_lib_mpc_usconfig+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008729 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008730else
Martin v. Löwis11437992002-04-12 09:54:03 +00008731 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008732LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008733cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008734/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008735
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008736/* Override any GCC internal prototype to avoid an error.
8737 Use char because int might match the return type of a GCC
8738 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008739#ifdef __cplusplus
8740extern "C"
8741#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008742char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008743int
8744main ()
8745{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008746return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008747 ;
8748 return 0;
8749}
8750_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008751if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008752 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008753else
Matthias Kloseb9621712010-04-24 17:59:49 +00008754 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008755fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008756rm -f core conftest.err conftest.$ac_objext \
8757 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008758LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008759fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008760{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
8761$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008762if test "x$ac_cv_lib_mpc_usconfig" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008763 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008764
Martin v. Löwis130fb172001-07-19 11:00:41 +00008765 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008766 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008767 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008768fi
8769
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008770
Neal Norwitza978ab02002-11-02 16:58:05 +00008771 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008772 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
8773$as_echo_n "checking for thr_create in -lthread... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008774if test "${ac_cv_lib_thread_thr_create+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008775 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008776else
Martin v. Löwis11437992002-04-12 09:54:03 +00008777 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008778LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008779cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008780/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008781
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008782/* Override any GCC internal prototype to avoid an error.
8783 Use char because int might match the return type of a GCC
8784 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008785#ifdef __cplusplus
8786extern "C"
8787#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008788char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008789int
8790main ()
8791{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008792return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008793 ;
8794 return 0;
8795}
8796_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008797if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008798 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008799else
Matthias Kloseb9621712010-04-24 17:59:49 +00008800 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008801fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008802rm -f core conftest.err conftest.$ac_objext \
8803 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008804LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008805fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008806{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
8807$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008808if test "x$ac_cv_lib_thread_thr_create" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008809 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008810
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008811 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008812 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008813 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008814fi
8815
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008816 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008817fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008818
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008819if test "$posix_threads" = "yes"; then
8820 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008821
Matthias Kloseb9621712010-04-24 17:59:49 +00008822$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008823
8824 fi
8825
8826 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
8827 case $ac_sys_system/$ac_sys_release in
8828 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +00008829$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008830
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008831 ;;
8832 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +00008833$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008834
8835 ;;
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00008836 AIX/5)
Matthias Kloseb9621712010-04-24 17:59:49 +00008837$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00008838
8839 ;;
Antoine Pitrou33a29942010-08-30 14:52:00 +00008840 AIX/6)
8841$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
8842
8843 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008844 esac
8845
Matthias Kloseb9621712010-04-24 17:59:49 +00008846 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
8847$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008848 if test "${ac_cv_pthread_system_supported+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008849 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008850else
Matthias Kloseb9621712010-04-24 17:59:49 +00008851 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008852 ac_cv_pthread_system_supported=no
8853else
Matthias Kloseb9621712010-04-24 17:59:49 +00008854 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008855/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008856#include <pthread.h>
8857 void *foo(void *parm) {
8858 return NULL;
8859 }
8860 main() {
8861 pthread_attr_t attr;
8862 pthread_t id;
8863 if (pthread_attr_init(&attr)) exit(-1);
8864 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
8865 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
8866 exit(0);
8867 }
8868_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008869if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008870 ac_cv_pthread_system_supported=yes
8871else
Matthias Kloseb9621712010-04-24 17:59:49 +00008872 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008873fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008874rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8875 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008876fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008877
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008878
Guido van Rossum627b2d71993-12-24 10:39:16 +00008879fi
8880
Matthias Kloseb9621712010-04-24 17:59:49 +00008881 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
8882$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008883 if test "$ac_cv_pthread_system_supported" = "yes"; then
8884
Matthias Kloseb9621712010-04-24 17:59:49 +00008885$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008886
8887 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008888 for ac_func in pthread_sigmask
8889do :
8890 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008891if test "x$ac_cv_func_pthread_sigmask" = x""yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008892 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008893#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008894_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +00008895 case $ac_sys_system in
8896 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008897
Matthias Kloseb9621712010-04-24 17:59:49 +00008898$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +00008899
8900 ;;
8901 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008902fi
8903done
8904
8905fi
8906
8907
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008908# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +00008909
Matthias Kloseb9621712010-04-24 17:59:49 +00008910{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
8911$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008912# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008913if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008914 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008915 no)
Matthias Kloseb9621712010-04-24 17:59:49 +00008916 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8917$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008918 ipv6=no
8919 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00008920 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8921$as_echo "yes" >&6; }
8922 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008923
8924 ipv6=yes
8925 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008926 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008927else
Martin v. Löwis11437992002-04-12 09:54:03 +00008928
Matthias Kloseb9621712010-04-24 17:59:49 +00008929 if test "$cross_compiling" = yes; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008930
Matthias Kloseb9621712010-04-24 17:59:49 +00008931 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8932$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008933 ipv6=no
8934
8935else
Matthias Kloseb9621712010-04-24 17:59:49 +00008936 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008937/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008938 /* AF_INET6 available check */
8939#include <sys/types.h>
8940#include <sys/socket.h>
8941main()
8942{
8943 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
8944 exit(1);
8945 else
8946 exit(0);
8947}
8948
Martin v. Löwis11437992002-04-12 09:54:03 +00008949_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008950if ac_fn_c_try_run "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008951
Matthias Kloseb9621712010-04-24 17:59:49 +00008952 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8953$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008954 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +00008955
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008956else
Matthias Kloseb159a552010-04-25 21:00:44 +00008957
Matthias Kloseb9621712010-04-24 17:59:49 +00008958 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8959$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008960 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +00008961
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008962fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008963rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8964 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008965fi
8966
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008967
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008968if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008969 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
8970$as_echo_n "checking if RFC2553 API is available... " >&6; }
8971 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008972/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008973
8974 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008975#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008976int
8977main ()
8978{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008979struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +00008980 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +00008981 ;
8982 return 0;
8983}
Matthias Kloseb159a552010-04-25 21:00:44 +00008984
Martin v. Löwis11437992002-04-12 09:54:03 +00008985_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008986if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008987
8988 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008989$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008990 ipv6=yes
8991
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008992else
Matthias Kloseb159a552010-04-25 21:00:44 +00008993
8994 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008995$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008996 ipv6=no
8997
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008998fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008999rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009000fi
9001
9002if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009003 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009004
9005fi
9006
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009007fi
9008
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009009
9010ipv6type=unknown
9011ipv6lib=none
9012ipv6trylibc=no
9013
9014if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009015 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
9016$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +00009017 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
9018 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009019 case $i in
9020 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +00009021 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009022/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009023
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009024#include <netinet/in.h>
9025#ifdef IPV6_INRIA_VERSION
9026yes
9027#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009028_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009029if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009030 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009031 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009032fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009033rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009034
9035 ;;
9036 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +00009037 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009038/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009039
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009040#include <netinet/in.h>
9041#ifdef __KAME__
9042yes
9043#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009044_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009045if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009046 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009047 ipv6type=$i;
9048 ipv6lib=inet6
9049 ipv6libdir=/usr/local/v6/lib
9050 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009051fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009052rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009053
9054 ;;
9055 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +00009056 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009057/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009058
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009059#include <features.h>
9060#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
9061yes
9062#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009063_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009064if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009065 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009066 ipv6type=$i;
9067 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009068fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009069rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009070
9071 ;;
9072 linux-inet6)
9073 if test -d /usr/inet6; then
9074 ipv6type=$i
9075 ipv6lib=inet6
9076 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +00009077 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009078 fi
9079 ;;
9080 solaris)
9081 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +00009082 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009083 ipv6type=$i
9084 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009085 fi
9086 fi
9087 ;;
9088 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +00009089 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009090/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009091
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009092#include <sys/param.h>
9093#ifdef _TOSHIBA_INET6
9094yes
9095#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009096_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009097if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009098 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009099 ipv6type=$i;
9100 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009101 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009102fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009103rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009104
9105 ;;
9106 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +00009107 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009108/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009109
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009110#include </usr/local/v6/include/sys/v6config.h>
9111#ifdef __V6D__
9112yes
9113#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009114_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009115if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009116 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009117 ipv6type=$i;
9118 ipv6lib=v6;
9119 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +00009120 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009121fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009122rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009123
9124 ;;
9125 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +00009126 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009127/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009128
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009129#include <sys/param.h>
9130#ifdef _ZETA_MINAMI_INET6
9131yes
9132#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009133_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009134if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009135 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009136 ipv6type=$i;
9137 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009138 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009139fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009140rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009141
9142 ;;
9143 esac
9144 if test "$ipv6type" != "unknown"; then
9145 break
9146 fi
9147 done
Matthias Kloseb9621712010-04-24 17:59:49 +00009148 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
9149$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009150fi
9151
9152if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
9153 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
9154 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
9155 echo "using lib$ipv6lib"
9156 else
9157 if test $ipv6trylibc = "yes"; then
9158 echo "using libc"
9159 else
9160 echo 'Fatal: no $ipv6lib library found. cannot continue.'
9161 echo "You need to fetch lib$ipv6lib.a from appropriate"
9162 echo 'ipv6 kit and compile beforehand.'
9163 exit 1
9164 fi
9165 fi
9166fi
9167
Matthias Kloseb9621712010-04-24 17:59:49 +00009168{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
9169$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
9170cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009171/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009172
9173 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009174int
9175main ()
9176{
9177FSIORefNum fRef = 0
9178 ;
9179 return 0;
9180}
Matthias Kloseb159a552010-04-25 21:00:44 +00009181
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009182_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009183if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009184
Matthias Kloseb159a552010-04-25 21:00:44 +00009185
Matthias Kloseb9621712010-04-24 17:59:49 +00009186$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009187
Matthias Kloseb9621712010-04-24 17:59:49 +00009188 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9189$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009190
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009191else
Matthias Kloseb159a552010-04-25 21:00:44 +00009192
Matthias Kloseb9621712010-04-24 17:59:49 +00009193 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9194$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009195
9196fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009197rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9198
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009199# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +00009200{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
9201$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009202
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009203# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009204if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009205 withval=$with_doc_strings;
9206fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009207
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009208
9209if test -z "$with_doc_strings"
9210then with_doc_strings="yes"
9211fi
9212if test "$with_doc_strings" != "no"
9213then
9214
Matthias Kloseb9621712010-04-24 17:59:49 +00009215$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009216
9217fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009218{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
9219$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009220
Antoine Pitrou042b1282010-08-13 21:15:58 +00009221# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +00009222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
9223$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009224
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009225# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009226if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009227 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009228if test "$withval" != no
9229then
9230
Matthias Kloseb9621712010-04-24 17:59:49 +00009231$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009232
Matthias Kloseb9621712010-04-24 17:59:49 +00009233 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9234$as_echo "yes" >&6; }
9235else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9236$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009237fi
9238else
Matthias Kloseb9621712010-04-24 17:59:49 +00009239 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9240$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009241fi
9242
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009243
9244# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +00009245{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
9246$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009247
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009248# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009249if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009250 withval=$with_pymalloc;
9251fi
Michael W. Hudson54241132001-12-07 15:38:26 +00009252
Neil Schemenauera35c6882001-02-27 04:45:05 +00009253
Neil Schemenauer16c22972002-03-22 15:34:49 +00009254if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00009255then
9256 with_pymalloc="yes"
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00009257 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +00009258fi
9259if test "$with_pymalloc" != "no"
9260then
Martin v. Löwis11437992002-04-12 09:54:03 +00009261
Matthias Kloseb9621712010-04-24 17:59:49 +00009262$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +00009263
9264fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009265{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
9266$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +00009267
Benjamin Peterson05159c42009-12-03 03:01:27 +00009268# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +00009269{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
9270$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009271
9272# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009273if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009274 withval=$with_valgrind;
9275else
9276 with_valgrind=no
9277fi
9278
Matthias Kloseb9621712010-04-24 17:59:49 +00009279{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
9280$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009281if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009282 ac_fn_c_check_header_mongrel "$LINENO" "valgrind/valgrind.h" "ac_cv_header_valgrind_valgrind_h" "$ac_includes_default"
Benjamin Peterson316e02b2011-05-10 15:01:56 -05009283if test "x$ac_cv_header_valgrind_valgrind_h" = x""yes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009284
Matthias Kloseb9621712010-04-24 17:59:49 +00009285$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +00009286
9287else
Benjamin Peterson87cdb812011-05-31 18:26:08 -05009288 as_fn_error "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +00009289
9290fi
9291
9292
Jeffrey Yasskin39370832010-05-03 19:29:34 +00009293 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +00009294fi
9295
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009296# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00009297
Guido van Rossum98935bf2001-09-05 19:13:16 +00009298DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +00009299
Guido van Rossume97ee181999-12-20 21:27:22 +00009300# the dlopen() function means we might want to use dynload_shlib.o. some
9301# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +00009302for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +00009303do :
9304 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Benjamin Peterson316e02b2011-05-10 15:01:56 -05009305if test "x$ac_cv_func_dlopen" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009306 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009307#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009308_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +00009309
Guido van Rossume97ee181999-12-20 21:27:22 +00009310fi
Thomas Wouters3a584202000-08-05 23:28:51 +00009311done
Guido van Rossume97ee181999-12-20 21:27:22 +00009312
Michael W. Hudson54241132001-12-07 15:38:26 +00009313
Guido van Rossume97ee181999-12-20 21:27:22 +00009314# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
9315# loading of modules.
9316
Matthias Kloseb9621712010-04-24 17:59:49 +00009317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
9318$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009319if test -z "$DYNLOADFILE"
9320then
9321 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00009322 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
9323 if test "$ac_cv_func_dlopen" = yes
9324 then DYNLOADFILE="dynload_shlib.o"
9325 else DYNLOADFILE="dynload_aix.o"
9326 fi
9327 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +00009328 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009329 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
9330 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +00009331 *)
9332 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
9333 # out any dynamic loading
9334 if test "$ac_cv_func_dlopen" = yes
9335 then DYNLOADFILE="dynload_shlib.o"
9336 else DYNLOADFILE="dynload_stub.o"
9337 fi
9338 ;;
9339 esac
9340fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009341{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
9342$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009343if test "$DYNLOADFILE" != "dynload_stub.o"
9344then
Martin v. Löwis11437992002-04-12 09:54:03 +00009345
Matthias Kloseb9621712010-04-24 17:59:49 +00009346$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +00009347
9348fi
9349
Neil Schemenauer4e425612001-06-19 15:44:15 +00009350# MACHDEP_OBJS can be set to platform-specific object files needed by Python
9351
Michael W. Hudson54241132001-12-07 15:38:26 +00009352
Matthias Kloseb9621712010-04-24 17:59:49 +00009353{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
9354$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009355if test -z "$MACHDEP_OBJS"
9356then
Jack Jansene578a632001-08-15 01:27:14 +00009357 MACHDEP_OBJS=$extra_machdep_objs
9358else
9359 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +00009360fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009361{ $as_echo "$as_me:${as_lineno-$LINENO}: result: MACHDEP_OBJS" >&5
9362$as_echo "MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009363
Guido van Rossum627b2d71993-12-24 10:39:16 +00009364# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +00009365for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Antoine Pitrou8250e232011-02-25 23:41:16 +00009366 clock confstr ctermid execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +02009367 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
9368 futimens futimes \
Martin v. Löwis438b5342002-12-27 10:16:42 +00009369 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +00009370 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07009371 if_nameindex \
Ross Lagerwall7807c352011-03-17 20:20:30 +02009372 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +02009373 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +02009374 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +02009375 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Georg Brandl941f9562011-02-25 15:21:47 +00009376 select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +00009377 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +00009378 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Victor Stinnerb3e72192011-05-08 01:46:11 +02009379 sigaction sigaltstack siginterrupt sigpending \
9380 sigrelse sigwait snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +00009381 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +02009382 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
9383 wcscoll wcsftime wcsxfrm writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +00009384do :
9385 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9386ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Benjamin Peterson87cdb812011-05-31 18:26:08 -05009387eval as_val=\$$as_ac_var
9388 if test "x$as_val" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009389 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009390#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009391_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00009392
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009393fi
9394done
9395
Michael W. Hudson54241132001-12-07 15:38:26 +00009396
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009397# For some functions, having a definition is not sufficient, since
9398# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +00009399{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
9400$as_echo_n "checking for chroot... " >&6; }
9401cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009402/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009403#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009404int
9405main ()
9406{
9407void *x=chroot
9408 ;
9409 return 0;
9410}
9411_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009412if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009413
Matthias Kloseb9621712010-04-24 17:59:49 +00009414$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009415
Matthias Kloseb159a552010-04-25 21:00:44 +00009416 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009417$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009418else
Matthias Kloseb9621712010-04-24 17:59:49 +00009419 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9420$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009421
9422fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009423rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009424{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
9425$as_echo_n "checking for link... " >&6; }
9426cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009427/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009428#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009429int
9430main ()
9431{
9432void *x=link
9433 ;
9434 return 0;
9435}
9436_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009437if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009438
Matthias Kloseb9621712010-04-24 17:59:49 +00009439$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009440
Matthias Kloseb159a552010-04-25 21:00:44 +00009441 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009442$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009443else
Matthias Kloseb9621712010-04-24 17:59:49 +00009444 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9445$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009446
9447fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009448rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009449{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
9450$as_echo_n "checking for symlink... " >&6; }
9451cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009452/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009453#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009454int
9455main ()
9456{
9457void *x=symlink
9458 ;
9459 return 0;
9460}
9461_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009462if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009463
Matthias Kloseb9621712010-04-24 17:59:49 +00009464$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009465
Matthias Kloseb159a552010-04-25 21:00:44 +00009466 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009467$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009468else
Matthias Kloseb9621712010-04-24 17:59:49 +00009469 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9470$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009471
9472fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009473rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009474{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
9475$as_echo_n "checking for fchdir... " >&6; }
9476cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009477/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009478#include <unistd.h>
9479int
9480main ()
9481{
9482void *x=fchdir
9483 ;
9484 return 0;
9485}
9486_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009487if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009488
Matthias Kloseb9621712010-04-24 17:59:49 +00009489$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009490
Matthias Kloseb159a552010-04-25 21:00:44 +00009491 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009492$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009493else
Matthias Kloseb9621712010-04-24 17:59:49 +00009494 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9495$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009496
9497fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009498rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
9500$as_echo_n "checking for fsync... " >&6; }
9501cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009502/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009503#include <unistd.h>
9504int
9505main ()
9506{
9507void *x=fsync
9508 ;
9509 return 0;
9510}
9511_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009512if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009513
Matthias Kloseb9621712010-04-24 17:59:49 +00009514$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009515
Matthias Kloseb159a552010-04-25 21:00:44 +00009516 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009517$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009518else
Matthias Kloseb9621712010-04-24 17:59:49 +00009519 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9520$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009521
9522fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009523rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009524{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
9525$as_echo_n "checking for fdatasync... " >&6; }
9526cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009527/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009528#include <unistd.h>
9529int
9530main ()
9531{
9532void *x=fdatasync
9533 ;
9534 return 0;
9535}
9536_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009537if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009538
Matthias Kloseb9621712010-04-24 17:59:49 +00009539$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009540
Matthias Kloseb159a552010-04-25 21:00:44 +00009541 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009542$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009543else
Matthias Kloseb9621712010-04-24 17:59:49 +00009544 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9545$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009546
9547fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009548rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009549{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
9550$as_echo_n "checking for epoll... " >&6; }
9551cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009552/* end confdefs.h. */
9553#include <sys/epoll.h>
9554int
9555main ()
9556{
9557void *x=epoll_create
9558 ;
9559 return 0;
9560}
9561_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009562if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009563
Matthias Kloseb9621712010-04-24 17:59:49 +00009564$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009565
Matthias Kloseb159a552010-04-25 21:00:44 +00009566 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009567$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009568else
Matthias Kloseb9621712010-04-24 17:59:49 +00009569 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9570$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009571
9572fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009573rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009574{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
9575$as_echo_n "checking for kqueue... " >&6; }
9576cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009577/* end confdefs.h. */
9578
9579#include <sys/types.h>
9580#include <sys/event.h>
9581
9582int
9583main ()
9584{
9585int x=kqueue()
9586 ;
9587 return 0;
9588}
9589_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009590if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009591
Matthias Kloseb9621712010-04-24 17:59:49 +00009592$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009593
Matthias Kloseb159a552010-04-25 21:00:44 +00009594 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009595$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009596else
Matthias Kloseb9621712010-04-24 17:59:49 +00009597 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9598$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009599
9600fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009601rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +00009602# On some systems (eg. FreeBSD 5), we would find a definition of the
9603# functions ctermid_r, setgroups in the library, but no prototype
9604# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
9605# address to avoid compiler warnings and potential miscompilations
9606# because of the missing prototypes.
9607
Matthias Kloseb9621712010-04-24 17:59:49 +00009608{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
9609$as_echo_n "checking for ctermid_r... " >&6; }
9610cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009611/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +00009612
Martin v. Löwisd5843682002-11-21 20:41:28 +00009613#include <stdio.h>
9614
Martin v. Löwisd5843682002-11-21 20:41:28 +00009615int
9616main ()
9617{
9618void* p = ctermid_r
9619 ;
9620 return 0;
9621}
9622_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009623if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +00009624
Matthias Kloseb9621712010-04-24 17:59:49 +00009625$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +00009626
Matthias Kloseb159a552010-04-25 21:00:44 +00009627 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009628$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009629else
Matthias Kloseb9621712010-04-24 17:59:49 +00009630 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9631$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009632
9633fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009634rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9635
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009636{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
9637$as_echo_n "checking for flock declaration... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05009638if test "${ac_cv_flock_decl+set}" = set; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009639 $as_echo_n "(cached) " >&6
9640else
9641 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009642/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009643#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009644int
9645main ()
9646{
9647void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009648
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009649 ;
9650 return 0;
9651}
9652_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009653if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009654 ac_cv_flock_decl=yes
9655else
9656 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009657
9658fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009659rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +00009660
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009661fi
9662{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
9663$as_echo "$ac_cv_flock_decl" >&6; }
9664if test "x${ac_cv_flock_decl}" = xyes; then
9665 for ac_func in flock
9666do :
9667 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Benjamin Peterson316e02b2011-05-10 15:01:56 -05009668if test "x$ac_cv_func_flock" = x""yes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009669 cat >>confdefs.h <<_ACEOF
9670#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +00009671_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009672
Antoine Pitroua3000072010-09-07 14:52:42 +00009673else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009674 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +00009675$as_echo_n "checking for flock in -lbsd... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05009676if test "${ac_cv_lib_bsd_flock+set}" = set; then :
Antoine Pitroua3000072010-09-07 14:52:42 +00009677 $as_echo_n "(cached) " >&6
9678else
9679 ac_check_lib_save_LIBS=$LIBS
9680LIBS="-lbsd $LIBS"
9681cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9682/* end confdefs.h. */
9683
9684/* Override any GCC internal prototype to avoid an error.
9685 Use char because int might match the return type of a GCC
9686 builtin and then its argument prototype would still apply. */
9687#ifdef __cplusplus
9688extern "C"
9689#endif
9690char flock ();
9691int
9692main ()
9693{
9694return flock ();
9695 ;
9696 return 0;
9697}
9698_ACEOF
9699if ac_fn_c_try_link "$LINENO"; then :
9700 ac_cv_lib_bsd_flock=yes
9701else
9702 ac_cv_lib_bsd_flock=no
9703fi
9704rm -f core conftest.err conftest.$ac_objext \
9705 conftest$ac_exeext conftest.$ac_ext
9706LIBS=$ac_check_lib_save_LIBS
9707fi
9708{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
9709$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05009710if test "x$ac_cv_lib_bsd_flock" = x""yes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009711 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +00009712
9713
9714$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
9715
9716
9717fi
9718
9719
9720fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009721done
9722
Antoine Pitroua3000072010-09-07 14:52:42 +00009723fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009724
Matthias Kloseb9621712010-04-24 17:59:49 +00009725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
9726$as_echo_n "checking for getpagesize... " >&6; }
9727cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009728/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009729
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009730#include <unistd.h>
9731
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009732int
9733main ()
9734{
9735void* p = getpagesize
9736 ;
9737 return 0;
9738}
9739_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009740if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009741
Matthias Kloseb9621712010-04-24 17:59:49 +00009742$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009743
Matthias Kloseb159a552010-04-25 21:00:44 +00009744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009745$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009746else
Matthias Kloseb9621712010-04-24 17:59:49 +00009747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9748$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009749
9750fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009751rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009752
Antoine Pitrou6f26be02011-05-03 18:18:59 +02009753{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mallopt can set malloc mmap threshold" >&5
9754$as_echo_n "checking whether mallopt can set malloc mmap threshold... " >&6; }
9755cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9756/* end confdefs.h. */
9757
9758#include <malloc.h>
9759
9760int
9761main ()
9762{
9763mallopt(M_MMAP_THRESHOLD, 256 * 1024)
9764 ;
9765 return 0;
9766}
9767_ACEOF
9768if ac_fn_c_try_compile "$LINENO"; then :
9769
9770$as_echo "#define HAVE_MALLOPT_MMAP_THRESHOLD 1" >>confdefs.h
9771
9772 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9773$as_echo "yes" >&6; }
9774else
9775 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9776$as_echo "no" >&6; }
9777
9778fi
9779rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9780
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009781for ac_prog in true
9782do
9783 # Extract the first word of "$ac_prog", so it can be a program name with args.
9784set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00009785{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9786$as_echo_n "checking for $ac_word... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05009787if test "${ac_cv_prog_TRUE+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009788 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009789else
9790 if test -n "$TRUE"; then
9791 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
9792else
9793as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9794for as_dir in $PATH
9795do
9796 IFS=$as_save_IFS
9797 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009798 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009799 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 +00009800 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00009801 $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 +00009802 break 2
9803 fi
9804done
Matthias Kloseb9621712010-04-24 17:59:49 +00009805 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009806IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009807
9808fi
9809fi
9810TRUE=$ac_cv_prog_TRUE
9811if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009812 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
9813$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009814else
Matthias Kloseb9621712010-04-24 17:59:49 +00009815 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9816$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009817fi
9818
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009819
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009820 test -n "$TRUE" && break
9821done
9822test -n "$TRUE" || TRUE="/bin/true"
9823
9824
Matthias Kloseb9621712010-04-24 17:59:49 +00009825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
9826$as_echo_n "checking for inet_aton in -lc... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05009827if test "${ac_cv_lib_c_inet_aton+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009828 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009829else
9830 ac_check_lib_save_LIBS=$LIBS
9831LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009832cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009833/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009834
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009835/* Override any GCC internal prototype to avoid an error.
9836 Use char because int might match the return type of a GCC
9837 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009838#ifdef __cplusplus
9839extern "C"
9840#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009841char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009842int
9843main ()
9844{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009845return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009846 ;
9847 return 0;
9848}
9849_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009850if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009851 ac_cv_lib_c_inet_aton=yes
9852else
Matthias Kloseb9621712010-04-24 17:59:49 +00009853 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009854fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009855rm -f core conftest.err conftest.$ac_objext \
9856 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009857LIBS=$ac_check_lib_save_LIBS
9858fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009859{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
9860$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05009861if test "x$ac_cv_lib_c_inet_aton" = x""yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009862 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009863else
Matthias Kloseb9621712010-04-24 17:59:49 +00009864 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
9865$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05009866if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009867 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009868else
9869 ac_check_lib_save_LIBS=$LIBS
9870LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009871cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009872/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009873
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009874/* Override any GCC internal prototype to avoid an error.
9875 Use char because int might match the return type of a GCC
9876 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009877#ifdef __cplusplus
9878extern "C"
9879#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009880char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009881int
9882main ()
9883{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009884return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009885 ;
9886 return 0;
9887}
9888_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009889if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009890 ac_cv_lib_resolv_inet_aton=yes
9891else
Matthias Kloseb9621712010-04-24 17:59:49 +00009892 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009893fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009894rm -f core conftest.err conftest.$ac_objext \
9895 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009896LIBS=$ac_check_lib_save_LIBS
9897fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009898{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
9899$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05009900if test "x$ac_cv_lib_resolv_inet_aton" = x""yes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009901 cat >>confdefs.h <<_ACEOF
9902#define HAVE_LIBRESOLV 1
9903_ACEOF
9904
9905 LIBS="-lresolv $LIBS"
9906
9907fi
9908
9909
9910fi
9911
9912
Christian Heimesd0764e22007-12-04 15:00:33 +00009913# On Tru64, chflags seems to be present, but calling it will
9914# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +00009915{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
9916$as_echo_n "checking for chflags... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05009917if test "${ac_cv_have_chflags+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009918 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009919else
Matthias Kloseb9621712010-04-24 17:59:49 +00009920 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009921 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +00009922else
Matthias Kloseb9621712010-04-24 17:59:49 +00009923 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +00009924/* end confdefs.h. */
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009925[
Christian Heimesd0764e22007-12-04 15:00:33 +00009926#include <sys/stat.h>
9927#include <unistd.h>
9928int main(int argc, char*argv[])
9929{
9930 if(chflags(argv[0], 0) != 0)
9931 return 1;
9932 return 0;
9933}
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009934]
Christian Heimesd0764e22007-12-04 15:00:33 +00009935_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009936if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009937 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009938else
Matthias Kloseb9621712010-04-24 17:59:49 +00009939 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009940fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009941rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9942 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009943fi
9944
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009945
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009946fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009947{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
9948$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009949if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009950 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Benjamin Peterson316e02b2011-05-10 15:01:56 -05009951if test "x$ac_cv_func_chflags" = x""yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009952 ac_cv_have_chflags="yes"
9953else
9954 ac_cv_have_chflags="no"
9955fi
9956
9957fi
9958if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009959
Matthias Kloseb9621712010-04-24 17:59:49 +00009960$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009961
9962fi
9963
Matthias Kloseb9621712010-04-24 17:59:49 +00009964{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
9965$as_echo_n "checking for lchflags... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05009966if test "${ac_cv_have_lchflags+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009967 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009968else
Matthias Kloseb9621712010-04-24 17:59:49 +00009969 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009970 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +00009971else
Matthias Kloseb9621712010-04-24 17:59:49 +00009972 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +00009973/* end confdefs.h. */
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009974[
Christian Heimesd0764e22007-12-04 15:00:33 +00009975#include <sys/stat.h>
9976#include <unistd.h>
9977int main(int argc, char*argv[])
9978{
9979 if(lchflags(argv[0], 0) != 0)
9980 return 1;
9981 return 0;
9982}
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009983]
Christian Heimesd0764e22007-12-04 15:00:33 +00009984_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009985if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009986 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009987else
Matthias Kloseb9621712010-04-24 17:59:49 +00009988 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +00009989fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009990rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9991 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009992fi
9993
9994
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009995fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009996{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
9997$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009998if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009999 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010000if test "x$ac_cv_func_lchflags" = x""yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010001 ac_cv_have_lchflags="yes"
10002else
10003 ac_cv_have_lchflags="no"
10004fi
10005
10006fi
10007if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010008
Matthias Kloseb9621712010-04-24 17:59:49 +000010009$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010010
10011fi
10012
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010013case $ac_sys_system/$ac_sys_release in
10014Darwin/*)
10015 _CUR_CFLAGS="${CFLAGS}"
10016 _CUR_LDFLAGS="${LDFLAGS}"
10017 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
10018 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
10019 ;;
10020esac
10021
Matthias Kloseb9621712010-04-24 17:59:49 +000010022{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
10023$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010024if test "${ac_cv_lib_z_inflateCopy+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010025 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010026else
10027 ac_check_lib_save_LIBS=$LIBS
10028LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010029cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010030/* end confdefs.h. */
10031
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010032/* Override any GCC internal prototype to avoid an error.
10033 Use char because int might match the return type of a GCC
10034 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010035#ifdef __cplusplus
10036extern "C"
10037#endif
10038char inflateCopy ();
10039int
10040main ()
10041{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010042return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010043 ;
10044 return 0;
10045}
10046_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010047if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010048 ac_cv_lib_z_inflateCopy=yes
10049else
Matthias Kloseb9621712010-04-24 17:59:49 +000010050 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010051fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010052rm -f core conftest.err conftest.$ac_objext \
10053 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010054LIBS=$ac_check_lib_save_LIBS
10055fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010056{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
10057$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010058if test "x$ac_cv_lib_z_inflateCopy" = x""yes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010059
Matthias Kloseb9621712010-04-24 17:59:49 +000010060$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010061
10062fi
10063
10064
10065case $ac_sys_system/$ac_sys_release in
10066Darwin/*)
10067 CFLAGS="${_CUR_CFLAGS}"
10068 LDFLAGS="${_CUR_LDFLAGS}"
10069 ;;
10070esac
10071
Matthias Kloseb9621712010-04-24 17:59:49 +000010072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
10073$as_echo_n "checking for hstrerror... " >&6; }
10074cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010075/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010076
Martin v. Löwise9416172003-05-03 10:12:45 +000010077#include <netdb.h>
10078
Martin v. Löwise9416172003-05-03 10:12:45 +000010079int
10080main ()
10081{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010082void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010083 ;
10084 return 0;
10085}
10086_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010087if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010088
Matthias Kloseb9621712010-04-24 17:59:49 +000010089$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010090
Matthias Kloseb159a552010-04-25 21:00:44 +000010091 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010092$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010093else
Matthias Kloseb9621712010-04-24 17:59:49 +000010094 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10095$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010096
10097fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010098rm -f core conftest.err conftest.$ac_objext \
10099 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010100
Matthias Kloseb9621712010-04-24 17:59:49 +000010101{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
10102$as_echo_n "checking for inet_aton... " >&6; }
10103cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010104/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010105
Martin v. Löwis86d66262006-02-17 08:40:11 +000010106#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010107#include <sys/socket.h>
10108#include <netinet/in.h>
10109#include <arpa/inet.h>
10110
Martin v. Löwise9416172003-05-03 10:12:45 +000010111int
10112main ()
10113{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010114void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010115 ;
10116 return 0;
10117}
10118_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010119if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010120
Matthias Kloseb9621712010-04-24 17:59:49 +000010121$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010122
Matthias Kloseb159a552010-04-25 21:00:44 +000010123 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010124$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010125else
Matthias Kloseb9621712010-04-24 17:59:49 +000010126 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10127$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010128
10129fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010130rm -f core conftest.err conftest.$ac_objext \
10131 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010132
Matthias Kloseb9621712010-04-24 17:59:49 +000010133{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
10134$as_echo_n "checking for inet_pton... " >&6; }
10135cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010136/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010137
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010138#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010139#include <sys/socket.h>
10140#include <netinet/in.h>
10141#include <arpa/inet.h>
10142
Martin v. Löwise9416172003-05-03 10:12:45 +000010143int
10144main ()
10145{
10146void* p = inet_pton
10147 ;
10148 return 0;
10149}
10150_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010151if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010152
Matthias Kloseb9621712010-04-24 17:59:49 +000010153$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010154
Matthias Kloseb159a552010-04-25 21:00:44 +000010155 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010156$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010157else
Matthias Kloseb9621712010-04-24 17:59:49 +000010158 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10159$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010160
10161fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010162rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000010163
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010164# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000010165{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
10166$as_echo_n "checking for setgroups... " >&6; }
10167cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010168/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010169
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010170#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010171#ifdef HAVE_GRP_H
10172#include <grp.h>
10173#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000010174
Martin v. Löwisd5843682002-11-21 20:41:28 +000010175int
10176main ()
10177{
10178void* p = setgroups
10179 ;
10180 return 0;
10181}
10182_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010183if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010184
Matthias Kloseb9621712010-04-24 17:59:49 +000010185$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010186
Matthias Kloseb159a552010-04-25 21:00:44 +000010187 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010188$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010189else
Matthias Kloseb9621712010-04-24 17:59:49 +000010190 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10191$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010192
10193fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010194rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010195
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010196# check for openpty and forkpty
10197
10198for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010199do :
10200 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010201if test "x$ac_cv_func_openpty" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010202 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010203#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010204_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010205
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010206else
Matthias Kloseb9621712010-04-24 17:59:49 +000010207 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
10208$as_echo_n "checking for openpty in -lutil... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010209if test "${ac_cv_lib_util_openpty+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010210 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010211else
Martin v. Löwis11437992002-04-12 09:54:03 +000010212 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010213LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010214cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010215/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010216
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010217/* Override any GCC internal prototype to avoid an error.
10218 Use char because int might match the return type of a GCC
10219 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010220#ifdef __cplusplus
10221extern "C"
10222#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010223char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010224int
10225main ()
10226{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010227return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010228 ;
10229 return 0;
10230}
10231_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010232if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010233 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010234else
Matthias Kloseb9621712010-04-24 17:59:49 +000010235 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010236fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010237rm -f core conftest.err conftest.$ac_objext \
10238 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010239LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010240fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010241{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
10242$as_echo "$ac_cv_lib_util_openpty" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010243if test "x$ac_cv_lib_util_openpty" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010244 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010245 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010246else
Matthias Kloseb9621712010-04-24 17:59:49 +000010247 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
10248$as_echo_n "checking for openpty in -lbsd... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010249if test "${ac_cv_lib_bsd_openpty+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010250 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010251else
10252 ac_check_lib_save_LIBS=$LIBS
10253LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010254cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010255/* end confdefs.h. */
10256
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010257/* Override any GCC internal prototype to avoid an error.
10258 Use char because int might match the return type of a GCC
10259 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010260#ifdef __cplusplus
10261extern "C"
10262#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010263char openpty ();
10264int
10265main ()
10266{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010267return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010268 ;
10269 return 0;
10270}
10271_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010272if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010273 ac_cv_lib_bsd_openpty=yes
10274else
Matthias Kloseb9621712010-04-24 17:59:49 +000010275 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010276fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010277rm -f core conftest.err conftest.$ac_objext \
10278 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010279LIBS=$ac_check_lib_save_LIBS
10280fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010281{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
10282$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010283if test "x$ac_cv_lib_bsd_openpty" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010284 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010285 LIBS="$LIBS -lbsd"
10286fi
10287
10288
10289fi
10290
Fred Drake8cef4cf2000-06-28 16:40:38 +000010291
10292fi
10293done
10294
10295for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010296do :
10297 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010298if test "x$ac_cv_func_forkpty" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010299 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010300#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010301_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010302
Fred Drake8cef4cf2000-06-28 16:40:38 +000010303else
Matthias Kloseb9621712010-04-24 17:59:49 +000010304 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
10305$as_echo_n "checking for forkpty in -lutil... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010306if test "${ac_cv_lib_util_forkpty+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010307 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010308else
Martin v. Löwis11437992002-04-12 09:54:03 +000010309 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010310LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010311cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010312/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010313
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010314/* Override any GCC internal prototype to avoid an error.
10315 Use char because int might match the return type of a GCC
10316 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010317#ifdef __cplusplus
10318extern "C"
10319#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010320char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010321int
10322main ()
10323{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010324return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010325 ;
10326 return 0;
10327}
10328_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010329if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010330 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010331else
Matthias Kloseb9621712010-04-24 17:59:49 +000010332 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010333fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010334rm -f core conftest.err conftest.$ac_objext \
10335 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010336LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010337fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010338{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
10339$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010340if test "x$ac_cv_lib_util_forkpty" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010341 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010342 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010343else
Matthias Kloseb9621712010-04-24 17:59:49 +000010344 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
10345$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010346if test "${ac_cv_lib_bsd_forkpty+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010347 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010348else
10349 ac_check_lib_save_LIBS=$LIBS
10350LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010351cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010352/* end confdefs.h. */
10353
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010354/* Override any GCC internal prototype to avoid an error.
10355 Use char because int might match the return type of a GCC
10356 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010357#ifdef __cplusplus
10358extern "C"
10359#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010360char forkpty ();
10361int
10362main ()
10363{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010364return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010365 ;
10366 return 0;
10367}
10368_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010369if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010370 ac_cv_lib_bsd_forkpty=yes
10371else
Matthias Kloseb9621712010-04-24 17:59:49 +000010372 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010373fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010374rm -f core conftest.err conftest.$ac_objext \
10375 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010376LIBS=$ac_check_lib_save_LIBS
10377fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010378{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
10379$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010380if test "x$ac_cv_lib_bsd_forkpty" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010381 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010382 LIBS="$LIBS -lbsd"
10383fi
10384
10385
10386fi
10387
Fred Drake8cef4cf2000-06-28 16:40:38 +000010388
10389fi
10390done
10391
Jack Jansendd19cf82001-12-06 22:36:17 +000010392
Christian Heimesb186d002008-03-18 15:15:01 +000010393# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000010394for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000010395do :
10396 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010397if test "x$ac_cv_func_memmove" = x""yes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000010398 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010399#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000010400_ACEOF
10401
10402fi
10403done
10404
10405
Michael W. Hudson54241132001-12-07 15:38:26 +000010406# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000010407for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000010408do :
10409 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10410ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Benjamin Peterson87cdb812011-05-31 18:26:08 -050010411eval as_val=\$$as_ac_var
10412 if test "x$as_val" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010413 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010414#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010415_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000010416
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010417fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000010418done
10419
Michael W. Hudson54241132001-12-07 15:38:26 +000010420
Benjamin Peterson87cdb812011-05-31 18:26:08 -050010421for ac_func in dup2 getcwd strdup
10422do :
10423 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10424ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10425eval as_val=\$$as_ac_var
10426 if test "x$as_val" = x""yes; then :
10427 cat >>confdefs.h <<_ACEOF
10428#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
10429_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000010430
Martin v. Löwis1142de32002-03-29 16:28:31 +000010431else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010432 case " $LIBOBJS " in
Benjamin Peterson87cdb812011-05-31 18:26:08 -050010433 *" $ac_func.$ac_objext "* ) ;;
10434 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010435 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010436esac
10437
Martin v. Löwis1142de32002-03-29 16:28:31 +000010438fi
Benjamin Peterson87cdb812011-05-31 18:26:08 -050010439done
Martin v. Löwis1142de32002-03-29 16:28:31 +000010440
10441
10442for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010443do :
10444 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010445if test "x$ac_cv_func_getpgrp" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010446 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010447#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010448_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010449 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010450/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010451#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010452int
10453main ()
10454{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010455getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010456 ;
10457 return 0;
10458}
10459_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010460if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010461
Matthias Kloseb9621712010-04-24 17:59:49 +000010462$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010463
Guido van Rossum627b2d71993-12-24 10:39:16 +000010464fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010465rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010466
Guido van Rossum627b2d71993-12-24 10:39:16 +000010467fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010468done
Guido van Rossum627b2d71993-12-24 10:39:16 +000010469
Jack Jansen150753c2003-03-29 22:07:47 +000010470for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010471do :
10472 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010473if test "x$ac_cv_func_setpgrp" = x""yes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000010474 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010475#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000010476_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010477 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010478/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000010479#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000010480int
10481main ()
10482{
10483setpgrp(0,0);
10484 ;
10485 return 0;
10486}
10487_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010488if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010489
Matthias Kloseb9621712010-04-24 17:59:49 +000010490$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010491
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010492fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010493rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000010494
10495fi
10496done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010497
Thomas Wouters3a584202000-08-05 23:28:51 +000010498for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000010499do :
10500 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010501if test "x$ac_cv_func_gettimeofday" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010502 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010503#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010504_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010505 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010506/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010507#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010508int
10509main ()
10510{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010511gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010512 ;
10513 return 0;
10514}
10515_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010516if ac_fn_c_try_compile "$LINENO"; then :
10517
Guido van Rossum627b2d71993-12-24 10:39:16 +000010518else
Skip Montanaro6dead952003-09-25 14:50:04 +000010519
Matthias Kloseb9621712010-04-24 17:59:49 +000010520$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010521
Martin v. Löwis11437992002-04-12 09:54:03 +000010522
Guido van Rossum627b2d71993-12-24 10:39:16 +000010523fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010524rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010525
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010526fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010527done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010528
Michael W. Hudson54241132001-12-07 15:38:26 +000010529
Matthias Kloseb9621712010-04-24 17:59:49 +000010530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
10531$as_echo_n "checking for major... " >&6; }
10532cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010533/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010534
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010535#if defined(MAJOR_IN_MKDEV)
10536#include <sys/mkdev.h>
10537#elif defined(MAJOR_IN_SYSMACROS)
10538#include <sys/sysmacros.h>
10539#else
10540#include <sys/types.h>
10541#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010542
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010543int
10544main ()
10545{
10546
10547 makedev(major(0),minor(0));
10548
10549 ;
10550 return 0;
10551}
10552_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010553if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010554
10555
Matthias Kloseb9621712010-04-24 17:59:49 +000010556$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010557
Matthias Kloseb9621712010-04-24 17:59:49 +000010558 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10559$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010560
10561else
Skip Montanaro6dead952003-09-25 14:50:04 +000010562
Matthias Kloseb9621712010-04-24 17:59:49 +000010563 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10564$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010565
10566fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010567rm -f core conftest.err conftest.$ac_objext \
10568 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010569
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010570# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000010571# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000010572{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
10573$as_echo_n "checking for getaddrinfo... " >&6; }
10574cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010575/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010576
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010577#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010578#include <sys/socket.h>
10579#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010580#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010581
Martin v. Löwis11437992002-04-12 09:54:03 +000010582int
10583main ()
10584{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010585getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000010586 ;
10587 return 0;
10588}
10589_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010590if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010591 have_getaddrinfo=yes
10592else
Matthias Kloseb9621712010-04-24 17:59:49 +000010593 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010594fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010595rm -f core conftest.err conftest.$ac_objext \
10596 conftest$ac_exeext conftest.$ac_ext
10597{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
10598$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010599if test $have_getaddrinfo = yes
10600then
Matthias Kloseb9621712010-04-24 17:59:49 +000010601 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
10602$as_echo_n "checking getaddrinfo bug... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010603 if test "${ac_cv_buggy_getaddrinfo+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010604 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010605else
Matthias Kloseb9621712010-04-24 17:59:49 +000010606 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010607 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010608else
Matthias Kloseb9621712010-04-24 17:59:49 +000010609 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010610/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010611
10612#include <sys/types.h>
10613#include <netdb.h>
10614#include <string.h>
10615#include <sys/socket.h>
10616#include <netinet/in.h>
10617
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010618int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010619{
10620 int passive, gaierr, inet4 = 0, inet6 = 0;
10621 struct addrinfo hints, *ai, *aitop;
10622 char straddr[INET6_ADDRSTRLEN], strport[16];
10623
10624 for (passive = 0; passive <= 1; passive++) {
10625 memset(&hints, 0, sizeof(hints));
10626 hints.ai_family = AF_UNSPEC;
10627 hints.ai_flags = passive ? AI_PASSIVE : 0;
10628 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000010629 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010630 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
10631 (void)gai_strerror(gaierr);
10632 goto bad;
10633 }
10634 for (ai = aitop; ai; ai = ai->ai_next) {
10635 if (ai->ai_addr == NULL ||
10636 ai->ai_addrlen == 0 ||
10637 getnameinfo(ai->ai_addr, ai->ai_addrlen,
10638 straddr, sizeof(straddr), strport, sizeof(strport),
10639 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
10640 goto bad;
10641 }
10642 switch (ai->ai_family) {
10643 case AF_INET:
10644 if (strcmp(strport, "54321") != 0) {
10645 goto bad;
10646 }
10647 if (passive) {
10648 if (strcmp(straddr, "0.0.0.0") != 0) {
10649 goto bad;
10650 }
10651 } else {
10652 if (strcmp(straddr, "127.0.0.1") != 0) {
10653 goto bad;
10654 }
10655 }
10656 inet4++;
10657 break;
10658 case AF_INET6:
10659 if (strcmp(strport, "54321") != 0) {
10660 goto bad;
10661 }
10662 if (passive) {
10663 if (strcmp(straddr, "::") != 0) {
10664 goto bad;
10665 }
10666 } else {
10667 if (strcmp(straddr, "::1") != 0) {
10668 goto bad;
10669 }
10670 }
10671 inet6++;
10672 break;
10673 case AF_UNSPEC:
10674 goto bad;
10675 break;
10676 default:
10677 /* another family support? */
10678 break;
10679 }
10680 }
10681 }
10682
10683 if (!(inet4 == 0 || inet4 == 2))
10684 goto bad;
10685 if (!(inet6 == 0 || inet6 == 2))
10686 goto bad;
10687
10688 if (aitop)
10689 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010690 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010691
10692 bad:
10693 if (aitop)
10694 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010695 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010696}
10697
Martin v. Löwis11437992002-04-12 09:54:03 +000010698_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010699if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010700 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010701else
Matthias Kloseb9621712010-04-24 17:59:49 +000010702 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010703fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010704rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10705 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010706fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010707
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010708fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010709
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010710fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010711
Benjamin Petersond4694ed2010-11-01 01:44:30 +000010712{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
10713$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
10714
Mark Dickinson2df5d282009-12-31 21:22:50 +000010715if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010716then
10717 if test $ipv6 = yes
10718 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010719 echo 'Fatal: You must get working getaddrinfo() function.'
10720 echo ' or you can specify "--disable-ipv6"'.
10721 exit 1
10722 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010723else
Martin v. Löwis11437992002-04-12 09:54:03 +000010724
Matthias Kloseb9621712010-04-24 17:59:49 +000010725$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010726
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010727fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000010728
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010729for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000010730do :
10731 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010732if test "x$ac_cv_func_getnameinfo" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010733 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010734#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010735_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010736
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010737fi
10738done
10739
Michael W. Hudson54241132001-12-07 15:38:26 +000010740
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010741# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000010742{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
10743$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010744if test "${ac_cv_header_time+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010745 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010746else
Matthias Kloseb9621712010-04-24 17:59:49 +000010747 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010748/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010749#include <sys/types.h>
10750#include <sys/time.h>
10751#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010752
Martin v. Löwis11437992002-04-12 09:54:03 +000010753int
10754main ()
10755{
10756if ((struct tm *) 0)
10757return 0;
10758 ;
10759 return 0;
10760}
10761_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010762if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010763 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000010764else
Matthias Kloseb9621712010-04-24 17:59:49 +000010765 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010766fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010767rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010768fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010769{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
10770$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010771if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010772
Matthias Kloseb9621712010-04-24 17:59:49 +000010773$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010774
10775fi
10776
Matthias Kloseb9621712010-04-24 17:59:49 +000010777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
10778$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010779if test "${ac_cv_struct_tm+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010780 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010781else
Matthias Kloseb9621712010-04-24 17:59:49 +000010782 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010783/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010784#include <sys/types.h>
10785#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010786
Martin v. Löwis11437992002-04-12 09:54:03 +000010787int
10788main ()
10789{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010790struct tm tm;
10791 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000010792 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000010793 ;
10794 return 0;
10795}
10796_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010797if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010798 ac_cv_struct_tm=time.h
10799else
Matthias Kloseb9621712010-04-24 17:59:49 +000010800 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010801fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010802rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010803fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010804{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
10805$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010806if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010807
Matthias Kloseb9621712010-04-24 17:59:49 +000010808$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010809
10810fi
10811
Matthias Kloseb9621712010-04-24 17:59:49 +000010812ac_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 +000010813#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000010814
Matthias Kloseb9621712010-04-24 17:59:49 +000010815"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010816if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010817
10818cat >>confdefs.h <<_ACEOF
10819#define HAVE_STRUCT_TM_TM_ZONE 1
10820_ACEOF
10821
10822
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010823fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010824
Martin v. Löwis11437992002-04-12 09:54:03 +000010825if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
10826
Matthias Kloseb9621712010-04-24 17:59:49 +000010827$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010828
10829else
Matthias Kloseb9621712010-04-24 17:59:49 +000010830 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
10831"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010832if test "x$ac_cv_have_decl_tzname" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010833 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010834else
Matthias Kloseb9621712010-04-24 17:59:49 +000010835 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010836fi
10837
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010838cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010839#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010840_ACEOF
10841
Matthias Kloseb9621712010-04-24 17:59:49 +000010842 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
10843$as_echo_n "checking for tzname... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010844if test "${ac_cv_var_tzname+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010845 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010846else
Matthias Kloseb9621712010-04-24 17:59:49 +000010847 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010848/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010849#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010850#if !HAVE_DECL_TZNAME
10851extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000010852#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010853
Martin v. Löwis11437992002-04-12 09:54:03 +000010854int
10855main ()
10856{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010857return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000010858 ;
10859 return 0;
10860}
10861_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010862if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010863 ac_cv_var_tzname=yes
10864else
Matthias Kloseb9621712010-04-24 17:59:49 +000010865 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010866fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010867rm -f core conftest.err conftest.$ac_objext \
10868 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000010869fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010870{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
10871$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010872 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010873
Matthias Kloseb9621712010-04-24 17:59:49 +000010874$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010875
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010876 fi
10877fi
10878
Matthias Kloseb9621712010-04-24 17:59:49 +000010879ac_fn_c_check_member "$LINENO" "struct stat" "st_rdev" "ac_cv_member_struct_stat_st_rdev" "$ac_includes_default"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010880if test "x$ac_cv_member_struct_stat_st_rdev" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010881
10882cat >>confdefs.h <<_ACEOF
10883#define HAVE_STRUCT_STAT_ST_RDEV 1
10884_ACEOF
10885
10886
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010887fi
10888
Matthias Kloseb9621712010-04-24 17:59:49 +000010889ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010890if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000010891
Martin v. Löwis11437992002-04-12 09:54:03 +000010892cat >>confdefs.h <<_ACEOF
10893#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
10894_ACEOF
10895
10896
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010897fi
10898
Matthias Kloseb9621712010-04-24 17:59:49 +000010899ac_fn_c_check_member "$LINENO" "struct stat" "st_flags" "ac_cv_member_struct_stat_st_flags" "$ac_includes_default"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010900if test "x$ac_cv_member_struct_stat_st_flags" = x""yes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000010901
10902cat >>confdefs.h <<_ACEOF
10903#define HAVE_STRUCT_STAT_ST_FLAGS 1
10904_ACEOF
10905
10906
10907fi
10908
Matthias Kloseb9621712010-04-24 17:59:49 +000010909ac_fn_c_check_member "$LINENO" "struct stat" "st_gen" "ac_cv_member_struct_stat_st_gen" "$ac_includes_default"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010910if test "x$ac_cv_member_struct_stat_st_gen" = x""yes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000010911
10912cat >>confdefs.h <<_ACEOF
10913#define HAVE_STRUCT_STAT_ST_GEN 1
10914_ACEOF
10915
10916
10917fi
10918
Matthias Kloseb9621712010-04-24 17:59:49 +000010919ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtime" "ac_cv_member_struct_stat_st_birthtime" "$ac_includes_default"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010920if test "x$ac_cv_member_struct_stat_st_birthtime" = x""yes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000010921
10922cat >>confdefs.h <<_ACEOF
10923#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
10924_ACEOF
10925
10926
10927fi
10928
Matthias Kloseb9621712010-04-24 17:59:49 +000010929ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010930if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000010931
Martin v. Löwis11437992002-04-12 09:54:03 +000010932cat >>confdefs.h <<_ACEOF
10933#define HAVE_STRUCT_STAT_ST_BLOCKS 1
10934_ACEOF
10935
10936
Matthias Kloseb9621712010-04-24 17:59:49 +000010937$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010938
10939else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010940 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000010941 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010942 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
10943 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010944esac
10945
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010946fi
10947
Michael W. Hudson54241132001-12-07 15:38:26 +000010948
Martin v. Löwis11437992002-04-12 09:54:03 +000010949
Matthias Kloseb9621712010-04-24 17:59:49 +000010950{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
10951$as_echo_n "checking for time.h that defines altzone... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010952if test "${ac_cv_header_time_altzone+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010953 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010954else
Matthias Kloseb159a552010-04-25 21:00:44 +000010955
Matthias Kloseb9621712010-04-24 17:59:49 +000010956 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010957/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000010958#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010959int
10960main ()
10961{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010962return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000010963 ;
10964 return 0;
10965}
10966_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010967if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010968 ac_cv_header_time_altzone=yes
10969else
Matthias Kloseb9621712010-04-24 17:59:49 +000010970 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000010971fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010972rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000010973
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010974fi
10975
Matthias Kloseb9621712010-04-24 17:59:49 +000010976{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
10977$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010978if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010979
Matthias Kloseb9621712010-04-24 17:59:49 +000010980$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010981
10982fi
10983
Guido van Rossumda88dad1995-01-26 00:46:29 +000010984was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000010985{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
10986$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
10987cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010988/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000010989
10990#include <sys/types.h>
10991#include <sys/select.h>
10992#include <sys/time.h>
10993
Martin v. Löwis11437992002-04-12 09:54:03 +000010994int
10995main ()
10996{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010997;
Martin v. Löwis11437992002-04-12 09:54:03 +000010998 ;
10999 return 0;
11000}
11001_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011002if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011003
11004
Matthias Kloseb9621712010-04-24 17:59:49 +000011005$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011006
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011007 was_it_defined=yes
11008
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011009fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011010rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011011{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
11012$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011013
Matthias Kloseb9621712010-04-24 17:59:49 +000011014{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
11015$as_echo_n "checking for addrinfo... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050011016if test "${ac_cv_struct_addrinfo+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011017 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011018else
Matthias Kloseb9621712010-04-24 17:59:49 +000011019 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011020/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000011021#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011022int
11023main ()
11024{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011025struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000011026 ;
11027 return 0;
11028}
11029_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011030if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011031 ac_cv_struct_addrinfo=yes
11032else
Matthias Kloseb9621712010-04-24 17:59:49 +000011033 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011034fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011035rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11036fi
11037
Matthias Kloseb9621712010-04-24 17:59:49 +000011038{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
11039$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011040if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011041
Matthias Kloseb9621712010-04-24 17:59:49 +000011042$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011043
11044fi
11045
Matthias Kloseb9621712010-04-24 17:59:49 +000011046{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
11047$as_echo_n "checking for sockaddr_storage... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050011048if test "${ac_cv_struct_sockaddr_storage+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011049 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011050else
Matthias Kloseb9621712010-04-24 17:59:49 +000011051 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011052/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011053
11054# include <sys/types.h>
11055# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011056int
11057main ()
11058{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011059struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000011060 ;
11061 return 0;
11062}
11063_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011064if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011065 ac_cv_struct_sockaddr_storage=yes
11066else
Matthias Kloseb9621712010-04-24 17:59:49 +000011067 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011068fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011069rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11070fi
11071
Matthias Kloseb9621712010-04-24 17:59:49 +000011072{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
11073$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011074if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011075
Matthias Kloseb9621712010-04-24 17:59:49 +000011076$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011077
11078fi
11079
Guido van Rossum627b2d71993-12-24 10:39:16 +000011080# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000011081
Matthias Kloseb9621712010-04-24 17:59:49 +000011082{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
11083$as_echo_n "checking whether char is unsigned... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050011084if test "${ac_cv_c_char_unsigned+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011085 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000011086else
Matthias Kloseb9621712010-04-24 17:59:49 +000011087 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011088/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011089$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000011090int
11091main ()
11092{
11093static int test_array [1 - 2 * !(((char) -1) < 0)];
11094test_array [0] = 0
11095
11096 ;
11097 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000011098}
Martin v. Löwis11437992002-04-12 09:54:03 +000011099_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011100if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000011101 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011102else
Matthias Kloseb9621712010-04-24 17:59:49 +000011103 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011104fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011105rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011106fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011107{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
11108$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011109if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011110 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011111
11112fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000011113
Matthias Kloseb9621712010-04-24 17:59:49 +000011114{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
11115$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050011116if test "${ac_cv_c_const+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011117 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011118else
Matthias Kloseb9621712010-04-24 17:59:49 +000011119 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011120/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011121
Martin v. Löwis11437992002-04-12 09:54:03 +000011122int
11123main ()
11124{
11125/* FIXME: Include the comments suggested by Paul. */
11126#ifndef __cplusplus
11127 /* Ultrix mips cc rejects this. */
11128 typedef int charset[2];
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011129 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000011130 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011131 char const *const *pcpcc;
11132 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011133 /* NEC SVR4.0.2 mips cc rejects this. */
11134 struct point {int x, y;};
11135 static struct point const zero = {0,0};
11136 /* AIX XL C 1.02.0.0 rejects this.
11137 It does not let you subtract one const X* pointer from another in
11138 an arm of an if-expression whose if-part is not a constant
11139 expression */
11140 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011141 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011142 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011143 ++pcpcc;
11144 ppc = (char**) pcpcc;
11145 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011146 { /* SCO 3.2v4 cc rejects this. */
11147 char *t;
11148 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011149
Martin v. Löwis11437992002-04-12 09:54:03 +000011150 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011151 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011152 }
11153 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
11154 int x[] = {25, 17};
11155 const int *foo = &x[0];
11156 ++foo;
11157 }
11158 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11159 typedef const int *iptr;
11160 iptr p = 0;
11161 ++p;
11162 }
11163 { /* AIX XL C 1.02.0.0 rejects this saying
11164 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11165 struct s { int j; const int *ap[3]; };
11166 struct s *b; b->j = 5;
11167 }
11168 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11169 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011170 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011171 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011172 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000011173#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000011174
Martin v. Löwis11437992002-04-12 09:54:03 +000011175 ;
11176 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000011177}
Martin v. Löwis11437992002-04-12 09:54:03 +000011178_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011179if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011180 ac_cv_c_const=yes
11181else
Matthias Kloseb9621712010-04-24 17:59:49 +000011182 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011183fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011184rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011185fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011186{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
11187$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011188if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011189
Matthias Kloseb9621712010-04-24 17:59:49 +000011190$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011191
11192fi
11193
Michael W. Hudson54241132001-12-07 15:38:26 +000011194
Guido van Rossumda88dad1995-01-26 00:46:29 +000011195works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
11197$as_echo_n "checking for working volatile... " >&6; }
11198cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011199/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011200
Martin v. Löwis11437992002-04-12 09:54:03 +000011201int
11202main ()
11203{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011204volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011205 ;
11206 return 0;
11207}
11208_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011209if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011210 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011211else
Skip Montanaro6dead952003-09-25 14:50:04 +000011212
Matthias Kloseb9621712010-04-24 17:59:49 +000011213$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011214
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011215
Guido van Rossum627b2d71993-12-24 10:39:16 +000011216fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011217rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011218{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11219$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011220
Guido van Rossumda88dad1995-01-26 00:46:29 +000011221works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
11223$as_echo_n "checking for working signed char... " >&6; }
11224cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011225/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011226
Martin v. Löwis11437992002-04-12 09:54:03 +000011227int
11228main ()
11229{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011230signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000011231 ;
11232 return 0;
11233}
11234_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011235if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011236 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011237else
Skip Montanaro6dead952003-09-25 14:50:04 +000011238
Matthias Kloseb9621712010-04-24 17:59:49 +000011239$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000011240
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011241
Guido van Rossum7f43da71994-08-01 12:15:30 +000011242fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011243rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011244{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11245$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011246
Guido van Rossumda88dad1995-01-26 00:46:29 +000011247have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011248{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
11249$as_echo_n "checking for prototypes... " >&6; }
11250cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011251/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011252int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011253int
11254main ()
11255{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011256return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000011257 ;
11258 return 0;
11259}
11260_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011261if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011262
Matthias Kloseb9621712010-04-24 17:59:49 +000011263$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011264
Matthias Kloseb159a552010-04-25 21:00:44 +000011265 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011266fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011267rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011268{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
11269$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011270
Guido van Rossumda88dad1995-01-26 00:46:29 +000011271works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
11273$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
11274cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011275/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011276
11277#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000011278int foo(int x, ...) {
11279 va_list va;
11280 va_start(va, x);
11281 va_arg(va, int);
11282 va_arg(va, char *);
11283 va_arg(va, double);
11284 return 0;
11285}
Guido van Rossum7f43da71994-08-01 12:15:30 +000011286
Martin v. Löwis11437992002-04-12 09:54:03 +000011287int
11288main ()
11289{
Guido van Rossum90eea071996-08-30 20:58:57 +000011290return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000011291 ;
11292 return 0;
11293}
11294_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011295if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011296
11297
Matthias Kloseb9621712010-04-24 17:59:49 +000011298$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011299
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011300 works=yes
11301
Guido van Rossum627b2d71993-12-24 10:39:16 +000011302fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011303rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011304{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11305$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011306
Martin v. Löwisd6320502004-08-12 13:45:08 +000011307# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000011308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
11309$as_echo_n "checking for socketpair... " >&6; }
11310cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011311/* end confdefs.h. */
11312
11313#include <sys/types.h>
11314#include <sys/socket.h>
11315
11316int
11317main ()
11318{
11319void *x=socketpair
11320 ;
11321 return 0;
11322}
11323_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011324if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000011325
Matthias Kloseb9621712010-04-24 17:59:49 +000011326$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000011327
Matthias Kloseb159a552010-04-25 21:00:44 +000011328 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011329$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011330else
Matthias Kloseb9621712010-04-24 17:59:49 +000011331 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11332$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011333
11334fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011335rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011336
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011337# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000011338{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
11339$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
11340cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011341/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011342#include <sys/types.h>
11343#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011344int
11345main ()
11346{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011347struct sockaddr x;
11348x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011349 ;
11350 return 0;
11351}
11352_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011353if ac_fn_c_try_compile "$LINENO"; then :
11354 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11355$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011356
Matthias Kloseb9621712010-04-24 17:59:49 +000011357$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011358
11359else
Matthias Kloseb9621712010-04-24 17:59:49 +000011360 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11361$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011362
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011363fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011364rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011365
Guido van Rossumda88dad1995-01-26 00:46:29 +000011366va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011367{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
11368$as_echo_n "checking whether va_list is an array... " >&6; }
11369cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011370/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011371
11372#ifdef HAVE_STDARG_PROTOTYPES
11373#include <stdarg.h>
11374#else
11375#include <varargs.h>
11376#endif
11377
Martin v. Löwis11437992002-04-12 09:54:03 +000011378int
11379main ()
11380{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011381va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000011382 ;
11383 return 0;
11384}
11385_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011386if ac_fn_c_try_compile "$LINENO"; then :
11387
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011388else
Skip Montanaro6dead952003-09-25 14:50:04 +000011389
Martin v. Löwis11437992002-04-12 09:54:03 +000011390
Matthias Kloseb9621712010-04-24 17:59:49 +000011391$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011392
Guido van Rossumda88dad1995-01-26 00:46:29 +000011393 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011394
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011395fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011396rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011397{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
11398$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011399
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011400# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000011401
11402
Matthias Kloseb9621712010-04-24 17:59:49 +000011403ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050011404if test "x$ac_cv_func_gethostbyname_r" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011405
Matthias Kloseb9621712010-04-24 17:59:49 +000011406 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000011407
Matthias Kloseb9621712010-04-24 17:59:49 +000011408 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
11409$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011410 OLD_CFLAGS=$CFLAGS
11411 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011412 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011413/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011414
11415# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011416
Martin v. Löwis11437992002-04-12 09:54:03 +000011417int
11418main ()
11419{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011420
11421 char *name;
11422 struct hostent *he, *res;
11423 char buffer[2048];
11424 int buflen = 2048;
11425 int h_errnop;
11426
11427 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011428
11429 ;
11430 return 0;
11431}
11432_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011433if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011434
Matthias Kloseb9621712010-04-24 17:59:49 +000011435 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011436
Martin v. Löwis11437992002-04-12 09:54:03 +000011437
Matthias Kloseb9621712010-04-24 17:59:49 +000011438$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011439
Matthias Kloseb9621712010-04-24 17:59:49 +000011440 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11441$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011442
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011443else
Skip Montanaro6dead952003-09-25 14:50:04 +000011444
Matthias Kloseb9621712010-04-24 17:59:49 +000011445 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11446$as_echo "no" >&6; }
11447 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
11448$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
11449 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011450/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011451
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011452# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011453
Martin v. Löwis11437992002-04-12 09:54:03 +000011454int
11455main ()
11456{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011457
11458 char *name;
11459 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000011460 char buffer[2048];
11461 int buflen = 2048;
11462 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011463
Matthias Kloseb159a552010-04-25 21:00:44 +000011464 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011465
11466 ;
11467 return 0;
11468}
11469_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011470if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011471
Matthias Kloseb9621712010-04-24 17:59:49 +000011472 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011473
Martin v. Löwis11437992002-04-12 09:54:03 +000011474
Matthias Kloseb159a552010-04-25 21:00:44 +000011475$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011476
Matthias Kloseb9621712010-04-24 17:59:49 +000011477 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11478$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011479
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011480else
Skip Montanaro6dead952003-09-25 14:50:04 +000011481
Matthias Kloseb9621712010-04-24 17:59:49 +000011482 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11483$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011484 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
11485$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
11486 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11487/* end confdefs.h. */
11488
11489# include <netdb.h>
11490
11491int
11492main ()
11493{
11494
11495 char *name;
11496 struct hostent *he;
11497 struct hostent_data data;
11498
11499 (void) gethostbyname_r(name, he, &data);
11500
11501 ;
11502 return 0;
11503}
11504_ACEOF
11505if ac_fn_c_try_compile "$LINENO"; then :
11506
11507 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
11508
11509
11510$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
11511
11512 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11513$as_echo "yes" >&6; }
11514
11515else
11516
11517 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11518$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011519
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011520fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011521rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011522
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011523fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011524rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011525
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011526fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011527rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011528 CFLAGS=$OLD_CFLAGS
11529
11530else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011531
Matthias Kloseb9621712010-04-24 17:59:49 +000011532 for ac_func in gethostbyname
11533do :
11534 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050011535if test "x$ac_cv_func_gethostbyname" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011536 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011537#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011538_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011539
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011540fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011541done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011542
Michael W. Hudson54241132001-12-07 15:38:26 +000011543
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011544fi
11545
Michael W. Hudson54241132001-12-07 15:38:26 +000011546
11547
11548
11549
11550
11551
Guido van Rossum627b2d71993-12-24 10:39:16 +000011552# checks for system services
11553# (none yet)
11554
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011555# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000011556ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050011557if test "x$ac_cv_func___fpu_control" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011558
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011559else
Matthias Kloseb9621712010-04-24 17:59:49 +000011560 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
11561$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050011562if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011563 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011564else
Martin v. Löwis11437992002-04-12 09:54:03 +000011565 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011566LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011567cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011568/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011569
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011570/* Override any GCC internal prototype to avoid an error.
11571 Use char because int might match the return type of a GCC
11572 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011573#ifdef __cplusplus
11574extern "C"
11575#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011576char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011577int
11578main ()
11579{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011580return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011581 ;
11582 return 0;
11583}
11584_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011585if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011586 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011587else
Matthias Kloseb9621712010-04-24 17:59:49 +000011588 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011589fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011590rm -f core conftest.err conftest.$ac_objext \
11591 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011592LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011593fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011594{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
11595$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050011596if test "x$ac_cv_lib_ieee___fpu_control" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011597 cat >>confdefs.h <<_ACEOF
11598#define HAVE_LIBIEEE 1
11599_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011600
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011601 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011602
Guido van Rossum627b2d71993-12-24 10:39:16 +000011603fi
11604
Michael W. Hudson54241132001-12-07 15:38:26 +000011605
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011606fi
11607
Michael W. Hudson54241132001-12-07 15:38:26 +000011608
Guido van Rossum7f253911997-05-09 02:42:48 +000011609# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000011610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
11611$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011612
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011613# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011614if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011615 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000011616if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000011617then
11618
Matthias Kloseb9621712010-04-24 17:59:49 +000011619$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011620
Matthias Kloseb9621712010-04-24 17:59:49 +000011621 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11622$as_echo "yes" >&6; }
11623else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11624$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011625fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000011626else
Matthias Kloseb9621712010-04-24 17:59:49 +000011627 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11628$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011629fi
11630
Guido van Rossum7f253911997-05-09 02:42:48 +000011631
Guido van Rossum7f43da71994-08-01 12:15:30 +000011632# check for --with-libm=...
11633
Guido van Rossum563e7081996-09-10 18:20:48 +000011634case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000011635Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000011636*) LIBM=-lm
11637esac
Matthias Kloseb9621712010-04-24 17:59:49 +000011638{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
11639$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011640
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011641# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011642if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011643 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000011644if test "$withval" = no
11645then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000011646 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
11647$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011648elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011649then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000011650 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
11651$as_echo "set LIBM=\"$withval\"" >&6; }
Benjamin Peterson87cdb812011-05-31 18:26:08 -050011652else as_fn_error "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011653fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011654else
Matthias Kloseb9621712010-04-24 17:59:49 +000011655 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
11656$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011657fi
11658
Guido van Rossum7f43da71994-08-01 12:15:30 +000011659
11660# check for --with-libc=...
11661
Matthias Kloseb9621712010-04-24 17:59:49 +000011662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
11663$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011664
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011665# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011666if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011667 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000011668if test "$withval" = no
11669then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000011670 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
11671$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011672elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011673then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000011674 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
11675$as_echo "set LIBC=\"$withval\"" >&6; }
Benjamin Peterson87cdb812011-05-31 18:26:08 -050011676else as_fn_error "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011677fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011678else
Matthias Kloseb9621712010-04-24 17:59:49 +000011679 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
11680$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011681fi
11682
Guido van Rossum7f43da71994-08-01 12:15:30 +000011683
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011684# **************************************************
11685# * Check for various properties of floating point *
11686# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011687
Matthias Kloseb9621712010-04-24 17:59:49 +000011688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
11689$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050011690if test "${ac_cv_little_endian_double+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011691 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011692else
11693
Matthias Kloseb9621712010-04-24 17:59:49 +000011694if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011695 ac_cv_little_endian_double=no
11696else
Matthias Kloseb9621712010-04-24 17:59:49 +000011697 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011698/* end confdefs.h. */
11699
11700#include <string.h>
11701int main() {
11702 double x = 9006104071832581.0;
11703 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
11704 return 0;
11705 else
11706 return 1;
11707}
11708
11709_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011710if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011711 ac_cv_little_endian_double=yes
11712else
Matthias Kloseb9621712010-04-24 17:59:49 +000011713 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011714fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011715rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11716 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011717fi
11718
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011719fi
11720
Matthias Kloseb9621712010-04-24 17:59:49 +000011721{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
11722$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011723if test "$ac_cv_little_endian_double" = yes
11724then
11725
Matthias Kloseb9621712010-04-24 17:59:49 +000011726$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011727
11728fi
11729
Matthias Kloseb9621712010-04-24 17:59:49 +000011730{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
11731$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050011732if test "${ac_cv_big_endian_double+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011733 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011734else
11735
Matthias Kloseb9621712010-04-24 17:59:49 +000011736if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011737 ac_cv_big_endian_double=no
11738else
Matthias Kloseb9621712010-04-24 17:59:49 +000011739 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011740/* end confdefs.h. */
11741
11742#include <string.h>
11743int main() {
11744 double x = 9006104071832581.0;
11745 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
11746 return 0;
11747 else
11748 return 1;
11749}
11750
11751_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011752if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011753 ac_cv_big_endian_double=yes
11754else
Matthias Kloseb9621712010-04-24 17:59:49 +000011755 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011756fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011757rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11758 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011759fi
11760
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011761fi
11762
Matthias Kloseb9621712010-04-24 17:59:49 +000011763{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
11764$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011765if test "$ac_cv_big_endian_double" = yes
11766then
11767
Matthias Kloseb9621712010-04-24 17:59:49 +000011768$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011769
11770fi
11771
11772# Some ARM platforms use a mixed-endian representation for doubles.
11773# While Python doesn't currently have full support for these platforms
11774# (see e.g., issue 1762561), we can at least make sure that float <-> string
11775# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000011776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
11777$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050011778if test "${ac_cv_mixed_endian_double+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011779 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011780else
11781
Matthias Kloseb9621712010-04-24 17:59:49 +000011782if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011783 ac_cv_mixed_endian_double=no
11784else
Matthias Kloseb9621712010-04-24 17:59:49 +000011785 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011786/* end confdefs.h. */
11787
11788#include <string.h>
11789int main() {
11790 double x = 9006104071832581.0;
11791 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
11792 return 0;
11793 else
11794 return 1;
11795}
11796
11797_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011798if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011799 ac_cv_mixed_endian_double=yes
11800else
Matthias Kloseb9621712010-04-24 17:59:49 +000011801 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011802fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011803rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11804 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011805fi
11806
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011807fi
11808
Matthias Kloseb9621712010-04-24 17:59:49 +000011809{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
11810$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011811if test "$ac_cv_mixed_endian_double" = yes
11812then
11813
Matthias Kloseb9621712010-04-24 17:59:49 +000011814$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011815
11816fi
11817
Mark Dickinson7abf8d42009-04-18 20:17:52 +000011818# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000011819# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000011820# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000011821# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011822# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000011823# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011824
11825# This inline assembler syntax may also work for suncc and icc,
11826# so we try it on all platforms.
11827
Matthias Kloseb9621712010-04-24 17:59:49 +000011828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
11829$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
11830cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011831/* end confdefs.h. */
11832
11833int
11834main ()
11835{
11836
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011837 unsigned short cw;
11838 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
11839 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011840
11841 ;
11842 return 0;
11843}
11844_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011845if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011846 have_gcc_asm_for_x87=yes
11847else
Matthias Kloseb9621712010-04-24 17:59:49 +000011848 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011849fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011850rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011851{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
11852$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011853if test "$have_gcc_asm_for_x87" = yes
11854then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011855
Matthias Kloseb9621712010-04-24 17:59:49 +000011856$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011857
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011858fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011859
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011860# Detect whether system arithmetic is subject to x87-style double
11861# rounding issues. The result of this test has little meaning on non
11862# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
11863# mode is round-to-nearest and double rounding issues are present, and
11864# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000011865{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
11866$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011867# $BASECFLAGS may affect the result
11868ac_save_cc="$CC"
11869CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011870if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011871 ac_cv_x87_double_rounding=no
11872else
Matthias Kloseb9621712010-04-24 17:59:49 +000011873 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011874/* end confdefs.h. */
11875
11876#include <stdlib.h>
11877#include <math.h>
11878int main() {
11879 volatile double x, y, z;
11880 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
11881 x = 0.99999999999999989; /* 1-2**-53 */
11882 y = 1./x;
11883 if (y != 1.)
11884 exit(0);
11885 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
11886 x = 1e16;
11887 y = 2.99999;
11888 z = x + y;
11889 if (z != 1e16+4.)
11890 exit(0);
11891 /* both tests show evidence of double rounding */
11892 exit(1);
11893}
11894
11895_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011896if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011897 ac_cv_x87_double_rounding=no
11898else
Matthias Kloseb9621712010-04-24 17:59:49 +000011899 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011900fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011901rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11902 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011903fi
11904
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011905CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000011906{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
11907$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011908if test "$ac_cv_x87_double_rounding" = yes
11909then
11910
Matthias Kloseb9621712010-04-24 17:59:49 +000011911$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011912
11913fi
11914
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011915# ************************************
11916# * Check for mathematical functions *
11917# ************************************
11918
11919LIBS_SAVE=$LIBS
11920LIBS="$LIBS $LIBM"
11921
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011922for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
11923do :
11924 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11925ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Benjamin Peterson87cdb812011-05-31 18:26:08 -050011926eval as_val=\$$as_ac_var
11927 if test "x$as_val" = x""yes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011928 cat >>confdefs.h <<_ACEOF
11929#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11930_ACEOF
11931
11932fi
11933done
11934
Victor Stinner8f9f8d62011-05-09 12:45:41 +020011935for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011936do :
11937 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11938ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Benjamin Peterson87cdb812011-05-31 18:26:08 -050011939eval as_val=\$$as_ac_var
11940 if test "x$as_val" = x""yes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011941 cat >>confdefs.h <<_ACEOF
11942#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11943_ACEOF
11944
11945fi
11946done
11947
11948ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
11949"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050011950if test "x$ac_cv_have_decl_isinf" = x""yes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011951 ac_have_decl=1
11952else
11953 ac_have_decl=0
11954fi
11955
11956cat >>confdefs.h <<_ACEOF
11957#define HAVE_DECL_ISINF $ac_have_decl
11958_ACEOF
11959ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
11960"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050011961if test "x$ac_cv_have_decl_isnan" = x""yes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011962 ac_have_decl=1
11963else
11964 ac_have_decl=0
11965fi
11966
11967cat >>confdefs.h <<_ACEOF
11968#define HAVE_DECL_ISNAN $ac_have_decl
11969_ACEOF
11970ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
11971"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050011972if test "x$ac_cv_have_decl_isfinite" = x""yes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011973 ac_have_decl=1
11974else
11975 ac_have_decl=0
11976fi
11977
11978cat >>confdefs.h <<_ACEOF
11979#define HAVE_DECL_ISFINITE $ac_have_decl
11980_ACEOF
11981
11982
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011983# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
11984# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000011985{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
11986$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050011987if test "${ac_cv_tanh_preserves_zero_sign+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011988 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011989else
11990
Matthias Kloseb9621712010-04-24 17:59:49 +000011991if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011992 ac_cv_tanh_preserves_zero_sign=no
11993else
Matthias Kloseb9621712010-04-24 17:59:49 +000011994 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011995/* end confdefs.h. */
11996
11997#include <math.h>
11998#include <stdlib.h>
11999int main() {
12000 /* return 0 if either negative zeros don't exist
12001 on this platform or if negative zeros exist
12002 and tanh(-0.) == -0. */
12003 if (atan2(0., -1.) == atan2(-0., -1.) ||
12004 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
12005 else exit(1);
12006}
12007
12008_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012009if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012010 ac_cv_tanh_preserves_zero_sign=yes
12011else
Matthias Kloseb9621712010-04-24 17:59:49 +000012012 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012013fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012014rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12015 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012016fi
12017
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012018fi
12019
Matthias Kloseb9621712010-04-24 17:59:49 +000012020{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
12021$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012022if test "$ac_cv_tanh_preserves_zero_sign" = yes
12023then
12024
Matthias Kloseb9621712010-04-24 17:59:49 +000012025$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012026
12027fi
12028
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012029if test "$ac_cv_func_log1p" = yes
12030then
12031 # On some versions of AIX, log1p(-0.) returns 0. instead of
12032 # -0. See issue #9920.
12033 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
12034$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050012035 if test "${ac_cv_log1p_drops_zero_sign+set}" = set; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012036 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012037else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012038
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012039 if test "$cross_compiling" = yes; then :
12040 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012041else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012042 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12043/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012044
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012045 #include <math.h>
12046 #include <stdlib.h>
12047 int main() {
12048 /* Fail if the signs of log1p(-0.) and -0. can be
12049 distinguished. */
12050 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
12051 return 0;
12052 else
12053 return 1;
12054 }
12055
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012056_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012057if ac_fn_c_try_run "$LINENO"; then :
12058 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012059else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012060 ac_cv_log1p_drops_zero_sign=yes
12061fi
12062rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12063 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012064fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012065
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012066fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012067
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012068 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
12069$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
12070fi
12071if test "$ac_cv_log1p_drops_zero_sign" = yes
12072then
12073
12074$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
12075
12076fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012077
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000012078LIBS=$LIBS_SAVE
12079
Mark Dickinsona614f042009-11-28 12:48:43 +000012080# For multiprocessing module, check that sem_open
12081# actually works. For FreeBSD versions <= 7.2,
12082# the kernel module that provides POSIX semaphores
12083# isn't loaded by default, so an attempt to call
12084# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000012085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
12086$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050012087if test "${ac_cv_posix_semaphores_enabled+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012088 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000012089else
Matthias Kloseb9621712010-04-24 17:59:49 +000012090 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000012091 ac_cv_posix_semaphores_enabled=yes
12092else
Matthias Kloseb9621712010-04-24 17:59:49 +000012093 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000012094/* end confdefs.h. */
12095
12096#include <unistd.h>
12097#include <fcntl.h>
12098#include <stdio.h>
12099#include <semaphore.h>
12100#include <sys/stat.h>
12101
12102int main(void) {
12103 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
12104 if (a == SEM_FAILED) {
12105 perror("sem_open");
12106 return 1;
12107 }
12108 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000012109 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000012110 return 0;
12111}
12112
12113_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012114if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000012115 ac_cv_posix_semaphores_enabled=yes
12116else
Matthias Kloseb9621712010-04-24 17:59:49 +000012117 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000012118fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012119rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12120 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000012121fi
12122
12123
Mark Dickinsona614f042009-11-28 12:48:43 +000012124fi
12125
Matthias Kloseb9621712010-04-24 17:59:49 +000012126{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
12127$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000012128if test $ac_cv_posix_semaphores_enabled = no
12129then
12130
Matthias Kloseb9621712010-04-24 17:59:49 +000012131$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000012132
12133fi
12134
Mark Dickinson10683072009-04-18 21:18:19 +000012135# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000012136{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
12137$as_echo_n "checking for broken sem_getvalue... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050012138if test "${ac_cv_broken_sem_getvalue+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012139 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012140else
Matthias Kloseb9621712010-04-24 17:59:49 +000012141 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012142 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000012143else
Matthias Kloseb9621712010-04-24 17:59:49 +000012144 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000012145/* end confdefs.h. */
12146
12147#include <unistd.h>
12148#include <fcntl.h>
12149#include <stdio.h>
12150#include <semaphore.h>
12151#include <sys/stat.h>
12152
12153int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000012154 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000012155 int count;
12156 int res;
12157 if(a==SEM_FAILED){
12158 perror("sem_open");
12159 return 1;
12160
12161 }
12162 res = sem_getvalue(a, &count);
12163 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000012164 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000012165 return res==-1 ? 1 : 0;
12166}
12167
Mark Dickinson10683072009-04-18 21:18:19 +000012168_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012169if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012170 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000012171else
Matthias Kloseb9621712010-04-24 17:59:49 +000012172 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012173fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012174rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12175 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012176fi
12177
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012178
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012179fi
12180
Matthias Kloseb9621712010-04-24 17:59:49 +000012181{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
12182$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012183if test $ac_cv_broken_sem_getvalue = yes
12184then
12185
Matthias Kloseb9621712010-04-24 17:59:49 +000012186$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012187
12188fi
12189
Mark Dickinsonbd792642009-03-18 20:06:12 +000012190# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000012191{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
12192$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012193# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012194if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000012195 enableval=$enable_big_digits; case $enable_big_digits in
12196yes)
12197 enable_big_digits=30 ;;
12198no)
12199 enable_big_digits=15 ;;
1220015|30)
12201 ;;
12202*)
Benjamin Peterson87cdb812011-05-31 18:26:08 -050012203 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 +000012204esac
Matthias Kloseb9621712010-04-24 17:59:49 +000012205{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
12206$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012207
12208cat >>confdefs.h <<_ACEOF
12209#define PYLONG_BITS_IN_DIGIT $enable_big_digits
12210_ACEOF
12211
12212
12213else
Matthias Kloseb9621712010-04-24 17:59:49 +000012214 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
12215$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012216fi
12217
12218
Guido van Rossumef2255b2000-03-10 22:30:29 +000012219# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012220ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050012221if test "x$ac_cv_header_wchar_h" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012222
12223
Matthias Kloseb9621712010-04-24 17:59:49 +000012224$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012225
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012226 wchar_h="yes"
12227
Guido van Rossumef2255b2000-03-10 22:30:29 +000012228else
Martin v. Löwis11437992002-04-12 09:54:03 +000012229 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000012230
12231fi
12232
Michael W. Hudson54241132001-12-07 15:38:26 +000012233
Martin v. Löwis11437992002-04-12 09:54:03 +000012234
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012235# determine wchar_t size
12236if test "$wchar_h" = yes
12237then
Matthias Kloseb9621712010-04-24 17:59:49 +000012238 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012239# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12240# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12241# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000012242{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
12243$as_echo_n "checking size of wchar_t... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050012244if test "${ac_cv_sizeof_wchar_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012245 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012246else
Matthias Kloseb9621712010-04-24 17:59:49 +000012247 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
12248"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012249
Martin v. Löwis11437992002-04-12 09:54:03 +000012250else
Matthias Kloseb9621712010-04-24 17:59:49 +000012251 if test "$ac_cv_type_wchar_t" = yes; then
12252 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12253$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Benjamin Peterson87cdb812011-05-31 18:26:08 -050012254{ as_fn_set_status 77
12255as_fn_error "cannot compute sizeof (wchar_t)
12256See \`config.log' for more details." "$LINENO" 5; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012257 else
12258 ac_cv_sizeof_wchar_t=0
12259 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012260fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012261
Martin v. Löwis11437992002-04-12 09:54:03 +000012262fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012263{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
12264$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012265
12266
12267
Martin v. Löwis11437992002-04-12 09:54:03 +000012268cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012269#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012270_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012271
Michael W. Hudson54241132001-12-07 15:38:26 +000012272
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012273fi
12274
Matthias Kloseb9621712010-04-24 17:59:49 +000012275{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
12276$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012277have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012278cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012279/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012280
12281#include <tcl.h>
12282#if TCL_UTF_MAX != 6
12283# error "NOT UCS4_TCL"
12284#endif
12285int
12286main ()
12287{
12288
12289 ;
12290 return 0;
12291}
12292_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012293if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012294
12295
Matthias Kloseb9621712010-04-24 17:59:49 +000012296$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012297
12298 have_ucs4_tcl=yes
12299
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012300fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012301rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012302{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
12303$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012304
Skip Montanaro6dead952003-09-25 14:50:04 +000012305# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012306if test "$wchar_h" = yes
12307then
12308 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000012309 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
12310$as_echo_n "checking whether wchar_t is signed... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050012311 if test "${ac_cv_wchar_t_signed+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012312 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012313else
12314
Matthias Kloseb9621712010-04-24 17:59:49 +000012315 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012316 ac_cv_wchar_t_signed=yes
12317else
Matthias Kloseb9621712010-04-24 17:59:49 +000012318 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012319/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012320
12321 #include <wchar.h>
12322 int main()
12323 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000012324 /* Success: exit code 0 */
12325 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012326 }
12327
12328_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012329if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012330 ac_cv_wchar_t_signed=yes
12331else
Matthias Kloseb9621712010-04-24 17:59:49 +000012332 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012333fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012334rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12335 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012336fi
12337
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012338fi
12339
Matthias Kloseb9621712010-04-24 17:59:49 +000012340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
12341$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012342fi
12343
Matthias Kloseb9621712010-04-24 17:59:49 +000012344{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what type to use for str" >&5
12345$as_echo_n "checking what type to use for str... " >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000012346
12347# Check whether --with-wide-unicode was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012348if test "${with_wide_unicode+set}" = set; then :
Georg Brandl52d168a2008-01-07 18:10:24 +000012349 withval=$with_wide_unicode;
12350if test "$withval" != no
12351then unicode_size="4"
12352else unicode_size="2"
12353fi
12354
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012355else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012356
Georg Brandl52d168a2008-01-07 18:10:24 +000012357case "$have_ucs4_tcl" in
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012358 yes) unicode_size="4";;
Georg Brandl52d168a2008-01-07 18:10:24 +000012359 *) unicode_size="2" ;;
12360esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012361
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012362fi
12363
Martin v. Löwis0036cba2002-04-12 09:58:45 +000012364
12365
Georg Brandl52d168a2008-01-07 18:10:24 +000012366case "$unicode_size" in
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012367 4)
12368 $as_echo "#define Py_UNICODE_SIZE 4" >>confdefs.h
12369
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012370 ABIFLAGS="${ABIFLAGS}u"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012371 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000012372 *) $as_echo "#define Py_UNICODE_SIZE 2" >>confdefs.h
Georg Brandl52d168a2008-01-07 18:10:24 +000012373 ;;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012374esac
12375
Michael W. Hudson54241132001-12-07 15:38:26 +000012376
Martin v. Löwis11437992002-04-12 09:54:03 +000012377
Georg Brandl52d168a2008-01-07 18:10:24 +000012378# wchar_t is only usable if it maps to an unsigned type
12379if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000012380 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000012381then
12382 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012383
Matthias Kloseb9621712010-04-24 17:59:49 +000012384$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012385
Matthias Kloseb9621712010-04-24 17:59:49 +000012386 $as_echo "#define PY_UNICODE_TYPE wchar_t" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012387
Georg Brandl52d168a2008-01-07 18:10:24 +000012388elif test "$ac_cv_sizeof_short" = "$unicode_size"
12389then
12390 PY_UNICODE_TYPE="unsigned short"
Matthias Kloseb9621712010-04-24 17:59:49 +000012391 $as_echo "#define PY_UNICODE_TYPE unsigned short" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012392
Georg Brandl52d168a2008-01-07 18:10:24 +000012393elif test "$ac_cv_sizeof_long" = "$unicode_size"
12394then
12395 PY_UNICODE_TYPE="unsigned long"
Matthias Kloseb9621712010-04-24 17:59:49 +000012396 $as_echo "#define PY_UNICODE_TYPE unsigned long" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012397
Georg Brandl52d168a2008-01-07 18:10:24 +000012398else
12399 PY_UNICODE_TYPE="no type found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012400fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012401{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PY_UNICODE_TYPE" >&5
12402$as_echo "$PY_UNICODE_TYPE" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000012403
12404# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000012405 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12406$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050012407if test "${ac_cv_c_bigendian+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012408 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000012409else
Matthias Kloseb9621712010-04-24 17:59:49 +000012410 ac_cv_c_bigendian=unknown
12411 # See if we're dealing with a universal compiler.
12412 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12413/* end confdefs.h. */
12414#ifndef __APPLE_CC__
12415 not a universal capable compiler
12416 #endif
12417 typedef int dummy;
12418
Skip Montanaro6dead952003-09-25 14:50:04 +000012419_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012420if ac_fn_c_try_compile "$LINENO"; then :
12421
12422 # Check for potential -arch flags. It is not universal unless
12423 # there are at least two -arch flags with different values.
12424 ac_arch=
12425 ac_prev=
12426 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12427 if test -n "$ac_prev"; then
12428 case $ac_word in
12429 i?86 | x86_64 | ppc | ppc64)
12430 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12431 ac_arch=$ac_word
12432 else
12433 ac_cv_c_bigendian=universal
12434 break
12435 fi
12436 ;;
12437 esac
12438 ac_prev=
12439 elif test "x$ac_word" = "x-arch"; then
12440 ac_prev=arch
12441 fi
12442 done
12443fi
12444rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12445 if test $ac_cv_c_bigendian = unknown; then
12446 # See if sys/param.h defines the BYTE_ORDER macro.
12447 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012448/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012449#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012450 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012451
Martin v. Löwis11437992002-04-12 09:54:03 +000012452int
12453main ()
12454{
Matthias Kloseb9621712010-04-24 17:59:49 +000012455#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12456 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12457 && LITTLE_ENDIAN)
12458 bogus endian macros
12459 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012460
12461 ;
12462 return 0;
12463}
12464_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012465if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012466 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000012467 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012468/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012469#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012470 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012471
Martin v. Löwis11437992002-04-12 09:54:03 +000012472int
12473main ()
12474{
Guido van Rossumef2255b2000-03-10 22:30:29 +000012475#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000012476 not big endian
12477 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012478
12479 ;
12480 return 0;
12481}
12482_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012483if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012484 ac_cv_c_bigendian=yes
12485else
Matthias Kloseb9621712010-04-24 17:59:49 +000012486 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000012487fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012488rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012489fi
12490rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12491 fi
12492 if test $ac_cv_c_bigendian = unknown; then
12493 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12494 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012495/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000012496#include <limits.h>
12497
Martin v. Löwis11437992002-04-12 09:54:03 +000012498int
12499main ()
12500{
Matthias Kloseb9621712010-04-24 17:59:49 +000012501#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12502 bogus endian macros
12503 #endif
12504
Martin v. Löwis11437992002-04-12 09:54:03 +000012505 ;
12506 return 0;
12507}
12508_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012509if ac_fn_c_try_compile "$LINENO"; then :
12510 # It does; now see whether it defined to _BIG_ENDIAN or not.
12511 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12512/* end confdefs.h. */
12513#include <limits.h>
12514
12515int
12516main ()
12517{
12518#ifndef _BIG_ENDIAN
12519 not big endian
12520 #endif
12521
12522 ;
12523 return 0;
12524}
12525_ACEOF
12526if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012527 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012528else
Matthias Kloseb9621712010-04-24 17:59:49 +000012529 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012530fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012531rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12532fi
12533rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12534 fi
12535 if test $ac_cv_c_bigendian = unknown; then
12536 # Compile a test program.
12537 if test "$cross_compiling" = yes; then :
12538 # Try to guess by grepping values from an object file.
12539 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12540/* end confdefs.h. */
12541short int ascii_mm[] =
12542 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12543 short int ascii_ii[] =
12544 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12545 int use_ascii (int i) {
12546 return ascii_mm[i] + ascii_ii[i];
12547 }
12548 short int ebcdic_ii[] =
12549 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12550 short int ebcdic_mm[] =
12551 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12552 int use_ebcdic (int i) {
12553 return ebcdic_mm[i] + ebcdic_ii[i];
12554 }
12555 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012556
Matthias Kloseb9621712010-04-24 17:59:49 +000012557int
12558main ()
12559{
12560return use_ascii (foo) == use_ebcdic (foo);
12561 ;
12562 return 0;
12563}
12564_ACEOF
12565if ac_fn_c_try_compile "$LINENO"; then :
12566 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12567 ac_cv_c_bigendian=yes
12568 fi
12569 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12570 if test "$ac_cv_c_bigendian" = unknown; then
12571 ac_cv_c_bigendian=no
12572 else
12573 # finding both strings is unlikely to happen, but who knows?
12574 ac_cv_c_bigendian=unknown
12575 fi
12576 fi
12577fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012578rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012579else
Matthias Kloseb9621712010-04-24 17:59:49 +000012580 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012581/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012582$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012583int
12584main ()
12585{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012586
Matthias Kloseb9621712010-04-24 17:59:49 +000012587 /* Are we little or big endian? From Harbison&Steele. */
12588 union
12589 {
12590 long int l;
12591 char c[sizeof (long int)];
12592 } u;
12593 u.l = 1;
12594 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012595
12596 ;
12597 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000012598}
Martin v. Löwis11437992002-04-12 09:54:03 +000012599_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012600if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012601 ac_cv_c_bigendian=no
12602else
Matthias Kloseb9621712010-04-24 17:59:49 +000012603 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000012604fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012605rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12606 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000012607fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012608
Matthias Kloseb9621712010-04-24 17:59:49 +000012609 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012610fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012611{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12612$as_echo "$ac_cv_c_bigendian" >&6; }
12613 case $ac_cv_c_bigendian in #(
12614 yes)
12615 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12616;; #(
12617 no)
12618 ;; #(
12619 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012620
Matthias Kloseb9621712010-04-24 17:59:49 +000012621$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012622
Matthias Kloseb9621712010-04-24 17:59:49 +000012623 ;; #(
12624 *)
Benjamin Peterson87cdb812011-05-31 18:26:08 -050012625 as_fn_error "unknown endianness
12626 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000012627 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000012628
Michael W. Hudson54241132001-12-07 15:38:26 +000012629
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012630# ABI version string for Python extension modules. This appears between the
12631# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
12632# from the following attributes which affect the ABI of this Python build (in
12633# this order):
12634#
12635# * The Python implementation (always 'cpython-' for us)
12636# * The major and minor version numbers
12637# * --with-pydebug (adds a 'd')
12638# * --with-pymalloc (adds a 'm')
12639# * --with-wide-unicode (adds a 'u')
12640#
12641# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012642# would get a shared library ABI version tag of 'cpython-32dmu' and shared
12643# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012644
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012645{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
12646$as_echo_n "checking ABIFLAGS... " >&6; }
12647{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
12648$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012649{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
12650$as_echo_n "checking SOABI... " >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012651SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012652{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
12653$as_echo "$SOABI" >&6; }
12654
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012655{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
12656$as_echo_n "checking LDVERSION... " >&6; }
12657LDVERSION='$(VERSION)$(ABIFLAGS)'
12658{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
12659$as_echo "$LDVERSION" >&6; }
12660
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012661# SO is the extension of shared libraries `(including the dot!)
12662# -- usually .so, .sl on HP-UX, .dll on Cygwin
12663{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SO" >&5
12664$as_echo_n "checking SO... " >&6; }
12665if test -z "$SO"
12666then
12667 case $ac_sys_system in
12668 hp*|HP*)
12669 case `uname -m` in
12670 ia64) SO=.so;;
12671 *) SO=.sl;;
12672 esac
12673 ;;
12674 CYGWIN*) SO=.dll;;
Barry Warsaw278266f2010-10-14 17:38:46 +000012675 Linux*|GNU*)
12676 SO=.${SOABI}.so;;
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012677 *) SO=.so;;
12678 esac
12679else
12680 # this might also be a termcap variable, see #610332
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012681 echo
12682 echo '====================================================================='
12683 echo '+ +'
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012684 echo '+ WARNING: You have set SO in your environment. +'
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012685 echo '+ Do you really mean to change the extension for shared libraries? +'
12686 echo '+ Continuing in 10 seconds to let you to ponder. +'
12687 echo '+ +'
12688 echo '====================================================================='
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012689 sleep 10
12690fi
12691{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SO" >&5
12692$as_echo "$SO" >&6; }
12693
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012694# Check whether right shifting a negative integer extends the sign bit
12695# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000012696{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
12697$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050012698if test "${ac_cv_rshift_extends_sign+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012699 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000012700else
Martin v. Löwis11437992002-04-12 09:54:03 +000012701
Matthias Kloseb9621712010-04-24 17:59:49 +000012702if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000012703 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012704else
Matthias Kloseb9621712010-04-24 17:59:49 +000012705 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012706/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012707
12708int main()
12709{
Vladimir Marangozova6180282000-07-12 05:05:06 +000012710 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012711}
12712
Martin v. Löwis11437992002-04-12 09:54:03 +000012713_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012714if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000012715 ac_cv_rshift_extends_sign=yes
12716else
Matthias Kloseb9621712010-04-24 17:59:49 +000012717 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000012718fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012719rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12720 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000012721fi
12722
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012723fi
12724
Matthias Kloseb9621712010-04-24 17:59:49 +000012725{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
12726$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000012727if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012728then
Martin v. Löwis11437992002-04-12 09:54:03 +000012729
Matthias Kloseb9621712010-04-24 17:59:49 +000012730$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012731
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012732fi
12733
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012734# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000012735{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
12736$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050012737if test "${ac_cv_have_getc_unlocked+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012738 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012739else
Martin v. Löwis11437992002-04-12 09:54:03 +000012740
Matthias Kloseb9621712010-04-24 17:59:49 +000012741cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012742/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012743#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012744int
12745main ()
12746{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012747
12748 FILE *f = fopen("/dev/null", "r");
12749 flockfile(f);
12750 getc_unlocked(f);
12751 funlockfile(f);
12752
Martin v. Löwis11437992002-04-12 09:54:03 +000012753 ;
12754 return 0;
12755}
12756_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012757if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012758 ac_cv_have_getc_unlocked=yes
12759else
Matthias Kloseb9621712010-04-24 17:59:49 +000012760 ac_cv_have_getc_unlocked=no
12761fi
12762rm -f core conftest.err conftest.$ac_objext \
12763 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012764fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012765
Matthias Kloseb9621712010-04-24 17:59:49 +000012766{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
12767$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012768if test "$ac_cv_have_getc_unlocked" = yes
12769then
Martin v. Löwis11437992002-04-12 09:54:03 +000012770
Matthias Kloseb9621712010-04-24 17:59:49 +000012771$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012772
12773fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012774
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012775# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000012776# save the value of LIBS so we don't actually link Python with readline
12777LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012778
Gregory P. Smith18820942008-09-07 06:24:49 +000012779# On some systems we need to link readline to a termcap compatible
12780# library. NOTE: Keep the precedence of listed libraries synchronised
12781# with setup.py.
12782py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012783{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
12784$as_echo_n "checking how to link readline libs... " >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012785for py_libtermcap in "" ncursesw ncurses curses termcap; do
12786 if test -z "$py_libtermcap"; then
12787 READLINE_LIBS="-lreadline"
12788 else
12789 READLINE_LIBS="-lreadline -l$py_libtermcap"
12790 fi
12791 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000012792 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012793/* end confdefs.h. */
12794
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012795/* Override any GCC internal prototype to avoid an error.
12796 Use char because int might match the return type of a GCC
12797 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012798#ifdef __cplusplus
12799extern "C"
12800#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012801char readline ();
12802int
12803main ()
12804{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012805return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012806 ;
12807 return 0;
12808}
12809_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012810if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000012811 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012812fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012813rm -f core conftest.err conftest.$ac_objext \
12814 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000012815 if test $py_cv_lib_readline = yes; then
12816 break
12817 fi
12818done
12819# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
12820#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000012821if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012822 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
12823$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012824else
Matthias Kloseb9621712010-04-24 17:59:49 +000012825 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
12826$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012827
Matthias Kloseb9621712010-04-24 17:59:49 +000012828$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012829
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012830fi
12831
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012832# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000012833{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
12834$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050012835if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012836 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012837else
12838 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012839LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012840cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012841/* end confdefs.h. */
12842
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012843/* Override any GCC internal prototype to avoid an error.
12844 Use char because int might match the return type of a GCC
12845 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012846#ifdef __cplusplus
12847extern "C"
12848#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012849char rl_callback_handler_install ();
12850int
12851main ()
12852{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012853return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012854 ;
12855 return 0;
12856}
12857_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012858if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012859 ac_cv_lib_readline_rl_callback_handler_install=yes
12860else
Matthias Kloseb9621712010-04-24 17:59:49 +000012861 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012862fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012863rm -f core conftest.err conftest.$ac_objext \
12864 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012865LIBS=$ac_check_lib_save_LIBS
12866fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012867{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
12868$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050012869if test "x$ac_cv_lib_readline_rl_callback_handler_install" = x""yes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012870
Matthias Kloseb9621712010-04-24 17:59:49 +000012871$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012872
12873fi
12874
12875
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012876# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000012877cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012878/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012879#include <readline/readline.h>
12880_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012881if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012882 have_readline=yes
12883else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012884 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000012885
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012886fi
Benjamin Peterson87cdb812011-05-31 18:26:08 -050012887rm -f conftest.err conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012888if test $have_readline = yes
12889then
Matthias Kloseb9621712010-04-24 17:59:49 +000012890 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012891/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012892#include <readline/readline.h>
12893
12894_ACEOF
12895if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012896 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012897
Matthias Kloseb9621712010-04-24 17:59:49 +000012898$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012899
12900fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012901rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012902
Matthias Kloseb9621712010-04-24 17:59:49 +000012903 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000012904/* end confdefs.h. */
12905#include <readline/readline.h>
12906
12907_ACEOF
12908if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012909 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000012910
Matthias Kloseb9621712010-04-24 17:59:49 +000012911$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000012912
12913fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012914rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000012915
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012916fi
12917
Martin v. Löwis0daad592001-09-30 21:09:59 +000012918# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000012919{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
12920$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050012921if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012922 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000012923else
Martin v. Löwis11437992002-04-12 09:54:03 +000012924 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012925LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012926cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012927/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012928
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012929/* Override any GCC internal prototype to avoid an error.
12930 Use char because int might match the return type of a GCC
12931 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012932#ifdef __cplusplus
12933extern "C"
12934#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012935char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012936int
12937main ()
12938{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012939return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012940 ;
12941 return 0;
12942}
12943_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012944if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012945 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000012946else
Matthias Kloseb9621712010-04-24 17:59:49 +000012947 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000012948fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012949rm -f core conftest.err conftest.$ac_objext \
12950 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012951LIBS=$ac_check_lib_save_LIBS
12952fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012953{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
12954$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050012955if test "x$ac_cv_lib_readline_rl_pre_input_hook" = x""yes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012956
Matthias Kloseb9621712010-04-24 17:59:49 +000012957$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000012958
Martin v. Löwis0daad592001-09-30 21:09:59 +000012959fi
12960
Michael W. Hudson54241132001-12-07 15:38:26 +000012961
Thomas Wouters89d996e2007-09-08 17:39:28 +000012962# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000012963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
12964$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050012965if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012966 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000012967else
12968 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012969LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012970cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000012971/* end confdefs.h. */
12972
12973/* Override any GCC internal prototype to avoid an error.
12974 Use char because int might match the return type of a GCC
12975 builtin and then its argument prototype would still apply. */
12976#ifdef __cplusplus
12977extern "C"
12978#endif
12979char rl_completion_display_matches_hook ();
12980int
12981main ()
12982{
12983return rl_completion_display_matches_hook ();
12984 ;
12985 return 0;
12986}
12987_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012988if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000012989 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
12990else
Matthias Kloseb9621712010-04-24 17:59:49 +000012991 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000012992fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012993rm -f core conftest.err conftest.$ac_objext \
12994 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000012995LIBS=$ac_check_lib_save_LIBS
12996fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012997{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
12998$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050012999if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = x""yes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000013000
Matthias Kloseb9621712010-04-24 17:59:49 +000013001$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000013002
13003fi
13004
13005
Martin v. Löwis0daad592001-09-30 21:09:59 +000013006# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000013007{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
13008$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050013009if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013010 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000013011else
Martin v. Löwis11437992002-04-12 09:54:03 +000013012 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013013LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013014cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013015/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013016
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013017/* Override any GCC internal prototype to avoid an error.
13018 Use char because int might match the return type of a GCC
13019 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013020#ifdef __cplusplus
13021extern "C"
13022#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013023char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013024int
13025main ()
13026{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013027return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013028 ;
13029 return 0;
13030}
13031_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013032if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013033 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000013034else
Matthias Kloseb9621712010-04-24 17:59:49 +000013035 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000013036fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013037rm -f core conftest.err conftest.$ac_objext \
13038 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013039LIBS=$ac_check_lib_save_LIBS
13040fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013041{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
13042$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050013043if test "x$ac_cv_lib_readline_rl_completion_matches" = x""yes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013044
Matthias Kloseb9621712010-04-24 17:59:49 +000013045$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000013046
Guido van Rossum353ae582001-07-10 16:45:32 +000013047fi
13048
Jack Jansendd19cf82001-12-06 22:36:17 +000013049
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013050# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000013051cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013052/* end confdefs.h. */
13053#include <readline/readline.h>
13054_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013055if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013056 have_readline=yes
13057else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013058 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000013059
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013060fi
Benjamin Peterson87cdb812011-05-31 18:26:08 -050013061rm -f conftest.err conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013062if test $have_readline = yes
13063then
Matthias Kloseb9621712010-04-24 17:59:49 +000013064 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013065/* end confdefs.h. */
13066#include <readline/readline.h>
13067
13068_ACEOF
13069if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000013070 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013071
Matthias Kloseb9621712010-04-24 17:59:49 +000013072$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013073
13074fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000013075rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013076
13077fi
13078
Martin v. Löwis82bca632006-02-10 20:49:30 +000013079# End of readline checks: restore LIBS
13080LIBS=$LIBS_no_readline
13081
Matthias Kloseb9621712010-04-24 17:59:49 +000013082{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
13083$as_echo_n "checking for broken nice()... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050013084if test "${ac_cv_broken_nice+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013085 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000013086else
Martin v. Löwis11437992002-04-12 09:54:03 +000013087
Matthias Kloseb9621712010-04-24 17:59:49 +000013088if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013089 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013090else
Matthias Kloseb9621712010-04-24 17:59:49 +000013091 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013092/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013093
13094int main()
13095{
13096 int val1 = nice(1);
13097 if (val1 != -1 && val1 == nice(2))
13098 exit(0);
13099 exit(1);
13100}
13101
Martin v. Löwis11437992002-04-12 09:54:03 +000013102_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013103if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013104 ac_cv_broken_nice=yes
13105else
Matthias Kloseb9621712010-04-24 17:59:49 +000013106 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013107fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013108rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13109 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013110fi
13111
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013112fi
13113
Matthias Kloseb9621712010-04-24 17:59:49 +000013114{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
13115$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013116if test "$ac_cv_broken_nice" = yes
13117then
Martin v. Löwis11437992002-04-12 09:54:03 +000013118
Matthias Kloseb9621712010-04-24 17:59:49 +000013119$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013120
13121fi
13122
Matthias Kloseb9621712010-04-24 17:59:49 +000013123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
13124$as_echo_n "checking for broken poll()... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050013125if test "${ac_cv_broken_poll+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013126 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013127else
Matthias Kloseb9621712010-04-24 17:59:49 +000013128 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013129 ac_cv_broken_poll=no
13130else
Matthias Kloseb9621712010-04-24 17:59:49 +000013131 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013132/* end confdefs.h. */
13133
13134#include <poll.h>
13135
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013136int main()
13137{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013138 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013139 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013140
13141 close (42);
13142
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013143 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013144 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013145 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013146 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013147 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013148 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013149 return 1;
13150}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013151
13152_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013153if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013154 ac_cv_broken_poll=yes
13155else
Matthias Kloseb9621712010-04-24 17:59:49 +000013156 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013157fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013158rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13159 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013160fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013161
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013162fi
13163
Matthias Kloseb9621712010-04-24 17:59:49 +000013164{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
13165$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013166if test "$ac_cv_broken_poll" = yes
13167then
13168
Matthias Kloseb9621712010-04-24 17:59:49 +000013169$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013170
13171fi
13172
Brett Cannon43802422005-02-10 20:48:03 +000013173# 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 +000013174# (which is not required by ISO C or UNIX spec) and/or if we support
13175# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000013176ac_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 +000013177#include <$ac_cv_struct_tm>
13178
Matthias Kloseb9621712010-04-24 17:59:49 +000013179"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050013180if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then :
Brett Cannon43802422005-02-10 20:48:03 +000013181
13182cat >>confdefs.h <<_ACEOF
13183#define HAVE_STRUCT_TM_TM_ZONE 1
13184_ACEOF
13185
13186
13187fi
13188
13189if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13190
Matthias Kloseb9621712010-04-24 17:59:49 +000013191$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013192
13193else
Matthias Kloseb9621712010-04-24 17:59:49 +000013194 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13195"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050013196if test "x$ac_cv_have_decl_tzname" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013197 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013198else
Matthias Kloseb9621712010-04-24 17:59:49 +000013199 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013200fi
13201
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013202cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013203#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013204_ACEOF
13205
Matthias Kloseb9621712010-04-24 17:59:49 +000013206 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13207$as_echo_n "checking for tzname... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050013208if test "${ac_cv_var_tzname+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013209 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013210else
Matthias Kloseb9621712010-04-24 17:59:49 +000013211 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013212/* end confdefs.h. */
13213#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013214#if !HAVE_DECL_TZNAME
13215extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000013216#endif
13217
13218int
13219main ()
13220{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013221return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000013222 ;
13223 return 0;
13224}
13225_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013226if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000013227 ac_cv_var_tzname=yes
13228else
Matthias Kloseb9621712010-04-24 17:59:49 +000013229 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000013230fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013231rm -f core conftest.err conftest.$ac_objext \
13232 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013233fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013234{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13235$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000013236 if test $ac_cv_var_tzname = yes; then
13237
Matthias Kloseb9621712010-04-24 17:59:49 +000013238$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013239
13240 fi
13241fi
13242
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013243
Martin v. Löwis1d459062005-03-14 21:23:33 +000013244# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000013245{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
13246$as_echo_n "checking for working tzset()... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050013247if test "${ac_cv_working_tzset+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013248 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013249else
13250
Matthias Kloseb9621712010-04-24 17:59:49 +000013251if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013252 ac_cv_working_tzset=no
13253else
Matthias Kloseb9621712010-04-24 17:59:49 +000013254 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013255/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013256
13257#include <stdlib.h>
13258#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000013259#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000013260
13261#if HAVE_TZNAME
13262extern char *tzname[];
13263#endif
13264
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013265int main()
13266{
Brett Cannon18367812003-09-19 00:59:16 +000013267 /* Note that we need to ensure that not only does tzset(3)
13268 do 'something' with localtime, but it works as documented
13269 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000013270 This includes making sure that tzname is set properly if
13271 tm->tm_zone does not exist since it is the alternative way
13272 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000013273
13274 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000013275 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000013276 */
13277
Martin v. Löwis1d459062005-03-14 21:23:33 +000013278 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000013279 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
13280
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013281 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013282 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013283 if (localtime(&groundhogday)->tm_hour != 0)
13284 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013285#if HAVE_TZNAME
13286 /* For UTC, tzname[1] is sometimes "", sometimes " " */
13287 if (strcmp(tzname[0], "UTC") ||
13288 (tzname[1][0] != 0 && tzname[1][0] != ' '))
13289 exit(1);
13290#endif
Brett Cannon18367812003-09-19 00:59:16 +000013291
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013292 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013293 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013294 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013295 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013296#if HAVE_TZNAME
13297 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
13298 exit(1);
13299#endif
Brett Cannon18367812003-09-19 00:59:16 +000013300
13301 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
13302 tzset();
13303 if (localtime(&groundhogday)->tm_hour != 11)
13304 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013305#if HAVE_TZNAME
13306 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
13307 exit(1);
13308#endif
13309
13310#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000013311 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
13312 exit(1);
13313 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
13314 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013315#endif
Brett Cannon18367812003-09-19 00:59:16 +000013316
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013317 exit(0);
13318}
13319
13320_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013321if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013322 ac_cv_working_tzset=yes
13323else
Matthias Kloseb9621712010-04-24 17:59:49 +000013324 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013325fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013326rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13327 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013328fi
13329
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013330fi
13331
Matthias Kloseb9621712010-04-24 17:59:49 +000013332{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
13333$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013334if test "$ac_cv_working_tzset" = yes
13335then
13336
Matthias Kloseb9621712010-04-24 17:59:49 +000013337$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013338
13339fi
13340
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013341# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013342{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
13343$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050013344if test "${ac_cv_stat_tv_nsec+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013345 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013346else
Matthias Kloseb9621712010-04-24 17:59:49 +000013347 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013348/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013349#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013350int
13351main ()
13352{
13353
13354struct stat st;
13355st.st_mtim.tv_nsec = 1;
13356
13357 ;
13358 return 0;
13359}
13360_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013361if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000013362 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013363else
Matthias Kloseb9621712010-04-24 17:59:49 +000013364 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013365fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013366rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13367fi
13368
Matthias Kloseb9621712010-04-24 17:59:49 +000013369{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
13370$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013371if test "$ac_cv_stat_tv_nsec" = yes
13372then
13373
Matthias Kloseb9621712010-04-24 17:59:49 +000013374$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013375
13376fi
13377
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013378# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013379{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
13380$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050013381if test "${ac_cv_stat_tv_nsec2+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013382 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013383else
Matthias Kloseb9621712010-04-24 17:59:49 +000013384 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013385/* end confdefs.h. */
13386#include <sys/stat.h>
13387int
13388main ()
13389{
13390
13391struct stat st;
13392st.st_mtimespec.tv_nsec = 1;
13393
13394 ;
13395 return 0;
13396}
13397_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013398if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013399 ac_cv_stat_tv_nsec2=yes
13400else
Matthias Kloseb9621712010-04-24 17:59:49 +000013401 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013402fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013403rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13404fi
13405
Matthias Kloseb9621712010-04-24 17:59:49 +000013406{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
13407$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013408if test "$ac_cv_stat_tv_nsec2" = yes
13409then
13410
Matthias Kloseb9621712010-04-24 17:59:49 +000013411$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013412
13413fi
13414
Jack Jansen666b1e72001-10-31 12:11:48 +000013415# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000013416{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
13417$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050013418if test "${ac_cv_mvwdelch_is_expression+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013419 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013420else
Matthias Kloseb9621712010-04-24 17:59:49 +000013421 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013422/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013423#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013424int
13425main ()
13426{
Jack Jansen666b1e72001-10-31 12:11:48 +000013427
13428 int rtn;
13429 rtn = mvwdelch(0,0,0);
13430
Martin v. Löwis11437992002-04-12 09:54:03 +000013431 ;
13432 return 0;
13433}
13434_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013435if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013436 ac_cv_mvwdelch_is_expression=yes
13437else
Matthias Kloseb9621712010-04-24 17:59:49 +000013438 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013439fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013440rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13441fi
13442
Matthias Kloseb9621712010-04-24 17:59:49 +000013443{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
13444$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000013445
13446if test "$ac_cv_mvwdelch_is_expression" = yes
13447then
Martin v. Löwis11437992002-04-12 09:54:03 +000013448
Matthias Kloseb9621712010-04-24 17:59:49 +000013449$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013450
13451fi
13452
Matthias Kloseb9621712010-04-24 17:59:49 +000013453{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
13454$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050013455if test "${ac_cv_window_has_flags+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013456 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013457else
Matthias Kloseb9621712010-04-24 17:59:49 +000013458 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013459/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013460#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013461int
13462main ()
13463{
Jack Jansen666b1e72001-10-31 12:11:48 +000013464
13465 WINDOW *w;
13466 w->_flags = 0;
13467
Martin v. Löwis11437992002-04-12 09:54:03 +000013468 ;
13469 return 0;
13470}
13471_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013472if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013473 ac_cv_window_has_flags=yes
13474else
Matthias Kloseb9621712010-04-24 17:59:49 +000013475 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013476fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013477rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13478fi
13479
Matthias Kloseb9621712010-04-24 17:59:49 +000013480{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
13481$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013482
Jack Jansen666b1e72001-10-31 12:11:48 +000013483
13484if test "$ac_cv_window_has_flags" = yes
13485then
Martin v. Löwis11437992002-04-12 09:54:03 +000013486
Matthias Kloseb9621712010-04-24 17:59:49 +000013487$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013488
13489fi
13490
Matthias Kloseb9621712010-04-24 17:59:49 +000013491{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
13492$as_echo_n "checking for is_term_resized... " >&6; }
13493cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013494/* end confdefs.h. */
13495#include <curses.h>
13496int
13497main ()
13498{
13499void *x=is_term_resized
13500 ;
13501 return 0;
13502}
13503_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013504if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013505
Matthias Kloseb9621712010-04-24 17:59:49 +000013506$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013507
Matthias Kloseb159a552010-04-25 21:00:44 +000013508 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013509$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013510else
Matthias Kloseb9621712010-04-24 17:59:49 +000013511 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13512$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013513
13514fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013515rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13516
Matthias Kloseb9621712010-04-24 17:59:49 +000013517{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
13518$as_echo_n "checking for resize_term... " >&6; }
13519cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013520/* end confdefs.h. */
13521#include <curses.h>
13522int
13523main ()
13524{
13525void *x=resize_term
13526 ;
13527 return 0;
13528}
13529_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013530if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013531
Matthias Kloseb9621712010-04-24 17:59:49 +000013532$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013533
Matthias Kloseb159a552010-04-25 21:00:44 +000013534 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013535$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013536else
Matthias Kloseb9621712010-04-24 17:59:49 +000013537 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13538$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013539
13540fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013541rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13542
Matthias Kloseb9621712010-04-24 17:59:49 +000013543{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
13544$as_echo_n "checking for resizeterm... " >&6; }
13545cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013546/* end confdefs.h. */
13547#include <curses.h>
13548int
13549main ()
13550{
13551void *x=resizeterm
13552 ;
13553 return 0;
13554}
13555_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013556if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013557
Matthias Kloseb9621712010-04-24 17:59:49 +000013558$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013559
Matthias Kloseb159a552010-04-25 21:00:44 +000013560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013561$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013562else
Matthias Kloseb9621712010-04-24 17:59:49 +000013563 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13564$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013565
13566fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013567rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13568
Matthias Kloseb9621712010-04-24 17:59:49 +000013569{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
13570$as_echo_n "checking for /dev/ptmx... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013571
13572if test -r /dev/ptmx
13573then
Matthias Kloseb9621712010-04-24 17:59:49 +000013574 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13575$as_echo "yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013576
Matthias Kloseb9621712010-04-24 17:59:49 +000013577$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013578
Thomas Wouters89f507f2006-12-13 04:49:30 +000013579else
Matthias Kloseb9621712010-04-24 17:59:49 +000013580 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13581$as_echo "no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013582fi
13583
Matthias Kloseb9621712010-04-24 17:59:49 +000013584{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
13585$as_echo_n "checking for /dev/ptc... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013586
13587if test -r /dev/ptc
13588then
Matthias Kloseb9621712010-04-24 17:59:49 +000013589 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13590$as_echo "yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013591
Matthias Kloseb9621712010-04-24 17:59:49 +000013592$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000013593
Thomas Wouters89f507f2006-12-13 04:49:30 +000013594else
Matthias Kloseb9621712010-04-24 17:59:49 +000013595 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13596$as_echo "no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013597fi
13598
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013599if test "$have_long_long" = yes
13600then
Matthias Kloseb9621712010-04-24 17:59:49 +000013601 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
13602$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050013603 if test "${ac_cv_have_long_long_format+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013604 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013605else
Matthias Kloseb9621712010-04-24 17:59:49 +000013606 if test "$cross_compiling" = yes; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013607 ac_cv_have_long_long_format=no
13608else
Matthias Kloseb9621712010-04-24 17:59:49 +000013609 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013610/* end confdefs.h. */
13611
13612 #include <stdio.h>
13613 #include <stddef.h>
13614 #include <string.h>
13615
13616 #ifdef HAVE_SYS_TYPES_H
13617 #include <sys/types.h>
13618 #endif
13619
13620 int main()
13621 {
13622 char buffer[256];
13623
13624 if (sprintf(buffer, "%lld", (long long)123) < 0)
13625 return 1;
13626 if (strcmp(buffer, "123"))
13627 return 1;
13628
13629 if (sprintf(buffer, "%lld", (long long)-123) < 0)
13630 return 1;
13631 if (strcmp(buffer, "-123"))
13632 return 1;
13633
13634 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
13635 return 1;
13636 if (strcmp(buffer, "123"))
13637 return 1;
13638
13639 return 0;
13640 }
13641
13642_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013643if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013644 ac_cv_have_long_long_format=yes
13645else
Matthias Kloseb9621712010-04-24 17:59:49 +000013646 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013647fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013648rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13649 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013650fi
13651
13652
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013653fi
13654
Matthias Kloseb9621712010-04-24 17:59:49 +000013655 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
13656$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013657fi
13658
Mark Dickinson89d7d412009-12-31 20:50:59 +000013659if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013660then
13661
Matthias Kloseb9621712010-04-24 17:59:49 +000013662$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013663
13664fi
13665
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000013666if test $ac_sys_system = Darwin
13667then
13668 LIBS="$LIBS -framework CoreFoundation"
13669fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013670
Matthias Kloseb9621712010-04-24 17:59:49 +000013671{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
13672$as_echo_n "checking for %zd printf() format support... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050013673if test "${ac_cv_have_size_t_format+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013674 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013675else
Matthias Kloseb9621712010-04-24 17:59:49 +000013676 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000013677 ac_cv_have_size_t_format="cross -- assuming yes"
13678
Thomas Wouters477c8d52006-05-27 19:21:47 +000013679else
Matthias Kloseb9621712010-04-24 17:59:49 +000013680 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000013681/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013682
Thomas Wouters477c8d52006-05-27 19:21:47 +000013683#include <stdio.h>
13684#include <stddef.h>
13685#include <string.h>
13686
Christian Heimes2c181612007-12-17 20:04:13 +000013687#ifdef HAVE_SYS_TYPES_H
13688#include <sys/types.h>
13689#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000013690
13691#ifdef HAVE_SSIZE_T
13692typedef ssize_t Py_ssize_t;
13693#elif SIZEOF_VOID_P == SIZEOF_LONG
13694typedef long Py_ssize_t;
13695#else
13696typedef int Py_ssize_t;
13697#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000013698
Christian Heimes2c181612007-12-17 20:04:13 +000013699int main()
13700{
13701 char buffer[256];
13702
Thomas Wouters477c8d52006-05-27 19:21:47 +000013703 if(sprintf(buffer, "%zd", (size_t)123) < 0)
13704 return 1;
13705
Thomas Wouters89f507f2006-12-13 04:49:30 +000013706 if (strcmp(buffer, "123"))
13707 return 1;
13708
13709 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
13710 return 1;
13711
13712 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000013713 return 1;
13714
13715 return 0;
13716}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013717
Thomas Wouters477c8d52006-05-27 19:21:47 +000013718_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013719if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013720 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013721else
Matthias Kloseb9621712010-04-24 17:59:49 +000013722 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013723fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013724rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13725 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013726fi
13727
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013728fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013729{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
13730$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000013731if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013732
Matthias Kloseb9621712010-04-24 17:59:49 +000013733$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013734
13735fi
13736
Matthias Kloseb9621712010-04-24 17:59:49 +000013737ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000013738#ifdef HAVE_SYS_TYPES_H
13739#include <sys/types.h>
13740#endif
13741#ifdef HAVE_SYS_SOCKET_H
13742#include <sys/socket.h>
13743#endif
13744
Matthias Kloseb9621712010-04-24 17:59:49 +000013745"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050013746if test "x$ac_cv_type_socklen_t" = x""yes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000013747
Martin v. Löwis11437992002-04-12 09:54:03 +000013748else
Guido van Rossum95713eb2000-05-18 20:53:31 +000013749
Matthias Kloseb9621712010-04-24 17:59:49 +000013750$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000013751
13752fi
13753
Michael W. Hudson54241132001-12-07 15:38:26 +000013754
Matthias Kloseb9621712010-04-24 17:59:49 +000013755{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
13756$as_echo_n "checking for broken mbstowcs... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050013757if test "${ac_cv_broken_mbstowcs+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013758 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013759else
Matthias Kloseb9621712010-04-24 17:59:49 +000013760 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000013761 ac_cv_broken_mbstowcs=no
13762else
Matthias Kloseb9621712010-04-24 17:59:49 +000013763 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000013764/* end confdefs.h. */
13765
13766#include<stdlib.h>
13767int main() {
13768 size_t len = -1;
13769 const char *str = "text";
13770 len = mbstowcs(NULL, str, 0);
13771 return (len != 4);
13772}
13773
13774_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013775if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000013776 ac_cv_broken_mbstowcs=no
13777else
Matthias Kloseb9621712010-04-24 17:59:49 +000013778 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000013779fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013780rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13781 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000013782fi
13783
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013784fi
13785
Matthias Kloseb9621712010-04-24 17:59:49 +000013786{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
13787$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000013788if test "$ac_cv_broken_mbstowcs" = yes
13789then
13790
Matthias Kloseb9621712010-04-24 17:59:49 +000013791$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000013792
13793fi
13794
Antoine Pitrou042b1282010-08-13 21:15:58 +000013795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
13796$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050013797if test "${ac_cv_computed_gotos+set}" = set; then :
Antoine Pitrou042b1282010-08-13 21:15:58 +000013798 $as_echo_n "(cached) " >&6
13799else
13800 if test "$cross_compiling" = yes; then :
13801 ac_cv_computed_gotos=no
13802else
13803 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13804/* end confdefs.h. */
13805
13806int main(int argc, char **argv)
13807{
13808 static void *targets[1] = { &&LABEL1 };
13809 goto LABEL2;
13810LABEL1:
13811 return 0;
13812LABEL2:
13813 goto *targets[0];
13814 return 1;
13815}
13816
13817_ACEOF
13818if ac_fn_c_try_run "$LINENO"; then :
13819 ac_cv_computed_gotos=yes
13820else
13821 ac_cv_computed_gotos=no
13822fi
13823rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13824 conftest.$ac_objext conftest.beam conftest.$ac_ext
13825fi
13826
13827fi
13828
13829{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
13830$as_echo "$ac_cv_computed_gotos" >&6; }
13831if test "$ac_cv_computed_gotos" = yes
13832then
13833
13834$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
13835
13836fi
13837
Antoine Pitroub52ec782009-01-25 16:34:23 +000013838# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000013839{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
13840$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013841
13842# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013843if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000013844 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000013845if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000013846then
13847
Matthias Kloseb9621712010-04-24 17:59:49 +000013848$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000013849
Matthias Kloseb9621712010-04-24 17:59:49 +000013850 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13851$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013852fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000013853if test "$withval" = no
13854then
13855
13856$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
13857
Matthias Kloseb9621712010-04-24 17:59:49 +000013858 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13859$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013860fi
13861
Antoine Pitrou042b1282010-08-13 21:15:58 +000013862else
13863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
13864$as_echo "no value specified" >&6; }
13865fi
13866
Antoine Pitroub52ec782009-01-25 16:34:23 +000013867
Benjamin Petersond8d835b2010-10-15 23:14:46 +000013868case $ac_sys_system in
13869AIX*)
13870
13871$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
13872 ;;
13873esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000013874
Michael W. Hudson54241132001-12-07 15:38:26 +000013875
Mark Dickinsonb2153e92010-05-05 22:31:36 +000013876
13877
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000013878for h in `(cd $srcdir;echo Python/thread_*.h)`
13879do
13880 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
13881done
13882
Michael W. Hudson54241132001-12-07 15:38:26 +000013883
Neal Norwitzd24499d2005-12-18 21:36:39 +000013884SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Kloseb9621712010-04-24 17:59:49 +000013885{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
13886$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013887for dir in $SRCDIRS; do
13888 if test ! -d $dir; then
13889 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000013890 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013891done
Matthias Kloseb9621712010-04-24 17:59:49 +000013892{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
13893$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000013894
Guido van Rossum627b2d71993-12-24 10:39:16 +000013895# generate output files
Antoine Pitrou20327222009-05-24 20:39:11 +000013896ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000013897
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000013898ac_config_files="$ac_config_files Modules/ld_so_aix"
13899
Martin v. Löwis11437992002-04-12 09:54:03 +000013900cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013901# This file is a shell script that caches the results of configure
13902# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000013903# scripts and configure runs, see configure's option --config-cache.
13904# It is not useful on other systems. If it contains results you don't
13905# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013906#
Martin v. Löwis11437992002-04-12 09:54:03 +000013907# config.status only pays attention to the cache file if you give it
13908# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013909#
Skip Montanaro6dead952003-09-25 14:50:04 +000013910# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000013911# loading this file, other *unset* `ac_cv_foo' will be assigned the
13912# following values.
13913
13914_ACEOF
13915
Guido van Rossumf78abae1997-01-21 22:02:36 +000013916# The following way of writing the cache mishandles newlines in values,
13917# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013918# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013919# Ultrix sh set writes to stderr and can't be redirected directly,
13920# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013921(
13922 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
13923 eval ac_val=\$$ac_var
13924 case $ac_val in #(
13925 *${as_nl}*)
13926 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000013927 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
13928$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013929 esac
13930 case $ac_var in #(
13931 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000013932 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
13933 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013934 esac ;;
13935 esac
13936 done
13937
Martin v. Löwis11437992002-04-12 09:54:03 +000013938 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013939 case $as_nl`(ac_space=' '; set) 2>&1` in #(
13940 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000013941 # `set' does not quote correctly, so add quotes: double-quote
13942 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000013943 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013944 "s/'/'\\\\''/g;
13945 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013946 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000013947 *)
13948 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013949 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000013950 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013951 esac |
13952 sort
13953) |
Martin v. Löwis11437992002-04-12 09:54:03 +000013954 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013955 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000013956 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013957 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000013958 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
13959 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013960 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
13961 :end' >>confcache
13962if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
13963 if test -w "$cache_file"; then
Benjamin Peterson316e02b2011-05-10 15:01:56 -050013964 test "x$cache_file" != "x/dev/null" &&
Matthias Kloseb9621712010-04-24 17:59:49 +000013965 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
13966$as_echo "$as_me: updating cache $cache_file" >&6;}
Benjamin Peterson316e02b2011-05-10 15:01:56 -050013967 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013968 else
Matthias Kloseb9621712010-04-24 17:59:49 +000013969 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
13970$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013971 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013972fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013973rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000013974
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013975test "x$prefix" = xNONE && prefix=$ac_default_prefix
13976# Let make expand exec_prefix.
13977test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000013978
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013979DEFS=-DHAVE_CONFIG_H
13980
Skip Montanaro6dead952003-09-25 14:50:04 +000013981ac_libobjs=
13982ac_ltlibobjs=
13983for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
13984 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013985 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000013986 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013987 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
13988 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000013989 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
13990 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000013991done
13992LIBOBJS=$ac_libobjs
13993
13994LTLIBOBJS=$ac_ltlibobjs
13995
13996
Martin v. Löwis11437992002-04-12 09:54:03 +000013997
Matthias Kloseb9621712010-04-24 17:59:49 +000013998
Benjamin Peterson316e02b2011-05-10 15:01:56 -050013999: ${CONFIG_STATUS=./config.status}
Matthias Kloseb9621712010-04-24 17:59:49 +000014000ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000014001ac_clean_files_save=$ac_clean_files
14002ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014003{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
14004$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
14005as_write_fail=0
14006cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014007#! $SHELL
14008# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000014009# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014010# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000014011# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000014012
Martin v. Löwis11437992002-04-12 09:54:03 +000014013debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000014014ac_cs_recheck=false
14015ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000014016
Matthias Kloseb9621712010-04-24 17:59:49 +000014017SHELL=\${CONFIG_SHELL-$SHELL}
14018export SHELL
14019_ASEOF
14020cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
14021## -------------------- ##
14022## M4sh Initialization. ##
14023## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000014024
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014025# Be more Bourne compatible
14026DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000014027if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014028 emulate sh
14029 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000014030 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000014031 # is contrary to our usage. Disable this feature.
14032 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014033 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014034else
Matthias Kloseb9621712010-04-24 17:59:49 +000014035 case `(set -o) 2>/dev/null` in #(
14036 *posix*) :
14037 set -o posix ;; #(
14038 *) :
14039 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014040esac
Michael W. Hudson54241132001-12-07 15:38:26 +000014041fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000014042
14043
Matthias Kloseb9621712010-04-24 17:59:49 +000014044as_nl='
14045'
14046export as_nl
14047# Printing a long string crashes Solaris 7 /usr/bin/printf.
14048as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
14049as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
14050as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
14051# Prefer a ksh shell builtin over an external printf program on Solaris,
14052# but without wasting forks for bash or zsh.
14053if test -z "$BASH_VERSION$ZSH_VERSION" \
14054 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
14055 as_echo='print -r --'
14056 as_echo_n='print -rn --'
14057elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
14058 as_echo='printf %s\n'
14059 as_echo_n='printf %s'
14060else
14061 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
14062 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
14063 as_echo_n='/usr/ucb/echo -n'
14064 else
14065 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
14066 as_echo_n_body='eval
14067 arg=$1;
14068 case $arg in #(
14069 *"$as_nl"*)
14070 expr "X$arg" : "X\\(.*\\)$as_nl";
14071 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
14072 esac;
14073 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
14074 '
14075 export as_echo_n_body
14076 as_echo_n='sh -c $as_echo_n_body as_echo'
14077 fi
14078 export as_echo_body
14079 as_echo='sh -c $as_echo_body as_echo'
14080fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014081
14082# The user is always right.
14083if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014084 PATH_SEPARATOR=:
14085 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
14086 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
14087 PATH_SEPARATOR=';'
14088 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014089fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014090
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014091
14092# IFS
14093# We need space, tab and new line, in precisely that order. Quoting is
14094# there to prevent editors from complaining about space-tab.
14095# (If _AS_PATH_WALK were called with IFS unset, it would disable word
14096# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014097IFS=" "" $as_nl"
14098
14099# Find who we are. Look in the path if we contain no directory separator.
Matthias Kloseb9621712010-04-24 17:59:49 +000014100case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014101 *[\\/]* ) as_myself=$0 ;;
14102 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000014103for as_dir in $PATH
14104do
14105 IFS=$as_save_IFS
14106 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000014107 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
14108 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014109IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000014110
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014111 ;;
14112esac
14113# We did not find ourselves, most probably we were run as `sh COMMAND'
14114# in which case we are not to be found in the path.
14115if test "x$as_myself" = x; then
14116 as_myself=$0
14117fi
14118if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014119 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
14120 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014121fi
14122
Matthias Kloseb9621712010-04-24 17:59:49 +000014123# Unset variables that we do not need and which cause bugs (e.g. in
14124# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
14125# suppresses any "Segmentation fault" message there. '((' could
14126# trigger a bug in pdksh 5.2.14.
14127for as_var in BASH_ENV ENV MAIL MAILPATH
14128do eval test x\${$as_var+set} = xset \
14129 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014130done
14131PS1='$ '
14132PS2='> '
14133PS4='+ '
14134
14135# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000014136LC_ALL=C
14137export LC_ALL
14138LANGUAGE=C
14139export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014140
Matthias Kloseb9621712010-04-24 17:59:49 +000014141# CDPATH.
14142(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
14143
14144
Benjamin Peterson87cdb812011-05-31 18:26:08 -050014145# as_fn_error ERROR [LINENO LOG_FD]
14146# ---------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000014147# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
14148# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Benjamin Peterson87cdb812011-05-31 18:26:08 -050014149# script with status $?, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000014150as_fn_error ()
14151{
Benjamin Peterson87cdb812011-05-31 18:26:08 -050014152 as_status=$?; test $as_status -eq 0 && as_status=1
14153 if test "$3"; then
14154 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
14155 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
Matthias Kloseb9621712010-04-24 17:59:49 +000014156 fi
Benjamin Peterson87cdb812011-05-31 18:26:08 -050014157 $as_echo "$as_me: error: $1" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000014158 as_fn_exit $as_status
14159} # as_fn_error
14160
14161
14162# as_fn_set_status STATUS
14163# -----------------------
14164# Set $? to STATUS, without forking.
14165as_fn_set_status ()
14166{
14167 return $1
14168} # as_fn_set_status
14169
14170# as_fn_exit STATUS
14171# -----------------
14172# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
14173as_fn_exit ()
14174{
14175 set +e
14176 as_fn_set_status $1
14177 exit $1
14178} # as_fn_exit
14179
14180# as_fn_unset VAR
14181# ---------------
14182# Portably unset VAR.
14183as_fn_unset ()
14184{
14185 { eval $1=; unset $1;}
14186}
14187as_unset=as_fn_unset
14188# as_fn_append VAR VALUE
14189# ----------------------
14190# Append the text in VALUE to the end of the definition contained in VAR. Take
14191# advantage of any shell optimizations that allow amortized linear growth over
14192# repeated appends, instead of the typical quadratic growth present in naive
14193# implementations.
14194if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
14195 eval 'as_fn_append ()
14196 {
14197 eval $1+=\$2
14198 }'
14199else
14200 as_fn_append ()
14201 {
14202 eval $1=\$$1\$2
14203 }
14204fi # as_fn_append
14205
14206# as_fn_arith ARG...
14207# ------------------
14208# Perform arithmetic evaluation on the ARGs, and store the result in the
14209# global $as_val. Take advantage of shells that can avoid forks. The arguments
14210# must be portable across $(()) and expr.
14211if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
14212 eval 'as_fn_arith ()
14213 {
14214 as_val=$(( $* ))
14215 }'
14216else
14217 as_fn_arith ()
14218 {
14219 as_val=`expr "$@" || test $? -eq 1`
14220 }
14221fi # as_fn_arith
14222
14223
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014224if expr a : '\(a\)' >/dev/null 2>&1 &&
14225 test "X`expr 00001 : '.*\(...\)'`" = X001; then
14226 as_expr=expr
14227else
14228 as_expr=false
14229fi
14230
14231if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
14232 as_basename=basename
14233else
14234 as_basename=false
14235fi
14236
Matthias Kloseb9621712010-04-24 17:59:49 +000014237if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
14238 as_dirname=dirname
14239else
14240 as_dirname=false
14241fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014242
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014243as_me=`$as_basename -- "$0" ||
14244$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
14245 X"$0" : 'X\(//\)$' \| \
14246 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014247$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014248 sed '/^.*\/\([^/][^/]*\)\/*$/{
14249 s//\1/
14250 q
14251 }
14252 /^X\/\(\/\/\)$/{
14253 s//\1/
14254 q
14255 }
14256 /^X\/\(\/\).*/{
14257 s//\1/
14258 q
14259 }
14260 s/.*/./; q'`
14261
Matthias Kloseb9621712010-04-24 17:59:49 +000014262# Avoid depending upon Character Ranges.
14263as_cr_letters='abcdefghijklmnopqrstuvwxyz'
14264as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14265as_cr_Letters=$as_cr_letters$as_cr_LETTERS
14266as_cr_digits='0123456789'
14267as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014268
14269ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000014270case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014271-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014272 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014273 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000014274 xy) ECHO_C='\c';;
14275 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
14276 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014277 esac;;
14278*)
14279 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000014280esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014281
Martin v. Löwis11437992002-04-12 09:54:03 +000014282rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014283if test -d conf$$.dir; then
14284 rm -f conf$$.dir/conf$$.file
14285else
14286 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000014287 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014288fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014289if (echo >conf$$.file) 2>/dev/null; then
14290 if ln -s conf$$.file conf$$ 2>/dev/null; then
14291 as_ln_s='ln -s'
14292 # ... but there are two gotchas:
14293 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
14294 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
14295 # In both cases, we have to default to `cp -p'.
14296 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
14297 as_ln_s='cp -p'
14298 elif ln conf$$.file conf$$ 2>/dev/null; then
14299 as_ln_s=ln
14300 else
Martin v. Löwis11437992002-04-12 09:54:03 +000014301 as_ln_s='cp -p'
Matthias Kloseb9621712010-04-24 17:59:49 +000014302 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014303else
14304 as_ln_s='cp -p'
14305fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014306rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
14307rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000014308
Matthias Kloseb9621712010-04-24 17:59:49 +000014309
14310# as_fn_mkdir_p
14311# -------------
14312# Create "$as_dir" as a directory, including parents if necessary.
14313as_fn_mkdir_p ()
14314{
14315
14316 case $as_dir in #(
14317 -*) as_dir=./$as_dir;;
14318 esac
14319 test -d "$as_dir" || eval $as_mkdir_p || {
14320 as_dirs=
14321 while :; do
14322 case $as_dir in #(
14323 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
14324 *) as_qdir=$as_dir;;
14325 esac
14326 as_dirs="'$as_qdir' $as_dirs"
14327 as_dir=`$as_dirname -- "$as_dir" ||
14328$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
14329 X"$as_dir" : 'X\(//\)[^/]' \| \
14330 X"$as_dir" : 'X\(//\)$' \| \
14331 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
14332$as_echo X"$as_dir" |
14333 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14334 s//\1/
14335 q
14336 }
14337 /^X\(\/\/\)[^/].*/{
14338 s//\1/
14339 q
14340 }
14341 /^X\(\/\/\)$/{
14342 s//\1/
14343 q
14344 }
14345 /^X\(\/\).*/{
14346 s//\1/
14347 q
14348 }
14349 s/.*/./; q'`
14350 test -d "$as_dir" && break
14351 done
14352 test -z "$as_dirs" || eval "mkdir $as_dirs"
Benjamin Peterson87cdb812011-05-31 18:26:08 -050014353 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000014354
14355
14356} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000014357if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014358 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000014359else
Skip Montanarof0d5f792004-08-15 14:08:23 +000014360 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000014361 as_mkdir_p=false
14362fi
14363
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014364if test -x / >/dev/null 2>&1; then
14365 as_test_x='test -x'
14366else
14367 if ls -dL / >/dev/null 2>&1; then
14368 as_ls_L_option=L
14369 else
14370 as_ls_L_option=
14371 fi
14372 as_test_x='
14373 eval sh -c '\''
14374 if test -d "$1"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014375 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014376 else
Matthias Kloseb9621712010-04-24 17:59:49 +000014377 case $1 in #(
14378 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014379 esac;
Matthias Kloseb9621712010-04-24 17:59:49 +000014380 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014381 ???[sx]*):;;*)false;;esac;fi
14382 '\'' sh
14383 '
14384fi
14385as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000014386
14387# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014388as_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 +000014389
14390# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014391as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014392
14393
Martin v. Löwis11437992002-04-12 09:54:03 +000014394exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000014395## ----------------------------------- ##
14396## Main body of $CONFIG_STATUS script. ##
14397## ----------------------------------- ##
14398_ASEOF
14399test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014400
Matthias Kloseb9621712010-04-24 17:59:49 +000014401cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14402# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000014403# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014404# values after options handling.
14405ac_log="
Georg Brandl3ebb6b32011-02-20 10:37:07 +000014406This file was extended by python $as_me 3.3, which was
Benjamin Peterson87cdb812011-05-31 18:26:08 -050014407generated by GNU Autoconf 2.65. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000014408
14409 CONFIG_FILES = $CONFIG_FILES
14410 CONFIG_HEADERS = $CONFIG_HEADERS
14411 CONFIG_LINKS = $CONFIG_LINKS
14412 CONFIG_COMMANDS = $CONFIG_COMMANDS
14413 $ $0 $@
14414
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014415on `(hostname || uname -n) 2>/dev/null | sed 1q`
14416"
14417
Martin v. Löwis11437992002-04-12 09:54:03 +000014418_ACEOF
14419
Matthias Kloseb9621712010-04-24 17:59:49 +000014420case $ac_config_files in *"
14421"*) set x $ac_config_files; shift; ac_config_files=$*;;
14422esac
14423
14424case $ac_config_headers in *"
14425"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
14426esac
14427
14428
14429cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014430# Files that config.status was made for.
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014431config_files="$ac_config_files"
14432config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000014433
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014434_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014435
Matthias Kloseb9621712010-04-24 17:59:49 +000014436cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014437ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000014438\`$as_me' instantiates files and other configuration actions
14439from templates according to the current configuration. Unless the files
14440and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000014441
Matthias Kloseb9621712010-04-24 17:59:49 +000014442Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000014443
14444 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014445 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000014446 --config print configuration, then exit
14447 -q, --quiet, --silent
14448 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000014449 -d, --debug don't remove temporary files
14450 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000014451 --file=FILE[:TEMPLATE]
14452 instantiate the configuration file FILE
14453 --header=FILE[:TEMPLATE]
14454 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000014455
14456Configuration files:
14457$config_files
14458
14459Configuration headers:
14460$config_headers
14461
Matthias Kloseb9621712010-04-24 17:59:49 +000014462Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014463
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014464_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014465cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14466ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000014467ac_cs_version="\\
Georg Brandl3ebb6b32011-02-20 10:37:07 +000014468python config.status 3.3
Benjamin Peterson87cdb812011-05-31 18:26:08 -050014469configured by $0, generated by GNU Autoconf 2.65,
Matthias Kloseb9621712010-04-24 17:59:49 +000014470 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000014471
Benjamin Peterson87cdb812011-05-31 18:26:08 -050014472Copyright (C) 2009 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000014473This config.status script is free software; the Free Software Foundation
14474gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014475
14476ac_pwd='$ac_pwd'
14477srcdir='$srcdir'
14478INSTALL='$INSTALL'
Matthias Kloseb9621712010-04-24 17:59:49 +000014479test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000014480_ACEOF
14481
Matthias Kloseb9621712010-04-24 17:59:49 +000014482cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14483# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000014484ac_need_defaults=:
14485while test $# != 0
14486do
14487 case $1 in
Benjamin Peterson87cdb812011-05-31 18:26:08 -050014488 --*=*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014489 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14490 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000014491 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000014492 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014493 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000014494 ac_option=$1
14495 ac_optarg=$2
14496 ac_shift=shift
14497 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014498 esac
14499
Skip Montanaro6dead952003-09-25 14:50:04 +000014500 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000014501 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000014502 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14503 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014504 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000014505 $as_echo "$ac_cs_version"; exit ;;
14506 --config | --confi | --conf | --con | --co | --c )
14507 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014508 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000014509 debug=: ;;
14510 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000014511 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014512 case $ac_optarg in
14513 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14514 esac
14515 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014516 ac_need_defaults=false;;
14517 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000014518 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014519 case $ac_optarg in
14520 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14521 esac
14522 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014523 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014524 --he | --h)
14525 # Conflict between --help and --header
Benjamin Peterson87cdb812011-05-31 18:26:08 -050014526 as_fn_error "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000014527Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014528 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000014529 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000014530 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
14531 | -silent | --silent | --silen | --sile | --sil | --si | --s)
14532 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014533
14534 # This is an error.
Benjamin Peterson87cdb812011-05-31 18:26:08 -050014535 -*) as_fn_error "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000014536Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014537
Matthias Kloseb9621712010-04-24 17:59:49 +000014538 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014539 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014540
14541 esac
14542 shift
14543done
14544
Skip Montanaro6dead952003-09-25 14:50:04 +000014545ac_configure_extra_args=
14546
14547if $ac_cs_silent; then
14548 exec 6>/dev/null
14549 ac_configure_extra_args="$ac_configure_extra_args --silent"
14550fi
14551
14552_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014553cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000014554if \$ac_cs_recheck; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014555 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
14556 shift
14557 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
14558 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014559 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000014560 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000014561fi
14562
Martin v. Löwis11437992002-04-12 09:54:03 +000014563_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014564cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014565exec 5>>config.log
14566{
14567 echo
14568 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
14569## Running $as_me. ##
14570_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000014571 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014572} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014573
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014574_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014575cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014576_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014577
Matthias Kloseb9621712010-04-24 17:59:49 +000014578cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014579
14580# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000014581for ac_config_target in $ac_config_targets
14582do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014583 case $ac_config_target in
14584 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
14585 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
14586 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014587 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
14588 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014589 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
14590 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000014591 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000014592 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014593
Benjamin Peterson87cdb812011-05-31 18:26:08 -050014594 *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014595 esac
14596done
14597
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014598
Martin v. Löwis11437992002-04-12 09:54:03 +000014599# If the user did not use the arguments to specify the items to instantiate,
14600# then the envvar interface is used. Set only those that are not.
14601# We use the long form for the default assignment because of an extremely
14602# bizarre bug on SunOS 4.1.3.
14603if $ac_need_defaults; then
14604 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
14605 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
14606fi
14607
Skip Montanaro6dead952003-09-25 14:50:04 +000014608# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014609# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000014610# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014611# Hook for its removal unless debugging.
14612# Note that there is a small window in which the directory will not be cleaned:
14613# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000014614$debug ||
14615{
Benjamin Peterson316e02b2011-05-10 15:01:56 -050014616 tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014617 trap 'exit_status=$?
Benjamin Peterson316e02b2011-05-10 15:01:56 -050014618 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014619' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000014620 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000014621}
Martin v. Löwis11437992002-04-12 09:54:03 +000014622# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000014623
Martin v. Löwis11437992002-04-12 09:54:03 +000014624{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014625 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Benjamin Peterson316e02b2011-05-10 15:01:56 -050014626 test -n "$tmp" && test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000014627} ||
14628{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014629 tmp=./conf$$-$RANDOM
14630 (umask 077 && mkdir "$tmp")
Benjamin Peterson87cdb812011-05-31 18:26:08 -050014631} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000014632
Matthias Kloseb9621712010-04-24 17:59:49 +000014633# Set up the scripts for CONFIG_FILES section.
14634# No need to generate them if there are no CONFIG_FILES.
14635# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014636if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014637
Matthias Kloseb9621712010-04-24 17:59:49 +000014638
14639ac_cr=`echo X | tr X '\015'`
14640# On cygwin, bash can eat \r inside `` if the user requested igncr.
14641# But we know of no other shell where ac_cr would be empty at this
14642# point, so we can use a bashism as a fallback.
14643if test "x$ac_cr" = x; then
14644 eval ac_cr=\$\'\\r\'
14645fi
14646ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
14647if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Benjamin Peterson87cdb812011-05-31 18:26:08 -050014648 ac_cs_awk_cr='\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000014649else
14650 ac_cs_awk_cr=$ac_cr
14651fi
14652
Benjamin Peterson316e02b2011-05-10 15:01:56 -050014653echo 'BEGIN {' >"$tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000014654_ACEOF
14655
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014656
Matthias Kloseb9621712010-04-24 17:59:49 +000014657{
14658 echo "cat >conf$$subs.awk <<_ACEOF" &&
14659 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
14660 echo "_ACEOF"
14661} >conf$$subs.sh ||
Benjamin Peterson87cdb812011-05-31 18:26:08 -050014662 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
14663ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014664ac_delim='%!_!# '
14665for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000014666 . ./conf$$subs.sh ||
Benjamin Peterson87cdb812011-05-31 18:26:08 -050014667 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014668
Matthias Kloseb9621712010-04-24 17:59:49 +000014669 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
14670 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014671 break
14672 elif $ac_last_try; then
Benjamin Peterson87cdb812011-05-31 18:26:08 -050014673 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014674 else
14675 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000014676 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014677done
Matthias Kloseb9621712010-04-24 17:59:49 +000014678rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014679
Matthias Kloseb9621712010-04-24 17:59:49 +000014680cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Benjamin Peterson316e02b2011-05-10 15:01:56 -050014681cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014682_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014683sed -n '
14684h
14685s/^/S["/; s/!.*/"]=/
14686p
14687g
14688s/^[^!]*!//
14689:repl
14690t repl
14691s/'"$ac_delim"'$//
14692t delim
14693:nl
14694h
14695s/\(.\{148\}\)..*/\1/
14696t more1
14697s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
14698p
14699n
14700b repl
14701:more1
14702s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14703p
14704g
14705s/.\{148\}//
14706t nl
14707:delim
14708h
14709s/\(.\{148\}\)..*/\1/
14710t more2
14711s/["\\]/\\&/g; s/^/"/; s/$/"/
14712p
14713b
14714:more2
14715s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14716p
14717g
14718s/.\{148\}//
14719t delim
14720' <conf$$subs.awk | sed '
14721/^[^""]/{
14722 N
14723 s/\n//
14724}
14725' >>$CONFIG_STATUS || ac_write_fail=1
14726rm -f conf$$subs.awk
14727cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14728_ACAWK
Benjamin Peterson316e02b2011-05-10 15:01:56 -050014729cat >>"\$tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000014730 for (key in S) S_is_set[key] = 1
14731 FS = ""
14732
14733}
14734{
14735 line = $ 0
14736 nfields = split(line, field, "@")
14737 substed = 0
14738 len = length(field[1])
14739 for (i = 2; i < nfields; i++) {
14740 key = field[i]
14741 keylen = length(key)
14742 if (S_is_set[key]) {
14743 value = S[key]
14744 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
14745 len += length(value) + length(field[++i])
14746 substed = 1
14747 } else
14748 len += 1 + keylen
14749 }
14750
14751 print line
14752}
14753
14754_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014755_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014756cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14757if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
14758 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
14759else
14760 cat
Benjamin Peterson316e02b2011-05-10 15:01:56 -050014761fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
Benjamin Peterson87cdb812011-05-31 18:26:08 -050014762 || as_fn_error "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014763_ACEOF
14764
Benjamin Peterson87cdb812011-05-31 18:26:08 -050014765# VPATH may cause trouble with some makes, so we remove $(srcdir),
14766# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014767# trailing colons and then remove the whole line if VPATH becomes empty
14768# (actually we leave an empty line to preserve line numbers).
14769if test "x$srcdir" = x.; then
Benjamin Peterson87cdb812011-05-31 18:26:08 -050014770 ac_vpsub='/^[ ]*VPATH[ ]*=/{
14771s/:*\$(srcdir):*/:/
14772s/:*\${srcdir}:*/:/
14773s/:*@srcdir@:*/:/
14774s/^\([^=]*=[ ]*\):*/\1/
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014775s/:*$//
14776s/^[^=]*=[ ]*$//
14777}'
14778fi
14779
Matthias Kloseb9621712010-04-24 17:59:49 +000014780cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014781fi # test -n "$CONFIG_FILES"
14782
Matthias Kloseb9621712010-04-24 17:59:49 +000014783# Set up the scripts for CONFIG_HEADERS section.
14784# No need to generate them if there are no CONFIG_HEADERS.
14785# This happens for instance with `./config.status Makefile'.
14786if test -n "$CONFIG_HEADERS"; then
Benjamin Peterson316e02b2011-05-10 15:01:56 -050014787cat >"$tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014788BEGIN {
14789_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014790
Matthias Kloseb9621712010-04-24 17:59:49 +000014791# Transform confdefs.h into an awk script `defines.awk', embedded as
14792# here-document in config.status, that substitutes the proper values into
14793# config.h.in to produce config.h.
14794
14795# Create a delimiter string that does not exist in confdefs.h, to ease
14796# handling of long lines.
14797ac_delim='%!_!# '
14798for ac_last_try in false false :; do
Benjamin Peterson316e02b2011-05-10 15:01:56 -050014799 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
14800 if test -z "$ac_t"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014801 break
14802 elif $ac_last_try; then
Benjamin Peterson87cdb812011-05-31 18:26:08 -050014803 as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000014804 else
14805 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
14806 fi
14807done
14808
14809# For the awk script, D is an array of macro values keyed by name,
14810# likewise P contains macro parameters if any. Preserve backslash
14811# newline sequences.
14812
14813ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
14814sed -n '
14815s/.\{148\}/&'"$ac_delim"'/g
14816t rset
14817:rset
14818s/^[ ]*#[ ]*define[ ][ ]*/ /
14819t def
14820d
14821:def
14822s/\\$//
14823t bsnl
14824s/["\\]/\\&/g
14825s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14826D["\1"]=" \3"/p
14827s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
14828d
14829:bsnl
14830s/["\\]/\\&/g
14831s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14832D["\1"]=" \3\\\\\\n"\\/p
14833t cont
14834s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
14835t cont
14836d
14837:cont
14838n
14839s/.\{148\}/&'"$ac_delim"'/g
14840t clear
14841:clear
14842s/\\$//
14843t bsnlc
14844s/["\\]/\\&/g; s/^/"/; s/$/"/p
14845d
14846:bsnlc
14847s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
14848b cont
14849' <confdefs.h | sed '
14850s/'"$ac_delim"'/"\\\
14851"/g' >>$CONFIG_STATUS || ac_write_fail=1
14852
14853cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14854 for (key in D) D_is_set[key] = 1
14855 FS = ""
14856}
14857/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
14858 line = \$ 0
14859 split(line, arg, " ")
14860 if (arg[1] == "#") {
14861 defundef = arg[2]
14862 mac1 = arg[3]
14863 } else {
14864 defundef = substr(arg[1], 2)
14865 mac1 = arg[2]
14866 }
14867 split(mac1, mac2, "(") #)
14868 macro = mac2[1]
14869 prefix = substr(line, 1, index(line, defundef) - 1)
14870 if (D_is_set[macro]) {
14871 # Preserve the white space surrounding the "#".
14872 print prefix "define", macro P[macro] D[macro]
14873 next
14874 } else {
14875 # Replace #undef with comments. This is necessary, for example,
14876 # in the case of _POSIX_SOURCE, which is predefined and required
14877 # on some systems where configure will not decide to define it.
14878 if (defundef == "undef") {
14879 print "/*", prefix defundef, macro, "*/"
14880 next
14881 }
14882 }
14883}
14884{ print }
14885_ACAWK
14886_ACEOF
14887cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Benjamin Peterson87cdb812011-05-31 18:26:08 -050014888 as_fn_error "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000014889fi # test -n "$CONFIG_HEADERS"
14890
14891
14892eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
14893shift
14894for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014895do
14896 case $ac_tag in
14897 :[FHLC]) ac_mode=$ac_tag; continue;;
14898 esac
14899 case $ac_mode$ac_tag in
14900 :[FHL]*:*);;
Benjamin Peterson87cdb812011-05-31 18:26:08 -050014901 :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014902 :[FH]-) ac_tag=-:-;;
14903 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
14904 esac
14905 ac_save_IFS=$IFS
14906 IFS=:
14907 set x $ac_tag
14908 IFS=$ac_save_IFS
14909 shift
14910 ac_file=$1
14911 shift
14912
14913 case $ac_mode in
14914 :L) ac_source=$1;;
14915 :[FH])
14916 ac_file_inputs=
14917 for ac_f
14918 do
14919 case $ac_f in
Benjamin Peterson316e02b2011-05-10 15:01:56 -050014920 -) ac_f="$tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014921 *) # Look for the file first in the build tree, then in the source tree
14922 # (if the path is not absolute). The absolute path cannot be DOS-style,
14923 # because $ac_f cannot contain `:'.
14924 test -f "$ac_f" ||
14925 case $ac_f in
14926 [\\/$]*) false;;
14927 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
14928 esac ||
Benjamin Peterson87cdb812011-05-31 18:26:08 -050014929 as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014930 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014931 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
14932 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014933 done
14934
14935 # Let's still pretend it is `configure' which instantiates (i.e., don't
14936 # use $as_me), people would be surprised to read:
14937 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014938 configure_input='Generated from '`
14939 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
14940 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014941 if test x"$ac_file" != x-; then
14942 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000014943 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
14944$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014945 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014946 # Neutralize special characters interpreted by sed in replacement strings.
14947 case $configure_input in #(
14948 *\&* | *\|* | *\\* )
14949 ac_sed_conf_input=`$as_echo "$configure_input" |
14950 sed 's/[\\\\&|]/\\\\&/g'`;; #(
14951 *) ac_sed_conf_input=$configure_input;;
14952 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014953
14954 case $ac_tag in
Benjamin Peterson316e02b2011-05-10 15:01:56 -050014955 *:-:* | *:-) cat >"$tmp/stdin" \
Benjamin Peterson87cdb812011-05-31 18:26:08 -050014956 || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014957 esac
14958 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014959 esac
14960
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014961 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000014962$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014963 X"$ac_file" : 'X\(//\)[^/]' \| \
14964 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014965 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014966$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014967 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14968 s//\1/
14969 q
14970 }
14971 /^X\(\/\/\)[^/].*/{
14972 s//\1/
14973 q
14974 }
14975 /^X\(\/\/\)$/{
14976 s//\1/
14977 q
14978 }
14979 /^X\(\/\).*/{
14980 s//\1/
14981 q
14982 }
14983 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000014984 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000014985 ac_builddir=.
14986
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014987case "$ac_dir" in
14988.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
14989*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014990 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014991 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000014992 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014993 case $ac_top_builddir_sub in
14994 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
14995 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
14996 esac ;;
14997esac
14998ac_abs_top_builddir=$ac_pwd
14999ac_abs_builddir=$ac_pwd$ac_dir_suffix
15000# for backward compatibility:
15001ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000015002
15003case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015004 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000015005 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015006 ac_top_srcdir=$ac_top_builddir_sub
15007 ac_abs_top_srcdir=$ac_pwd ;;
15008 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000015009 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015010 ac_top_srcdir=$srcdir
15011 ac_abs_top_srcdir=$srcdir ;;
15012 *) # Relative name.
15013 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
15014 ac_top_srcdir=$ac_top_build_prefix$srcdir
15015 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015016esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015017ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000015018
Martin v. Löwis11437992002-04-12 09:54:03 +000015019
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015020 case $ac_mode in
15021 :F)
15022 #
15023 # CONFIG_FILE
15024 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015025
15026 case $INSTALL in
15027 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015028 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015029 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000015030_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015031
Matthias Kloseb9621712010-04-24 17:59:49 +000015032cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015033# If the template does not know about datarootdir, expand it.
15034# FIXME: This hack should be removed a few years after 2.60.
15035ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000015036ac_sed_dataroot='
15037/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015038 p
15039 q
15040}
15041/@datadir@/p
15042/@docdir@/p
15043/@infodir@/p
15044/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000015045/@mandir@/p'
15046case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015047*datarootdir*) ac_datarootdir_seen=yes;;
15048*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000015049 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
15050$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015051_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015052cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015053 ac_datarootdir_hack='
15054 s&@datadir@&$datadir&g
15055 s&@docdir@&$docdir&g
15056 s&@infodir@&$infodir&g
15057 s&@localedir@&$localedir&g
15058 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000015059 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015060esac
15061_ACEOF
15062
15063# Neutralize VPATH when `$srcdir' = `.'.
15064# Shell code in configure.ac might set extrasub.
15065# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000015066cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15067ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000015068$extrasub
15069_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015070cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015071:t
15072/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000015073s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015074s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000015075s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015076s&@srcdir@&$ac_srcdir&;t t
15077s&@abs_srcdir@&$ac_abs_srcdir&;t t
15078s&@top_srcdir@&$ac_top_srcdir&;t t
15079s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
15080s&@builddir@&$ac_builddir&;t t
15081s&@abs_builddir@&$ac_abs_builddir&;t t
15082s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
15083s&@INSTALL@&$ac_INSTALL&;t t
15084$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000015085"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050015086eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
Benjamin Peterson87cdb812011-05-31 18:26:08 -050015087 || as_fn_error "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015088
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015089test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Benjamin Peterson316e02b2011-05-10 15:01:56 -050015090 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
15091 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000015092 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Benjamin Peterson87cdb812011-05-31 18:26:08 -050015093which seems to be undefined. Please make sure it is defined." >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015094$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Benjamin Peterson87cdb812011-05-31 18:26:08 -050015095which seems to be undefined. Please make sure it is defined." >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000015096
Benjamin Peterson316e02b2011-05-10 15:01:56 -050015097 rm -f "$tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000015098 case $ac_file in
Benjamin Peterson316e02b2011-05-10 15:01:56 -050015099 -) cat "$tmp/out" && rm -f "$tmp/out";;
15100 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000015101 esac \
Benjamin Peterson87cdb812011-05-31 18:26:08 -050015102 || as_fn_error "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015103 ;;
15104 :H)
15105 #
15106 # CONFIG_HEADER
15107 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015108 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015109 {
15110 $as_echo "/* $configure_input */" \
Benjamin Peterson316e02b2011-05-10 15:01:56 -050015111 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
15112 } >"$tmp/config.h" \
Benjamin Peterson87cdb812011-05-31 18:26:08 -050015113 || as_fn_error "could not create $ac_file" "$LINENO" 5
Benjamin Peterson316e02b2011-05-10 15:01:56 -050015114 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015115 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
15116$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015117 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015118 rm -f "$ac_file"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050015119 mv "$tmp/config.h" "$ac_file" \
Benjamin Peterson87cdb812011-05-31 18:26:08 -050015120 || as_fn_error "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015121 fi
15122 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015123 $as_echo "/* $configure_input */" \
Benjamin Peterson316e02b2011-05-10 15:01:56 -050015124 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
Benjamin Peterson87cdb812011-05-31 18:26:08 -050015125 || as_fn_error "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015126 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015127 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000015128
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015129
15130 esac
15131
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000015132
15133 case $ac_file$ac_mode in
15134 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
15135
15136 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015137done # for ac_tag
15138
Guido van Rossum627b2d71993-12-24 10:39:16 +000015139
Matthias Kloseb9621712010-04-24 17:59:49 +000015140as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000015141_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015142ac_clean_files=$ac_clean_files_save
15143
Matthias Kloseb9621712010-04-24 17:59:49 +000015144test $ac_write_fail = 0 ||
Benjamin Peterson87cdb812011-05-31 18:26:08 -050015145 as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000015146
Martin v. Löwis11437992002-04-12 09:54:03 +000015147
15148# configure is writing to config.log, and then calls config.status.
15149# config.status does its own redirection, appending to config.log.
15150# Unfortunately, on DOS this fails, as config.log is still kept open
15151# by configure, so config.status won't be able to write to it; its
15152# output is simply discarded. So we exec the FD to /dev/null,
15153# effectively closing config.log, so it can be properly (re)opened and
15154# appended to by config.status. When coming back to configure, we
15155# need to make the FD available again.
15156if test "$no_create" != yes; then
15157 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000015158 ac_config_status_args=
15159 test "$silent" = yes &&
15160 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000015161 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000015162 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000015163 exec 5>>config.log
15164 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
15165 # would make configure fail if this is the last instruction.
Benjamin Peterson87cdb812011-05-31 18:26:08 -050015166 $ac_cs_success || as_fn_exit $?
Matthias Kloseb9621712010-04-24 17:59:49 +000015167fi
15168if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
15169 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
15170$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015171fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000015172
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015173
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015174echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015175if test ! -f Modules/Setup
15176then
15177 cp $srcdir/Modules/Setup.dist Modules/Setup
15178fi
15179
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015180echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015181if test ! -f Modules/Setup.local
15182then
15183 echo "# Edit this file for local setup changes" >Modules/Setup.local
15184fi
15185
15186echo "creating Makefile"
15187$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
15188 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000015189 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000015190mv config.c Modules