blob: e1ab99b81e9f59edde00e881b8f32aa28bdb5c84 [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.
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07004# Generated by GNU Autoconf 2.67 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,
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070010# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
11# Foundation, 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"
Gregory P. Smith5ed2e772011-05-15 00:26:45 -0700323 } || 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
Gregory P. Smith5ed2e772011-05-15 00:26:45 -0700363# as_fn_error STATUS 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
Gregory P. Smith5ed2e772011-05-15 00:26:45 -0700367# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +0000368as_fn_error ()
369{
Gregory P. Smith5ed2e772011-05-15 00:26:45 -0700370 as_status=$1; test $as_status -eq 0 && as_status=1
371 if test "$4"; then
372 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
373 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +0000374 fi
Gregory P. Smith5ed2e772011-05-15 00:26:45 -0700375 $as_echo "$as_me: error: $2" >&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.
Gregory P. Smith5ed2e772011-05-15 00:26:45 -0700537# hostname on some systems (SVR3.2, old GNU/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
Georg Brandl1ca2e792011-03-05 20:51:24 +0100639HAS_HG
640HGBRANCH
641HGTAG
642HGVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000643ARFLAGS
644AR
645RANLIB
Daniel Stutzbacha606faa2010-08-31 19:51:07 +0000646USE_INLINE
Matthias Kloseb9621712010-04-24 17:59:49 +0000647GNULD
648LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000649LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000650RUNSHARED
651INSTSONAME
652LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000653PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000654BLDLIBRARY
655DLLLIBRARY
656LDLIBRARY
657LIBRARY
658BUILDEXEEXT
659EGREP
660GREP
661CPP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200662NO_AS_NEEDED
Matthias Kloseb9621712010-04-24 17:59:49 +0000663MAINCC
664CXX
665OBJEXT
666EXEEXT
667ac_ct_CC
668CPPFLAGS
669LDFLAGS
670CFLAGS
671CC
672EXPORT_MACOSX_DEPLOYMENT_TARGET
673CONFIGURE_MACOSX_DEPLOYMENT_TARGET
674SGI_ABI
675MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000676FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000677FRAMEWORKUNIXTOOLSPREFIX
678FRAMEWORKALTINSTALLLAST
679FRAMEWORKALTINSTALLFIRST
680FRAMEWORKINSTALLLAST
681FRAMEWORKINSTALLFIRST
682PYTHONFRAMEWORKINSTALLDIR
683PYTHONFRAMEWORKPREFIX
684PYTHONFRAMEWORKDIR
685PYTHONFRAMEWORKIDENTIFIER
686PYTHONFRAMEWORK
687LIPO_32BIT_FLAGS
688ARCH_RUN_32BIT
689UNIVERSALSDK
690CONFIG_ARGS
691SOVERSION
692VERSION
693target_alias
694host_alias
695build_alias
696LIBS
697ECHO_T
698ECHO_N
699ECHO_C
700DEFS
701mandir
702localedir
703libdir
704psdir
705pdfdir
706dvidir
707htmldir
708infodir
709docdir
710oldincludedir
711includedir
712localstatedir
713sharedstatedir
714sysconfdir
715datadir
716datarootdir
717libexecdir
718sbindir
719bindir
720program_transform_name
721prefix
722exec_prefix
723PACKAGE_URL
724PACKAGE_BUGREPORT
725PACKAGE_STRING
726PACKAGE_VERSION
727PACKAGE_TARNAME
728PACKAGE_NAME
729PATH_SEPARATOR
730SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000731ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000732ac_user_opts='
733enable_option_checking
734enable_universalsdk
735with_universal_archs
736with_framework_name
737enable_framework
738with_gcc
739with_cxx_main
740with_suffix
741enable_shared
742enable_profiling
743with_pydebug
744with_libs
745with_system_expat
746with_system_ffi
Benjamin Peterson076ed002010-10-31 17:11:02 +0000747enable_loadable_sqlite_extensions
Matthias Kloseb9621712010-04-24 17:59:49 +0000748with_dbmliborder
749with_signal_module
Matthias Kloseb9621712010-04-24 17:59:49 +0000750with_threads
751with_thread
752enable_ipv6
753with_doc_strings
754with_tsc
755with_pymalloc
756with_valgrind
Matthias Kloseb9621712010-04-24 17:59:49 +0000757with_fpectl
758with_libm
759with_libc
760enable_big_digits
761with_wide_unicode
762with_computed_gotos
763'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000764 ac_precious_vars='build_alias
765host_alias
766target_alias
767CC
768CFLAGS
769LDFLAGS
770LIBS
771CPPFLAGS
Ross Lagerwall7807c352011-03-17 20:20:30 +0200772CPP'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000773
Guido van Rossum627b2d71993-12-24 10:39:16 +0000774
Guido van Rossum7f43da71994-08-01 12:15:30 +0000775# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000776ac_init_help=
777ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000778ac_unrecognized_opts=
779ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000780# The variables have the same names as the options, with
781# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000782cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000783exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000784no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000785no_recursion=
786prefix=NONE
787program_prefix=NONE
788program_suffix=NONE
789program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000790silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000791site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000792srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000793verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000794x_includes=NONE
795x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000796
797# Installation directory options.
798# These are left unexpanded so users can "make install exec_prefix=/foo"
799# and all the variables that are supposed to be based on exec_prefix
800# by default will actually change.
801# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000802# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000803bindir='${exec_prefix}/bin'
804sbindir='${exec_prefix}/sbin'
805libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000806datarootdir='${prefix}/share'
807datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000808sysconfdir='${prefix}/etc'
809sharedstatedir='${prefix}/com'
810localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000811includedir='${prefix}/include'
812oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000813docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
814infodir='${datarootdir}/info'
815htmldir='${docdir}'
816dvidir='${docdir}'
817pdfdir='${docdir}'
818psdir='${docdir}'
819libdir='${exec_prefix}/lib'
820localedir='${datarootdir}/locale'
821mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000822
Guido van Rossum7f43da71994-08-01 12:15:30 +0000823ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000824ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000825for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000826do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000827 # If the previous option needs an argument, assign it.
828 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000829 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000830 ac_prev=
831 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000832 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000833
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000834 case $ac_option in
Gregory P. Smith5ed2e772011-05-15 00:26:45 -0700835 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
836 *=) ac_optarg= ;;
837 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000838 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000839
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000840 # Accept the important Cygnus configure options, so we can diagnose typos.
841
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000842 case $ac_dashdash$ac_option in
843 --)
844 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000845
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000846 -bindir | --bindir | --bindi | --bind | --bin | --bi)
847 ac_prev=bindir ;;
848 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000849 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000850
851 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000852 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000853 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000854 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000855
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000856 -cache-file | --cache-file | --cache-fil | --cache-fi \
857 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
858 ac_prev=cache_file ;;
859 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
860 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000861 cache_file=$ac_optarg ;;
862
863 --config-cache | -C)
864 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000865
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000866 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000867 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000868 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000869 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000870
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000871 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
872 | --dataroo | --dataro | --datar)
873 ac_prev=datarootdir ;;
874 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
875 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
876 datarootdir=$ac_optarg ;;
877
Guido van Rossum7f43da71994-08-01 12:15:30 +0000878 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000879 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000880 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000881 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Gregory P. Smith5ed2e772011-05-15 00:26:45 -0700882 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000883 ac_useropt_orig=$ac_useropt
884 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
885 case $ac_user_opts in
886 *"
887"enable_$ac_useropt"
888"*) ;;
889 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
890 ac_unrecognized_sep=', ';;
891 esac
892 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000893
894 -docdir | --docdir | --docdi | --doc | --do)
895 ac_prev=docdir ;;
896 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
897 docdir=$ac_optarg ;;
898
899 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
900 ac_prev=dvidir ;;
901 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
902 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000903
904 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000905 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000906 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000907 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Gregory P. Smith5ed2e772011-05-15 00:26:45 -0700908 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000909 ac_useropt_orig=$ac_useropt
910 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
911 case $ac_user_opts in
912 *"
913"enable_$ac_useropt"
914"*) ;;
915 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
916 ac_unrecognized_sep=', ';;
917 esac
918 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000919
Guido van Rossum7f43da71994-08-01 12:15:30 +0000920 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
921 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
922 | --exec | --exe | --ex)
923 ac_prev=exec_prefix ;;
924 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
925 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
926 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000927 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000928
929 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000930 # Obsolete; use --with-gas.
931 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000932
Martin v. Löwis11437992002-04-12 09:54:03 +0000933 -help | --help | --hel | --he | -h)
934 ac_init_help=long ;;
935 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
936 ac_init_help=recursive ;;
937 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
938 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000939
940 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000941 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000942 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000943 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000944
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000945 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
946 ac_prev=htmldir ;;
947 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
948 | --ht=*)
949 htmldir=$ac_optarg ;;
950
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000951 -includedir | --includedir | --includedi | --included | --include \
952 | --includ | --inclu | --incl | --inc)
953 ac_prev=includedir ;;
954 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
955 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000956 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000957
958 -infodir | --infodir | --infodi | --infod | --info | --inf)
959 ac_prev=infodir ;;
960 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000961 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000962
963 -libdir | --libdir | --libdi | --libd)
964 ac_prev=libdir ;;
965 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000966 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000967
968 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
969 | --libexe | --libex | --libe)
970 ac_prev=libexecdir ;;
971 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
972 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000973 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000974
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000975 -localedir | --localedir | --localedi | --localed | --locale)
976 ac_prev=localedir ;;
977 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
978 localedir=$ac_optarg ;;
979
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000980 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000981 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000982 ac_prev=localstatedir ;;
983 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000984 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000985 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000986
987 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
988 ac_prev=mandir ;;
989 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000990 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000991
Guido van Rossum7f43da71994-08-01 12:15:30 +0000992 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000993 # Obsolete; use --without-fp.
994 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000995
996 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +0000997 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000998 no_create=yes ;;
999
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001000 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1001 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1002 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001003
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001004 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1005 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1006 | --oldin | --oldi | --old | --ol | --o)
1007 ac_prev=oldincludedir ;;
1008 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1009 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1010 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001011 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001012
Guido van Rossum7f43da71994-08-01 12:15:30 +00001013 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1014 ac_prev=prefix ;;
1015 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001016 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001017
1018 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1019 | --program-pre | --program-pr | --program-p)
1020 ac_prev=program_prefix ;;
1021 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1022 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001023 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001024
1025 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1026 | --program-suf | --program-su | --program-s)
1027 ac_prev=program_suffix ;;
1028 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1029 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001030 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001031
1032 -program-transform-name | --program-transform-name \
1033 | --program-transform-nam | --program-transform-na \
1034 | --program-transform-n | --program-transform- \
1035 | --program-transform | --program-transfor \
1036 | --program-transfo | --program-transf \
1037 | --program-trans | --program-tran \
1038 | --progr-tra | --program-tr | --program-t)
1039 ac_prev=program_transform_name ;;
1040 -program-transform-name=* | --program-transform-name=* \
1041 | --program-transform-nam=* | --program-transform-na=* \
1042 | --program-transform-n=* | --program-transform-=* \
1043 | --program-transform=* | --program-transfor=* \
1044 | --program-transfo=* | --program-transf=* \
1045 | --program-trans=* | --program-tran=* \
1046 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001047 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001048
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001049 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1050 ac_prev=pdfdir ;;
1051 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1052 pdfdir=$ac_optarg ;;
1053
1054 -psdir | --psdir | --psdi | --psd | --ps)
1055 ac_prev=psdir ;;
1056 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1057 psdir=$ac_optarg ;;
1058
Guido van Rossum7f43da71994-08-01 12:15:30 +00001059 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1060 | -silent | --silent | --silen | --sile | --sil)
1061 silent=yes ;;
1062
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001063 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1064 ac_prev=sbindir ;;
1065 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1066 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001067 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001068
1069 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1070 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1071 | --sharedst | --shareds | --shared | --share | --shar \
1072 | --sha | --sh)
1073 ac_prev=sharedstatedir ;;
1074 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1075 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1076 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1077 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001078 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001079
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001080 -site | --site | --sit)
1081 ac_prev=site ;;
1082 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001083 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001084
Guido van Rossum7f43da71994-08-01 12:15:30 +00001085 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1086 ac_prev=srcdir ;;
1087 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001088 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001089
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001090 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1091 | --syscon | --sysco | --sysc | --sys | --sy)
1092 ac_prev=sysconfdir ;;
1093 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1094 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001095 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001096
Guido van Rossum7f43da71994-08-01 12:15:30 +00001097 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001098 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001099 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001100 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001101
1102 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1103 verbose=yes ;;
1104
Martin v. Löwis11437992002-04-12 09:54:03 +00001105 -version | --version | --versio | --versi | --vers | -V)
1106 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001107
1108 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001109 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001110 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001111 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07001112 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001113 ac_useropt_orig=$ac_useropt
1114 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1115 case $ac_user_opts in
1116 *"
1117"with_$ac_useropt"
1118"*) ;;
1119 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1120 ac_unrecognized_sep=', ';;
1121 esac
1122 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001123
1124 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001125 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001126 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001127 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07001128 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001129 ac_useropt_orig=$ac_useropt
1130 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1131 case $ac_user_opts in
1132 *"
1133"with_$ac_useropt"
1134"*) ;;
1135 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1136 ac_unrecognized_sep=', ';;
1137 esac
1138 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001139
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001140 --x)
1141 # Obsolete; use --with-x.
1142 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001143
1144 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1145 | --x-incl | --x-inc | --x-in | --x-i)
1146 ac_prev=x_includes ;;
1147 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1148 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001149 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001150
1151 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1152 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1153 ac_prev=x_libraries ;;
1154 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1155 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001156 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001157
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07001158 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1159Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001160 ;;
1161
Martin v. Löwis11437992002-04-12 09:54:03 +00001162 *=*)
1163 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1164 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001165 case $ac_envvar in #(
1166 '' | [0-9]* | *[!_$as_cr_alnum]* )
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07001167 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001168 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001169 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001170 export $ac_envvar ;;
1171
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001172 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001173 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001174 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001175 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001176 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Benjamin Peterson316e02b2011-05-10 15:01:56 -05001177 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
Guido van Rossum7f43da71994-08-01 12:15:30 +00001178 ;;
1179
1180 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001181done
1182
Guido van Rossum7f43da71994-08-01 12:15:30 +00001183if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001184 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07001185 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001186fi
1187
Matthias Kloseb9621712010-04-24 17:59:49 +00001188if test -n "$ac_unrecognized_opts"; then
1189 case $enable_option_checking in
1190 no) ;;
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07001191 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001192 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1193 esac
1194fi
1195
1196# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001197for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1198 datadir sysconfdir sharedstatedir localstatedir includedir \
1199 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1200 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001201do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001202 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001203 # Remove trailing slashes.
1204 case $ac_val in
1205 */ )
1206 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1207 eval $ac_var=\$ac_val;;
1208 esac
1209 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001210 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001211 [\\/$]* | ?:[\\/]* ) continue;;
1212 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001213 esac
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07001214 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001215done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001216
Martin v. Löwis11437992002-04-12 09:54:03 +00001217# There might be people who depend on the old broken behavior: `$host'
1218# used to hold the argument of --host etc.
1219# FIXME: To remove some day.
1220build=$build_alias
1221host=$host_alias
1222target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001223
Martin v. Löwis11437992002-04-12 09:54:03 +00001224# FIXME: To remove some day.
1225if test "x$host_alias" != x; then
1226 if test "x$build_alias" = x; then
1227 cross_compiling=maybe
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07001228 $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
1229 If a cross compiler is detected then cross compile mode will be used" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001230 elif test "x$build_alias" != "x$host_alias"; then
1231 cross_compiling=yes
1232 fi
1233fi
1234
1235ac_tool_prefix=
1236test -n "$host_alias" && ac_tool_prefix=$host_alias-
1237
1238test "$silent" = yes && exec 6>/dev/null
1239
Guido van Rossum627b2d71993-12-24 10:39:16 +00001240
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001241ac_pwd=`pwd` && test -n "$ac_pwd" &&
1242ac_ls_di=`ls -di .` &&
1243ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07001244 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001245test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07001246 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001247
1248
Guido van Rossum627b2d71993-12-24 10:39:16 +00001249# Find the source files, if location was not specified.
1250if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001251 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001252 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001253 ac_confdir=`$as_dirname -- "$as_myself" ||
1254$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1255 X"$as_myself" : 'X\(//\)[^/]' \| \
1256 X"$as_myself" : 'X\(//\)$' \| \
1257 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1258$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001259 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1260 s//\1/
1261 q
1262 }
1263 /^X\(\/\/\)[^/].*/{
1264 s//\1/
1265 q
1266 }
1267 /^X\(\/\/\)$/{
1268 s//\1/
1269 q
1270 }
1271 /^X\(\/\).*/{
1272 s//\1/
1273 q
1274 }
1275 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001276 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001277 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001278 srcdir=..
1279 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001280else
1281 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001282fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001283if test ! -r "$srcdir/$ac_unique_file"; then
1284 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07001285 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001286fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001287ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1288ac_abs_confdir=`(
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07001289 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001290 pwd)`
1291# When building in place, set srcdir=.
1292if test "$ac_abs_confdir" = "$ac_pwd"; then
1293 srcdir=.
1294fi
1295# Remove unnecessary trailing slashes from srcdir.
1296# Double slashes in file names in object file debugging info
1297# mess up M-x gdb in Emacs.
1298case $srcdir in
1299*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1300esac
1301for ac_var in $ac_precious_vars; do
1302 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1303 eval ac_env_${ac_var}_value=\$${ac_var}
1304 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1305 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1306done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001307
Martin v. Löwis11437992002-04-12 09:54:03 +00001308#
1309# Report the --help message.
1310#
1311if test "$ac_init_help" = "long"; then
1312 # Omit some internal or obsolete options to make the list less imposing.
1313 # This message is too long to be a string in the A/UX 3.1 sh.
1314 cat <<_ACEOF
Georg Brandl3ebb6b32011-02-20 10:37:07 +00001315\`configure' configures python 3.3 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001316
1317Usage: $0 [OPTION]... [VAR=VALUE]...
1318
1319To assign environment variables (e.g., CC, CFLAGS...), specify them as
1320VAR=VALUE. See below for descriptions of some of the useful variables.
1321
1322Defaults for the options are specified in brackets.
1323
1324Configuration:
1325 -h, --help display this help and exit
1326 --help=short display options specific to this package
1327 --help=recursive display the short help of all the included packages
1328 -V, --version display version information and exit
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07001329 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001330 --cache-file=FILE cache test results in FILE [disabled]
1331 -C, --config-cache alias for \`--cache-file=config.cache'
1332 -n, --no-create do not create output files
1333 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1334
Martin v. Löwis11437992002-04-12 09:54:03 +00001335Installation directories:
1336 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001337 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001338 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001339 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001340
1341By default, \`make install' will install all the files in
1342\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1343an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1344for instance \`--prefix=\$HOME'.
1345
1346For better control, use the options below.
1347
1348Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001349 --bindir=DIR user executables [EPREFIX/bin]
1350 --sbindir=DIR system admin executables [EPREFIX/sbin]
1351 --libexecdir=DIR program executables [EPREFIX/libexec]
1352 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1353 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1354 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1355 --libdir=DIR object code libraries [EPREFIX/lib]
1356 --includedir=DIR C header files [PREFIX/include]
1357 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1358 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1359 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1360 --infodir=DIR info documentation [DATAROOTDIR/info]
1361 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1362 --mandir=DIR man documentation [DATAROOTDIR/man]
1363 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1364 --htmldir=DIR html documentation [DOCDIR]
1365 --dvidir=DIR dvi documentation [DOCDIR]
1366 --pdfdir=DIR pdf documentation [DOCDIR]
1367 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001368_ACEOF
1369
1370 cat <<\_ACEOF
1371_ACEOF
1372fi
1373
1374if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001375 case $ac_init_help in
Georg Brandl3ebb6b32011-02-20 10:37:07 +00001376 short | recursive ) echo "Configuration of python 3.3:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001377 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001378 cat <<\_ACEOF
1379
1380Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001381 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001382 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1383 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001384 --enable-universalsdk[=SDKDIR]
Christian Heimes292d3512008-02-03 16:51:08 +00001385 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001386 --enable-framework[=INSTALLDIR]
1387 Build (MacOSX|Darwin) framework
1388 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001389 --enable-profiling enable C-level code profiling
Benjamin Peterson076ed002010-10-31 17:11:02 +00001390 --enable-loadable-sqlite-extensions
1391 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001392 --enable-ipv6 Enable ipv6 (with ipv4) support
1393 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001394 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001395 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001396
1397Optional Packages:
1398 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1399 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001400 --with-universal-archs=ARCH
1401 select architectures for universal build ("32-bit",
Ronald Oussoren3c064c12009-09-08 07:12:42 +00001402 "64-bit", "3-way", "intel" or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001403 --with-framework-name=FRAMEWORK
1404 specify an alternate name of the framework built
1405 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001406 --without-gcc never use gcc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001407 --with-cxx-main=<compiler>
1408 compile main() and link python executable with C++
1409 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001410 --with-suffix=.exe set executable suffix
1411 --with-pydebug build with Py_DEBUG defined
1412 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001413 --with-system-expat build pyexpat module using an installed expat
1414 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001415 --with-system-ffi build _ctypes module using an installed ffi library
Matthias Klose55708cc2009-04-30 08:06:49 +00001416 --with-dbmliborder=db1:db2:...
1417 order to check db backends for dbm. Valid value is a
1418 colon separated string with the backend names
1419 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001420 --with-signal-module disable/enable signal module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001421 --with(out)-threads[=DIRECTORY]
1422 disable/enable thread support
1423 --with(out)-thread[=DIRECTORY]
1424 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001425 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001426 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001427 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001428 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001429 --with-fpectl enable SIGFPE catching
1430 --with-libm=STRING math library
1431 --with-libc=STRING C library
Georg Brandl52d168a2008-01-07 18:10:24 +00001432 --with-wide-unicode Use 4-byte Unicode characters (default is 2 bytes)
Antoine Pitrou042b1282010-08-13 21:15:58 +00001433 --with(out)-computed-gotos
1434 Use computed gotos in evaluation loop (enabled by
1435 default on supported compilers)
Martin v. Löwis11437992002-04-12 09:54:03 +00001436
1437Some influential environment variables:
1438 CC C compiler command
1439 CFLAGS C compiler flags
1440 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1441 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001442 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001443 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001444 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001445 CPP C preprocessor
1446
1447Use these variables to override the choices made by `configure' or to help
1448it to find libraries and programs with nonstandard names/locations.
1449
Georg Brandle2e15612009-05-20 18:25:10 +00001450Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001451_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001452ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001453fi
1454
1455if test "$ac_init_help" = "recursive"; then
1456 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001457 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001458 test -d "$ac_dir" ||
1459 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1460 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001461 ac_builddir=.
1462
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001463case "$ac_dir" in
1464.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1465*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001466 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001467 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001468 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001469 case $ac_top_builddir_sub in
1470 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1471 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1472 esac ;;
1473esac
1474ac_abs_top_builddir=$ac_pwd
1475ac_abs_builddir=$ac_pwd$ac_dir_suffix
1476# for backward compatibility:
1477ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001478
1479case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001480 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001481 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001482 ac_top_srcdir=$ac_top_builddir_sub
1483 ac_abs_top_srcdir=$ac_pwd ;;
1484 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001485 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001486 ac_top_srcdir=$srcdir
1487 ac_abs_top_srcdir=$srcdir ;;
1488 *) # Relative name.
1489 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1490 ac_top_srcdir=$ac_top_build_prefix$srcdir
1491 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001492esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001493ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001494
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001495 cd "$ac_dir" || { ac_status=$?; continue; }
1496 # Check for guested configure.
1497 if test -f "$ac_srcdir/configure.gnu"; then
1498 echo &&
1499 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1500 elif test -f "$ac_srcdir/configure"; then
1501 echo &&
1502 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001503 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001504 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001505 fi || ac_status=$?
1506 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001507 done
1508fi
1509
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001510test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001511if $ac_init_version; then
1512 cat <<\_ACEOF
Georg Brandl3ebb6b32011-02-20 10:37:07 +00001513python configure 3.3
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07001514generated by GNU Autoconf 2.67
Martin v. Löwis11437992002-04-12 09:54:03 +00001515
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07001516Copyright (C) 2010 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001517This configure script is free software; the Free Software Foundation
1518gives unlimited permission to copy, distribute and modify it.
1519_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001520 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001521fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001522
1523## ------------------------ ##
1524## Autoconf initialization. ##
1525## ------------------------ ##
1526
1527# ac_fn_c_try_compile LINENO
1528# --------------------------
1529# Try to compile conftest.$ac_ext, and return whether this succeeded.
1530ac_fn_c_try_compile ()
1531{
1532 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1533 rm -f conftest.$ac_objext
1534 if { { ac_try="$ac_compile"
1535case "(($ac_try" in
1536 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1537 *) ac_try_echo=$ac_try;;
1538esac
1539eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1540$as_echo "$ac_try_echo"; } >&5
1541 (eval "$ac_compile") 2>conftest.err
1542 ac_status=$?
1543 if test -s conftest.err; then
1544 grep -v '^ *+' conftest.err >conftest.er1
1545 cat conftest.er1 >&5
1546 mv -f conftest.er1 conftest.err
1547 fi
1548 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1549 test $ac_status = 0; } && {
1550 test -z "$ac_c_werror_flag" ||
1551 test ! -s conftest.err
1552 } && test -s conftest.$ac_objext; then :
1553 ac_retval=0
1554else
1555 $as_echo "$as_me: failed program was:" >&5
1556sed 's/^/| /' conftest.$ac_ext >&5
1557
1558 ac_retval=1
1559fi
Benjamin Peterson316e02b2011-05-10 15:01:56 -05001560 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00001561 as_fn_set_status $ac_retval
1562
1563} # ac_fn_c_try_compile
1564
Matthias Kloseb9621712010-04-24 17:59:49 +00001565# ac_fn_c_try_link LINENO
1566# -----------------------
1567# Try to link conftest.$ac_ext, and return whether this succeeded.
1568ac_fn_c_try_link ()
1569{
1570 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1571 rm -f conftest.$ac_objext conftest$ac_exeext
1572 if { { ac_try="$ac_link"
1573case "(($ac_try" in
1574 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1575 *) ac_try_echo=$ac_try;;
1576esac
1577eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1578$as_echo "$ac_try_echo"; } >&5
1579 (eval "$ac_link") 2>conftest.err
1580 ac_status=$?
1581 if test -s conftest.err; then
1582 grep -v '^ *+' conftest.err >conftest.er1
1583 cat conftest.er1 >&5
1584 mv -f conftest.er1 conftest.err
1585 fi
1586 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1587 test $ac_status = 0; } && {
1588 test -z "$ac_c_werror_flag" ||
1589 test ! -s conftest.err
1590 } && test -s conftest$ac_exeext && {
1591 test "$cross_compiling" = yes ||
1592 $as_test_x conftest$ac_exeext
1593 }; then :
1594 ac_retval=0
1595else
1596 $as_echo "$as_me: failed program was:" >&5
1597sed 's/^/| /' conftest.$ac_ext >&5
1598
1599 ac_retval=1
1600fi
1601 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1602 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1603 # interfere with the next link command; also delete a directory that is
1604 # left behind by Apple's compiler. We do this before executing the actions.
1605 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Benjamin Peterson316e02b2011-05-10 15:01:56 -05001606 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00001607 as_fn_set_status $ac_retval
1608
1609} # ac_fn_c_try_link
1610
Matthias Kloseb9621712010-04-24 17:59:49 +00001611# ac_fn_c_try_cpp LINENO
1612# ----------------------
1613# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1614ac_fn_c_try_cpp ()
1615{
1616 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1617 if { { ac_try="$ac_cpp conftest.$ac_ext"
1618case "(($ac_try" in
1619 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1620 *) ac_try_echo=$ac_try;;
1621esac
1622eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1623$as_echo "$ac_try_echo"; } >&5
1624 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1625 ac_status=$?
1626 if test -s conftest.err; then
1627 grep -v '^ *+' conftest.err >conftest.er1
1628 cat conftest.er1 >&5
1629 mv -f conftest.er1 conftest.err
1630 fi
1631 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07001632 test $ac_status = 0; } > conftest.i && {
Matthias Kloseb9621712010-04-24 17:59:49 +00001633 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1634 test ! -s conftest.err
1635 }; then :
1636 ac_retval=0
1637else
1638 $as_echo "$as_me: failed program was:" >&5
1639sed 's/^/| /' conftest.$ac_ext >&5
1640
1641 ac_retval=1
1642fi
Benjamin Peterson316e02b2011-05-10 15:01:56 -05001643 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00001644 as_fn_set_status $ac_retval
1645
1646} # ac_fn_c_try_cpp
1647
1648# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1649# -------------------------------------------------------
1650# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1651# the include files in INCLUDES and setting the cache variable VAR
1652# accordingly.
1653ac_fn_c_check_header_mongrel ()
1654{
1655 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07001656 if eval "test \"\${$3+set}\"" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001657 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1658$as_echo_n "checking for $2... " >&6; }
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07001659if eval "test \"\${$3+set}\"" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001660 $as_echo_n "(cached) " >&6
1661fi
1662eval ac_res=\$$3
1663 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1664$as_echo "$ac_res" >&6; }
1665else
1666 # Is the header compilable?
1667{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1668$as_echo_n "checking $2 usability... " >&6; }
1669cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1670/* end confdefs.h. */
1671$4
1672#include <$2>
1673_ACEOF
1674if ac_fn_c_try_compile "$LINENO"; then :
1675 ac_header_compiler=yes
1676else
1677 ac_header_compiler=no
1678fi
1679rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1680{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1681$as_echo "$ac_header_compiler" >&6; }
1682
1683# Is the header present?
1684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1685$as_echo_n "checking $2 presence... " >&6; }
1686cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1687/* end confdefs.h. */
1688#include <$2>
1689_ACEOF
1690if ac_fn_c_try_cpp "$LINENO"; then :
1691 ac_header_preproc=yes
1692else
1693 ac_header_preproc=no
1694fi
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07001695rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001696{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1697$as_echo "$ac_header_preproc" >&6; }
1698
1699# So? What about this header?
1700case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1701 yes:no: )
1702 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1703$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1704 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1705$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1706 ;;
1707 no:yes:* )
1708 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1709$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1710 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1711$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1712 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1713$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1714 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1715$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1716 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1717$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07001718( $as_echo "## -------------------------------------- ##
Matthias Kloseb9621712010-04-24 17:59:49 +00001719## Report this to http://bugs.python.org/ ##
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07001720## -------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001721 ) | sed "s/^/$as_me: WARNING: /" >&2
1722 ;;
1723esac
1724 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1725$as_echo_n "checking for $2... " >&6; }
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07001726if eval "test \"\${$3+set}\"" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001727 $as_echo_n "(cached) " >&6
1728else
1729 eval "$3=\$ac_header_compiler"
1730fi
1731eval ac_res=\$$3
1732 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1733$as_echo "$ac_res" >&6; }
1734fi
Benjamin Peterson316e02b2011-05-10 15:01:56 -05001735 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00001736
1737} # ac_fn_c_check_header_mongrel
1738
1739# ac_fn_c_try_run LINENO
1740# ----------------------
1741# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1742# that executables *can* be run.
1743ac_fn_c_try_run ()
1744{
1745 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1746 if { { ac_try="$ac_link"
1747case "(($ac_try" in
1748 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1749 *) ac_try_echo=$ac_try;;
1750esac
1751eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1752$as_echo "$ac_try_echo"; } >&5
1753 (eval "$ac_link") 2>&5
1754 ac_status=$?
1755 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1756 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1757 { { case "(($ac_try" in
1758 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1759 *) ac_try_echo=$ac_try;;
1760esac
1761eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1762$as_echo "$ac_try_echo"; } >&5
1763 (eval "$ac_try") 2>&5
1764 ac_status=$?
1765 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1766 test $ac_status = 0; }; }; then :
1767 ac_retval=0
1768else
1769 $as_echo "$as_me: program exited with status $ac_status" >&5
1770 $as_echo "$as_me: failed program was:" >&5
1771sed 's/^/| /' conftest.$ac_ext >&5
1772
1773 ac_retval=$ac_status
1774fi
1775 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Benjamin Peterson316e02b2011-05-10 15:01:56 -05001776 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00001777 as_fn_set_status $ac_retval
1778
1779} # ac_fn_c_try_run
1780
1781# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1782# -------------------------------------------------------
1783# Tests whether HEADER exists and can be compiled using the include files in
1784# INCLUDES, setting the cache variable VAR accordingly.
1785ac_fn_c_check_header_compile ()
1786{
1787 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1788 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1789$as_echo_n "checking for $2... " >&6; }
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07001790if eval "test \"\${$3+set}\"" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001791 $as_echo_n "(cached) " >&6
1792else
1793 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1794/* end confdefs.h. */
1795$4
1796#include <$2>
1797_ACEOF
1798if ac_fn_c_try_compile "$LINENO"; then :
1799 eval "$3=yes"
1800else
1801 eval "$3=no"
1802fi
1803rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1804fi
1805eval ac_res=\$$3
1806 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1807$as_echo "$ac_res" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05001808 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00001809
1810} # ac_fn_c_check_header_compile
1811
Matthias Kloseb9621712010-04-24 17:59:49 +00001812# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1813# -------------------------------------------
1814# Tests whether TYPE exists after having included INCLUDES, setting cache
1815# variable VAR accordingly.
1816ac_fn_c_check_type ()
1817{
1818 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1819 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1820$as_echo_n "checking for $2... " >&6; }
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07001821if eval "test \"\${$3+set}\"" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001822 $as_echo_n "(cached) " >&6
1823else
1824 eval "$3=no"
1825 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1826/* end confdefs.h. */
1827$4
1828int
1829main ()
1830{
1831if (sizeof ($2))
1832 return 0;
1833 ;
1834 return 0;
1835}
1836_ACEOF
1837if ac_fn_c_try_compile "$LINENO"; then :
1838 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1839/* end confdefs.h. */
1840$4
1841int
1842main ()
1843{
1844if (sizeof (($2)))
1845 return 0;
1846 ;
1847 return 0;
1848}
1849_ACEOF
1850if ac_fn_c_try_compile "$LINENO"; then :
1851
1852else
1853 eval "$3=yes"
1854fi
1855rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1856fi
1857rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1858fi
1859eval ac_res=\$$3
1860 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1861$as_echo "$ac_res" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05001862 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00001863
1864} # ac_fn_c_check_type
1865
1866# ac_fn_c_find_uintX_t LINENO BITS VAR
1867# ------------------------------------
1868# Finds an unsigned integer type with width BITS, setting cache variable VAR
1869# accordingly.
1870ac_fn_c_find_uintX_t ()
1871{
1872 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1873 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1874$as_echo_n "checking for uint$2_t... " >&6; }
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07001875if eval "test \"\${$3+set}\"" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001876 $as_echo_n "(cached) " >&6
1877else
1878 eval "$3=no"
1879 # Order is important - never check a type that is potentially smaller
1880 # than half of the expected target width.
1881 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1882 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1883 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1884/* end confdefs.h. */
1885$ac_includes_default
1886int
1887main ()
1888{
1889static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
1890test_array [0] = 0
1891
1892 ;
1893 return 0;
1894}
1895_ACEOF
1896if ac_fn_c_try_compile "$LINENO"; then :
1897 case $ac_type in #(
1898 uint$2_t) :
1899 eval "$3=yes" ;; #(
1900 *) :
1901 eval "$3=\$ac_type" ;;
1902esac
1903fi
1904rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07001905 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001906
1907else
1908 break
1909fi
1910 done
1911fi
1912eval ac_res=\$$3
1913 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1914$as_echo "$ac_res" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05001915 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00001916
1917} # ac_fn_c_find_uintX_t
1918
1919# ac_fn_c_find_intX_t LINENO BITS VAR
1920# -----------------------------------
1921# Finds a signed integer type with width BITS, setting cache variable VAR
1922# accordingly.
1923ac_fn_c_find_intX_t ()
1924{
1925 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1926 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
1927$as_echo_n "checking for int$2_t... " >&6; }
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07001928if eval "test \"\${$3+set}\"" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001929 $as_echo_n "(cached) " >&6
1930else
1931 eval "$3=no"
1932 # Order is important - never check a type that is potentially smaller
1933 # than half of the expected target width.
1934 for ac_type in int$2_t 'int' 'long int' \
1935 'long long int' 'short int' 'signed char'; do
1936 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1937/* end confdefs.h. */
1938$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001939 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00001940int
1941main ()
1942{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001943static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
Matthias Kloseb9621712010-04-24 17:59:49 +00001944test_array [0] = 0
1945
1946 ;
1947 return 0;
1948}
1949_ACEOF
1950if ac_fn_c_try_compile "$LINENO"; then :
1951 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1952/* end confdefs.h. */
1953$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001954 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00001955int
1956main ()
1957{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001958static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Kloseb9621712010-04-24 17:59:49 +00001959 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
1960test_array [0] = 0
1961
1962 ;
1963 return 0;
1964}
1965_ACEOF
1966if ac_fn_c_try_compile "$LINENO"; then :
1967
1968else
1969 case $ac_type in #(
1970 int$2_t) :
1971 eval "$3=yes" ;; #(
1972 *) :
1973 eval "$3=\$ac_type" ;;
1974esac
1975fi
1976rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1977fi
1978rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07001979 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001980
1981else
1982 break
1983fi
1984 done
1985fi
1986eval ac_res=\$$3
1987 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1988$as_echo "$ac_res" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05001989 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00001990
1991} # ac_fn_c_find_intX_t
1992
1993# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1994# --------------------------------------------
1995# Tries to find the compile-time value of EXPR in a program that includes
1996# INCLUDES, setting VAR accordingly. Returns whether the value could be
1997# computed
1998ac_fn_c_compute_int ()
1999{
2000 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2001 if test "$cross_compiling" = yes; then
2002 # Depending upon the size, compute the lo and hi bounds.
2003cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2004/* end confdefs.h. */
2005$4
2006int
2007main ()
2008{
2009static int test_array [1 - 2 * !(($2) >= 0)];
2010test_array [0] = 0
2011
2012 ;
2013 return 0;
2014}
2015_ACEOF
2016if ac_fn_c_try_compile "$LINENO"; then :
2017 ac_lo=0 ac_mid=0
2018 while :; do
2019 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2020/* end confdefs.h. */
2021$4
2022int
2023main ()
2024{
2025static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2026test_array [0] = 0
2027
2028 ;
2029 return 0;
2030}
2031_ACEOF
2032if ac_fn_c_try_compile "$LINENO"; then :
2033 ac_hi=$ac_mid; break
2034else
2035 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2036 if test $ac_lo -le $ac_mid; then
2037 ac_lo= ac_hi=
2038 break
2039 fi
2040 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2041fi
2042rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2043 done
2044else
2045 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2046/* end confdefs.h. */
2047$4
2048int
2049main ()
2050{
2051static int test_array [1 - 2 * !(($2) < 0)];
2052test_array [0] = 0
2053
2054 ;
2055 return 0;
2056}
2057_ACEOF
2058if ac_fn_c_try_compile "$LINENO"; then :
2059 ac_hi=-1 ac_mid=-1
2060 while :; do
2061 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2062/* end confdefs.h. */
2063$4
2064int
2065main ()
2066{
2067static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2068test_array [0] = 0
2069
2070 ;
2071 return 0;
2072}
2073_ACEOF
2074if ac_fn_c_try_compile "$LINENO"; then :
2075 ac_lo=$ac_mid; break
2076else
2077 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2078 if test $ac_mid -le $ac_hi; then
2079 ac_lo= ac_hi=
2080 break
2081 fi
2082 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2083fi
2084rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2085 done
2086else
2087 ac_lo= ac_hi=
2088fi
2089rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2090fi
2091rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2092# Binary search between lo and hi bounds.
2093while test "x$ac_lo" != "x$ac_hi"; do
2094 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2095 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2096/* end confdefs.h. */
2097$4
2098int
2099main ()
2100{
2101static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2102test_array [0] = 0
2103
2104 ;
2105 return 0;
2106}
2107_ACEOF
2108if ac_fn_c_try_compile "$LINENO"; then :
2109 ac_hi=$ac_mid
2110else
2111 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2112fi
2113rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2114done
2115case $ac_lo in #((
2116?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2117'') ac_retval=1 ;;
2118esac
2119 else
2120 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2121/* end confdefs.h. */
2122$4
2123static long int longval () { return $2; }
2124static unsigned long int ulongval () { return $2; }
2125#include <stdio.h>
2126#include <stdlib.h>
2127int
2128main ()
2129{
2130
2131 FILE *f = fopen ("conftest.val", "w");
2132 if (! f)
2133 return 1;
2134 if (($2) < 0)
2135 {
2136 long int i = longval ();
2137 if (i != ($2))
2138 return 1;
2139 fprintf (f, "%ld", i);
2140 }
2141 else
2142 {
2143 unsigned long int i = ulongval ();
2144 if (i != ($2))
2145 return 1;
2146 fprintf (f, "%lu", i);
2147 }
2148 /* Do not output a trailing newline, as this causes \r\n confusion
2149 on some platforms. */
2150 return ferror (f) || fclose (f) != 0;
2151
2152 ;
2153 return 0;
2154}
2155_ACEOF
2156if ac_fn_c_try_run "$LINENO"; then :
2157 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2158else
2159 ac_retval=1
2160fi
2161rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2162 conftest.$ac_objext conftest.beam conftest.$ac_ext
2163rm -f conftest.val
2164
2165 fi
Benjamin Peterson316e02b2011-05-10 15:01:56 -05002166 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00002167 as_fn_set_status $ac_retval
2168
2169} # ac_fn_c_compute_int
2170
2171# ac_fn_c_check_func LINENO FUNC VAR
2172# ----------------------------------
2173# Tests whether FUNC exists, setting the cache variable VAR accordingly
2174ac_fn_c_check_func ()
2175{
2176 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2177 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2178$as_echo_n "checking for $2... " >&6; }
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07002179if eval "test \"\${$3+set}\"" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002180 $as_echo_n "(cached) " >&6
2181else
2182 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2183/* end confdefs.h. */
2184/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2185 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2186#define $2 innocuous_$2
2187
2188/* System header to define __stub macros and hopefully few prototypes,
2189 which can conflict with char $2 (); below.
2190 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2191 <limits.h> exists even on freestanding compilers. */
2192
2193#ifdef __STDC__
2194# include <limits.h>
2195#else
2196# include <assert.h>
2197#endif
2198
2199#undef $2
2200
2201/* Override any GCC internal prototype to avoid an error.
2202 Use char because int might match the return type of a GCC
2203 builtin and then its argument prototype would still apply. */
2204#ifdef __cplusplus
2205extern "C"
2206#endif
2207char $2 ();
2208/* The GNU C library defines this for functions which it implements
2209 to always fail with ENOSYS. Some functions are actually named
2210 something starting with __ and the normal name is an alias. */
2211#if defined __stub_$2 || defined __stub___$2
2212choke me
2213#endif
2214
2215int
2216main ()
2217{
2218return $2 ();
2219 ;
2220 return 0;
2221}
2222_ACEOF
2223if ac_fn_c_try_link "$LINENO"; then :
2224 eval "$3=yes"
2225else
2226 eval "$3=no"
2227fi
2228rm -f core conftest.err conftest.$ac_objext \
2229 conftest$ac_exeext conftest.$ac_ext
2230fi
2231eval ac_res=\$$3
2232 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2233$as_echo "$ac_res" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05002234 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00002235
2236} # ac_fn_c_check_func
2237
2238# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2239# ----------------------------------------------------
2240# Tries to find if the field MEMBER exists in type AGGR, after including
2241# INCLUDES, setting cache variable VAR accordingly.
2242ac_fn_c_check_member ()
2243{
2244 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2245 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2246$as_echo_n "checking for $2.$3... " >&6; }
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07002247if eval "test \"\${$4+set}\"" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002248 $as_echo_n "(cached) " >&6
2249else
2250 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2251/* end confdefs.h. */
2252$5
2253int
2254main ()
2255{
2256static $2 ac_aggr;
2257if (ac_aggr.$3)
2258return 0;
2259 ;
2260 return 0;
2261}
2262_ACEOF
2263if ac_fn_c_try_compile "$LINENO"; then :
2264 eval "$4=yes"
2265else
2266 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2267/* end confdefs.h. */
2268$5
2269int
2270main ()
2271{
2272static $2 ac_aggr;
2273if (sizeof ac_aggr.$3)
2274return 0;
2275 ;
2276 return 0;
2277}
2278_ACEOF
2279if ac_fn_c_try_compile "$LINENO"; then :
2280 eval "$4=yes"
2281else
2282 eval "$4=no"
2283fi
2284rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2285fi
2286rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2287fi
2288eval ac_res=\$$4
2289 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2290$as_echo "$ac_res" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05002291 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00002292
2293} # ac_fn_c_check_member
2294
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07002295# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2296# ---------------------------------------------
2297# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2298# accordingly.
Matthias Kloseb9621712010-04-24 17:59:49 +00002299ac_fn_c_check_decl ()
2300{
2301 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07002302 as_decl_name=`echo $2|sed 's/ *(.*//'`
2303 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2304 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2305$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2306if eval "test \"\${$3+set}\"" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002307 $as_echo_n "(cached) " >&6
2308else
2309 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2310/* end confdefs.h. */
2311$4
2312int
2313main ()
2314{
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07002315#ifndef $as_decl_name
2316#ifdef __cplusplus
2317 (void) $as_decl_use;
2318#else
2319 (void) $as_decl_name;
2320#endif
Matthias Kloseb9621712010-04-24 17:59:49 +00002321#endif
2322
2323 ;
2324 return 0;
2325}
2326_ACEOF
2327if ac_fn_c_try_compile "$LINENO"; then :
2328 eval "$3=yes"
2329else
2330 eval "$3=no"
2331fi
2332rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2333fi
2334eval ac_res=\$$3
2335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2336$as_echo "$ac_res" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05002337 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
Matthias Kloseb9621712010-04-24 17:59:49 +00002338
2339} # ac_fn_c_check_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002340cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002341This file contains any messages produced by compilers while
2342running configure, to aid debugging if configure makes a mistake.
2343
Georg Brandl3ebb6b32011-02-20 10:37:07 +00002344It was created by python $as_me 3.3, which was
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07002345generated by GNU Autoconf 2.67. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002346
2347 $ $0 $@
2348
2349_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002350exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002351{
2352cat <<_ASUNAME
2353## --------- ##
2354## Platform. ##
2355## --------- ##
2356
2357hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2358uname -m = `(uname -m) 2>/dev/null || echo unknown`
2359uname -r = `(uname -r) 2>/dev/null || echo unknown`
2360uname -s = `(uname -s) 2>/dev/null || echo unknown`
2361uname -v = `(uname -v) 2>/dev/null || echo unknown`
2362
2363/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2364/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2365
2366/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2367/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2368/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002369/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002370/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2371/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2372/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2373
2374_ASUNAME
2375
2376as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2377for as_dir in $PATH
2378do
2379 IFS=$as_save_IFS
2380 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002381 $as_echo "PATH: $as_dir"
2382 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002383IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002384
2385} >&5
2386
2387cat >&5 <<_ACEOF
2388
2389
2390## ----------- ##
2391## Core tests. ##
2392## ----------- ##
2393
2394_ACEOF
2395
2396
2397# Keep a trace of the command line.
2398# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002399# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002400# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002401# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002402ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002403ac_configure_args0=
2404ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002405ac_must_keep_next=false
2406for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002407do
Skip Montanaro6dead952003-09-25 14:50:04 +00002408 for ac_arg
2409 do
2410 case $ac_arg in
2411 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2412 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2413 | -silent | --silent | --silen | --sile | --sil)
2414 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002415 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002416 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002417 esac
2418 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002419 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002420 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002421 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002422 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002423 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002424 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002425 case $ac_arg in
2426 *=* | --config-cache | -C | -disable-* | --disable-* \
2427 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2428 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2429 | -with-* | --with-* | -without-* | --without-* | --x)
2430 case "$ac_configure_args0 " in
2431 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2432 esac
2433 ;;
2434 -* ) ac_must_keep_next=true ;;
2435 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002436 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002437 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002438 ;;
2439 esac
2440 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002441done
Matthias Kloseb9621712010-04-24 17:59:49 +00002442{ ac_configure_args0=; unset ac_configure_args0;}
2443{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002444
2445# When interrupted or exit'd, cleanup temporary files, and complete
2446# config.log. We remove comments because anyway the quotes in there
2447# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002448# WARNING: Use '\'' to represent an apostrophe within the trap.
2449# 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 +00002450trap 'exit_status=$?
2451 # Save into config.log some information that might help in debugging.
2452 {
2453 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002454
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07002455 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002456## Cache variables. ##
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07002457## ---------------- ##"
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
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07002491 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002492## Output variables. ##
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07002493## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002494 echo
2495 for ac_var in $ac_subst_vars
2496 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002497 eval ac_val=\$$ac_var
2498 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002499 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002500 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002501 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002502 done | sort
2503 echo
2504
2505 if test -n "$ac_subst_files"; then
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07002506 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002507## File substitutions. ##
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07002508## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002509 echo
2510 for ac_var in $ac_subst_files
2511 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002512 eval ac_val=\$$ac_var
2513 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002514 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002515 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002516 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002517 done | sort
2518 echo
2519 fi
2520
Martin v. Löwis11437992002-04-12 09:54:03 +00002521 if test -s confdefs.h; then
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07002522 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002523## confdefs.h. ##
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07002524## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002525 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002526 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002527 echo
2528 fi
2529 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002530 $as_echo "$as_me: caught signal $ac_signal"
2531 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002532 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002533 rm -f core *.core core.conftest.* &&
2534 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002535 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002536' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002537for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002538 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002539done
2540ac_signal=0
2541
2542# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002543rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002544
Matthias Kloseb9621712010-04-24 17:59:49 +00002545$as_echo "/* confdefs.h */" > confdefs.h
2546
Martin v. Löwis11437992002-04-12 09:54:03 +00002547# Predefined preprocessor variables.
2548
2549cat >>confdefs.h <<_ACEOF
2550#define PACKAGE_NAME "$PACKAGE_NAME"
2551_ACEOF
2552
Martin v. Löwis11437992002-04-12 09:54:03 +00002553cat >>confdefs.h <<_ACEOF
2554#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2555_ACEOF
2556
Martin v. Löwis11437992002-04-12 09:54:03 +00002557cat >>confdefs.h <<_ACEOF
2558#define PACKAGE_VERSION "$PACKAGE_VERSION"
2559_ACEOF
2560
Martin v. Löwis11437992002-04-12 09:54:03 +00002561cat >>confdefs.h <<_ACEOF
2562#define PACKAGE_STRING "$PACKAGE_STRING"
2563_ACEOF
2564
Martin v. Löwis11437992002-04-12 09:54:03 +00002565cat >>confdefs.h <<_ACEOF
2566#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2567_ACEOF
2568
Matthias Kloseb9621712010-04-24 17:59:49 +00002569cat >>confdefs.h <<_ACEOF
2570#define PACKAGE_URL "$PACKAGE_URL"
2571_ACEOF
2572
Martin v. Löwis11437992002-04-12 09:54:03 +00002573
2574# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002575# Prefer an explicitly selected file to automatically selected ones.
2576ac_site_file1=NONE
2577ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002578if test -n "$CONFIG_SITE"; then
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07002579 # We do not want a PATH search for config.site.
2580 case $CONFIG_SITE in #((
2581 -*) ac_site_file1=./$CONFIG_SITE;;
2582 */*) ac_site_file1=$CONFIG_SITE;;
2583 *) ac_site_file1=./$CONFIG_SITE;;
2584 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002585elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002586 ac_site_file1=$prefix/share/config.site
2587 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002588else
Matthias Kloseb9621712010-04-24 17:59:49 +00002589 ac_site_file1=$ac_default_prefix/share/config.site
2590 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002591fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002592for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002593do
Matthias Kloseb9621712010-04-24 17:59:49 +00002594 test "x$ac_site_file" = xNONE && continue
2595 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2596 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2597$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002598 sed 's/^/| /' "$ac_site_file" >&5
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07002599 . "$ac_site_file" \
2600 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2601$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2602as_fn_error $? "failed to load site script $ac_site_file
2603See \`config.log' for more details" "$LINENO" 5 ; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002604 fi
2605done
2606
2607if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002608 # Some versions of bash will fail to source /dev/null (special files
2609 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2610 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2611 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2612$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002613 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002614 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2615 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002616 esac
2617 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002618else
Matthias Kloseb9621712010-04-24 17:59:49 +00002619 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2620$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002621 >$cache_file
2622fi
2623
2624# Check that the precious variables saved in the cache have kept the same
2625# value.
2626ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002627for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002628 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2629 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002630 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2631 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002632 case $ac_old_set,$ac_new_set in
2633 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002634 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2635$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 +00002636 ac_cache_corrupted=: ;;
2637 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002638 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2639$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002640 ac_cache_corrupted=: ;;
2641 ,);;
2642 *)
2643 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002644 # differences in whitespace do not lead to failure.
2645 ac_old_val_w=`echo x $ac_old_val`
2646 ac_new_val_w=`echo x $ac_new_val`
2647 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2648 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2649$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2650 ac_cache_corrupted=:
2651 else
2652 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2653$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2654 eval $ac_var=\$ac_old_val
2655 fi
2656 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2657$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2658 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2659$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002660 fi;;
2661 esac
2662 # Pass precious variables to config.status.
2663 if test "$ac_new_set" = set; then
2664 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002665 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002666 *) ac_arg=$ac_var=$ac_new_val ;;
2667 esac
2668 case " $ac_configure_args " in
2669 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002670 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002671 esac
2672 fi
2673done
2674if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002675 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2676$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2677 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2678$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07002679 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002680fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002681## -------------------- ##
2682## Main body of script. ##
2683## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002684
Guido van Rossum7f43da71994-08-01 12:15:30 +00002685ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002686ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002687ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2688ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2689ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002690
Guido van Rossum627b2d71993-12-24 10:39:16 +00002691
Michael W. Hudson54241132001-12-07 15:38:26 +00002692
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002693ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002694
2695
Martin v. Löwis11437992002-04-12 09:54:03 +00002696
Benjamin Petersond23f8222009-04-05 19:13:16 +00002697if test "$prefix" != "/"; then
2698 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2699fi
2700
2701
Martin v. Löwis11437992002-04-12 09:54:03 +00002702
2703
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002704# We don't use PACKAGE_ variables, and they cause conflicts
2705# with other autoconf-based packages that include Python.h
2706grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2707rm confdefs.h
2708mv confdefs.h.new confdefs.h
2709
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002710
Georg Brandl3ebb6b32011-02-20 10:37:07 +00002711VERSION=3.3
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002712
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002713# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002714
2715SOVERSION=1.0
2716
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002717# The later defininition of _XOPEN_SOURCE disables certain features
2718# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2719
Matthias Kloseb9621712010-04-24 17:59:49 +00002720$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002721
2722
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002723# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2724# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2725# them.
2726
Matthias Kloseb9621712010-04-24 17:59:49 +00002727$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002728
2729
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002730# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2731# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2732# them.
2733
Matthias Kloseb9621712010-04-24 17:59:49 +00002734$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002735
2736
Martin v. Löwisd6320502004-08-12 13:45:08 +00002737# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2738# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
2739
Matthias Kloseb9621712010-04-24 17:59:49 +00002740$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00002741
2742
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002743# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2744# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2745# them.
2746
Matthias Kloseb9621712010-04-24 17:59:49 +00002747$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002748
2749
2750
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002751define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002752
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00002753# Arguments passed to configure.
2754
2755CONFIG_ARGS="$ac_configure_args"
2756
Matthias Kloseb9621712010-04-24 17:59:49 +00002757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
2758$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002759# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002760if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002761 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00002762 case $enableval in
2763 yes)
2764 enableval=/Developer/SDKs/MacOSX10.4u.sdk
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002765 if test ! -d "${enableval}"
2766 then
2767 enableval=/
2768 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002769 ;;
2770 esac
2771 case $enableval in
2772 no)
2773 UNIVERSALSDK=
2774 enable_universalsdk=
2775 ;;
2776 *)
2777 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002778 if test ! -d "${UNIVERSALSDK}"
2779 then
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07002780 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002781 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002782 ;;
2783 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002784
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002785
Thomas Wouters477c8d52006-05-27 19:21:47 +00002786else
2787
2788 UNIVERSALSDK=
2789 enable_universalsdk=
2790
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002791fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002792
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002793if test -n "${UNIVERSALSDK}"
2794then
Matthias Kloseb9621712010-04-24 17:59:49 +00002795 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
2796$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002797else
Matthias Kloseb9621712010-04-24 17:59:49 +00002798 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2799$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002800fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002801
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002802
Benjamin Peterson6794aa32008-07-16 20:33:37 +00002803
2804
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002805UNIVERSAL_ARCHS="32-bit"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00002806
Matthias Kloseb9621712010-04-24 17:59:49 +00002807{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
2808$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002809
2810# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002811if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002812 withval=$with_universal_archs;
Matthias Kloseb9621712010-04-24 17:59:49 +00002813 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
2814$as_echo "$withval" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002815 UNIVERSAL_ARCHS="$withval"
2816
2817else
2818
Matthias Kloseb9621712010-04-24 17:59:49 +00002819 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 32-bit" >&5
2820$as_echo "32-bit" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002821
2822fi
2823
2824
2825
2826
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002827
2828# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002829if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002830 withval=$with_framework_name;
2831 PYTHONFRAMEWORK=${withval}
2832 PYTHONFRAMEWORKDIR=${withval}.framework
2833 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
2834
2835else
2836
2837 PYTHONFRAMEWORK=Python
2838 PYTHONFRAMEWORKDIR=Python.framework
2839 PYTHONFRAMEWORKIDENTIFIER=org.python.python
2840
2841fi
2842
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002843# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002844if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002845 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00002846 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00002847 yes)
Jack Jansene578a632001-08-15 01:27:14 +00002848 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00002849 esac
2850 case $enableval in
2851 no)
2852 PYTHONFRAMEWORK=
2853 PYTHONFRAMEWORKDIR=no-framework
2854 PYTHONFRAMEWORKPREFIX=
2855 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002856 FRAMEWORKINSTALLFIRST=
2857 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002858 FRAMEWORKALTINSTALLFIRST=
2859 FRAMEWORKALTINSTALLLAST=
2860 if test "x${prefix}" = "xNONE"; then
2861 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2862 else
2863 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2864 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00002865 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00002866 ;;
2867 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002868 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00002869 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00002870 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00002871 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00002872 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
2873 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002874 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002875
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002876 if test "x${prefix}" = "xNONE" ; then
2877 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002878
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002879 else
2880 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2881 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002882
2883 case "${enableval}" in
2884 /System*)
2885 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2886 if test "${prefix}" = "NONE" ; then
2887 # See below
2888 FRAMEWORKUNIXTOOLSPREFIX="/usr"
2889 fi
2890 ;;
2891
2892 /Library*)
2893 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2894 ;;
2895
2896 */Library/Frameworks)
2897 MDIR="`dirname "${enableval}"`"
2898 MDIR="`dirname "${MDIR}"`"
2899 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
2900
2901 if test "${prefix}" = "NONE"; then
2902 # User hasn't specified the
2903 # --prefix option, but wants to install
2904 # the framework in a non-default location,
2905 # ensure that the compatibility links get
2906 # installed relative to that prefix as well
2907 # instead of in /usr/local.
2908 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
2909 fi
2910 ;;
2911
2912 *)
2913 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2914 ;;
2915 esac
2916
Jack Jansen127e56e2001-09-11 14:41:54 +00002917 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00002918
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002919 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00002920 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002921 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002922
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002923 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002924
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002925 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
2926
2927 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
2928
Jack Jansene578a632001-08-15 01:27:14 +00002929 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002930
Guido van Rossum563e7081996-09-10 18:20:48 +00002931else
Martin v. Löwis11437992002-04-12 09:54:03 +00002932
Jack Jansene578a632001-08-15 01:27:14 +00002933 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00002934 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00002935 PYTHONFRAMEWORKPREFIX=
2936 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002937 FRAMEWORKINSTALLFIRST=
2938 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002939 FRAMEWORKALTINSTALLFIRST=
2940 FRAMEWORKALTINSTALLLAST=
2941 if test "x${prefix}" = "xNONE" ; then
2942 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2943 else
2944 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2945 fi
Jack Jansene578a632001-08-15 01:27:14 +00002946 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002947
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002948
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002949fi
2950
Thomas Wouters477c8d52006-05-27 19:21:47 +00002951
2952
Michael W. Hudson54241132001-12-07 15:38:26 +00002953
2954
2955
2956
Jack Jansene578a632001-08-15 01:27:14 +00002957
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002958
2959
2960
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002961
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002962
Jack Jansene578a632001-08-15 01:27:14 +00002963##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00002964## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00002965## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00002966##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002967# Set name for machine-dependent library files
2968
Matthias Kloseb9621712010-04-24 17:59:49 +00002969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
2970$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002971if test -z "$MACHDEP"
2972then
Guido van Rossum563e7081996-09-10 18:20:48 +00002973 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002974 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00002975 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00002976 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002977 else
Guido van Rossum563e7081996-09-10 18:20:48 +00002978 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002979 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00002980 ac_md_system=`echo $ac_sys_system |
2981 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
2982 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00002983 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00002984 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00002985
Guido van Rossum07397971997-04-29 21:49:50 +00002986 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002987 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002988 darwin*) MACHDEP="darwin";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00002989 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00002990 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002991 esac
2992fi
Guido van Rossum91922671997-10-09 20:24:13 +00002993
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002994# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
2995# disable features if it is defined, without any means to access these
2996# features as extensions. For these systems, we skip the definition of
2997# _XOPEN_SOURCE. Before adding a system to the list to gain access to
2998# some feature, make sure there is no alternative way to access this
2999# feature. Also, when using wildcards, make sure you have verified the
3000# need for not defining _XOPEN_SOURCE on all systems matching the
3001# wildcard, and that the wildcard does not include future systems
3002# (which may remove their limitations).
3003case $ac_sys_system/$ac_sys_release in
3004 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3005 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003006 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003007 # In addition, Stefan Krah confirms that issue #1244610 exists through
3008 # OpenBSD 4.6, but is fixed in 4.7.
3009 OpenBSD/2.* | OpenBSD/3.[0123456789] | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003010 define_xopen_source=no
3011 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3012 # also defined. This can be overridden by defining _BSD_SOURCE
3013 # As this has a different meaning on Linux, only define it on OpenBSD
3014
Matthias Kloseb9621712010-04-24 17:59:49 +00003015$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003016
3017 ;;
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003018 OpenBSD/4.[789])
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003019 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3020 # also defined. This can be overridden by defining _BSD_SOURCE
3021 # As this has a different meaning on Linux, only define it on OpenBSD
3022
Matthias Kloseb9621712010-04-24 17:59:49 +00003023$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003024
3025 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003026 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3027 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3028 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003029 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 +00003030 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003031 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3032 # request to enable features supported by the standard as a request
3033 # to disable features not supported by the standard. The best way
3034 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3035 # entirely and define __EXTENSIONS__ instead.
3036 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003037 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003038 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3039 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003040 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003041 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003042 define_xopen_source=no;;
3043 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003044 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003045 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003046 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003047 # On FreeBSD 4, the math functions C89 does not cover are never defined
3048 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3049 FreeBSD/4.*)
3050 define_xopen_source=no;;
3051 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3052 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3053 # identifies itself as Darwin/7.*
3054 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3055 # disables platform specific features beyond repair.
3056 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3057 # has no effect, don't bother defining them
3058 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003059 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003060 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003061 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003062 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3063 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3064 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003065 AIX/4)
3066 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003067 AIX/5)
3068 if test `uname -r` -eq 1; then
3069 define_xopen_source=no
3070 fi
3071 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003072 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3073 # defining NI_NUMERICHOST.
3074 QNX/6.3.2)
3075 define_xopen_source=no
3076 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003077
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003078esac
3079
3080if test $define_xopen_source = yes
3081then
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003082
Matthias Kloseb9621712010-04-24 17:59:49 +00003083$as_echo "#define _XOPEN_SOURCE 600" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003084
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003085
3086 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3087 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3088 # several APIs are not declared. Since this is also needed in some
3089 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003090
Matthias Kloseb9621712010-04-24 17:59:49 +00003091$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003092
3093
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003094
Matthias Kloseb9621712010-04-24 17:59:49 +00003095$as_echo "#define _POSIX_C_SOURCE 200112L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003096
3097
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003098fi
3099
Guido van Rossum91922671997-10-09 20:24:13 +00003100#
3101# SGI compilers allow the specification of the both the ABI and the
3102# ISA on the command line. Depending on the values of these switches,
3103# different and often incompatable code will be generated.
3104#
3105# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3106# thus supply support for various ABI/ISA combinations. The MACHDEP
3107# variable is also adjusted.
3108#
3109
3110if test ! -z "$SGI_ABI"
3111then
3112 CC="cc $SGI_ABI"
3113 LDFLAGS="$SGI_ABI $LDFLAGS"
3114 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3115fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003116{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3117$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003118
Jack Jansen6b08a402004-06-03 12:41:45 +00003119# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3120# it may influence the way we can build extensions, so distutils
3121# needs to check it
3122
Thomas Wouters477c8d52006-05-27 19:21:47 +00003123
Jack Jansen6b08a402004-06-03 12:41:45 +00003124CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003125EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003126
Matthias Kloseb9621712010-04-24 17:59:49 +00003127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking machine type as reported by uname -m" >&5
3128$as_echo_n "checking machine type as reported by uname -m... " >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00003129ac_sys_machine=`uname -m`
Matthias Kloseb9621712010-04-24 17:59:49 +00003130{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_sys_machine" >&5
3131$as_echo "$ac_sys_machine" >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00003132
Guido van Rossum627b2d71993-12-24 10:39:16 +00003133# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003134
3135# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3136# for debug/optimization stuff. BASECFLAGS is for flags that are required
3137# just to get things to compile and link. Users are free to override OPT
3138# when running configure or make. The build should not break if they do.
3139# BASECFLAGS should generally not be messed with, however.
3140
3141# XXX shouldn't some/most/all of this code be merged with the stuff later
3142# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003143{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3144$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003145
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003146# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003147if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003148 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003149 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003150 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003151 without_gcc=yes;;
3152 yes) CC=gcc
3153 without_gcc=no;;
3154 *) CC=$withval
3155 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003156 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003157else
Martin v. Löwis11437992002-04-12 09:54:03 +00003158
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003159 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003160 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003161 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003162 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003163 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003164fi
3165
Matthias Kloseb9621712010-04-24 17:59:49 +00003166{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3167$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003168
Guido van Rossum8b131c51995-03-09 14:10:13 +00003169# If the user switches compilers, we can't believe the cache
3170if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3171then
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07003172 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003173(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003174fi
3175
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003176# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3177# when the compiler supports them, but we don't always want -O2, and
3178# we set -g later.
3179if test -z "$CFLAGS"; then
3180 CFLAGS=
3181fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003182ac_ext=c
3183ac_cpp='$CPP $CPPFLAGS'
3184ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3185ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3186ac_compiler_gnu=$ac_cv_c_compiler_gnu
3187if test -n "$ac_tool_prefix"; then
3188 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3189set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003190{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3191$as_echo_n "checking for $ac_word... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05003192if test "${ac_cv_prog_CC+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003193 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003194else
3195 if test -n "$CC"; then
3196 ac_cv_prog_CC="$CC" # Let the user override the test.
3197else
Martin v. Löwis11437992002-04-12 09:54:03 +00003198as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3199for as_dir in $PATH
3200do
3201 IFS=$as_save_IFS
3202 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003203 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003204 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 +00003205 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003206 $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 +00003207 break 2
3208 fi
3209done
Matthias Kloseb9621712010-04-24 17:59:49 +00003210 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003211IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003212
Jack Jansendd19cf82001-12-06 22:36:17 +00003213fi
3214fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003215CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003216if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003217 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3218$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003219else
Matthias Kloseb9621712010-04-24 17:59:49 +00003220 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3221$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003222fi
3223
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003224
Martin v. Löwis11437992002-04-12 09:54:03 +00003225fi
3226if test -z "$ac_cv_prog_CC"; then
3227 ac_ct_CC=$CC
3228 # Extract the first word of "gcc", so it can be a program name with args.
3229set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003230{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3231$as_echo_n "checking for $ac_word... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05003232if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003233 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003234else
3235 if test -n "$ac_ct_CC"; then
3236 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3237else
3238as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3239for as_dir in $PATH
3240do
3241 IFS=$as_save_IFS
3242 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003243 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003244 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 +00003245 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003246 $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 +00003247 break 2
3248 fi
3249done
Matthias Kloseb9621712010-04-24 17:59:49 +00003250 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003251IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003252
3253fi
3254fi
3255ac_ct_CC=$ac_cv_prog_ac_ct_CC
3256if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003257 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3258$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003259else
Matthias Kloseb9621712010-04-24 17:59:49 +00003260 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3261$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003262fi
3263
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003264 if test "x$ac_ct_CC" = x; then
3265 CC=""
3266 else
3267 case $cross_compiling:$ac_tool_warned in
3268yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003269{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3270$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003271ac_tool_warned=yes ;;
3272esac
3273 CC=$ac_ct_CC
3274 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003275else
3276 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003277fi
3278
Jack Jansendd19cf82001-12-06 22:36:17 +00003279if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003280 if test -n "$ac_tool_prefix"; then
3281 # 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 +00003282set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003283{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3284$as_echo_n "checking for $ac_word... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05003285if test "${ac_cv_prog_CC+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003286 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003287else
3288 if test -n "$CC"; then
3289 ac_cv_prog_CC="$CC" # Let the user override the test.
3290else
Martin v. Löwis11437992002-04-12 09:54:03 +00003291as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3292for as_dir in $PATH
3293do
3294 IFS=$as_save_IFS
3295 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003296 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003297 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 +00003298 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003299 $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 +00003300 break 2
3301 fi
3302done
Matthias Kloseb9621712010-04-24 17:59:49 +00003303 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003304IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003305
3306fi
3307fi
3308CC=$ac_cv_prog_CC
3309if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003310 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3311$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003312else
Matthias Kloseb9621712010-04-24 17:59:49 +00003313 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3314$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003315fi
3316
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003317
Martin v. Löwis11437992002-04-12 09:54:03 +00003318 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003319fi
3320if test -z "$CC"; then
3321 # Extract the first word of "cc", so it can be a program name with args.
3322set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003323{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3324$as_echo_n "checking for $ac_word... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05003325if test "${ac_cv_prog_CC+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003326 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003327else
3328 if test -n "$CC"; then
3329 ac_cv_prog_CC="$CC" # Let the user override the test.
3330else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003331 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003332as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3333for as_dir in $PATH
3334do
3335 IFS=$as_save_IFS
3336 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003337 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003338 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 +00003339 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3340 ac_prog_rejected=yes
3341 continue
3342 fi
3343 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003344 $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 +00003345 break 2
3346 fi
3347done
Matthias Kloseb9621712010-04-24 17:59:49 +00003348 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003349IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003350
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003351if test $ac_prog_rejected = yes; then
3352 # We found a bogon in the path, so make sure we never use it.
3353 set dummy $ac_cv_prog_CC
3354 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003355 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003356 # We chose a different compiler from the bogus one.
3357 # However, it has the same basename, so the bogon will be chosen
3358 # first if we set CC to just the basename; use the full file name.
3359 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003360 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003361 fi
3362fi
3363fi
3364fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003365CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003366if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003367 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3368$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003369else
Matthias Kloseb9621712010-04-24 17:59:49 +00003370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3371$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003372fi
3373
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003374
Martin v. Löwis11437992002-04-12 09:54:03 +00003375fi
3376if test -z "$CC"; then
3377 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003378 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003379 do
3380 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3381set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3383$as_echo_n "checking for $ac_word... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05003384if test "${ac_cv_prog_CC+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003385 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003386else
3387 if test -n "$CC"; then
3388 ac_cv_prog_CC="$CC" # Let the user override the test.
3389else
Martin v. Löwis11437992002-04-12 09:54:03 +00003390as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3391for as_dir in $PATH
3392do
3393 IFS=$as_save_IFS
3394 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003395 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003396 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 +00003397 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003398 $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 +00003399 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003400 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003401done
Matthias Kloseb9621712010-04-24 17:59:49 +00003402 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003403IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003404
3405fi
3406fi
3407CC=$ac_cv_prog_CC
3408if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003409 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3410$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003411else
Matthias Kloseb9621712010-04-24 17:59:49 +00003412 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3413$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003414fi
3415
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003416
Martin v. Löwis11437992002-04-12 09:54:03 +00003417 test -n "$CC" && break
3418 done
3419fi
3420if test -z "$CC"; then
3421 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003422 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003423do
3424 # Extract the first word of "$ac_prog", so it can be a program name with args.
3425set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003426{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3427$as_echo_n "checking for $ac_word... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05003428if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003429 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003430else
3431 if test -n "$ac_ct_CC"; then
3432 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3433else
3434as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3435for as_dir in $PATH
3436do
3437 IFS=$as_save_IFS
3438 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003439 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003440 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 +00003441 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003442 $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 +00003443 break 2
3444 fi
3445done
Matthias Kloseb9621712010-04-24 17:59:49 +00003446 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003447IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003448
Martin v. Löwis11437992002-04-12 09:54:03 +00003449fi
3450fi
3451ac_ct_CC=$ac_cv_prog_ac_ct_CC
3452if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003453 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3454$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003455else
Matthias Kloseb9621712010-04-24 17:59:49 +00003456 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3457$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003458fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003459
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003460
Martin v. Löwis11437992002-04-12 09:54:03 +00003461 test -n "$ac_ct_CC" && break
3462done
Michael W. Hudson54241132001-12-07 15:38:26 +00003463
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003464 if test "x$ac_ct_CC" = x; then
3465 CC=""
3466 else
3467 case $cross_compiling:$ac_tool_warned in
3468yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003469{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3470$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003471ac_tool_warned=yes ;;
3472esac
3473 CC=$ac_ct_CC
3474 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003475fi
3476
3477fi
3478
3479
Matthias Kloseb9621712010-04-24 17:59:49 +00003480test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3481$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07003482as_fn_error $? "no acceptable C compiler found in \$PATH
3483See \`config.log' for more details" "$LINENO" 5 ; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003484
3485# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003486$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3487set X $ac_compile
3488ac_compiler=$2
3489for ac_option in --version -v -V -qversion; do
3490 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003491case "(($ac_try" in
3492 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3493 *) ac_try_echo=$ac_try;;
3494esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003495eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3496$as_echo "$ac_try_echo"; } >&5
3497 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003498 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003499 if test -s conftest.err; then
3500 sed '10a\
3501... rest of stderr output deleted ...
3502 10q' conftest.err >conftest.er1
3503 cat conftest.er1 >&5
3504 fi
3505 rm -f conftest.er1 conftest.err
3506 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3507 test $ac_status = 0; }
3508done
Martin v. Löwis11437992002-04-12 09:54:03 +00003509
Matthias Kloseb9621712010-04-24 17:59:49 +00003510cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003511/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003512
Martin v. Löwis11437992002-04-12 09:54:03 +00003513int
3514main ()
3515{
3516
3517 ;
3518 return 0;
3519}
3520_ACEOF
3521ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003522ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003523# Try to create an executable without -o first, disregard a.out.
3524# It will help us diagnose broken compilers, and finding out an intuition
3525# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003526{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3527$as_echo_n "checking whether the C compiler works... " >&6; }
3528ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3529
3530# The possible output files:
3531ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3532
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003533ac_rmfiles=
3534for ac_file in $ac_files
3535do
3536 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003537 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003538 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3539 esac
3540done
3541rm -f $ac_rmfiles
3542
Matthias Kloseb9621712010-04-24 17:59:49 +00003543if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003544case "(($ac_try" in
3545 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3546 *) ac_try_echo=$ac_try;;
3547esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003548eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3549$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003550 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003551 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003552 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3553 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003554 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3555# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3556# in a Makefile. We should not override ac_cv_exeext if it was cached,
3557# so that the user can short-circuit this test for compilers unknown to
3558# Autoconf.
3559for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003560do
3561 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003562 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003563 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003564 ;;
3565 [ab].out )
3566 # We found the default executable, but exeext='' is most
3567 # certainly right.
3568 break;;
3569 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003570 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003571 then :; else
3572 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3573 fi
3574 # We set ac_cv_exeext here because the later test for it is not
3575 # safe: cross compilers may not add the suffix if given an `-o'
3576 # argument, so we may need to know it at that point already.
3577 # Even if this section looks crufty: it has the advantage of
3578 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003579 break;;
3580 * )
3581 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003582 esac
3583done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003584test "$ac_cv_exeext" = no && ac_cv_exeext=
3585
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003586else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003587 ac_file=''
3588fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003589if test -z "$ac_file"; then :
3590 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3591$as_echo "no" >&6; }
3592$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003593sed 's/^/| /' conftest.$ac_ext >&5
3594
Matthias Kloseb9621712010-04-24 17:59:49 +00003595{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3596$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07003597as_fn_error 77 "C compiler cannot create executables
3598See \`config.log' for more details" "$LINENO" 5 ; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003599else
3600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3601$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003602fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003603{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3604$as_echo_n "checking for C compiler default output file name... " >&6; }
3605{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3606$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003607ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003608
Matthias Kloseb9621712010-04-24 17:59:49 +00003609rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003610ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00003611{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3612$as_echo_n "checking for suffix of executables... " >&6; }
3613if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003614case "(($ac_try" in
3615 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3616 *) ac_try_echo=$ac_try;;
3617esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003618eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3619$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003620 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003621 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003622 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3623 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003624 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3625# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3626# work properly (i.e., refer to `conftest.exe'), while it won't with
3627# `rm'.
3628for ac_file in conftest.exe conftest conftest.*; do
3629 test -f "$ac_file" || continue
3630 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003631 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003632 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3633 break;;
3634 * ) break;;
3635 esac
3636done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003637else
Matthias Kloseb9621712010-04-24 17:59:49 +00003638 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3639$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07003640as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3641See \`config.log' for more details" "$LINENO" 5 ; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003642fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003643rm -f conftest conftest$ac_cv_exeext
3644{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3645$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003646
3647rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003648EXEEXT=$ac_cv_exeext
3649ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003650cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3651/* end confdefs.h. */
3652#include <stdio.h>
3653int
3654main ()
3655{
3656FILE *f = fopen ("conftest.out", "w");
3657 return ferror (f) || fclose (f) != 0;
3658
3659 ;
3660 return 0;
3661}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003662_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003663ac_clean_files="$ac_clean_files conftest.out"
3664# Check that the compiler produces executables we can run. If not, either
3665# the compiler is broken, or we cross compile.
3666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3667$as_echo_n "checking whether we are cross compiling... " >&6; }
3668if test "$cross_compiling" != yes; then
3669 { { ac_try="$ac_link"
3670case "(($ac_try" in
3671 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3672 *) ac_try_echo=$ac_try;;
3673esac
3674eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3675$as_echo "$ac_try_echo"; } >&5
3676 (eval "$ac_link") 2>&5
3677 ac_status=$?
3678 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3679 test $ac_status = 0; }
3680 if { ac_try='./conftest$ac_cv_exeext'
3681 { { case "(($ac_try" in
3682 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3683 *) ac_try_echo=$ac_try;;
3684esac
3685eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3686$as_echo "$ac_try_echo"; } >&5
3687 (eval "$ac_try") 2>&5
3688 ac_status=$?
3689 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3690 test $ac_status = 0; }; }; then
3691 cross_compiling=no
3692 else
3693 if test "$cross_compiling" = maybe; then
3694 cross_compiling=yes
3695 else
3696 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3697$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07003698as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00003699If you meant to cross compile, use \`--host'.
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07003700See \`config.log' for more details" "$LINENO" 5 ; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003701 fi
3702 fi
3703fi
3704{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3705$as_echo "$cross_compiling" >&6; }
3706
3707rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3708ac_clean_files=$ac_clean_files_save
3709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3710$as_echo_n "checking for suffix of object files... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05003711if test "${ac_cv_objext+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003712 $as_echo_n "(cached) " >&6
3713else
3714 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003715/* end confdefs.h. */
3716
3717int
3718main ()
3719{
3720
3721 ;
3722 return 0;
3723}
3724_ACEOF
3725rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00003726if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003727case "(($ac_try" in
3728 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3729 *) ac_try_echo=$ac_try;;
3730esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003731eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3732$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003733 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003734 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003735 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3736 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003737 for ac_file in conftest.o conftest.obj conftest.*; do
3738 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00003739 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003740 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003741 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3742 break;;
3743 esac
3744done
3745else
Matthias Kloseb9621712010-04-24 17:59:49 +00003746 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003747sed 's/^/| /' conftest.$ac_ext >&5
3748
Matthias Kloseb9621712010-04-24 17:59:49 +00003749{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3750$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07003751as_fn_error $? "cannot compute suffix of object files: cannot compile
3752See \`config.log' for more details" "$LINENO" 5 ; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003753fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003754rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003755fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003756{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3757$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003758OBJEXT=$ac_cv_objext
3759ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3761$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05003762if test "${ac_cv_c_compiler_gnu+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003763 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003764else
Matthias Kloseb9621712010-04-24 17:59:49 +00003765 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003766/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003767
Martin v. Löwis11437992002-04-12 09:54:03 +00003768int
3769main ()
3770{
3771#ifndef __GNUC__
3772 choke me
3773#endif
3774
3775 ;
3776 return 0;
3777}
3778_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003779if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00003780 ac_compiler_gnu=yes
3781else
Matthias Kloseb9621712010-04-24 17:59:49 +00003782 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003783fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003784rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003785ac_cv_c_compiler_gnu=$ac_compiler_gnu
3786
3787fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003788{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3789$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3790if test $ac_compiler_gnu = yes; then
3791 GCC=yes
3792else
3793 GCC=
3794fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003795ac_test_CFLAGS=${CFLAGS+set}
3796ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00003797{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3798$as_echo_n "checking whether $CC accepts -g... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05003799if test "${ac_cv_prog_cc_g+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003800 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003801else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003802 ac_save_c_werror_flag=$ac_c_werror_flag
3803 ac_c_werror_flag=yes
3804 ac_cv_prog_cc_g=no
3805 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00003806 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003807/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003808
Martin v. Löwis11437992002-04-12 09:54:03 +00003809int
3810main ()
3811{
3812
3813 ;
3814 return 0;
3815}
3816_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003817if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00003818 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003819else
Matthias Kloseb9621712010-04-24 17:59:49 +00003820 CFLAGS=""
3821 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003822/* end confdefs.h. */
3823
3824int
3825main ()
3826{
3827
3828 ;
3829 return 0;
3830}
3831_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003832if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003833
Matthias Kloseb9621712010-04-24 17:59:49 +00003834else
3835 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003836 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00003837 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003838/* end confdefs.h. */
3839
3840int
3841main ()
3842{
3843
3844 ;
3845 return 0;
3846}
3847_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003848if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003849 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00003850fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003851rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003852fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003853rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3854fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003855rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3856 ac_c_werror_flag=$ac_save_c_werror_flag
3857fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003858{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3859$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003860if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003861 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003862elif test $ac_cv_prog_cc_g = yes; then
3863 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003864 CFLAGS="-g -O2"
3865 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003866 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003867 fi
3868else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003869 if test "$GCC" = yes; then
3870 CFLAGS="-O2"
3871 else
3872 CFLAGS=
3873 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003874fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003875{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3876$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05003877if test "${ac_cv_prog_cc_c89+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003878 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003879else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003880 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003881ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00003882cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003883/* end confdefs.h. */
3884#include <stdarg.h>
3885#include <stdio.h>
3886#include <sys/types.h>
3887#include <sys/stat.h>
3888/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3889struct buf { int x; };
3890FILE * (*rcsopen) (struct buf *, struct stat *, int);
3891static char *e (p, i)
3892 char **p;
3893 int i;
3894{
3895 return p[i];
3896}
3897static char *f (char * (*g) (char **, int), char **p, ...)
3898{
3899 char *s;
3900 va_list v;
3901 va_start (v,p);
3902 s = g (p, va_arg (v,int));
3903 va_end (v);
3904 return s;
3905}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003906
3907/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3908 function prototypes and stuff, but not '\xHH' hex character constants.
3909 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003910 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003911 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3912 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003913 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003914int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3915
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003916/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3917 inside strings and character constants. */
3918#define FOO(x) 'x'
3919int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3920
Skip Montanaro6dead952003-09-25 14:50:04 +00003921int test (int i, double x);
3922struct s1 {int (*f) (int a);};
3923struct s2 {int (*f) (double a);};
3924int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3925int argc;
3926char **argv;
3927int
3928main ()
3929{
3930return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3931 ;
3932 return 0;
3933}
3934_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003935for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3936 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003937do
3938 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00003939 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003940 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00003941fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003942rm -f core conftest.err conftest.$ac_objext
3943 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00003944done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003945rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003946CC=$ac_save_CC
3947
3948fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003949# AC_CACHE_VAL
3950case "x$ac_cv_prog_cc_c89" in
3951 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00003952 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3953$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003954 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00003955 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3956$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003957 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003958 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00003959 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3960$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003961esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003962if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00003963
Matthias Kloseb9621712010-04-24 17:59:49 +00003964fi
Skip Montanaro6dead952003-09-25 14:50:04 +00003965
Martin v. Löwis11437992002-04-12 09:54:03 +00003966ac_ext=c
3967ac_cpp='$CPP $CPPFLAGS'
3968ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3969ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3970ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003971
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003972
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003973
3974
Matthias Kloseb9621712010-04-24 17:59:49 +00003975{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
3976$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003977
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003978# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003979if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003980 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003981
3982 case $withval in
3983 no) with_cxx_main=no
3984 MAINCC='$(CC)';;
3985 yes) with_cxx_main=yes
3986 MAINCC='$(CXX)';;
3987 *) with_cxx_main=yes
3988 MAINCC=$withval
3989 if test -z "$CXX"
3990 then
3991 CXX=$withval
3992 fi;;
3993 esac
3994else
3995
3996 with_cxx_main=no
3997 MAINCC='$(CC)'
3998
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003999fi
4000
Matthias Kloseb9621712010-04-24 17:59:49 +00004001{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4002$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004003
4004preset_cxx="$CXX"
4005if test -z "$CXX"
4006then
4007 case "$CC" in
4008 gcc) # Extract the first word of "g++", so it can be a program name with args.
4009set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004010{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4011$as_echo_n "checking for $ac_word... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05004012if test "${ac_cv_path_CXX+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004013 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004014else
4015 case $CXX in
4016 [\\/]* | ?:[\\/]*)
4017 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4018 ;;
4019 *)
4020 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4021for as_dir in notfound
4022do
4023 IFS=$as_save_IFS
4024 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004025 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004026 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 +00004027 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004028 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004029 break 2
4030 fi
4031done
Matthias Kloseb9621712010-04-24 17:59:49 +00004032 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004033IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004034
4035 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
4036 ;;
4037esac
4038fi
4039CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004040if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004041 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4042$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004043else
Matthias Kloseb9621712010-04-24 17:59:49 +00004044 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4045$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004046fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004047
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004048 ;;
4049 cc) # Extract the first word of "c++", so it can be a program name with args.
4050set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004051{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4052$as_echo_n "checking for $ac_word... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05004053if test "${ac_cv_path_CXX+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004054 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004055else
4056 case $CXX in
4057 [\\/]* | ?:[\\/]*)
4058 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4059 ;;
4060 *)
4061 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4062for as_dir in notfound
4063do
4064 IFS=$as_save_IFS
4065 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004066 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004067 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 +00004068 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004069 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004070 break 2
4071 fi
4072done
Matthias Kloseb9621712010-04-24 17:59:49 +00004073 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004074IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004075
4076 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
4077 ;;
4078esac
4079fi
4080CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004081if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004082 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4083$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004084else
Matthias Kloseb9621712010-04-24 17:59:49 +00004085 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4086$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004087fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004088
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004089 ;;
4090 esac
4091 if test "$CXX" = "notfound"
4092 then
4093 CXX=""
4094 fi
4095fi
4096if test -z "$CXX"
4097then
4098 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4099do
4100 # Extract the first word of "$ac_prog", so it can be a program name with args.
4101set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4103$as_echo_n "checking for $ac_word... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05004104if test "${ac_cv_prog_CXX+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004105 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004106else
4107 if test -n "$CXX"; then
4108 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4109else
4110as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4111for as_dir in $PATH
4112do
4113 IFS=$as_save_IFS
4114 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004115 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004116 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 +00004117 ac_cv_prog_CXX="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00004118 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004119 break 2
4120 fi
4121done
Matthias Kloseb9621712010-04-24 17:59:49 +00004122 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004123IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004124
4125fi
4126fi
4127CXX=$ac_cv_prog_CXX
4128if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004129 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4130$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004131else
Matthias Kloseb9621712010-04-24 17:59:49 +00004132 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4133$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004134fi
4135
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004136
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004137 test -n "$CXX" && break
4138done
4139test -n "$CXX" || CXX="notfound"
4140
4141 if test "$CXX" = "notfound"
4142 then
4143 CXX=""
4144 fi
4145fi
4146if test "$preset_cxx" != "$CXX"
4147then
Matthias Kloseb9621712010-04-24 17:59:49 +00004148 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004149
4150 By default, distutils will build C++ extension modules with \"$CXX\".
4151 If this is not intended, then set CXX on the configure command line.
4152 " >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00004153$as_echo "$as_me: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004154
4155 By default, distutils will build C++ extension modules with \"$CXX\".
4156 If this is not intended, then set CXX on the configure command line.
4157 " >&2;}
4158fi
4159
4160
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004161{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
4162$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
4163save_LDFLAGS="$LDFLAGS"
4164LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00004165
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004166cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4167/* end confdefs.h. */
4168
4169int
4170main ()
4171{
4172
4173 ;
4174 return 0;
4175}
4176_ACEOF
4177if ac_fn_c_try_link "$LINENO"; then :
4178 NO_AS_NEEDED="-Wl,--no-as-needed"
4179 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4180$as_echo "yes" >&6; }
4181else
4182 NO_AS_NEEDED=""
4183 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4184$as_echo "no" >&6; }
4185fi
4186rm -f core conftest.err conftest.$ac_objext \
4187 conftest$ac_exeext conftest.$ac_ext
4188LDFLAGS="$save_LDFLAGS"
4189
4190
4191
4192# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004193ac_ext=c
4194ac_cpp='$CPP $CPPFLAGS'
4195ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4196ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4197ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Kloseb9621712010-04-24 17:59:49 +00004198{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4199$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004200# On Suns, sometimes $CPP names a directory.
4201if test -n "$CPP" && test -d "$CPP"; then
4202 CPP=
4203fi
4204if test -z "$CPP"; then
Benjamin Peterson316e02b2011-05-10 15:01:56 -05004205 if test "${ac_cv_prog_CPP+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004206 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004207else
Martin v. Löwis11437992002-04-12 09:54:03 +00004208 # Double quotes because CPP needs to be expanded
4209 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4210 do
4211 ac_preproc_ok=false
4212for ac_c_preproc_warn_flag in '' yes
4213do
4214 # Use a header file that comes with gcc, so configuring glibc
4215 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004216 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4217 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004218 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004219 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004220 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004221/* end confdefs.h. */
4222#ifdef __STDC__
4223# include <limits.h>
4224#else
4225# include <assert.h>
4226#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004227 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004228_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004229if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004230
Matthias Kloseb9621712010-04-24 17:59:49 +00004231else
Martin v. Löwis11437992002-04-12 09:54:03 +00004232 # Broken: fails on valid input.
4233continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004234fi
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07004235rm -f conftest.err conftest.i conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004236
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004237 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004238 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004239 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004240/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004241#include <ac_nonexistent.h>
4242_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004243if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004244 # Broken: success on invalid input.
4245continue
4246else
Martin v. Löwis11437992002-04-12 09:54:03 +00004247 # Passes both tests.
4248ac_preproc_ok=:
4249break
4250fi
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07004251rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004252
4253done
4254# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07004255rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004256if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004257 break
4258fi
4259
4260 done
4261 ac_cv_prog_CPP=$CPP
4262
4263fi
4264 CPP=$ac_cv_prog_CPP
4265else
4266 ac_cv_prog_CPP=$CPP
4267fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004268{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4269$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004270ac_preproc_ok=false
4271for ac_c_preproc_warn_flag in '' yes
4272do
4273 # Use a header file that comes with gcc, so configuring glibc
4274 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004275 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4276 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004277 # On the NeXT, cc -E runs the code through the compiler's parser,
4278 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004279 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004280/* end confdefs.h. */
4281#ifdef __STDC__
4282# include <limits.h>
4283#else
4284# include <assert.h>
4285#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004286 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004287_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004288if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004289
Matthias Kloseb9621712010-04-24 17:59:49 +00004290else
Martin v. Löwis11437992002-04-12 09:54:03 +00004291 # Broken: fails on valid input.
4292continue
4293fi
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07004294rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004295
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004296 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004297 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004298 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004299/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004300#include <ac_nonexistent.h>
4301_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004302if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004303 # Broken: success on invalid input.
4304continue
4305else
Martin v. Löwis11437992002-04-12 09:54:03 +00004306 # Passes both tests.
4307ac_preproc_ok=:
4308break
4309fi
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07004310rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004311
4312done
4313# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07004314rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004315if $ac_preproc_ok; then :
4316
Martin v. Löwis11437992002-04-12 09:54:03 +00004317else
Matthias Kloseb9621712010-04-24 17:59:49 +00004318 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4319$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07004320as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4321See \`config.log' for more details" "$LINENO" 5 ; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004322fi
4323
4324ac_ext=c
4325ac_cpp='$CPP $CPPFLAGS'
4326ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4327ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4328ac_compiler_gnu=$ac_cv_c_compiler_gnu
4329
4330
Matthias Kloseb9621712010-04-24 17:59:49 +00004331{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4332$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05004333if test "${ac_cv_path_GREP+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004334 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004335else
Matthias Kloseb9621712010-04-24 17:59:49 +00004336 if test -z "$GREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004337 ac_path_GREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004338 # Loop through the user's path and test for each of PROGNAME-LIST
4339 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004340for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4341do
4342 IFS=$as_save_IFS
4343 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004344 for ac_prog in grep ggrep; do
4345 for ac_exec_ext in '' $ac_executable_extensions; do
4346 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4347 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
4348# Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004349 # Check for GNU $ac_path_GREP
4350case `"$ac_path_GREP" --version 2>&1` in
4351*GNU*)
4352 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4353*)
4354 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004355 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004356 while :
4357 do
4358 cat "conftest.in" "conftest.in" >"conftest.tmp"
4359 mv "conftest.tmp" "conftest.in"
4360 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00004361 $as_echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004362 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4363 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00004364 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004365 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4366 # Best one so far, save it but keep looking for a better one
4367 ac_cv_path_GREP="$ac_path_GREP"
4368 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00004369 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004370 # 10*(2^10) chars as input seems more than enough
4371 test $ac_count -gt 10 && break
4372 done
4373 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4374esac
4375
Matthias Kloseb9621712010-04-24 17:59:49 +00004376 $ac_path_GREP_found && break 3
4377 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004378 done
Matthias Kloseb9621712010-04-24 17:59:49 +00004379 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004380IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00004381 if test -z "$ac_cv_path_GREP"; then
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07004382 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 +00004383 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004384else
4385 ac_cv_path_GREP=$GREP
4386fi
4387
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004388fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004389{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4390$as_echo "$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004391 GREP="$ac_cv_path_GREP"
4392
4393
Matthias Kloseb9621712010-04-24 17:59:49 +00004394{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4395$as_echo_n "checking for egrep... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05004396if test "${ac_cv_path_EGREP+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004397 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004398else
4399 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4400 then ac_cv_path_EGREP="$GREP -E"
4401 else
Matthias Kloseb9621712010-04-24 17:59:49 +00004402 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004403 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004404 # Loop through the user's path and test for each of PROGNAME-LIST
4405 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004406for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4407do
4408 IFS=$as_save_IFS
4409 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004410 for ac_prog in egrep; do
4411 for ac_exec_ext in '' $ac_executable_extensions; do
4412 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4413 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
4414# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004415 # Check for GNU $ac_path_EGREP
4416case `"$ac_path_EGREP" --version 2>&1` in
4417*GNU*)
4418 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4419*)
4420 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004421 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004422 while :
4423 do
4424 cat "conftest.in" "conftest.in" >"conftest.tmp"
4425 mv "conftest.tmp" "conftest.in"
4426 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00004427 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004428 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4429 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00004430 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004431 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4432 # Best one so far, save it but keep looking for a better one
4433 ac_cv_path_EGREP="$ac_path_EGREP"
4434 ac_path_EGREP_max=$ac_count
4435 fi
4436 # 10*(2^10) chars as input seems more than enough
4437 test $ac_count -gt 10 && break
4438 done
4439 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4440esac
4441
Matthias Kloseb9621712010-04-24 17:59:49 +00004442 $ac_path_EGREP_found && break 3
4443 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004444 done
Matthias Kloseb9621712010-04-24 17:59:49 +00004445 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004446IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00004447 if test -z "$ac_cv_path_EGREP"; then
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07004448 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 +00004449 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004450else
4451 ac_cv_path_EGREP=$EGREP
4452fi
4453
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004454 fi
4455fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004456{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4457$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004458 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00004459
4460
Matthias Kloseb9621712010-04-24 17:59:49 +00004461{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4462$as_echo_n "checking for ANSI C header files... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05004463if test "${ac_cv_header_stdc+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004464 $as_echo_n "(cached) " >&6
4465else
4466 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004467/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00004468#include <stdlib.h>
4469#include <stdarg.h>
4470#include <string.h>
4471#include <float.h>
4472
4473int
4474main ()
4475{
4476
4477 ;
4478 return 0;
4479}
4480_ACEOF
4481if ac_fn_c_try_compile "$LINENO"; then :
4482 ac_cv_header_stdc=yes
4483else
4484 ac_cv_header_stdc=no
4485fi
4486rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4487
4488if test $ac_cv_header_stdc = yes; then
4489 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4490 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4491/* end confdefs.h. */
4492#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004493
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004494_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004495if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00004496 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004497
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004498else
Matthias Kloseb9621712010-04-24 17:59:49 +00004499 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004500fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00004501rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004502
Matthias Kloseb9621712010-04-24 17:59:49 +00004503fi
4504
4505if test $ac_cv_header_stdc = yes; then
4506 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4507 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4508/* end confdefs.h. */
4509#include <stdlib.h>
4510
4511_ACEOF
4512if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4513 $EGREP "free" >/dev/null 2>&1; then :
4514
4515else
4516 ac_cv_header_stdc=no
4517fi
4518rm -f conftest*
4519
4520fi
4521
4522if test $ac_cv_header_stdc = yes; then
4523 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4524 if test "$cross_compiling" = yes; then :
4525 :
4526else
4527 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4528/* end confdefs.h. */
4529#include <ctype.h>
4530#include <stdlib.h>
4531#if ((' ' & 0x0FF) == 0x020)
4532# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4533# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4534#else
4535# define ISLOWER(c) \
4536 (('a' <= (c) && (c) <= 'i') \
4537 || ('j' <= (c) && (c) <= 'r') \
4538 || ('s' <= (c) && (c) <= 'z'))
4539# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4540#endif
4541
4542#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4543int
4544main ()
4545{
4546 int i;
4547 for (i = 0; i < 256; i++)
4548 if (XOR (islower (i), ISLOWER (i))
4549 || toupper (i) != TOUPPER (i))
4550 return 2;
4551 return 0;
4552}
4553_ACEOF
4554if ac_fn_c_try_run "$LINENO"; then :
4555
4556else
4557 ac_cv_header_stdc=no
4558fi
4559rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4560 conftest.$ac_objext conftest.beam conftest.$ac_ext
4561fi
4562
4563fi
4564fi
4565{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4566$as_echo "$ac_cv_header_stdc" >&6; }
4567if test $ac_cv_header_stdc = yes; then
4568
4569$as_echo "#define STDC_HEADERS 1" >>confdefs.h
4570
4571fi
4572
4573# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4574for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4575 inttypes.h stdint.h unistd.h
4576do :
4577 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4578ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4579"
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07004580if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004581 cat >>confdefs.h <<_ACEOF
4582#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4583_ACEOF
4584
4585fi
4586
4587done
4588
4589
4590
4591 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 -05004592if test "x$ac_cv_header_minix_config_h" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004593 MINIX=yes
4594else
4595 MINIX=
4596fi
4597
4598
4599 if test "$MINIX" = yes; then
4600
4601$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4602
4603
4604$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4605
4606
4607$as_echo "#define _MINIX 1" >>confdefs.h
4608
4609 fi
4610
4611
4612 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4613$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05004614if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004615 $as_echo_n "(cached) " >&6
4616else
4617 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4618/* end confdefs.h. */
4619
4620# define __EXTENSIONS__ 1
4621 $ac_includes_default
4622int
4623main ()
4624{
4625
4626 ;
4627 return 0;
4628}
4629_ACEOF
4630if ac_fn_c_try_compile "$LINENO"; then :
4631 ac_cv_safe_to_define___extensions__=yes
4632else
4633 ac_cv_safe_to_define___extensions__=no
4634fi
4635rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4636fi
4637{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4638$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4639 test $ac_cv_safe_to_define___extensions__ = yes &&
4640 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4641
4642 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4643
4644 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4645
4646 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4647
4648 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4649
4650
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004651
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004652# Check for unsupported systems
4653case $ac_sys_system/$ac_sys_release in
4654atheos*|Linux*/1*)
4655 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
4656 echo See README for details.
4657 exit 1;;
4658esac
4659
4660
Matthias Kloseb9621712010-04-24 17:59:49 +00004661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
4662$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004663
4664# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004665if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004666 withval=$with_suffix;
4667 case $withval in
4668 no) EXEEXT=;;
4669 yes) EXEEXT=.exe;;
4670 *) EXEEXT=$withval;;
4671 esac
4672fi
4673
Matthias Kloseb9621712010-04-24 17:59:49 +00004674{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
4675$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004676
4677# Test whether we're running on a non-case-sensitive system, in which
4678# case we give a warning if no ext is given
4679
Matthias Kloseb9621712010-04-24 17:59:49 +00004680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
4681$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004682if test ! -d CaseSensitiveTestDir; then
4683mkdir CaseSensitiveTestDir
4684fi
4685
4686if test -d casesensitivetestdir
4687then
Matthias Kloseb9621712010-04-24 17:59:49 +00004688 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4689$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004690 BUILDEXEEXT=.exe
4691else
Matthias Kloseb9621712010-04-24 17:59:49 +00004692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4693$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004694 BUILDEXEEXT=$EXEEXT
4695fi
4696rmdir CaseSensitiveTestDir
4697
4698case $MACHDEP in
4699bsdos*)
4700 case $CC in
4701 gcc) CC="$CC -D_HAVE_BSDI";;
4702 esac;;
4703esac
4704
4705case $ac_sys_system in
4706hp*|HP*)
4707 case $CC in
4708 cc|*/cc) CC="$CC -Ae";;
4709 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004710esac
4711
4712
4713
Matthias Kloseb9621712010-04-24 17:59:49 +00004714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
4715$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004716if test -z "$LIBRARY"
4717then
Barry Warsawf040d7d2010-10-18 17:09:07 +00004718 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004719fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004720{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
4721$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004722
4723# LDLIBRARY is the name of the library to link against (as opposed to the
4724# name of the library into which to insert object files). BLDLIBRARY is also
4725# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
4726# is blank as the main program is not linked directly against LDLIBRARY.
4727# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
4728# systems without shared libraries, LDLIBRARY is the same as LIBRARY
4729# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
4730# DLLLIBRARY is the shared (i.e., DLL) library.
4731#
4732# RUNSHARED is used to run shared python without installed libraries
4733#
4734# INSTSONAME is the name of the shared library that will be use to install
4735# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004736#
4737# LDVERSION is the shared library version number, normally the Python version
4738# with the ABI build flags appended.
4739
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004740
4741
4742
4743
4744
4745
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00004746
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004747LDLIBRARY="$LIBRARY"
4748BLDLIBRARY='$(LDLIBRARY)'
4749INSTSONAME='$(LDLIBRARY)'
4750DLLLIBRARY=''
4751LDLIBRARYDIR=''
4752RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00004753LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004754
4755# LINKCC is the command that links the python executable -- default is $(CC).
4756# If CXX is set, and if it is needed to link a main function that was
4757# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
4758# python might then depend on the C++ runtime
4759# This is altered for AIX in order to build the export list before
4760# linking.
4761
Matthias Kloseb9621712010-04-24 17:59:49 +00004762{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
4763$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004764if test -z "$LINKCC"
4765then
4766 LINKCC='$(PURIFY) $(MAINCC)'
4767 case $ac_sys_system in
4768 AIX*)
4769 exp_extra="\"\""
4770 if test $ac_sys_release -ge 5 -o \
4771 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
4772 exp_extra="."
4773 fi
4774 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004775 QNX*)
4776 # qcc must be used because the other compilers do not
4777 # support -N.
4778 LINKCC=qcc;;
4779 esac
4780fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004781{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
4782$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004783
4784# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
4785# make sure we default having it set to "no": this is used by
4786# distutils.unixccompiler to know if it should add --enable-new-dtags
4787# to linker command lines, and failing to detect GNU ld simply results
4788# in the same bahaviour as before.
4789
Matthias Kloseb9621712010-04-24 17:59:49 +00004790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
4791$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004792ac_prog=ld
4793if test "$GCC" = yes; then
4794 ac_prog=`$CC -print-prog-name=ld`
4795fi
4796case `"$ac_prog" -V 2>&1 < /dev/null` in
4797 *GNU*)
4798 GNULD=yes;;
4799 *)
4800 GNULD=no;;
4801esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004802{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
4803$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004804
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
4806$as_echo_n "checking for inline... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05004807if test "${ac_cv_c_inline+set}" = set; then :
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004808 $as_echo_n "(cached) " >&6
4809else
4810 ac_cv_c_inline=no
4811for ac_kw in inline __inline__ __inline; do
4812 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4813/* end confdefs.h. */
4814#ifndef __cplusplus
4815typedef int foo_t;
4816static $ac_kw foo_t static_foo () {return 0; }
4817$ac_kw foo_t foo () {return 0; }
4818#endif
4819
4820_ACEOF
4821if ac_fn_c_try_compile "$LINENO"; then :
4822 ac_cv_c_inline=$ac_kw
4823fi
4824rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4825 test "$ac_cv_c_inline" != no && break
4826done
4827
4828fi
4829{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
4830$as_echo "$ac_cv_c_inline" >&6; }
4831
4832case $ac_cv_c_inline in
4833 inline | yes) ;;
4834 *)
4835 case $ac_cv_c_inline in
4836 no) ac_val=;;
4837 *) ac_val=$ac_cv_c_inline;;
4838 esac
4839 cat >>confdefs.h <<_ACEOF
4840#ifndef __cplusplus
4841#define inline $ac_val
4842#endif
4843_ACEOF
4844 ;;
4845esac
4846
4847if test "$ac_cv_c_inline" != no ; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00004848
4849$as_echo "#define USE_INLINE 1" >>confdefs.h
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004850
4851
4852fi
4853
4854
Matthias Kloseb9621712010-04-24 17:59:49 +00004855{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
4856$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004857# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004858if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004859 enableval=$enable_shared;
4860fi
4861
4862
4863if test -z "$enable_shared"
4864then
4865 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00004866 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004867 enable_shared="yes";;
4868 *)
4869 enable_shared="no";;
4870 esac
4871fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004872{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
4873$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004874
Matthias Kloseb9621712010-04-24 17:59:49 +00004875{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
4876$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004877# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004878if test "${enable_profiling+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004879 enableval=$enable_profiling; ac_save_cc="$CC"
4880 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004881 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004882 ac_enable_profiling="no"
4883else
Matthias Kloseb9621712010-04-24 17:59:49 +00004884 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004885/* end confdefs.h. */
4886int main() { return 0; }
4887_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004888if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004889 ac_enable_profiling="yes"
4890else
Matthias Kloseb9621712010-04-24 17:59:49 +00004891 ac_enable_profiling="no"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004892fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004893rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4894 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004895fi
4896
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004897 CC="$ac_save_cc"
4898fi
4899
Matthias Kloseb9621712010-04-24 17:59:49 +00004900{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_profiling" >&5
4901$as_echo "$ac_enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004902
4903case "$ac_enable_profiling" in
4904 "yes")
4905 BASECFLAGS="-pg $BASECFLAGS"
4906 LDFLAGS="-pg $LDFLAGS"
4907 ;;
4908esac
4909
Matthias Kloseb9621712010-04-24 17:59:49 +00004910{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
4911$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004912
4913# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4914# library that we build, but we do not want to link against it (we
4915# will find it with a -framework option). For this reason there is an
4916# extra variable BLDLIBRARY against which Python and the extension
4917# modules are linked, BLDLIBRARY. This is normally the same as
4918# LDLIBRARY, but empty for MacOSX framework builds.
4919if test "$enable_framework"
4920then
4921 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
4922 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
4923 BLDLIBRARY=''
4924else
4925 BLDLIBRARY='$(LDLIBRARY)'
4926fi
4927
4928# Other platforms follow
4929if test $enable_shared = "yes"; then
4930
Matthias Kloseb9621712010-04-24 17:59:49 +00004931$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004932
4933 case $ac_sys_system in
4934 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004935 LDLIBRARY='libpython$(LDVERSION).dll.a'
4936 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004937 ;;
4938 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004939 LDLIBRARY='libpython$(LDVERSION).so'
4940 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004941 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4942 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004943 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00004944 then
4945 PY3LIBRARY=libpython3.so
4946 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004947 ;;
4948 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004949 LDLIBRARY='libpython$(LDVERSION).so'
4950 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004951 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4952 case $ac_sys_system in
4953 FreeBSD*)
4954 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4955 ;;
4956 esac
4957 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004958 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00004959 then
4960 PY3LIBRARY=libpython3.so
4961 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004962 ;;
4963 hp*|HP*)
4964 case `uname -m` in
4965 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004966 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004967 ;;
4968 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004969 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004970 ;;
4971 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004972 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004973 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
4974 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004975 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004976 LDLIBRARY='libpython$(LDVERSION).dylib'
4977 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004978 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
4979 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00004980 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004981 LDLIBRARY='libpython$(LDVERSION).so'
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00004982 RUNSHARED=LIBPATH=`pwd`:${LIBPATH}
4983 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004984
4985 esac
4986else # shared is disabled
4987 case $ac_sys_system in
4988 CYGWIN*)
4989 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004990 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004991 ;;
4992 esac
4993fi
4994
Matthias Kloseb9621712010-04-24 17:59:49 +00004995{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
4996$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004997
4998if test -n "$ac_tool_prefix"; then
4999 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5000set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005001{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5002$as_echo_n "checking for $ac_word... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05005003if test "${ac_cv_prog_RANLIB+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005004 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005005else
5006 if test -n "$RANLIB"; then
5007 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5008else
5009as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5010for as_dir in $PATH
5011do
5012 IFS=$as_save_IFS
5013 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005014 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005015 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5016 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005017 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005018 break 2
5019 fi
5020done
Matthias Kloseb9621712010-04-24 17:59:49 +00005021 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005022IFS=$as_save_IFS
5023
5024fi
5025fi
5026RANLIB=$ac_cv_prog_RANLIB
5027if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5029$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005030else
Matthias Kloseb9621712010-04-24 17:59:49 +00005031 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5032$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005033fi
5034
5035
5036fi
5037if test -z "$ac_cv_prog_RANLIB"; then
5038 ac_ct_RANLIB=$RANLIB
5039 # Extract the first word of "ranlib", so it can be a program name with args.
5040set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005041{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5042$as_echo_n "checking for $ac_word... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05005043if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005044 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005045else
5046 if test -n "$ac_ct_RANLIB"; then
5047 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5048else
5049as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5050for as_dir in $PATH
5051do
5052 IFS=$as_save_IFS
5053 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005054 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005055 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5056 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005057 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005058 break 2
5059 fi
5060done
Matthias Kloseb9621712010-04-24 17:59:49 +00005061 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005062IFS=$as_save_IFS
5063
5064fi
5065fi
5066ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5067if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005068 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5069$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005070else
Matthias Kloseb9621712010-04-24 17:59:49 +00005071 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5072$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005073fi
5074
5075 if test "x$ac_ct_RANLIB" = x; then
5076 RANLIB=":"
5077 else
5078 case $cross_compiling:$ac_tool_warned in
5079yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00005080{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5081$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005082ac_tool_warned=yes ;;
5083esac
5084 RANLIB=$ac_ct_RANLIB
5085 fi
5086else
5087 RANLIB="$ac_cv_prog_RANLIB"
5088fi
5089
5090
5091for ac_prog in ar aal
5092do
5093 # Extract the first word of "$ac_prog", so it can be a program name with args.
5094set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005095{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5096$as_echo_n "checking for $ac_word... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05005097if test "${ac_cv_prog_AR+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005098 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005099else
5100 if test -n "$AR"; then
5101 ac_cv_prog_AR="$AR" # Let the user override the test.
5102else
5103as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5104for as_dir in $PATH
5105do
5106 IFS=$as_save_IFS
5107 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005108 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005109 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5110 ac_cv_prog_AR="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005111 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005112 break 2
5113 fi
5114done
Matthias Kloseb9621712010-04-24 17:59:49 +00005115 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005116IFS=$as_save_IFS
5117
5118fi
5119fi
5120AR=$ac_cv_prog_AR
5121if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005122 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5123$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005124else
Matthias Kloseb9621712010-04-24 17:59:49 +00005125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5126$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005127fi
5128
5129
5130 test -n "$AR" && break
5131done
5132test -n "$AR" || AR="ar"
5133
5134
5135# tweak ARFLAGS only if the user didn't set it on the command line
5136
5137if test -z "$ARFLAGS"
5138then
5139 ARFLAGS="rc"
5140fi
5141
5142
Georg Brandl1ca2e792011-03-05 20:51:24 +01005143
5144
5145# Extract the first word of "hg", so it can be a program name with args.
5146set dummy hg; ac_word=$2
5147{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5148$as_echo_n "checking for $ac_word... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05005149if test "${ac_cv_prog_HAS_HG+set}" = set; then :
Georg Brandl1ca2e792011-03-05 20:51:24 +01005150 $as_echo_n "(cached) " >&6
5151else
5152 if test -n "$HAS_HG"; then
5153 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
5154else
5155as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5156for as_dir in $PATH
5157do
5158 IFS=$as_save_IFS
5159 test -z "$as_dir" && as_dir=.
5160 for ac_exec_ext in '' $ac_executable_extensions; do
5161 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5162 ac_cv_prog_HAS_HG="found"
5163 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5164 break 2
5165 fi
5166done
5167 done
5168IFS=$as_save_IFS
5169
5170 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
5171fi
5172fi
5173HAS_HG=$ac_cv_prog_HAS_HG
5174if test -n "$HAS_HG"; then
5175 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
5176$as_echo "$HAS_HG" >&6; }
5177else
5178 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5179$as_echo "no" >&6; }
5180fi
5181
5182
5183if test $HAS_HG = found
5184then
5185 HGVERSION="hg id -i \$(srcdir)"
5186 HGTAG="hg id -t \$(srcdir)"
5187 HGBRANCH="hg id -b \$(srcdir)"
5188else
5189 HGVERSION=""
5190 HGTAG=""
5191 HGBRANCH=""
5192fi
5193
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005194case $MACHDEP in
5195bsdos*|hp*|HP*)
5196 # install -d does not work on BSDI or HP-UX
5197 if test -z "$INSTALL"
5198 then
5199 INSTALL="${srcdir}/install-sh -c"
5200 fi
5201esac
5202ac_aux_dir=
5203for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07005204 if test -f "$ac_dir/install-sh"; then
5205 ac_aux_dir=$ac_dir
5206 ac_install_sh="$ac_aux_dir/install-sh -c"
5207 break
5208 elif test -f "$ac_dir/install.sh"; then
5209 ac_aux_dir=$ac_dir
5210 ac_install_sh="$ac_aux_dir/install.sh -c"
5211 break
5212 elif test -f "$ac_dir/shtool"; then
5213 ac_aux_dir=$ac_dir
5214 ac_install_sh="$ac_aux_dir/shtool install -c"
5215 break
5216 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005217done
5218if test -z "$ac_aux_dir"; then
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07005219 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005220fi
5221
5222# These three variables are undocumented and unsupported,
5223# and are intended to be withdrawn in a future Autoconf release.
5224# They can cause serious problems if a builder's source tree is in a directory
5225# whose full name contains unusual characters.
5226ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
5227ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
5228ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
5229
5230
5231# Find a good install program. We prefer a C program (faster),
5232# so one script is as good as another. But avoid the broken or
5233# incompatible versions:
5234# SysV /etc/install, /usr/sbin/install
5235# SunOS /usr/etc/install
5236# IRIX /sbin/install
5237# AIX /bin/install
5238# AmigaOS /C/install, which installs bootblocks on floppy discs
5239# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5240# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5241# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5242# OS/2's system install, which has a completely different semantic
5243# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00005244# Reject install programs that cannot install multiple files.
5245{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
5246$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005247if test -z "$INSTALL"; then
Benjamin Peterson316e02b2011-05-10 15:01:56 -05005248if test "${ac_cv_path_install+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005249 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005250else
5251 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5252for as_dir in $PATH
5253do
5254 IFS=$as_save_IFS
5255 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005256 # Account for people who put trailing slashes in PATH elements.
5257case $as_dir/ in #((
5258 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005259 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00005260 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005261 /usr/ucb/* ) ;;
5262 *)
5263 # OSF1 and SCO ODT 3.0 have their own names for install.
5264 # Don't use installbsd from OSF since it installs stuff as root
5265 # by default.
5266 for ac_prog in ginstall scoinst install; do
5267 for ac_exec_ext in '' $ac_executable_extensions; do
5268 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
5269 if test $ac_prog = install &&
5270 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5271 # AIX install. It has an incompatible calling convention.
5272 :
5273 elif test $ac_prog = install &&
5274 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5275 # program-specific install script used by HP pwplus--don't use.
5276 :
5277 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005278 rm -rf conftest.one conftest.two conftest.dir
5279 echo one > conftest.one
5280 echo two > conftest.two
5281 mkdir conftest.dir
5282 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5283 test -s conftest.one && test -s conftest.two &&
5284 test -s conftest.dir/conftest.one &&
5285 test -s conftest.dir/conftest.two
5286 then
5287 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5288 break 3
5289 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005290 fi
5291 fi
5292 done
5293 done
5294 ;;
5295esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005296
5297 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005298IFS=$as_save_IFS
5299
Matthias Kloseb9621712010-04-24 17:59:49 +00005300rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005301
5302fi
5303 if test "${ac_cv_path_install+set}" = set; then
5304 INSTALL=$ac_cv_path_install
5305 else
5306 # As a last resort, use the slow shell script. Don't cache a
5307 # value for INSTALL within a source directory, because that will
5308 # break other packages using the cache if that directory is
5309 # removed, or if the value is a relative name.
5310 INSTALL=$ac_install_sh
5311 fi
5312fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005313{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
5314$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005315
5316# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5317# It thinks the first close brace ends the variable substitution.
5318test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5319
5320test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
5321
5322test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5323
5324
5325# Not every filesystem supports hard links
5326
5327if test -z "$LN" ; then
5328 case $ac_sys_system in
5329 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005330 *) LN=ln;;
5331 esac
5332fi
5333
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00005334# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005335
5336ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00005337
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005338# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00005339{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
5340$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005341
5342# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005343if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005344 withval=$with_pydebug;
5345if test "$withval" != no
5346then
5347
Matthias Kloseb9621712010-04-24 17:59:49 +00005348$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005349
Matthias Kloseb9621712010-04-24 17:59:49 +00005350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5351$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005352 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005353 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00005354else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5355$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005356fi
5357else
Matthias Kloseb9621712010-04-24 17:59:49 +00005358 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5359$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005360fi
5361
5362
5363# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
5364# merged with this chunk of code?
5365
5366# Optimizer/debugger flags
5367# ------------------------
5368# (The following bit of code is complicated enough - please keep things
5369# indented properly. Just pretend you're editing Python code. ;-)
5370
5371# There are two parallel sets of case statements below, one that checks to
5372# see if OPT was set and one that does BASECFLAGS setting based upon
5373# compiler and platform. BASECFLAGS tweaks need to be made even if the
5374# user set OPT.
5375
5376# tweak OPT based on compiler and platform, only if the user didn't set
5377# it on the command line
5378
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00005379if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005380then
5381 case $GCC in
5382 yes)
5383 if test "$CC" != 'g++' ; then
5384 STRICT_PROTO="-Wstrict-prototypes"
5385 fi
5386 # For gcc 4.x we need to use -fwrapv so lets check if its supported
5387 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
5388 WRAP="-fwrapv"
5389 fi
5390 case $ac_cv_prog_cc_g in
5391 yes)
5392 if test "$Py_DEBUG" = 'true' ; then
5393 # Optimization messes up debuggers, so turn it off for
5394 # debug builds.
Mark Dickinsonb2153e92010-05-05 22:31:36 +00005395 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005396 else
5397 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
5398 fi
5399 ;;
5400 *)
5401 OPT="-O3 -Wall $STRICT_PROTO"
5402 ;;
5403 esac
5404 case $ac_sys_system in
5405 SCO_SV*) OPT="$OPT -m486 -DSCO5"
5406 ;;
5407 esac
5408 ;;
5409
5410 *)
5411 OPT="-O"
5412 ;;
5413 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005414fi
5415
5416
5417
5418# The -arch flags for universal builds on OSX
5419UNIVERSAL_ARCH_FLAGS=
5420
5421
5422# tweak BASECFLAGS based on compiler and platform
5423case $GCC in
5424yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005425 # Python doesn't violate C99 aliasing rules, but older versions of
5426 # GCC produce warnings for legal Python code. Enable
5427 # -fno-strict-aliasing on versions of GCC that support but produce
5428 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00005429 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
5430$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005431 ac_save_cc="$CC"
5432 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005433 save_CFLAGS="$CFLAGS"
Benjamin Peterson316e02b2011-05-10 15:01:56 -05005434 if test "${ac_cv_no_strict_aliasing+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005435 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00005436else
Matthias Kloseb9621712010-04-24 17:59:49 +00005437 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005438/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005439
Matthias Kloseb159a552010-04-25 21:00:44 +00005440
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005441int
5442main ()
5443{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005444
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005445 ;
5446 return 0;
5447}
Matthias Kloseb159a552010-04-25 21:00:44 +00005448
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005449_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005450if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00005451
5452 CC="$ac_save_cc -fstrict-aliasing"
5453 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
5454 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005455/* end confdefs.h. */
5456
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005457 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005458int
5459main ()
5460{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005461double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005462 ;
5463 return 0;
5464}
Matthias Kloseb159a552010-04-25 21:00:44 +00005465
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005466_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005467if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00005468
5469 ac_cv_no_strict_aliasing=no
5470
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005471else
Matthias Kloseb159a552010-04-25 21:00:44 +00005472
5473 ac_cv_no_strict_aliasing=yes
5474
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005475fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005476rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00005477
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005478else
Matthias Kloseb159a552010-04-25 21:00:44 +00005479
5480 ac_cv_no_strict_aliasing=no
5481
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005482fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005483rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00005484fi
5485
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005486 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005487 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00005488 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
5489$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005490 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005491 then
5492 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
5493 fi
5494
5495 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
5496 # support. Without this, treatment of subnormals doesn't follow
5497 # the standard.
5498 case $ac_sys_machine in
5499 alpha*)
5500 BASECFLAGS="$BASECFLAGS -mieee"
5501 ;;
5502 esac
5503
5504 case $ac_sys_system in
5505 SCO_SV*)
5506 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
5507 ;;
5508 # is there any other compiler on Darwin besides gcc?
5509 Darwin*)
5510 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
5511 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussoren666028b2010-04-18 19:07:43 +00005512 if test "${CC}" = gcc
5513 then
Matthias Kloseb9621712010-04-24 17:59:49 +00005514 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
5515$as_echo_n "checking which compiler should be used... " >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00005516 case "${UNIVERSALSDK}" in
5517 */MacOSX10.4u.sdk)
5518 # Build using 10.4 SDK, force usage of gcc when the
5519 # compiler is gcc, otherwise the user will get very
5520 # confusing error messages when building on OSX 10.6
5521 CC=gcc-4.0
5522 CPP=cpp-4.0
5523 ;;
5524 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005525 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5526$as_echo "$CC" >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00005527 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005528
5529
5530 if test "${enable_universalsdk}"; then
5531 UNIVERSAL_ARCH_FLAGS=""
5532 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
5533 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
5534 ARCH_RUN_32BIT=""
Benjamin Peterson99f03762010-04-11 22:15:28 +00005535 LIPO_32BIT_FLAGS=""
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005536 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
5537 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005538 LIPO_32BIT_FLAGS=""
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005539 ARCH_RUN_32BIT="true"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005540
5541 elif test "$UNIVERSAL_ARCHS" = "all" ; then
5542 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005543 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005544 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005545
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005546 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
5547 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005548 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005549 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005550
5551 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
5552 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005553 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005554 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005555
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005556 else
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07005557 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 +00005558
5559 fi
5560
5561
Ronald Oussoren666028b2010-04-18 19:07:43 +00005562 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
5563 if test "${UNIVERSALSDK}" != "/"
5564 then
5565 CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
5566 LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren712979d2010-04-20 19:51:33 +00005567 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005568 fi
5569 fi
5570
5571 # Calculate the right deployment target for this build.
5572 #
5573 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
5574 if test ${cur_target} '>' 10.2; then
5575 cur_target=10.3
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005576 if test ${enable_universalsdk}; then
5577 if test "${UNIVERSAL_ARCHS}" = "all"; then
5578 # Ensure that the default platform for a
5579 # 4-way universal build is OSX 10.5,
5580 # that's the first OS release where
5581 # 4-way builds make sense.
5582 cur_target='10.5'
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005583
5584 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
5585 cur_target='10.5'
5586
5587 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
5588 cur_target='10.5'
5589
5590 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
5591 cur_target='10.5'
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005592 fi
5593 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00005594 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005595 # On Intel macs default to a deployment
5596 # target of 10.4, that's the first OSX
5597 # release with Intel support.
5598 cur_target="10.4"
5599 fi
5600 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005601 fi
5602 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
5603
5604 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
5605 # environment with a value that is the same as what we'll use
5606 # in the Makefile to ensure that we'll get the same compiler
5607 # environment during configure and build time.
5608 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
5609 export MACOSX_DEPLOYMENT_TARGET
5610 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
5611
5612 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005613 esac
5614 ;;
5615
5616*)
5617 case $ac_sys_system in
5618 OpenUNIX*|UnixWare*)
5619 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
5620 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005621 SCO_SV*)
5622 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
5623 ;;
5624 esac
5625 ;;
5626esac
5627
5628if test "$Py_DEBUG" = 'true'; then
5629 :
5630else
5631 OPT="-DNDEBUG $OPT"
5632fi
5633
5634if test "$ac_arch_flags"
5635then
5636 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
5637fi
5638
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005639# Check whether GCC supports PyArg_ParseTuple format
5640if test "$GCC" = "yes"
5641then
Matthias Kloseb9621712010-04-24 17:59:49 +00005642 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5
5643$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005644 save_CFLAGS=$CFLAGS
5645 CFLAGS="$CFLAGS -Werror"
Matthias Kloseb9621712010-04-24 17:59:49 +00005646 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005647/* end confdefs.h. */
5648
5649 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005650int
5651main ()
5652{
5653
5654 ;
5655 return 0;
5656}
Matthias Kloseb159a552010-04-25 21:00:44 +00005657
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005658_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005659if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005660
Matthias Kloseb159a552010-04-25 21:00:44 +00005661
Matthias Kloseb9621712010-04-24 17:59:49 +00005662$as_echo "#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005663
Matthias Kloseb159a552010-04-25 21:00:44 +00005664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00005665$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00005666
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005667else
Matthias Kloseb159a552010-04-25 21:00:44 +00005668
5669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00005670$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005671
5672fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005673rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5674 CFLAGS=$save_CFLAGS
5675fi
5676
5677# On some compilers, pthreads are available without further options
5678# (e.g. MacOS X). On some of these systems, the compiler will not
5679# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
5680# So we have to see first whether pthreads are available without
5681# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00005682{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
5683$as_echo_n "checking whether pthreads are available without options... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05005684if test "${ac_cv_pthread_is_default+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005685 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005686else
Matthias Kloseb9621712010-04-24 17:59:49 +00005687 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005688 ac_cv_pthread_is_default=no
5689else
Matthias Kloseb9621712010-04-24 17:59:49 +00005690 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005691/* end confdefs.h. */
5692
5693#include <pthread.h>
5694
5695void* routine(void* p){return NULL;}
5696
5697int main(){
5698 pthread_t p;
5699 if(pthread_create(&p,NULL,routine,NULL)!=0)
5700 return 1;
5701 (void)pthread_detach(p);
5702 return 0;
5703}
5704
5705_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005706if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005707
5708 ac_cv_pthread_is_default=yes
5709 ac_cv_kthread=no
5710 ac_cv_pthread=no
5711
5712else
Matthias Kloseb9621712010-04-24 17:59:49 +00005713 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005714fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005715rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5716 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005717fi
5718
5719
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005720fi
5721
Matthias Kloseb9621712010-04-24 17:59:49 +00005722{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
5723$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005724
5725
5726if test $ac_cv_pthread_is_default = yes
5727then
5728 ac_cv_kpthread=no
5729else
5730# -Kpthread, if available, provides the right #defines
5731# and linker options to make pthread_create available
5732# Some compilers won't report that they do not support -Kpthread,
5733# so we need to run a program to see whether it really made the
5734# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005735{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
5736$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05005737if test "${ac_cv_kpthread+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005738 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005739else
5740 ac_save_cc="$CC"
5741CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005742if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005743 ac_cv_kpthread=no
5744else
Matthias Kloseb9621712010-04-24 17:59:49 +00005745 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005746/* end confdefs.h. */
5747
5748#include <pthread.h>
5749
5750void* routine(void* p){return NULL;}
5751
5752int main(){
5753 pthread_t p;
5754 if(pthread_create(&p,NULL,routine,NULL)!=0)
5755 return 1;
5756 (void)pthread_detach(p);
5757 return 0;
5758}
5759
5760_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005761if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005762 ac_cv_kpthread=yes
5763else
Matthias Kloseb9621712010-04-24 17:59:49 +00005764 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005765fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005766rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5767 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005768fi
5769
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005770CC="$ac_save_cc"
5771fi
5772
Matthias Kloseb9621712010-04-24 17:59:49 +00005773{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
5774$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005775fi
5776
5777if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
5778then
5779# -Kthread, if available, provides the right #defines
5780# and linker options to make pthread_create available
5781# Some compilers won't report that they do not support -Kthread,
5782# so we need to run a program to see whether it really made the
5783# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005784{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
5785$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05005786if test "${ac_cv_kthread+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005787 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005788else
5789 ac_save_cc="$CC"
5790CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005791if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005792 ac_cv_kthread=no
5793else
Matthias Kloseb9621712010-04-24 17:59:49 +00005794 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005795/* end confdefs.h. */
5796
5797#include <pthread.h>
5798
5799void* routine(void* p){return NULL;}
5800
5801int main(){
5802 pthread_t p;
5803 if(pthread_create(&p,NULL,routine,NULL)!=0)
5804 return 1;
5805 (void)pthread_detach(p);
5806 return 0;
5807}
5808
5809_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005810if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005811 ac_cv_kthread=yes
5812else
Matthias Kloseb9621712010-04-24 17:59:49 +00005813 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005814fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005815rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5816 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005817fi
5818
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005819CC="$ac_save_cc"
5820fi
5821
Matthias Kloseb9621712010-04-24 17:59:49 +00005822{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
5823$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005824fi
5825
5826if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
5827then
5828# -pthread, if available, provides the right #defines
5829# and linker options to make pthread_create available
5830# Some compilers won't report that they do not support -pthread,
5831# so we need to run a program to see whether it really made the
5832# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005833{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
5834$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05005835if test "${ac_cv_thread+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005836 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005837else
5838 ac_save_cc="$CC"
5839CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005840if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005841 ac_cv_pthread=no
5842else
Matthias Kloseb9621712010-04-24 17:59:49 +00005843 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005844/* end confdefs.h. */
5845
5846#include <pthread.h>
5847
5848void* routine(void* p){return NULL;}
5849
5850int main(){
5851 pthread_t p;
5852 if(pthread_create(&p,NULL,routine,NULL)!=0)
5853 return 1;
5854 (void)pthread_detach(p);
5855 return 0;
5856}
5857
5858_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005859if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005860 ac_cv_pthread=yes
5861else
Matthias Kloseb9621712010-04-24 17:59:49 +00005862 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005863fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005864rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5865 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005866fi
5867
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005868CC="$ac_save_cc"
5869fi
5870
Matthias Kloseb9621712010-04-24 17:59:49 +00005871{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
5872$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005873fi
5874
5875# If we have set a CC compiler flag for thread support then
5876# check if it works for CXX, too.
5877ac_cv_cxx_thread=no
5878if test ! -z "$CXX"
5879then
Matthias Kloseb9621712010-04-24 17:59:49 +00005880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
5881$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005882ac_save_cxx="$CXX"
5883
5884if test "$ac_cv_kpthread" = "yes"
5885then
5886 CXX="$CXX -Kpthread"
5887 ac_cv_cxx_thread=yes
5888elif test "$ac_cv_kthread" = "yes"
5889then
5890 CXX="$CXX -Kthread"
5891 ac_cv_cxx_thread=yes
5892elif test "$ac_cv_pthread" = "yes"
5893then
5894 CXX="$CXX -pthread"
5895 ac_cv_cxx_thread=yes
5896fi
5897
5898if test $ac_cv_cxx_thread = yes
5899then
5900 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5901 $CXX -c conftest.$ac_ext 2>&5
5902 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5903 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5904 then
5905 ac_cv_cxx_thread=yes
5906 else
5907 ac_cv_cxx_thread=no
5908 fi
5909 rm -fr conftest*
5910fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005911{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
5912$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005913fi
5914CXX="$ac_save_cxx"
5915
5916
5917# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00005918{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5919$as_echo_n "checking for ANSI C header files... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05005920if test "${ac_cv_header_stdc+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005921 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005922else
Matthias Kloseb9621712010-04-24 17:59:49 +00005923 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005924/* end confdefs.h. */
5925#include <stdlib.h>
5926#include <stdarg.h>
5927#include <string.h>
5928#include <float.h>
5929
5930int
5931main ()
5932{
5933
5934 ;
5935 return 0;
5936}
5937_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005938if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005939 ac_cv_header_stdc=yes
5940else
Matthias Kloseb9621712010-04-24 17:59:49 +00005941 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005942fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005943rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5944
5945if test $ac_cv_header_stdc = yes; then
5946 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00005947 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005948/* end confdefs.h. */
5949#include <string.h>
5950
5951_ACEOF
5952if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005953 $EGREP "memchr" >/dev/null 2>&1; then :
5954
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005955else
5956 ac_cv_header_stdc=no
5957fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005958rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005959
5960fi
5961
5962if test $ac_cv_header_stdc = yes; then
5963 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00005964 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005965/* end confdefs.h. */
5966#include <stdlib.h>
5967
5968_ACEOF
5969if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005970 $EGREP "free" >/dev/null 2>&1; then :
5971
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005972else
5973 ac_cv_header_stdc=no
5974fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005975rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005976
5977fi
5978
5979if test $ac_cv_header_stdc = yes; then
5980 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00005981 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005982 :
5983else
Matthias Kloseb9621712010-04-24 17:59:49 +00005984 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005985/* end confdefs.h. */
5986#include <ctype.h>
5987#include <stdlib.h>
5988#if ((' ' & 0x0FF) == 0x020)
5989# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5990# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5991#else
5992# define ISLOWER(c) \
5993 (('a' <= (c) && (c) <= 'i') \
5994 || ('j' <= (c) && (c) <= 'r') \
5995 || ('s' <= (c) && (c) <= 'z'))
5996# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5997#endif
5998
5999#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6000int
6001main ()
6002{
6003 int i;
6004 for (i = 0; i < 256; i++)
6005 if (XOR (islower (i), ISLOWER (i))
6006 || toupper (i) != TOUPPER (i))
6007 return 2;
6008 return 0;
6009}
6010_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006011if ac_fn_c_try_run "$LINENO"; then :
6012
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006013else
Matthias Kloseb9621712010-04-24 17:59:49 +00006014 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006015fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006016rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6017 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006018fi
6019
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006020fi
6021fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006022{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6023$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006024if test $ac_cv_header_stdc = yes; then
6025
Matthias Kloseb9621712010-04-24 17:59:49 +00006026$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006027
6028fi
6029
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006030for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
6031fcntl.h grp.h \
Christian Heimesbbe741d2008-03-28 10:53:29 +00006032ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Thomas Wouters89f507f2006-12-13 04:49:30 +00006033shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00006034unistd.h utime.h \
Christian Heimes4fbc72b2008-03-22 00:47:35 +00006035sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
6036sys/lock.h sys/mkdev.h sys/modem.h \
Georg Brandl941f9562011-02-25 15:21:47 +00006037sys/param.h sys/poll.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
6038sys/stat.h sys/termio.h sys/time.h \
6039sys/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 -07006040libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Ronald Oussoren755740f2010-02-07 19:56:39 +00006041bluetooth/bluetooth.h linux/tipc.h spawn.h util.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006042do :
6043 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6044ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07006045if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006046 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006047#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006048_ACEOF
6049
6050fi
6051
Guido van Rossum627b2d71993-12-24 10:39:16 +00006052done
6053
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006054ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006055for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00006056 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
6058$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07006059if eval "test \"\${$as_ac_Header+set}\"" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006060 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006061else
Matthias Kloseb9621712010-04-24 17:59:49 +00006062 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006063/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006064#include <sys/types.h>
6065#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00006066
Martin v. Löwis11437992002-04-12 09:54:03 +00006067int
6068main ()
6069{
6070if ((DIR *) 0)
6071return 0;
6072 ;
6073 return 0;
6074}
6075_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006076if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006077 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00006078else
Matthias Kloseb9621712010-04-24 17:59:49 +00006079 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006080fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006081rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006082fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006083eval ac_res=\$$as_ac_Header
6084 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6085$as_echo "$ac_res" >&6; }
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07006086if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006087 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006088#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006089_ACEOF
6090
6091ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00006092fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006093
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006094done
6095# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6096if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006097 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6098$as_echo_n "checking for library containing opendir... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006099if test "${ac_cv_search_opendir+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006100 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006101else
Martin v. Löwis11437992002-04-12 09:54:03 +00006102 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006103cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006104/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006105
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006106/* Override any GCC internal prototype to avoid an error.
6107 Use char because int might match the return type of a GCC
6108 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006109#ifdef __cplusplus
6110extern "C"
6111#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006112char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006113int
6114main ()
6115{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006116return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006117 ;
6118 return 0;
6119}
6120_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006121for ac_lib in '' dir; do
6122 if test -z "$ac_lib"; then
6123 ac_res="none required"
6124 else
6125 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006126 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006127 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006128 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006129 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006130fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006131rm -f core conftest.err conftest.$ac_objext \
6132 conftest$ac_exeext
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006133 if test "${ac_cv_search_opendir+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006134 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006135fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006136done
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006137if test "${ac_cv_search_opendir+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006138
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006139else
6140 ac_cv_search_opendir=no
6141fi
6142rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006143LIBS=$ac_func_search_save_LIBS
6144fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006145{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6146$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006147ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006148if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006149 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00006150
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006151fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006152
Michael W. Hudson54241132001-12-07 15:38:26 +00006153else
Matthias Kloseb9621712010-04-24 17:59:49 +00006154 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6155$as_echo_n "checking for library containing opendir... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006156if test "${ac_cv_search_opendir+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006157 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006158else
6159 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006160cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006161/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006162
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006163/* Override any GCC internal prototype to avoid an error.
6164 Use char because int might match the return type of a GCC
6165 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006166#ifdef __cplusplus
6167extern "C"
6168#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006169char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006170int
6171main ()
6172{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006173return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006174 ;
6175 return 0;
6176}
6177_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006178for ac_lib in '' x; do
6179 if test -z "$ac_lib"; then
6180 ac_res="none required"
6181 else
6182 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006183 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006184 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006185 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006186 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006187fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006188rm -f core conftest.err conftest.$ac_objext \
6189 conftest$ac_exeext
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006190 if test "${ac_cv_search_opendir+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006191 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006192fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006193done
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006194if test "${ac_cv_search_opendir+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006195
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006196else
6197 ac_cv_search_opendir=no
6198fi
6199rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006200LIBS=$ac_func_search_save_LIBS
6201fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006202{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6203$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006204ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006205if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006206 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006207
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006208fi
6209
6210fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006211
Matthias Kloseb9621712010-04-24 17:59:49 +00006212{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
6213$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006214if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006215 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006216else
Matthias Kloseb9621712010-04-24 17:59:49 +00006217 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006218/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006219#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006220int
6221main ()
6222{
6223return makedev(0, 0);
6224 ;
6225 return 0;
6226}
6227_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006228if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006229 ac_cv_header_sys_types_h_makedev=yes
6230else
Matthias Kloseb9621712010-04-24 17:59:49 +00006231 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006232fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006233rm -f core conftest.err conftest.$ac_objext \
6234 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006235
6236fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006237{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
6238$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006239
6240if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006241ac_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 -05006242if test "x$ac_cv_header_sys_mkdev_h" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006243
Matthias Kloseb9621712010-04-24 17:59:49 +00006244$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006245
6246fi
6247
6248
6249
6250 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006251 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 -05006252if test "x$ac_cv_header_sys_sysmacros_h" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006253
Matthias Kloseb9621712010-04-24 17:59:49 +00006254$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006255
6256fi
6257
6258
6259 fi
6260fi
6261
Michael W. Hudson54241132001-12-07 15:38:26 +00006262
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07006263# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
6264for ac_header in net/if.h
6265do :
6266 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
6267#ifdef STDC_HEADERS
6268# include <stdlib.h>
6269# include <stddef.h>
6270#else
6271# ifdef HAVE_STDLIB_H
6272# include <stdlib.h>
6273# endif
6274#endif
6275#ifdef HAVE_SYS_SOCKET_H
6276# include <sys/socket.h>
6277#endif
6278
6279"
6280if test "x$ac_cv_header_net_if_h" = x""yes; then :
6281 cat >>confdefs.h <<_ACEOF
6282#define HAVE_NET_IF_H 1
6283_ACEOF
6284
6285fi
6286
6287done
6288
6289
6290
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006291# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006292for ac_header in term.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006293do :
6294 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006295#ifdef HAVE_CURSES_H
6296#include <curses.h>
6297#endif
6298
Matthias Kloseb9621712010-04-24 17:59:49 +00006299"
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006300if test "x$ac_cv_header_term_h" = x""yes; then :
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006301 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006302#define HAVE_TERM_H 1
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006303_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006304
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006305fi
6306
6307done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006308
6309
Martin v. Löwis11017b12006-01-14 18:12:57 +00006310# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00006311for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006312do :
6313 ac_fn_c_check_header_compile "$LINENO" "linux/netlink.h" "ac_cv_header_linux_netlink_h" "
Martin v. Löwis11017b12006-01-14 18:12:57 +00006314#ifdef HAVE_ASM_TYPES_H
6315#include <asm/types.h>
6316#endif
6317#ifdef HAVE_SYS_SOCKET_H
6318#include <sys/socket.h>
6319#endif
6320
Matthias Kloseb9621712010-04-24 17:59:49 +00006321"
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006322if test "x$ac_cv_header_linux_netlink_h" = x""yes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00006323 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006324#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006325_ACEOF
6326
6327fi
6328
6329done
6330
6331
Guido van Rossum627b2d71993-12-24 10:39:16 +00006332# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006333was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006334{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
6335$as_echo_n "checking for clock_t in time.h... " >&6; }
6336cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006337/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006338#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006339
6340_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006341if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006342 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00006343 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006344else
Martin v. Löwis11437992002-04-12 09:54:03 +00006345
6346
Matthias Kloseb9621712010-04-24 17:59:49 +00006347$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00006348
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006349
Guido van Rossum627b2d71993-12-24 10:39:16 +00006350fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006351rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006352
Matthias Kloseb9621712010-04-24 17:59:49 +00006353{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
6354$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006355
Matthias Kloseb9621712010-04-24 17:59:49 +00006356{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
6357$as_echo_n "checking for makedev... " >&6; }
6358cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006359/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00006360
Jesus Cea740f53a2010-04-28 11:35:30 +00006361#if defined(MAJOR_IN_MKDEV)
6362#include <sys/mkdev.h>
6363#elif defined(MAJOR_IN_SYSMACROS)
6364#include <sys/sysmacros.h>
6365#else
6366#include <sys/types.h>
6367#endif
6368
Neal Norwitz11690112002-07-30 01:08:28 +00006369int
6370main ()
6371{
Jesus Cea740f53a2010-04-28 11:35:30 +00006372
6373 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00006374 ;
6375 return 0;
6376}
Matthias Kloseb159a552010-04-25 21:00:44 +00006377
Neal Norwitz11690112002-07-30 01:08:28 +00006378_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006379if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006380 ac_cv_has_makedev=yes
6381else
Matthias Kloseb9621712010-04-24 17:59:49 +00006382 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006383fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006384rm -f core conftest.err conftest.$ac_objext \
6385 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006386{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
6387$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006388if test "$ac_cv_has_makedev" = "yes"; then
6389
Matthias Kloseb9621712010-04-24 17:59:49 +00006390$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006391
6392fi
6393
Martin v. Löwis399a6892002-10-04 10:22:02 +00006394# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6395# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6396# defined, but the compiler does not support pragma redefine_extname,
6397# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6398# structures (such as rlimit64) without declaring them. As a
6399# work-around, disable LFS on such configurations
6400
6401use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00006402{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
6403$as_echo_n "checking Solaris LFS bug... " >&6; }
6404cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006405/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006406
6407#define _LARGEFILE_SOURCE 1
6408#define _FILE_OFFSET_BITS 64
6409#include <sys/resource.h>
6410
Martin v. Löwis399a6892002-10-04 10:22:02 +00006411int
6412main ()
6413{
6414struct rlimit foo;
6415 ;
6416 return 0;
6417}
6418_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006419if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00006420 sol_lfs_bug=no
6421else
Matthias Kloseb9621712010-04-24 17:59:49 +00006422 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006423fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006424rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006425{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
6426$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006427if test "$sol_lfs_bug" = "yes"; then
6428 use_lfs=no
6429fi
6430
6431if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006432# Two defines needed to enable largefile support on various platforms
6433# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00006434case $ac_sys_system/$ac_sys_release in
6435AIX*)
6436
6437$as_echo "#define _LARGE_FILES 1" >>confdefs.h
6438
6439 ;;
6440esac
Guido van Rossum810cc512001-09-09 23:51:39 +00006441
Matthias Kloseb9621712010-04-24 17:59:49 +00006442$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006443
6444
Matthias Kloseb9621712010-04-24 17:59:49 +00006445$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00006446
Martin v. Löwis399a6892002-10-04 10:22:02 +00006447fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006448
Guido van Rossum84e7b241996-08-19 21:59:00 +00006449# Add some code to confdefs.h so that the test for off_t works on SCO
6450cat >> confdefs.h <<\EOF
6451#if defined(SCO_DS)
6452#undef _OFF_T
6453#endif
6454EOF
6455
Guido van Rossumef2255b2000-03-10 22:30:29 +00006456# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00006457ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006458if test "x$ac_cv_type_mode_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006459
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006460else
Martin v. Löwis11437992002-04-12 09:54:03 +00006461
6462cat >>confdefs.h <<_ACEOF
6463#define mode_t int
6464_ACEOF
6465
6466fi
6467
Matthias Kloseb9621712010-04-24 17:59:49 +00006468ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006469if test "x$ac_cv_type_off_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006470
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006471else
Martin v. Löwis11437992002-04-12 09:54:03 +00006472
6473cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006474#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006475_ACEOF
6476
6477fi
6478
Matthias Kloseb9621712010-04-24 17:59:49 +00006479ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006480if test "x$ac_cv_type_pid_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006481
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006482else
Martin v. Löwis11437992002-04-12 09:54:03 +00006483
6484cat >>confdefs.h <<_ACEOF
6485#define pid_t int
6486_ACEOF
6487
6488fi
6489
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006490
Martin v. Löwis11437992002-04-12 09:54:03 +00006491cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00006492#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00006493_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006494
Matthias Kloseb9621712010-04-24 17:59:49 +00006495ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006496if test "x$ac_cv_type_size_t" = x""yes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006497
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006498else
Martin v. Löwis11437992002-04-12 09:54:03 +00006499
6500cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006501#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00006502_ACEOF
6503
6504fi
6505
Matthias Kloseb9621712010-04-24 17:59:49 +00006506{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
6507$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006508if test "${ac_cv_type_uid_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006509 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006510else
Matthias Kloseb9621712010-04-24 17:59:49 +00006511 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006512/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006513#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006514
6515_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006516if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006517 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006518 ac_cv_type_uid_t=yes
6519else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006520 ac_cv_type_uid_t=no
6521fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006522rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006523
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006524fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006525{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
6526$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00006527if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006528
Matthias Kloseb9621712010-04-24 17:59:49 +00006529$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006530
6531
Matthias Kloseb9621712010-04-24 17:59:49 +00006532$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006533
6534fi
6535
Matthias Kloseb9621712010-04-24 17:59:49 +00006536ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
6537case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006538 no|yes) ;; #(
6539 *)
6540
Matthias Kloseb9621712010-04-24 17:59:49 +00006541$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006542
6543
6544cat >>confdefs.h <<_ACEOF
6545#define uint32_t $ac_cv_c_uint32_t
6546_ACEOF
6547;;
6548 esac
6549
Matthias Kloseb9621712010-04-24 17:59:49 +00006550ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
6551case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006552 no|yes) ;; #(
6553 *)
6554
Matthias Kloseb9621712010-04-24 17:59:49 +00006555$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006556
6557
6558cat >>confdefs.h <<_ACEOF
6559#define uint64_t $ac_cv_c_uint64_t
6560_ACEOF
6561;;
6562 esac
6563
Matthias Kloseb9621712010-04-24 17:59:49 +00006564ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
6565case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006566 no|yes) ;; #(
6567 *)
6568
6569cat >>confdefs.h <<_ACEOF
6570#define int32_t $ac_cv_c_int32_t
6571_ACEOF
6572;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00006573esac
6574
Matthias Kloseb9621712010-04-24 17:59:49 +00006575ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
6576case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006577 no|yes) ;; #(
6578 *)
6579
6580cat >>confdefs.h <<_ACEOF
6581#define int64_t $ac_cv_c_int64_t
6582_ACEOF
6583;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006584esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00006585
Matthias Kloseb9621712010-04-24 17:59:49 +00006586ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006587if test "x$ac_cv_type_ssize_t" = x""yes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006588
Matthias Kloseb9621712010-04-24 17:59:49 +00006589$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00006590
6591fi
6592
Jack Jansendd19cf82001-12-06 22:36:17 +00006593
Michael W. Hudson54241132001-12-07 15:38:26 +00006594# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00006595# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006596# The cast to long int works around a bug in the HP C Compiler
6597# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6598# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6599# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
6601$as_echo_n "checking size of int... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006602if test "${ac_cv_sizeof_int+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006603 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006604else
Matthias Kloseb9621712010-04-24 17:59:49 +00006605 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 +00006606
Martin v. Löwis11437992002-04-12 09:54:03 +00006607else
Matthias Kloseb9621712010-04-24 17:59:49 +00006608 if test "$ac_cv_type_int" = yes; then
6609 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6610$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07006611as_fn_error 77 "cannot compute sizeof (int)
6612See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006613 else
6614 ac_cv_sizeof_int=0
6615 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006616fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006617
Martin v. Löwis11437992002-04-12 09:54:03 +00006618fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006619{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
6620$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006621
6622
6623
Martin v. Löwis11437992002-04-12 09:54:03 +00006624cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006625#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00006626_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006627
6628
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006629# The cast to long int works around a bug in the HP C Compiler
6630# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6631# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6632# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006633{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
6634$as_echo_n "checking size of long... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006635if test "${ac_cv_sizeof_long+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006636 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006637else
Matthias Kloseb9621712010-04-24 17:59:49 +00006638 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 +00006639
Martin v. Löwis11437992002-04-12 09:54:03 +00006640else
Matthias Kloseb9621712010-04-24 17:59:49 +00006641 if test "$ac_cv_type_long" = yes; then
6642 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6643$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07006644as_fn_error 77 "cannot compute sizeof (long)
6645See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006646 else
6647 ac_cv_sizeof_long=0
6648 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006649fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006650
Martin v. Löwis11437992002-04-12 09:54:03 +00006651fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006652{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
6653$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006654
6655
6656
Martin v. Löwis11437992002-04-12 09:54:03 +00006657cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006658#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006659_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006660
6661
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006662# The cast to long int works around a bug in the HP C Compiler
6663# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6664# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6665# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
6667$as_echo_n "checking size of void *... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006668if test "${ac_cv_sizeof_void_p+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006669 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006670else
Matthias Kloseb9621712010-04-24 17:59:49 +00006671 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 +00006672
Martin v. Löwis11437992002-04-12 09:54:03 +00006673else
Matthias Kloseb9621712010-04-24 17:59:49 +00006674 if test "$ac_cv_type_void_p" = yes; then
6675 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6676$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07006677as_fn_error 77 "cannot compute sizeof (void *)
6678See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006679 else
6680 ac_cv_sizeof_void_p=0
6681 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006682fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006683
Martin v. Löwis11437992002-04-12 09:54:03 +00006684fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006685{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
6686$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006687
6688
6689
Martin v. Löwis11437992002-04-12 09:54:03 +00006690cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006691#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00006692_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006693
6694
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006695# The cast to long int works around a bug in the HP C Compiler
6696# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6697# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6698# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006699{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
6700$as_echo_n "checking size of short... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006701if test "${ac_cv_sizeof_short+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006702 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006703else
Matthias Kloseb9621712010-04-24 17:59:49 +00006704 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 +00006705
Martin v. Löwis11437992002-04-12 09:54:03 +00006706else
Matthias Kloseb9621712010-04-24 17:59:49 +00006707 if test "$ac_cv_type_short" = yes; then
6708 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6709$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07006710as_fn_error 77 "cannot compute sizeof (short)
6711See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006712 else
6713 ac_cv_sizeof_short=0
6714 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006715fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006716
Martin v. Löwis11437992002-04-12 09:54:03 +00006717fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006718{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
6719$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006720
6721
6722
Martin v. Löwis11437992002-04-12 09:54:03 +00006723cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006724#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00006725_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006726
6727
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006728# The cast to long int works around a bug in the HP C Compiler
6729# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6730# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6731# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
6733$as_echo_n "checking size of float... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006734if test "${ac_cv_sizeof_float+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006735 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006736else
Matthias Kloseb9621712010-04-24 17:59:49 +00006737 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 +00006738
Martin v. Löwis11437992002-04-12 09:54:03 +00006739else
Matthias Kloseb9621712010-04-24 17:59:49 +00006740 if test "$ac_cv_type_float" = yes; then
6741 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6742$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07006743as_fn_error 77 "cannot compute sizeof (float)
6744See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006745 else
6746 ac_cv_sizeof_float=0
6747 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006748fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006749
Martin v. Löwis11437992002-04-12 09:54:03 +00006750fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006751{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
6752$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006753
6754
6755
Martin v. Löwis11437992002-04-12 09:54:03 +00006756cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006757#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00006758_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006759
6760
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006761# The cast to long int works around a bug in the HP C Compiler
6762# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6763# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6764# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006765{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
6766$as_echo_n "checking size of double... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006767if test "${ac_cv_sizeof_double+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006768 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006769else
Matthias Kloseb9621712010-04-24 17:59:49 +00006770 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 +00006771
Martin v. Löwis11437992002-04-12 09:54:03 +00006772else
Matthias Kloseb9621712010-04-24 17:59:49 +00006773 if test "$ac_cv_type_double" = yes; then
6774 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6775$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07006776as_fn_error 77 "cannot compute sizeof (double)
6777See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006778 else
6779 ac_cv_sizeof_double=0
6780 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006781fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006782
Martin v. Löwis11437992002-04-12 09:54:03 +00006783fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006784{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
6785$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006786
6787
6788
Martin v. Löwis11437992002-04-12 09:54:03 +00006789cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006790#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00006791_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006792
6793
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006794# The cast to long int works around a bug in the HP C Compiler
6795# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6796# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6797# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006798{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
6799$as_echo_n "checking size of fpos_t... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006800if test "${ac_cv_sizeof_fpos_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006801 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006802else
Matthias Kloseb9621712010-04-24 17:59:49 +00006803 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 +00006804
Martin v. Löwis11437992002-04-12 09:54:03 +00006805else
Matthias Kloseb9621712010-04-24 17:59:49 +00006806 if test "$ac_cv_type_fpos_t" = yes; then
6807 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6808$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07006809as_fn_error 77 "cannot compute sizeof (fpos_t)
6810See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006811 else
6812 ac_cv_sizeof_fpos_t=0
6813 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006814fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006815
Martin v. Löwis11437992002-04-12 09:54:03 +00006816fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006817{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
6818$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006819
6820
6821
Martin v. Löwis11437992002-04-12 09:54:03 +00006822cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006823#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00006824_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006825
Michael W. Hudson54241132001-12-07 15:38:26 +00006826
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006827# The cast to long int works around a bug in the HP C Compiler
6828# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6829# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6830# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
6832$as_echo_n "checking size of size_t... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006833if test "${ac_cv_sizeof_size_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006834 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00006835else
Matthias Kloseb9621712010-04-24 17:59:49 +00006836 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 +00006837
Martin v. Löwis18e16552006-02-15 17:27:45 +00006838else
Matthias Kloseb9621712010-04-24 17:59:49 +00006839 if test "$ac_cv_type_size_t" = yes; then
6840 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6841$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07006842as_fn_error 77 "cannot compute sizeof (size_t)
6843See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006844 else
6845 ac_cv_sizeof_size_t=0
6846 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00006847fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006848
Martin v. Löwis18e16552006-02-15 17:27:45 +00006849fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006850{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
6851$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006852
6853
6854
Martin v. Löwis18e16552006-02-15 17:27:45 +00006855cat >>confdefs.h <<_ACEOF
6856#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
6857_ACEOF
6858
6859
Christian Heimes400adb02008-02-01 08:12:03 +00006860# The cast to long int works around a bug in the HP C Compiler
6861# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6862# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6863# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006864{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
6865$as_echo_n "checking size of pid_t... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006866if test "${ac_cv_sizeof_pid_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006867 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00006868else
Matthias Kloseb9621712010-04-24 17:59:49 +00006869 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 +00006870
Christian Heimes400adb02008-02-01 08:12:03 +00006871else
Matthias Kloseb9621712010-04-24 17:59:49 +00006872 if test "$ac_cv_type_pid_t" = yes; then
6873 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6874$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07006875as_fn_error 77 "cannot compute sizeof (pid_t)
6876See \`config.log' for more details" "$LINENO" 5 ; }
Christian Heimes400adb02008-02-01 08:12:03 +00006877 else
6878 ac_cv_sizeof_pid_t=0
6879 fi
6880fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006881
Christian Heimes400adb02008-02-01 08:12:03 +00006882fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006883{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
6884$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00006885
6886
6887
6888cat >>confdefs.h <<_ACEOF
6889#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
6890_ACEOF
6891
6892
Michael W. Hudson54241132001-12-07 15:38:26 +00006893
Matthias Kloseb9621712010-04-24 17:59:49 +00006894{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
6895$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006896have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006897cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006898/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006899
Martin v. Löwis11437992002-04-12 09:54:03 +00006900int
6901main ()
6902{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006903long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00006904 ;
6905 return 0;
6906}
6907_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006908if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006909
6910
Matthias Kloseb9621712010-04-24 17:59:49 +00006911$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006912
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006913 have_long_long=yes
6914
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006915fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006916rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006917{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
6918$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00006919if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006920# The cast to long int works around a bug in the HP C Compiler
6921# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6922# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6923# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006924{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
6925$as_echo_n "checking size of long long... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006926if test "${ac_cv_sizeof_long_long+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006927 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006928else
Matthias Kloseb9621712010-04-24 17:59:49 +00006929 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 +00006930
Martin v. Löwis11437992002-04-12 09:54:03 +00006931else
Matthias Kloseb9621712010-04-24 17:59:49 +00006932 if test "$ac_cv_type_long_long" = yes; then
6933 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6934$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07006935as_fn_error 77 "cannot compute sizeof (long long)
6936See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006937 else
6938 ac_cv_sizeof_long_long=0
6939 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006940fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006941
Martin v. Löwis11437992002-04-12 09:54:03 +00006942fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006943{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
6944$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006945
6946
6947
Martin v. Löwis11437992002-04-12 09:54:03 +00006948cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006949#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006950_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006951
Michael W. Hudson54241132001-12-07 15:38:26 +00006952
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006953fi
6954
Matthias Kloseb9621712010-04-24 17:59:49 +00006955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
6956$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006957have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006958cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006959/* end confdefs.h. */
6960
6961int
6962main ()
6963{
6964long double x; x = (long double)0;
6965 ;
6966 return 0;
6967}
6968_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006969if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006970
6971
Matthias Kloseb9621712010-04-24 17:59:49 +00006972$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006973
6974 have_long_double=yes
6975
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006976fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006977rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006978{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
6979$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006980if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006981# The cast to long int works around a bug in the HP C Compiler
6982# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6983# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6984# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006985{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
6986$as_echo_n "checking size of long double... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05006987if test "${ac_cv_sizeof_long_double+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006988 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006989else
Matthias Kloseb9621712010-04-24 17:59:49 +00006990 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 +00006991
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006992else
Matthias Kloseb9621712010-04-24 17:59:49 +00006993 if test "$ac_cv_type_long_double" = yes; then
6994 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6995$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07006996as_fn_error 77 "cannot compute sizeof (long double)
6997See \`config.log' for more details" "$LINENO" 5 ; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006998 else
6999 ac_cv_sizeof_long_double=0
7000 fi
7001fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007002
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007003fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007004{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
7005$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007006
7007
7008
7009cat >>confdefs.h <<_ACEOF
7010#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
7011_ACEOF
7012
7013
7014fi
7015
7016
Matthias Kloseb9621712010-04-24 17:59:49 +00007017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
7018$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007019have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007020cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00007021/* end confdefs.h. */
7022
7023int
7024main ()
7025{
7026_Bool x; x = (_Bool)0;
7027 ;
7028 return 0;
7029}
7030_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007031if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00007032
7033
Matthias Kloseb9621712010-04-24 17:59:49 +00007034$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00007035
7036 have_c99_bool=yes
7037
Thomas Woutersb2137042007-02-01 18:02:27 +00007038fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007039rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007040{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
7041$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007042if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007043# The cast to long int works around a bug in the HP C Compiler
7044# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7045# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7046# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007047{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
7048$as_echo_n "checking size of _Bool... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05007049if test "${ac_cv_sizeof__Bool+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007050 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00007051else
Matthias Kloseb9621712010-04-24 17:59:49 +00007052 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 +00007053
Thomas Woutersb2137042007-02-01 18:02:27 +00007054else
Matthias Kloseb9621712010-04-24 17:59:49 +00007055 if test "$ac_cv_type__Bool" = yes; then
7056 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7057$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07007058as_fn_error 77 "cannot compute sizeof (_Bool)
7059See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007060 else
7061 ac_cv_sizeof__Bool=0
7062 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00007063fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007064
Thomas Woutersb2137042007-02-01 18:02:27 +00007065fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007066{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
7067$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007068
7069
7070
Thomas Woutersb2137042007-02-01 18:02:27 +00007071cat >>confdefs.h <<_ACEOF
7072#define SIZEOF__BOOL $ac_cv_sizeof__Bool
7073_ACEOF
7074
7075
7076fi
7077
Matthias Kloseb9621712010-04-24 17:59:49 +00007078ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00007079 #include <stdint.h>
7080 #endif
Antoine Pitrou1bf29b72010-10-10 08:10:16 +00007081 #ifdef HAVE_INTTYPES_H
7082 #include <inttypes.h>
7083 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00007084"
Benjamin Peterson316e02b2011-05-10 15:01:56 -05007085if test "x$ac_cv_type_uintptr_t" = x""yes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00007086
7087cat >>confdefs.h <<_ACEOF
7088#define HAVE_UINTPTR_T 1
7089_ACEOF
7090
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007091# The cast to long int works around a bug in the HP C Compiler
7092# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7093# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7094# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007095{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
7096$as_echo_n "checking size of uintptr_t... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05007097if test "${ac_cv_sizeof_uintptr_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007098 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007099else
Matthias Kloseb9621712010-04-24 17:59:49 +00007100 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 +00007101
Martin v. Löwis11437992002-04-12 09:54:03 +00007102else
Matthias Kloseb9621712010-04-24 17:59:49 +00007103 if test "$ac_cv_type_uintptr_t" = yes; then
7104 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7105$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07007106as_fn_error 77 "cannot compute sizeof (uintptr_t)
7107See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007108 else
7109 ac_cv_sizeof_uintptr_t=0
7110 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007111fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007112
Martin v. Löwis11437992002-04-12 09:54:03 +00007113fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007114{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
7115$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007116
7117
7118
Martin v. Löwis11437992002-04-12 09:54:03 +00007119cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007120#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007121_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007122
Michael W. Hudson54241132001-12-07 15:38:26 +00007123
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007124fi
7125
Thomas Wouters89f507f2006-12-13 04:49:30 +00007126
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007127# The cast to long int works around a bug in the HP C Compiler
7128# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7129# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7130# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
7132$as_echo_n "checking size of off_t... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05007133if test "${ac_cv_sizeof_off_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007134 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007135else
Matthias Kloseb9621712010-04-24 17:59:49 +00007136 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007137#ifdef HAVE_SYS_TYPES_H
7138#include <sys/types.h>
7139#endif
7140
Matthias Kloseb9621712010-04-24 17:59:49 +00007141"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007142
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007143else
Matthias Kloseb9621712010-04-24 17:59:49 +00007144 if test "$ac_cv_type_off_t" = yes; then
7145 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7146$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07007147as_fn_error 77 "cannot compute sizeof (off_t)
7148See \`config.log' for more details" "$LINENO" 5 ; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007149 else
7150 ac_cv_sizeof_off_t=0
7151 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007152fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007153
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007154fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007155{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
7156$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007157
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007158
7159
Martin v. Löwis11437992002-04-12 09:54:03 +00007160cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007161#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007162_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007163
Michael W. Hudson54241132001-12-07 15:38:26 +00007164
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007165
Matthias Kloseb9621712010-04-24 17:59:49 +00007166{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
7167$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007168if test "$have_long_long" = yes
7169then
7170if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007171 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007172
Matthias Kloseb9621712010-04-24 17:59:49 +00007173$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007174
Matthias Kloseb9621712010-04-24 17:59:49 +00007175 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7176$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007177else
Matthias Kloseb9621712010-04-24 17:59:49 +00007178 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7179$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007180fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00007181else
Matthias Kloseb9621712010-04-24 17:59:49 +00007182 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7183$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007184fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007185
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007186# The cast to long int works around a bug in the HP C Compiler
7187# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7188# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7189# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007190{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
7191$as_echo_n "checking size of time_t... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05007192if test "${ac_cv_sizeof_time_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007193 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007194else
Matthias Kloseb9621712010-04-24 17:59:49 +00007195 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007196#ifdef HAVE_SYS_TYPES_H
7197#include <sys/types.h>
7198#endif
7199#ifdef HAVE_TIME_H
7200#include <time.h>
7201#endif
7202
Matthias Kloseb9621712010-04-24 17:59:49 +00007203"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007204
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007205else
Matthias Kloseb9621712010-04-24 17:59:49 +00007206 if test "$ac_cv_type_time_t" = yes; then
7207 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7208$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07007209as_fn_error 77 "cannot compute sizeof (time_t)
7210See \`config.log' for more details" "$LINENO" 5 ; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007211 else
7212 ac_cv_sizeof_time_t=0
7213 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007214fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007215
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007216fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007217{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
7218$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007219
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007220
7221
Martin v. Löwis11437992002-04-12 09:54:03 +00007222cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007223#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007224_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007225
Michael W. Hudson54241132001-12-07 15:38:26 +00007226
7227
Trent Mick635f6fb2000-08-23 21:33:05 +00007228# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007229ac_save_cc="$CC"
7230if test "$ac_cv_kpthread" = "yes"
7231then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00007232elif test "$ac_cv_kthread" = "yes"
7233then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00007234elif test "$ac_cv_pthread" = "yes"
7235then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007236fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007237
Matthias Kloseb9621712010-04-24 17:59:49 +00007238{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
7239$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007240have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007241cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007242/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007243
7244 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007245int
7246main ()
7247{
Guido van Rossum12580492000-09-24 16:47:19 +00007248pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007249 ;
7250 return 0;
7251}
Matthias Kloseb159a552010-04-25 21:00:44 +00007252
Martin v. Löwis11437992002-04-12 09:54:03 +00007253_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007254if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00007255 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00007256fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007257rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007258{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
7259$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007260if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007261 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007262# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7263# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7264# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007265{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
7266$as_echo_n "checking size of pthread_t... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05007267if test "${ac_cv_sizeof_pthread_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007268 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007269else
Matthias Kloseb9621712010-04-24 17:59:49 +00007270 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007271#ifdef HAVE_PTHREAD_H
7272#include <pthread.h>
7273#endif
7274
Matthias Kloseb9621712010-04-24 17:59:49 +00007275"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007276
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007277else
Matthias Kloseb9621712010-04-24 17:59:49 +00007278 if test "$ac_cv_type_pthread_t" = yes; then
7279 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7280$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07007281as_fn_error 77 "cannot compute sizeof (pthread_t)
7282See \`config.log' for more details" "$LINENO" 5 ; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007283 else
7284 ac_cv_sizeof_pthread_t=0
7285 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00007286fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007287
Trent Mick635f6fb2000-08-23 21:33:05 +00007288fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007289{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
7290$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007291
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007292
7293
Martin v. Löwis11437992002-04-12 09:54:03 +00007294cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007295#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007296_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007297
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007298
Trent Mick635f6fb2000-08-23 21:33:05 +00007299fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007300CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00007301
Michael W. Hudson54241132001-12-07 15:38:26 +00007302
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007303case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007304 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007305 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
7306 ;;
7307 Darwin/*)
7308 OTHER_LIBTOOL_OPT=""
7309 ;;
7310esac
7311
7312
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007313ARCH_RUN_32BIT=""
7314
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007315case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007316 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00007317 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
7318 if test "${enable_universalsdk}"; then
7319 :
7320 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007321 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007322 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00007323 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007324 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00007325 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00007326 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007327 if test ${gcc_version} '<' 4.0
7328 then
7329 LIBTOOL_CRUFT="-lcc_dynamic"
7330 else
7331 LIBTOOL_CRUFT=""
7332 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007333 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007334 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007335else
Matthias Kloseb9621712010-04-24 17:59:49 +00007336 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007337/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007338
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007339 #include <unistd.h>
7340 int main(int argc, char*argv[])
7341 {
7342 if (sizeof(long) == 4) {
7343 return 0;
7344 } else {
7345 return 1;
7346 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007347 }
7348
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007349_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007350if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007351 ac_osx_32bit=yes
7352else
Matthias Kloseb9621712010-04-24 17:59:49 +00007353 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007354fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007355rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7356 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007357fi
7358
7359
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007360 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007361 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007362 i386)
7363 MACOSX_DEFAULT_ARCH="i386"
7364 ;;
7365 ppc)
7366 MACOSX_DEFAULT_ARCH="ppc"
7367 ;;
7368 *)
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07007369 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007370 ;;
7371 esac
7372 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007373 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007374 i386)
7375 MACOSX_DEFAULT_ARCH="x86_64"
7376 ;;
7377 ppc)
7378 MACOSX_DEFAULT_ARCH="ppc64"
7379 ;;
7380 *)
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07007381 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007382 ;;
7383 esac
7384
7385 #ARCH_RUN_32BIT="true"
7386 fi
7387
7388 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00007389 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007390 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007391esac
7392
Matthias Kloseb9621712010-04-24 17:59:49 +00007393{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
7394$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007395if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007396then
Skip Montanarodecc6a42003-01-01 20:07:49 +00007397 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00007398 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00007399 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007400
Matthias Kloseb9621712010-04-24 17:59:49 +00007401$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007402
Matthias Kloseb9621712010-04-24 17:59:49 +00007403 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7404$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00007405 if test $enable_shared = "yes"
7406 then
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07007407 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 +00007408 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007409else
Matthias Kloseb9621712010-04-24 17:59:49 +00007410 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7411$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007412fi
7413
Matthias Kloseb9621712010-04-24 17:59:49 +00007414{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
7415$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007416case $ac_sys_system/$ac_sys_release in
7417 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007418
Matthias Kloseb9621712010-04-24 17:59:49 +00007419$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007420
Matthias Kloseb9621712010-04-24 17:59:49 +00007421 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
7422$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007423 ;;
7424 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00007425 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7426$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007427 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007428esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007429
Guido van Rossum0a516c91994-09-12 10:58:40 +00007430# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00007431
Michael W. Hudson54241132001-12-07 15:38:26 +00007432
7433
7434
7435
Benjamin Peterson99f03762010-04-11 22:15:28 +00007436
Thomas Wouters477c8d52006-05-27 19:21:47 +00007437
Georg Brandlb1441c72009-01-03 22:33:39 +00007438
Thomas Wouters477c8d52006-05-27 19:21:47 +00007439cat >>confdefs.h <<_ACEOF
7440#define SHLIB_EXT "$SO"
7441_ACEOF
7442
Guido van Rossum0a516c91994-09-12 10:58:40 +00007443# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00007444# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007445# (Shared libraries in this instance are shared modules to be loaded into
7446# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00007447{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
7448$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007449if test -z "$LDSHARED"
7450then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007451 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007452 AIX*)
Georg Brandl9a829be2011-02-15 15:44:51 +00007453 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00007454 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007455 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00007456 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00007457 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00007458 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007459 if test "$GCC" = "yes" ; then
7460 LDSHARED='$(CC) -shared'
7461 LDCXXSHARED='$(CXX) -shared'
7462 else
7463 LDSHARED='$(CC) -G'
7464 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00007465 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007466 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007467 if test "$GCC" = "yes" ; then
7468 LDSHARED='$(CC) -shared'
7469 LDCXXSHARED='$(CXX) -shared'
7470 else
7471 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007472 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00007473 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007474 LDSHARED='$(CC) -bundle'
7475 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00007476 if test "$enable_framework" ; then
7477 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007478 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7479 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007480 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007481 else
7482 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00007483 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00007484 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00007485 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007486 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007487 LDSHARED='$(CC) -bundle'
7488 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00007489 if test "$enable_framework" ; then
7490 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007491 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7492 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007493 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007494 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00007495 # No framework, use the Python app as bundle-loader
7496 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00007497 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007498 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007499 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007500 Darwin/*)
7501 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
7502 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00007503
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007504 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +00007505 then
Thomas Wouters477c8d52006-05-27 19:21:47 +00007506 if test "${enable_universalsdk}"; then
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007507 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007508 fi
Antoine Pitroud4958c22010-10-13 17:01:10 +00007509 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
7510 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
Jack Jansen6b08a402004-06-03 12:41:45 +00007511 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00007512 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00007513 LDSHARED='$(CC) -bundle'
7514 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00007515 if test "$enable_framework" ; then
7516 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007517 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7518 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007519 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007520 else
7521 # No framework, use the Python app as bundle-loader
7522 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
7523 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007524 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007525 fi
7526 fi
7527 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007528 Linux*|GNU*|QNX*)
7529 LDSHARED='$(CC) -shared'
7530 LDCXXSHARED='$(CXX) -shared';;
7531 BSD/OS*/4*)
7532 LDSHARED="gcc -shared"
7533 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007534 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00007535 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00007536 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00007537 LDSHARED='$(CC) -shared'
7538 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00007539 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00007540 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00007541 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007542 OpenBSD*)
7543 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7544 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00007545 LDSHARED='$(CC) -shared $(CCSHARED)'
7546 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007547 else
7548 case `uname -r` in
7549 [01].* | 2.[0-7] | 2.[0-7].*)
7550 LDSHARED="ld -Bshareable ${LDFLAGS}"
7551 ;;
7552 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007553 LDSHARED='$(CC) -shared $(CCSHARED)'
7554 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007555 ;;
7556 esac
7557 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007558 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00007559 LDSHARED='$(CC) -shared'
7560 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007561 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007562 if test "$GCC" = "yes" ; then
7563 LDSHARED='$(CC) -shared'
7564 LDCXXSHARED='$(CXX) -shared'
7565 else
7566 LDSHARED='$(CC) -G'
7567 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00007568 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007569 SCO_SV*)
7570 LDSHARED='$(CC) -Wl,-G,-Bexport'
7571 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
7572 CYGWIN*)
7573 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
7574 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007575 *) LDSHARED="ld";;
7576 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007577fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007578{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
7579$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00007580LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007581BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00007582# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007583# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007584{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
7585$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007586if test -z "$CCSHARED"
7587then
Guido van Rossum07397971997-04-29 21:49:50 +00007588 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00007589 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007590 then CCSHARED="-fPIC";
7591 elif test `uname -p` = sparc;
7592 then CCSHARED="-xcode=pic32";
7593 else CCSHARED="-Kpic";
7594 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00007595 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00007596 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00007597 else CCSHARED="+z";
7598 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007599 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007600 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007601 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007602 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00007603 if test "$GCC" = "yes"
7604 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00007605 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00007606 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007607 SCO_SV*)
7608 if test "$GCC" = "yes"
7609 then CCSHARED="-fPIC"
7610 else CCSHARED="-Kpic -belf"
7611 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007612 IRIX*/6*) case $CC in
7613 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00007614 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007615 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007616 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007617fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007618{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
7619$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007620# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007621# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007622{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
7623$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007624if test -z "$LINKFORSHARED"
7625then
Guido van Rossum07397971997-04-29 21:49:50 +00007626 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007627 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007628 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00007629 LINKFORSHARED="-Wl,-E -Wl,+s";;
7630# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007631 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007632 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007633 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00007634 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00007635 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Jack Jansene578a632001-08-15 01:27:14 +00007636 if test "$enable_framework"
7637 then
Jack Jansenda49e192005-01-07 13:08:22 +00007638 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007639 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007640 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007641 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007642 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00007643 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007644 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00007645 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7646 then
7647 LINKFORSHARED="-Wl,--export-dynamic"
7648 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007649 SunOS/5*) case $CC in
7650 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00007651 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00007652 then
7653 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007654 fi;;
7655 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00007656 CYGWIN*)
7657 if test $enable_shared = "no"
7658 then
7659 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
7660 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00007661 QNX*)
7662 # -Wl,-E causes the symbols to be added to the dynamic
7663 # symbol table so that they can be found when a module
7664 # is loaded. -N 2048K causes the stack size to be set
7665 # to 2048 kilobytes so that the stack doesn't overflow
7666 # when running test_compile.py.
7667 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007668 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007669fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007670{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
7671$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007672
Michael W. Hudson54241132001-12-07 15:38:26 +00007673
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00007674
Matthias Kloseb9621712010-04-24 17:59:49 +00007675{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
7676$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007677if test ! "$LIBRARY" = "$LDLIBRARY"
7678then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00007679 case $ac_sys_system in
7680 CYGWIN*)
7681 # Cygwin needs CCSHARED when building extension DLLs
7682 # but not when building the interpreter DLL.
7683 CFLAGSFORSHARED='';;
7684 *)
7685 CFLAGSFORSHARED='$(CCSHARED)'
7686 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007687fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007688{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
7689$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007690
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007691# SHLIBS are libraries (except -lc and -lm) to link to the python shared
7692# library (with --enable-shared).
7693# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007694# symbols, this must be set to $(LIBS) (expanded by make). We do this even
7695# if it is not required, since it creates a dependency of the shared library
7696# to LIBS. This, in turn, means that applications linking the shared libpython
7697# don't need to link LIBS explicitly. The default should be only changed
7698# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007699
Matthias Kloseb9621712010-04-24 17:59:49 +00007700{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
7701$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007702case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007703 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007704 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007705esac
Matthias Kloseb9621712010-04-24 17:59:49 +00007706{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
7707$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007708
7709
Guido van Rossum627b2d71993-12-24 10:39:16 +00007710# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00007711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
7712$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05007713if test "${ac_cv_lib_sendfile_sendfile+set}" = set; then :
Georg Brandl941f9562011-02-25 15:21:47 +00007714 $as_echo_n "(cached) " >&6
7715else
7716 ac_check_lib_save_LIBS=$LIBS
7717LIBS="-lsendfile $LIBS"
7718cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7719/* end confdefs.h. */
7720
7721/* Override any GCC internal prototype to avoid an error.
7722 Use char because int might match the return type of a GCC
7723 builtin and then its argument prototype would still apply. */
7724#ifdef __cplusplus
7725extern "C"
7726#endif
7727char sendfile ();
7728int
7729main ()
7730{
7731return sendfile ();
7732 ;
7733 return 0;
7734}
7735_ACEOF
7736if ac_fn_c_try_link "$LINENO"; then :
7737 ac_cv_lib_sendfile_sendfile=yes
7738else
7739 ac_cv_lib_sendfile_sendfile=no
7740fi
7741rm -f core conftest.err conftest.$ac_objext \
7742 conftest$ac_exeext conftest.$ac_ext
7743LIBS=$ac_check_lib_save_LIBS
7744fi
7745{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
7746$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05007747if test "x$ac_cv_lib_sendfile_sendfile" = x""yes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00007748 cat >>confdefs.h <<_ACEOF
7749#define HAVE_LIBSENDFILE 1
7750_ACEOF
7751
7752 LIBS="-lsendfile $LIBS"
7753
7754fi
7755
Matthias Kloseb9621712010-04-24 17:59:49 +00007756{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
7757$as_echo_n "checking for dlopen in -ldl... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05007758if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007759 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007760else
Martin v. Löwis11437992002-04-12 09:54:03 +00007761 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007762LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007763cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007764/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007765
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007766/* Override any GCC internal prototype to avoid an error.
7767 Use char because int might match the return type of a GCC
7768 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007769#ifdef __cplusplus
7770extern "C"
7771#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007772char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007773int
7774main ()
7775{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007776return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007777 ;
7778 return 0;
7779}
7780_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007781if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007782 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007783else
Matthias Kloseb9621712010-04-24 17:59:49 +00007784 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007785fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007786rm -f core conftest.err conftest.$ac_objext \
7787 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007788LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007789fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007790{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
7791$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05007792if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007793 cat >>confdefs.h <<_ACEOF
7794#define HAVE_LIBDL 1
7795_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007796
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007797 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00007798
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007799fi
7800 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00007801{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
7802$as_echo_n "checking for shl_load in -ldld... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05007803if test "${ac_cv_lib_dld_shl_load+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007804 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007805else
Martin v. Löwis11437992002-04-12 09:54:03 +00007806 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007807LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007808cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007809/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007810
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007811/* Override any GCC internal prototype to avoid an error.
7812 Use char because int might match the return type of a GCC
7813 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007814#ifdef __cplusplus
7815extern "C"
7816#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007817char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007818int
7819main ()
7820{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007821return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007822 ;
7823 return 0;
7824}
7825_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007826if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007827 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007828else
Matthias Kloseb9621712010-04-24 17:59:49 +00007829 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007830fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007831rm -f core conftest.err conftest.$ac_objext \
7832 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007833LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007834fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007835{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
7836$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05007837if test "x$ac_cv_lib_dld_shl_load" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007838 cat >>confdefs.h <<_ACEOF
7839#define HAVE_LIBDLD 1
7840_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007841
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007842 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007843
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007844fi
7845 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00007846
Georg Brandlb1441c72009-01-03 22:33:39 +00007847# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00007848if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007849 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
7850$as_echo_n "checking for library containing sem_init... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05007851if test "${ac_cv_search_sem_init+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007852 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007853else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00007854 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007855cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007856/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007857
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007858/* Override any GCC internal prototype to avoid an error.
7859 Use char because int might match the return type of a GCC
7860 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007861#ifdef __cplusplus
7862extern "C"
7863#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007864char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007865int
7866main ()
7867{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007868return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007869 ;
7870 return 0;
7871}
7872_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007873for ac_lib in '' pthread rt posix4; do
7874 if test -z "$ac_lib"; then
7875 ac_res="none required"
7876 else
7877 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007878 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007879 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007880 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007881 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007882fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007883rm -f core conftest.err conftest.$ac_objext \
7884 conftest$ac_exeext
Benjamin Peterson316e02b2011-05-10 15:01:56 -05007885 if test "${ac_cv_search_sem_init+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007886 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007887fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007888done
Benjamin Peterson316e02b2011-05-10 15:01:56 -05007889if test "${ac_cv_search_sem_init+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007890
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007891else
7892 ac_cv_search_sem_init=no
7893fi
7894rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00007895LIBS=$ac_func_search_save_LIBS
7896fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007897{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
7898$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007899ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00007900if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007901 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007902
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007903fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00007904 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00007905 # posix4 on Solaris 2.6
7906 # pthread (first!) on Linux
7907fi
7908
Martin v. Löwis19d17342003-06-14 21:03:05 +00007909# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00007910{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
7911$as_echo_n "checking for textdomain in -lintl... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05007912if test "${ac_cv_lib_intl_textdomain+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007913 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00007914else
7915 ac_check_lib_save_LIBS=$LIBS
7916LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007917cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007918/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00007919
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007920/* Override any GCC internal prototype to avoid an error.
7921 Use char because int might match the return type of a GCC
7922 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00007923#ifdef __cplusplus
7924extern "C"
7925#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00007926char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00007927int
7928main ()
7929{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007930return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00007931 ;
7932 return 0;
7933}
7934_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007935if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00007936 ac_cv_lib_intl_textdomain=yes
7937else
Matthias Kloseb9621712010-04-24 17:59:49 +00007938 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00007939fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007940rm -f core conftest.err conftest.$ac_objext \
7941 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00007942LIBS=$ac_check_lib_save_LIBS
7943fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007944{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
7945$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05007946if test "x$ac_cv_lib_intl_textdomain" = x""yes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00007947
Matthias Kloseb9621712010-04-24 17:59:49 +00007948$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00007949
Brett Cannonc6d936e2009-06-07 20:09:53 +00007950 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00007951fi
7952
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007953
7954# checks for system dependent C++ extensions support
7955case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00007956 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
7957$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
7958 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007959/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007960
Georg Brandl59e87bd2011-02-15 19:48:59 +00007961 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007962int
7963main ()
7964{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007965loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00007966 ;
7967 return 0;
7968}
Matthias Kloseb159a552010-04-25 21:00:44 +00007969
Martin v. Löwis11437992002-04-12 09:54:03 +00007970_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007971if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007972
Matthias Kloseb159a552010-04-25 21:00:44 +00007973
Matthias Kloseb9621712010-04-24 17:59:49 +00007974$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007975
Matthias Kloseb159a552010-04-25 21:00:44 +00007976 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007977$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00007978
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007979else
Matthias Kloseb159a552010-04-25 21:00:44 +00007980
7981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007982$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00007983
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007984fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007985rm -f core conftest.err conftest.$ac_objext \
7986 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007987 *) ;;
7988esac
7989
Guido van Rossum70c7f481998-03-26 18:44:10 +00007990# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00007991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
7992$as_echo_n "checking for t_open in -lnsl... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05007993if test "${ac_cv_lib_nsl_t_open+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007994 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007995else
Martin v. Löwis11437992002-04-12 09:54:03 +00007996 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007997LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007998cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007999/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008000
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008001/* Override any GCC internal prototype to avoid an error.
8002 Use char because int might match the return type of a GCC
8003 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008004#ifdef __cplusplus
8005extern "C"
8006#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008007char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008008int
8009main ()
8010{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008011return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008012 ;
8013 return 0;
8014}
8015_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008016if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008017 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008018else
Matthias Kloseb9621712010-04-24 17:59:49 +00008019 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008020fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008021rm -f core conftest.err conftest.$ac_objext \
8022 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008023LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008024fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008025{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
8026$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008027if test "x$ac_cv_lib_nsl_t_open" = x""yes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008028 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008029fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00008030 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00008031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
8032$as_echo_n "checking for socket in -lsocket... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008033if test "${ac_cv_lib_socket_socket+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008034 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008035else
Martin v. Löwis11437992002-04-12 09:54:03 +00008036 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008037LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008038cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008039/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008040
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008041/* Override any GCC internal prototype to avoid an error.
8042 Use char because int might match the return type of a GCC
8043 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008044#ifdef __cplusplus
8045extern "C"
8046#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008047char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008048int
8049main ()
8050{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008051return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008052 ;
8053 return 0;
8054}
8055_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008056if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008057 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008058else
Matthias Kloseb9621712010-04-24 17:59:49 +00008059 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008060fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008061rm -f core conftest.err conftest.$ac_objext \
8062 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008063LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008064fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008065{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
8066$as_echo "$ac_cv_lib_socket_socket" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008067if test "x$ac_cv_lib_socket_socket" = x""yes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00008068 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00008069fi
8070 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00008071
Matthias Kloseb9621712010-04-24 17:59:49 +00008072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
8073$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008074
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008075# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008076if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008077 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00008078{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8079$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00008080LIBS="$withval $LIBS"
8081
8082else
Matthias Kloseb9621712010-04-24 17:59:49 +00008083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8084$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008085fi
8086
Guido van Rossum7f43da71994-08-01 12:15:30 +00008087
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008088if test -n "$ac_tool_prefix"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008089 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
8090set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8092$as_echo_n "checking for $ac_word... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008093if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008094 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008095else
8096 case $PKG_CONFIG in
8097 [\\/]* | ?:[\\/]*)
8098 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8099 ;;
8100 *)
8101 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8102for as_dir in $PATH
8103do
8104 IFS=$as_save_IFS
8105 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008106 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Petersond78735d2010-01-01 16:04:23 +00008107 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8108 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008109 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008110 break 2
8111 fi
8112done
Matthias Kloseb9621712010-04-24 17:59:49 +00008113 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008114IFS=$as_save_IFS
8115
8116 ;;
8117esac
8118fi
8119PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8120if test -n "$PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008121 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8122$as_echo "$PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008123else
Matthias Kloseb9621712010-04-24 17:59:49 +00008124 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8125$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008126fi
8127
8128
8129fi
8130if test -z "$ac_cv_path_PKG_CONFIG"; then
8131 ac_pt_PKG_CONFIG=$PKG_CONFIG
8132 # Extract the first word of "pkg-config", so it can be a program name with args.
8133set dummy pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8135$as_echo_n "checking for $ac_word... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008136if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008137 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008138else
8139 case $ac_pt_PKG_CONFIG in
8140 [\\/]* | ?:[\\/]*)
8141 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
8142 ;;
8143 *)
8144 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8145for as_dir in $PATH
8146do
8147 IFS=$as_save_IFS
8148 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008149 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Petersond78735d2010-01-01 16:04:23 +00008150 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8151 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008152 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008153 break 2
8154 fi
8155done
Matthias Kloseb9621712010-04-24 17:59:49 +00008156 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008157IFS=$as_save_IFS
8158
8159 ;;
8160esac
8161fi
8162ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
8163if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008164 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
8165$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008166else
Matthias Kloseb9621712010-04-24 17:59:49 +00008167 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8168$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008169fi
8170
8171 if test "x$ac_pt_PKG_CONFIG" = x; then
8172 PKG_CONFIG=""
8173 else
8174 case $cross_compiling:$ac_tool_warned in
8175yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00008176{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8177$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Petersond78735d2010-01-01 16:04:23 +00008178ac_tool_warned=yes ;;
8179esac
8180 PKG_CONFIG=$ac_pt_PKG_CONFIG
8181 fi
8182else
8183 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
8184fi
8185
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008186
8187# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00008188{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
8189$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008190
8191# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008192if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008193 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00008194else
8195 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008196fi
8197
8198
Matthias Kloseb9621712010-04-24 17:59:49 +00008199{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
8200$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008201
8202# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00008203{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
8204$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008205
8206# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008207if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008208 withval=$with_system_ffi;
Benjamin Peterson79263252010-10-31 16:50:44 +00008209else
8210 with_system_ffi="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008211fi
8212
8213
8214if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008215 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
8216else
8217 LIBFFI_INCLUDEDIR=""
8218fi
8219
8220
Matthias Kloseb9621712010-04-24 17:59:49 +00008221{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
8222$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008223
Benjamin Peterson076ed002010-10-31 17:11:02 +00008224# Check for support for loadable sqlite extensions
8225{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
8226$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
8227# Check whether --enable-loadable-sqlite-extensions was given.
8228if test "${enable_loadable_sqlite_extensions+set}" = set; then :
8229 enableval=$enable_loadable_sqlite_extensions;
8230else
8231 enable_loadable_sqlite_extensions="no"
8232fi
8233
8234
8235{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
8236$as_echo "$enable_loadable_sqlite_extensions" >&6; }
8237
Matthias Klose55708cc2009-04-30 08:06:49 +00008238# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +00008239{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
8240$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008241
8242# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008243if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +00008244 withval=$with_dbmliborder;
8245if test x$with_dbmliborder = xyes
8246then
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07008247as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008248else
8249 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
8250 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
8251 then
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07008252 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008253 fi
8254 done
8255fi
8256fi
8257
Matthias Kloseb9621712010-04-24 17:59:49 +00008258{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
8259$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008260
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00008261# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008262
8263
Matthias Kloseb9621712010-04-24 17:59:49 +00008264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
8265$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008266
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008267# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008268if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008269 withval=$with_signal_module;
8270fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008271
8272
8273if test -z "$with_signal_module"
8274then with_signal_module="yes"
8275fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008276{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
8277$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008278
8279if test "${with_signal_module}" = "yes"; then
8280 USE_SIGNAL_MODULE=""
8281 SIGNAL_OBJS=""
8282else
8283 USE_SIGNAL_MODULE="#"
8284 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
8285fi
8286
Guido van Rossum3d15bd82001-01-10 18:53:48 +00008287# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00008288
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008289USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00008290
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008291
Martin v. Löwis11437992002-04-12 09:54:03 +00008292
8293# Templates for things AC_DEFINEd more than once.
8294# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00008295
8296
Martin v. Löwis11437992002-04-12 09:54:03 +00008297
8298
Matthias Kloseb9621712010-04-24 17:59:49 +00008299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
8300$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008301
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008302# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008303if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008304 withval=$with_threads;
8305fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008306
8307
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008308# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00008309
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008310# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008311if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008312 withval=$with_thread; with_threads=$with_thread
8313fi
8314
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008315
8316if test -z "$with_threads"
8317then with_threads="yes"
8318fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008319{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
8320$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008321
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008322
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008323if test "$with_threads" = "no"
8324then
8325 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008326elif test "$ac_cv_pthread_is_default" = yes
8327then
Matthias Kloseb9621712010-04-24 17:59:49 +00008328 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008329
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008330 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +00008331 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008332
8333 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00008334 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008335elif test "$ac_cv_kpthread" = "yes"
8336then
8337 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008338 if test "$ac_cv_cxx_thread" = "yes"; then
8339 CXX="$CXX -Kpthread"
8340 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008341 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00008342
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008343 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008344 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008345elif test "$ac_cv_kthread" = "yes"
8346then
8347 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008348 if test "$ac_cv_cxx_thread" = "yes"; then
8349 CXX="$CXX -Kthread"
8350 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008351 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008352
8353 posix_threads=yes
8354 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008355elif test "$ac_cv_pthread" = "yes"
8356then
8357 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008358 if test "$ac_cv_cxx_thread" = "yes"; then
8359 CXX="$CXX -pthread"
8360 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008361 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008362
8363 posix_threads=yes
8364 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008365else
8366 if test ! -z "$with_threads" -a -d "$with_threads"
8367 then LDFLAGS="$LDFLAGS -L$with_threads"
8368 fi
8369 if test ! -z "$withval" -a -d "$withval"
8370 then LDFLAGS="$LDFLAGS -L$withval"
8371 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008372
8373 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00008374 # define _POSIX_THREADS in unistd.h. Some apparently don't
8375 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +00008376 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
8377$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
8378 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008379/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008380
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008381#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008382#ifdef _POSIX_THREADS
8383yes
8384#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008385
8386_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008387if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008388 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008389 unistd_defines_pthreads=yes
8390else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008391 unistd_defines_pthreads=no
8392fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008393rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008394
Matthias Kloseb9621712010-04-24 17:59:49 +00008395 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
8396$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008397
Matthias Kloseb9621712010-04-24 17:59:49 +00008398 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00008399
Matthias Kloseb9621712010-04-24 17:59:49 +00008400 ac_fn_c_check_header_mongrel "$LINENO" "cthreads.h" "ac_cv_header_cthreads_h" "$ac_includes_default"
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008401if test "x$ac_cv_header_cthreads_h" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008402 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008403
Matthias Kloseb9621712010-04-24 17:59:49 +00008404 $as_echo "#define C_THREADS 1" >>confdefs.h
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008405
Martin v. Löwis11437992002-04-12 09:54:03 +00008406
Matthias Kloseb9621712010-04-24 17:59:49 +00008407$as_echo "#define HURD_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008408
8409 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008410 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008411else
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008412
Matthias Kloseb9621712010-04-24 17:59:49 +00008413 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 -05008414if test "x$ac_cv_header_mach_cthreads_h" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008415 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008416
Matthias Kloseb9621712010-04-24 17:59:49 +00008417 $as_echo "#define C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008418
Martin v. Löwis11437992002-04-12 09:54:03 +00008419
Matthias Kloseb9621712010-04-24 17:59:49 +00008420$as_echo "#define MACH_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008421
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008422 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008423else
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008424
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008425 # Just looking for pthread_create in libpthread is not enough:
8426 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
8427 # So we really have to include pthread.h, and then link.
8428 _libs=$LIBS
8429 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00008430 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
8431$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
8432 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008433/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008434#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00008435
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008436void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00008437int
8438main ()
8439{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008440
8441pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00008442 ;
8443 return 0;
8444}
8445_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008446if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008447
Matthias Kloseb9621712010-04-24 17:59:49 +00008448 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8449$as_echo "yes" >&6; }
8450 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00008451
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008452 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008453 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00008454else
Martin v. Löwis11437992002-04-12 09:54:03 +00008455
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008456 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +00008457 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008458if test "x$ac_cv_func_pthread_detach" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008459 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00008460
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008461 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008462 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00008463else
Guido van Rossumad678af1998-10-02 14:42:15 +00008464
Matthias Kloseb9621712010-04-24 17:59:49 +00008465 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
8466$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008467if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008468 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008469else
Martin v. Löwis11437992002-04-12 09:54:03 +00008470 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008471LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008472cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008473/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008474
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008475/* Override any GCC internal prototype to avoid an error.
8476 Use char because int might match the return type of a GCC
8477 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008478#ifdef __cplusplus
8479extern "C"
8480#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008481char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008482int
8483main ()
8484{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008485return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008486 ;
8487 return 0;
8488}
8489_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008490if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008491 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00008492else
Matthias Kloseb9621712010-04-24 17:59:49 +00008493 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00008494fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008495rm -f core conftest.err conftest.$ac_objext \
8496 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008497LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008498fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008499{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
8500$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008501if test "x$ac_cv_lib_pthreads_pthread_create" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008502 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00008503
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008504 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008505 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008506 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00008507else
Greg Steinadf63d62000-07-05 10:38:09 +00008508
Matthias Kloseb9621712010-04-24 17:59:49 +00008509 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
8510$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008511if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008512 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00008513else
Martin v. Löwis11437992002-04-12 09:54:03 +00008514 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008515LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008516cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008517/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008518
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008519/* Override any GCC internal prototype to avoid an error.
8520 Use char because int might match the return type of a GCC
8521 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008522#ifdef __cplusplus
8523extern "C"
8524#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008525char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008526int
8527main ()
8528{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008529return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008530 ;
8531 return 0;
8532}
8533_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008534if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008535 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00008536else
Matthias Kloseb9621712010-04-24 17:59:49 +00008537 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00008538fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008539rm -f core conftest.err conftest.$ac_objext \
8540 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008541LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00008542fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008543{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
8544$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008545if test "x$ac_cv_lib_c_r_pthread_create" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008546 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00008547
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008548 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008549 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008550 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008551else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008552
Matthias Kloseb9621712010-04-24 17:59:49 +00008553 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
8554$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008555if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008556 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008557else
Martin v. Löwis11437992002-04-12 09:54:03 +00008558 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008559LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008560cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008561/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008562
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008563/* Override any GCC internal prototype to avoid an error.
8564 Use char because int might match the return type of a GCC
8565 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008566#ifdef __cplusplus
8567extern "C"
8568#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008569char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008570int
8571main ()
8572{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008573return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008574 ;
8575 return 0;
8576}
8577_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008578if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008579 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008580else
Matthias Kloseb9621712010-04-24 17:59:49 +00008581 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008582fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008583rm -f core conftest.err conftest.$ac_objext \
8584 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008585LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008586fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008587{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
8588$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008589if test "x$ac_cv_lib_pthread___pthread_create_system" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008590 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008591
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008592 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008593 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008594 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008595else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008596
Matthias Kloseb9621712010-04-24 17:59:49 +00008597 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
8598$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008599if test "${ac_cv_lib_cma_pthread_create+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008600 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00008601else
Martin v. Löwis11437992002-04-12 09:54:03 +00008602 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008603LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008604cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008605/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008606
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008607/* Override any GCC internal prototype to avoid an error.
8608 Use char because int might match the return type of a GCC
8609 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008610#ifdef __cplusplus
8611extern "C"
8612#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008613char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008614int
8615main ()
8616{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008617return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008618 ;
8619 return 0;
8620}
8621_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008622if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008623 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00008624else
Matthias Kloseb9621712010-04-24 17:59:49 +00008625 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00008626fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008627rm -f core conftest.err conftest.$ac_objext \
8628 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008629LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008630fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008631{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
8632$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008633if test "x$ac_cv_lib_cma_pthread_create" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008634 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00008635
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008636 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008637 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008638 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00008639else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00008640
Martin v. Löwis130fb172001-07-19 11:00:41 +00008641 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00008642fi
8643
Guido van Rossum627b2d71993-12-24 10:39:16 +00008644
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008645fi
8646
Guido van Rossum0be3e491997-05-22 20:33:33 +00008647fi
8648
Guido van Rossum49545951997-12-02 19:28:29 +00008649fi
8650
Guido van Rossumb93a8621998-05-07 13:27:32 +00008651fi
8652
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008653fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008654rm -f core conftest.err conftest.$ac_objext \
8655 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008656fi
8657
Martin v. Löwis11437992002-04-12 09:54:03 +00008658
8659fi
8660
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008661
Michael W. Hudson54241132001-12-07 15:38:26 +00008662
Matthias Kloseb9621712010-04-24 17:59:49 +00008663 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
8664$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008665if test "${ac_cv_lib_mpc_usconfig+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008666 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008667else
Martin v. Löwis11437992002-04-12 09:54:03 +00008668 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008669LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008670cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008671/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008672
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008673/* Override any GCC internal prototype to avoid an error.
8674 Use char because int might match the return type of a GCC
8675 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008676#ifdef __cplusplus
8677extern "C"
8678#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008679char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008680int
8681main ()
8682{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008683return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008684 ;
8685 return 0;
8686}
8687_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008688if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008689 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008690else
Matthias Kloseb9621712010-04-24 17:59:49 +00008691 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008692fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008693rm -f core conftest.err conftest.$ac_objext \
8694 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008695LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008696fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008697{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
8698$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008699if test "x$ac_cv_lib_mpc_usconfig" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008700 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008701
Martin v. Löwis130fb172001-07-19 11:00:41 +00008702 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008703 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008704 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008705fi
8706
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008707
Neal Norwitza978ab02002-11-02 16:58:05 +00008708 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008709 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
8710$as_echo_n "checking for thr_create in -lthread... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008711if test "${ac_cv_lib_thread_thr_create+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008712 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008713else
Martin v. Löwis11437992002-04-12 09:54:03 +00008714 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008715LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008716cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008717/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008718
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008719/* Override any GCC internal prototype to avoid an error.
8720 Use char because int might match the return type of a GCC
8721 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008722#ifdef __cplusplus
8723extern "C"
8724#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008725char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008726int
8727main ()
8728{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008729return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008730 ;
8731 return 0;
8732}
8733_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008734if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008735 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008736else
Matthias Kloseb9621712010-04-24 17:59:49 +00008737 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008738fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008739rm -f core conftest.err conftest.$ac_objext \
8740 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008741LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008742fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008743{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
8744$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008745if test "x$ac_cv_lib_thread_thr_create" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008746 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008747
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008748 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008749 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008750 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008751fi
8752
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008753 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008754fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008755
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008756if test "$posix_threads" = "yes"; then
8757 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008758
Matthias Kloseb9621712010-04-24 17:59:49 +00008759$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008760
8761 fi
8762
8763 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
8764 case $ac_sys_system/$ac_sys_release in
8765 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +00008766$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008767
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008768 ;;
8769 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +00008770$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008771
8772 ;;
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00008773 AIX/5)
Matthias Kloseb9621712010-04-24 17:59:49 +00008774$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00008775
8776 ;;
Antoine Pitrou33a29942010-08-30 14:52:00 +00008777 AIX/6)
8778$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
8779
8780 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008781 esac
8782
Matthias Kloseb9621712010-04-24 17:59:49 +00008783 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
8784$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008785 if test "${ac_cv_pthread_system_supported+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008786 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008787else
Matthias Kloseb9621712010-04-24 17:59:49 +00008788 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008789 ac_cv_pthread_system_supported=no
8790else
Matthias Kloseb9621712010-04-24 17:59:49 +00008791 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008792/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008793#include <pthread.h>
8794 void *foo(void *parm) {
8795 return NULL;
8796 }
8797 main() {
8798 pthread_attr_t attr;
8799 pthread_t id;
8800 if (pthread_attr_init(&attr)) exit(-1);
8801 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
8802 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
8803 exit(0);
8804 }
8805_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008806if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008807 ac_cv_pthread_system_supported=yes
8808else
Matthias Kloseb9621712010-04-24 17:59:49 +00008809 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008810fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008811rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8812 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008813fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008814
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008815
Guido van Rossum627b2d71993-12-24 10:39:16 +00008816fi
8817
Matthias Kloseb9621712010-04-24 17:59:49 +00008818 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
8819$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008820 if test "$ac_cv_pthread_system_supported" = "yes"; then
8821
Matthias Kloseb9621712010-04-24 17:59:49 +00008822$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008823
8824 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008825 for ac_func in pthread_sigmask
8826do :
8827 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Benjamin Peterson316e02b2011-05-10 15:01:56 -05008828if test "x$ac_cv_func_pthread_sigmask" = x""yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008829 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008830#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008831_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +00008832 case $ac_sys_system in
8833 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008834
Matthias Kloseb9621712010-04-24 17:59:49 +00008835$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +00008836
8837 ;;
8838 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008839fi
8840done
8841
8842fi
8843
8844
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008845# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +00008846
Matthias Kloseb9621712010-04-24 17:59:49 +00008847{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
8848$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008849# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008850if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008851 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008852 no)
Matthias Kloseb9621712010-04-24 17:59:49 +00008853 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8854$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008855 ipv6=no
8856 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00008857 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8858$as_echo "yes" >&6; }
8859 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008860
8861 ipv6=yes
8862 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008863 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008864else
Martin v. Löwis11437992002-04-12 09:54:03 +00008865
Matthias Kloseb9621712010-04-24 17:59:49 +00008866 if test "$cross_compiling" = yes; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008867
Matthias Kloseb9621712010-04-24 17:59:49 +00008868 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8869$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008870 ipv6=no
8871
8872else
Matthias Kloseb9621712010-04-24 17:59:49 +00008873 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008874/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008875 /* AF_INET6 available check */
8876#include <sys/types.h>
8877#include <sys/socket.h>
8878main()
8879{
8880 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
8881 exit(1);
8882 else
8883 exit(0);
8884}
8885
Martin v. Löwis11437992002-04-12 09:54:03 +00008886_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008887if ac_fn_c_try_run "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008888
Matthias Kloseb9621712010-04-24 17:59:49 +00008889 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8890$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008891 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +00008892
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008893else
Matthias Kloseb159a552010-04-25 21:00:44 +00008894
Matthias Kloseb9621712010-04-24 17:59:49 +00008895 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8896$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008897 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +00008898
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008899fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008900rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8901 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008902fi
8903
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008904
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008905if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008906 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
8907$as_echo_n "checking if RFC2553 API is available... " >&6; }
8908 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008909/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008910
8911 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008912#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008913int
8914main ()
8915{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008916struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +00008917 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +00008918 ;
8919 return 0;
8920}
Matthias Kloseb159a552010-04-25 21:00:44 +00008921
Martin v. Löwis11437992002-04-12 09:54:03 +00008922_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008923if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008924
8925 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008926$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008927 ipv6=yes
8928
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008929else
Matthias Kloseb159a552010-04-25 21:00:44 +00008930
8931 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008932$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008933 ipv6=no
8934
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008935fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008936rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008937fi
8938
8939if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008940 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008941
8942fi
8943
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008944fi
8945
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008946
8947ipv6type=unknown
8948ipv6lib=none
8949ipv6trylibc=no
8950
8951if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008952 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
8953$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +00008954 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
8955 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008956 case $i in
8957 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +00008958 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008959/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008960
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008961#include <netinet/in.h>
8962#ifdef IPV6_INRIA_VERSION
8963yes
8964#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008965_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008966if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008967 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00008968 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008969fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008970rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008971
8972 ;;
8973 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +00008974 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008975/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008976
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008977#include <netinet/in.h>
8978#ifdef __KAME__
8979yes
8980#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008981_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008982if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008983 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008984 ipv6type=$i;
8985 ipv6lib=inet6
8986 ipv6libdir=/usr/local/v6/lib
8987 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008988fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008989rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008990
8991 ;;
8992 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +00008993 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008994/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008995
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008996#include <features.h>
8997#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
8998yes
8999#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009000_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009001if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009002 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009003 ipv6type=$i;
9004 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009005fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009006rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009007
9008 ;;
9009 linux-inet6)
9010 if test -d /usr/inet6; then
9011 ipv6type=$i
9012 ipv6lib=inet6
9013 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +00009014 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009015 fi
9016 ;;
9017 solaris)
9018 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +00009019 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009020 ipv6type=$i
9021 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009022 fi
9023 fi
9024 ;;
9025 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +00009026 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009027/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009028
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009029#include <sys/param.h>
9030#ifdef _TOSHIBA_INET6
9031yes
9032#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009033_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009034if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009035 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009036 ipv6type=$i;
9037 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009038 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009039fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009040rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009041
9042 ;;
9043 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +00009044 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009045/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009046
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009047#include </usr/local/v6/include/sys/v6config.h>
9048#ifdef __V6D__
9049yes
9050#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009051_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009052if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009053 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009054 ipv6type=$i;
9055 ipv6lib=v6;
9056 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +00009057 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009058fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009059rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009060
9061 ;;
9062 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +00009063 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009064/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009065
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009066#include <sys/param.h>
9067#ifdef _ZETA_MINAMI_INET6
9068yes
9069#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009070_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009071if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009072 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009073 ipv6type=$i;
9074 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009075 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009076fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009077rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009078
9079 ;;
9080 esac
9081 if test "$ipv6type" != "unknown"; then
9082 break
9083 fi
9084 done
Matthias Kloseb9621712010-04-24 17:59:49 +00009085 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
9086$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009087fi
9088
9089if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
9090 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
9091 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
9092 echo "using lib$ipv6lib"
9093 else
9094 if test $ipv6trylibc = "yes"; then
9095 echo "using libc"
9096 else
9097 echo 'Fatal: no $ipv6lib library found. cannot continue.'
9098 echo "You need to fetch lib$ipv6lib.a from appropriate"
9099 echo 'ipv6 kit and compile beforehand.'
9100 exit 1
9101 fi
9102 fi
9103fi
9104
Matthias Kloseb9621712010-04-24 17:59:49 +00009105{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
9106$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
9107cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009108/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009109
9110 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009111int
9112main ()
9113{
9114FSIORefNum fRef = 0
9115 ;
9116 return 0;
9117}
Matthias Kloseb159a552010-04-25 21:00:44 +00009118
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009119_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009120if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009121
Matthias Kloseb159a552010-04-25 21:00:44 +00009122
Matthias Kloseb9621712010-04-24 17:59:49 +00009123$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009124
Matthias Kloseb9621712010-04-24 17:59:49 +00009125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9126$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009127
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009128else
Matthias Kloseb159a552010-04-25 21:00:44 +00009129
Matthias Kloseb9621712010-04-24 17:59:49 +00009130 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9131$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009132
9133fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009134rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9135
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009136# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +00009137{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
9138$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009139
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009140# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009141if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009142 withval=$with_doc_strings;
9143fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009144
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009145
9146if test -z "$with_doc_strings"
9147then with_doc_strings="yes"
9148fi
9149if test "$with_doc_strings" != "no"
9150then
9151
Matthias Kloseb9621712010-04-24 17:59:49 +00009152$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009153
9154fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009155{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
9156$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009157
Antoine Pitrou042b1282010-08-13 21:15:58 +00009158# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +00009159{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
9160$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009161
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009162# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009163if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009164 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009165if test "$withval" != no
9166then
9167
Matthias Kloseb9621712010-04-24 17:59:49 +00009168$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009169
Matthias Kloseb9621712010-04-24 17:59:49 +00009170 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9171$as_echo "yes" >&6; }
9172else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9173$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009174fi
9175else
Matthias Kloseb9621712010-04-24 17:59:49 +00009176 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9177$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009178fi
9179
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009180
9181# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +00009182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
9183$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009184
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009185# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009186if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009187 withval=$with_pymalloc;
9188fi
Michael W. Hudson54241132001-12-07 15:38:26 +00009189
Neil Schemenauera35c6882001-02-27 04:45:05 +00009190
Neil Schemenauer16c22972002-03-22 15:34:49 +00009191if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00009192then
9193 with_pymalloc="yes"
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00009194 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +00009195fi
9196if test "$with_pymalloc" != "no"
9197then
Martin v. Löwis11437992002-04-12 09:54:03 +00009198
Matthias Kloseb9621712010-04-24 17:59:49 +00009199$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +00009200
9201fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009202{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
9203$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +00009204
Benjamin Peterson05159c42009-12-03 03:01:27 +00009205# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +00009206{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
9207$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009208
9209# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009210if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009211 withval=$with_valgrind;
9212else
9213 with_valgrind=no
9214fi
9215
Matthias Kloseb9621712010-04-24 17:59:49 +00009216{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
9217$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009218if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009219 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 -05009220if test "x$ac_cv_header_valgrind_valgrind_h" = x""yes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009221
Matthias Kloseb9621712010-04-24 17:59:49 +00009222$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +00009223
9224else
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07009225 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +00009226
9227fi
9228
9229
Jeffrey Yasskin39370832010-05-03 19:29:34 +00009230 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +00009231fi
9232
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009233# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00009234
Guido van Rossum98935bf2001-09-05 19:13:16 +00009235DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +00009236
Guido van Rossume97ee181999-12-20 21:27:22 +00009237# the dlopen() function means we might want to use dynload_shlib.o. some
9238# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +00009239for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +00009240do :
9241 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Benjamin Peterson316e02b2011-05-10 15:01:56 -05009242if test "x$ac_cv_func_dlopen" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009243 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009244#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009245_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +00009246
Guido van Rossume97ee181999-12-20 21:27:22 +00009247fi
Thomas Wouters3a584202000-08-05 23:28:51 +00009248done
Guido van Rossume97ee181999-12-20 21:27:22 +00009249
Michael W. Hudson54241132001-12-07 15:38:26 +00009250
Guido van Rossume97ee181999-12-20 21:27:22 +00009251# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
9252# loading of modules.
9253
Matthias Kloseb9621712010-04-24 17:59:49 +00009254{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
9255$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009256if test -z "$DYNLOADFILE"
9257then
9258 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00009259 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
9260 if test "$ac_cv_func_dlopen" = yes
9261 then DYNLOADFILE="dynload_shlib.o"
9262 else DYNLOADFILE="dynload_aix.o"
9263 fi
9264 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +00009265 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009266 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
9267 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +00009268 *)
9269 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
9270 # out any dynamic loading
9271 if test "$ac_cv_func_dlopen" = yes
9272 then DYNLOADFILE="dynload_shlib.o"
9273 else DYNLOADFILE="dynload_stub.o"
9274 fi
9275 ;;
9276 esac
9277fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009278{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
9279$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009280if test "$DYNLOADFILE" != "dynload_stub.o"
9281then
Martin v. Löwis11437992002-04-12 09:54:03 +00009282
Matthias Kloseb9621712010-04-24 17:59:49 +00009283$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +00009284
9285fi
9286
Neil Schemenauer4e425612001-06-19 15:44:15 +00009287# MACHDEP_OBJS can be set to platform-specific object files needed by Python
9288
Michael W. Hudson54241132001-12-07 15:38:26 +00009289
Matthias Kloseb9621712010-04-24 17:59:49 +00009290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
9291$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009292if test -z "$MACHDEP_OBJS"
9293then
Jack Jansene578a632001-08-15 01:27:14 +00009294 MACHDEP_OBJS=$extra_machdep_objs
9295else
9296 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +00009297fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009298{ $as_echo "$as_me:${as_lineno-$LINENO}: result: MACHDEP_OBJS" >&5
9299$as_echo "MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009300
Guido van Rossum627b2d71993-12-24 10:39:16 +00009301# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +00009302for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Antoine Pitrou8250e232011-02-25 23:41:16 +00009303 clock confstr ctermid execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +02009304 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
9305 futimens futimes \
Martin v. Löwis438b5342002-12-27 10:16:42 +00009306 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +00009307 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07009308 if_nameindex \
Ross Lagerwall7807c352011-03-17 20:20:30 +02009309 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mbrtowc mkdirat mkfifo \
Antoine Pitrouf65132d2011-02-25 23:25:17 +00009310 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +02009311 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +02009312 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Georg Brandl941f9562011-02-25 15:21:47 +00009313 select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +00009314 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +00009315 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Victor Stinnerb3e72192011-05-08 01:46:11 +02009316 sigaction sigaltstack siginterrupt sigpending \
9317 sigrelse sigwait snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +00009318 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +02009319 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
9320 wcscoll wcsftime wcsxfrm writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +00009321do :
9322 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9323ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07009324if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009325 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009326#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009327_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00009328
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009329fi
9330done
9331
Michael W. Hudson54241132001-12-07 15:38:26 +00009332
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009333# For some functions, having a definition is not sufficient, since
9334# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +00009335{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
9336$as_echo_n "checking for chroot... " >&6; }
9337cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009338/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009339#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009340int
9341main ()
9342{
9343void *x=chroot
9344 ;
9345 return 0;
9346}
9347_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009348if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009349
Matthias Kloseb9621712010-04-24 17:59:49 +00009350$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009351
Matthias Kloseb159a552010-04-25 21:00:44 +00009352 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009353$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009354else
Matthias Kloseb9621712010-04-24 17:59:49 +00009355 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9356$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009357
9358fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009359rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
9361$as_echo_n "checking for link... " >&6; }
9362cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009363/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009364#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009365int
9366main ()
9367{
9368void *x=link
9369 ;
9370 return 0;
9371}
9372_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009373if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009374
Matthias Kloseb9621712010-04-24 17:59:49 +00009375$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009376
Matthias Kloseb159a552010-04-25 21:00:44 +00009377 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009378$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009379else
Matthias Kloseb9621712010-04-24 17:59:49 +00009380 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9381$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009382
9383fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009384rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009385{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
9386$as_echo_n "checking for symlink... " >&6; }
9387cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009388/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009389#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009390int
9391main ()
9392{
9393void *x=symlink
9394 ;
9395 return 0;
9396}
9397_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009398if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009399
Matthias Kloseb9621712010-04-24 17:59:49 +00009400$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009401
Matthias Kloseb159a552010-04-25 21:00:44 +00009402 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009403$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009404else
Matthias Kloseb9621712010-04-24 17:59:49 +00009405 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9406$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009407
9408fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009409rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009410{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
9411$as_echo_n "checking for fchdir... " >&6; }
9412cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009413/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009414#include <unistd.h>
9415int
9416main ()
9417{
9418void *x=fchdir
9419 ;
9420 return 0;
9421}
9422_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009423if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009424
Matthias Kloseb9621712010-04-24 17:59:49 +00009425$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009426
Matthias Kloseb159a552010-04-25 21:00:44 +00009427 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009428$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009429else
Matthias Kloseb9621712010-04-24 17:59:49 +00009430 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9431$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009432
9433fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009434rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009435{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
9436$as_echo_n "checking for fsync... " >&6; }
9437cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009438/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009439#include <unistd.h>
9440int
9441main ()
9442{
9443void *x=fsync
9444 ;
9445 return 0;
9446}
9447_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009448if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009449
Matthias Kloseb9621712010-04-24 17:59:49 +00009450$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009451
Matthias Kloseb159a552010-04-25 21:00:44 +00009452 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009453$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009454else
Matthias Kloseb9621712010-04-24 17:59:49 +00009455 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9456$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009457
9458fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009459rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009460{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
9461$as_echo_n "checking for fdatasync... " >&6; }
9462cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009463/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009464#include <unistd.h>
9465int
9466main ()
9467{
9468void *x=fdatasync
9469 ;
9470 return 0;
9471}
9472_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009473if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009474
Matthias Kloseb9621712010-04-24 17:59:49 +00009475$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009476
Matthias Kloseb159a552010-04-25 21:00:44 +00009477 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009478$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009479else
Matthias Kloseb9621712010-04-24 17:59:49 +00009480 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9481$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009482
9483fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009484rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009485{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
9486$as_echo_n "checking for epoll... " >&6; }
9487cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009488/* end confdefs.h. */
9489#include <sys/epoll.h>
9490int
9491main ()
9492{
9493void *x=epoll_create
9494 ;
9495 return 0;
9496}
9497_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009498if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009499
Matthias Kloseb9621712010-04-24 17:59:49 +00009500$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009501
Matthias Kloseb159a552010-04-25 21:00:44 +00009502 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009503$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009504else
Matthias Kloseb9621712010-04-24 17:59:49 +00009505 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9506$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009507
9508fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009509rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009510{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
9511$as_echo_n "checking for kqueue... " >&6; }
9512cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009513/* end confdefs.h. */
9514
9515#include <sys/types.h>
9516#include <sys/event.h>
9517
9518int
9519main ()
9520{
9521int x=kqueue()
9522 ;
9523 return 0;
9524}
9525_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009526if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009527
Matthias Kloseb9621712010-04-24 17:59:49 +00009528$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009529
Matthias Kloseb159a552010-04-25 21:00:44 +00009530 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009531$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009532else
Matthias Kloseb9621712010-04-24 17:59:49 +00009533 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9534$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009535
9536fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009537rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +00009538# On some systems (eg. FreeBSD 5), we would find a definition of the
9539# functions ctermid_r, setgroups in the library, but no prototype
9540# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
9541# address to avoid compiler warnings and potential miscompilations
9542# because of the missing prototypes.
9543
Matthias Kloseb9621712010-04-24 17:59:49 +00009544{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
9545$as_echo_n "checking for ctermid_r... " >&6; }
9546cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009547/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +00009548
Martin v. Löwisd5843682002-11-21 20:41:28 +00009549#include <stdio.h>
9550
Martin v. Löwisd5843682002-11-21 20:41:28 +00009551int
9552main ()
9553{
9554void* p = ctermid_r
9555 ;
9556 return 0;
9557}
9558_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009559if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +00009560
Matthias Kloseb9621712010-04-24 17:59:49 +00009561$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +00009562
Matthias Kloseb159a552010-04-25 21:00:44 +00009563 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009564$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009565else
Matthias Kloseb9621712010-04-24 17:59:49 +00009566 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9567$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009568
9569fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009570rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9571
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009572{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
9573$as_echo_n "checking for flock declaration... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05009574if test "${ac_cv_flock_decl+set}" = set; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009575 $as_echo_n "(cached) " >&6
9576else
9577 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009578/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009579#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009580int
9581main ()
9582{
9583void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009584
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009585 ;
9586 return 0;
9587}
9588_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009589if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009590 ac_cv_flock_decl=yes
9591else
9592 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009593
9594fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009595rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +00009596
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009597fi
9598{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
9599$as_echo "$ac_cv_flock_decl" >&6; }
9600if test "x${ac_cv_flock_decl}" = xyes; then
9601 for ac_func in flock
9602do :
9603 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Benjamin Peterson316e02b2011-05-10 15:01:56 -05009604if test "x$ac_cv_func_flock" = x""yes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009605 cat >>confdefs.h <<_ACEOF
9606#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +00009607_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009608
Antoine Pitroua3000072010-09-07 14:52:42 +00009609else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009610 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +00009611$as_echo_n "checking for flock in -lbsd... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05009612if test "${ac_cv_lib_bsd_flock+set}" = set; then :
Antoine Pitroua3000072010-09-07 14:52:42 +00009613 $as_echo_n "(cached) " >&6
9614else
9615 ac_check_lib_save_LIBS=$LIBS
9616LIBS="-lbsd $LIBS"
9617cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9618/* end confdefs.h. */
9619
9620/* Override any GCC internal prototype to avoid an error.
9621 Use char because int might match the return type of a GCC
9622 builtin and then its argument prototype would still apply. */
9623#ifdef __cplusplus
9624extern "C"
9625#endif
9626char flock ();
9627int
9628main ()
9629{
9630return flock ();
9631 ;
9632 return 0;
9633}
9634_ACEOF
9635if ac_fn_c_try_link "$LINENO"; then :
9636 ac_cv_lib_bsd_flock=yes
9637else
9638 ac_cv_lib_bsd_flock=no
9639fi
9640rm -f core conftest.err conftest.$ac_objext \
9641 conftest$ac_exeext conftest.$ac_ext
9642LIBS=$ac_check_lib_save_LIBS
9643fi
9644{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
9645$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05009646if test "x$ac_cv_lib_bsd_flock" = x""yes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009647 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +00009648
9649
9650$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
9651
9652
9653fi
9654
9655
9656fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009657done
9658
Antoine Pitroua3000072010-09-07 14:52:42 +00009659fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009660
Matthias Kloseb9621712010-04-24 17:59:49 +00009661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
9662$as_echo_n "checking for getpagesize... " >&6; }
9663cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009664/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009665
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009666#include <unistd.h>
9667
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009668int
9669main ()
9670{
9671void* p = getpagesize
9672 ;
9673 return 0;
9674}
9675_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009676if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009677
Matthias Kloseb9621712010-04-24 17:59:49 +00009678$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009679
Matthias Kloseb159a552010-04-25 21:00:44 +00009680 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009681$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009682else
Matthias Kloseb9621712010-04-24 17:59:49 +00009683 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9684$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009685
9686fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009687rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009688
Antoine Pitrou6f26be02011-05-03 18:18:59 +02009689{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mallopt can set malloc mmap threshold" >&5
9690$as_echo_n "checking whether mallopt can set malloc mmap threshold... " >&6; }
9691cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9692/* end confdefs.h. */
9693
9694#include <malloc.h>
9695
9696int
9697main ()
9698{
9699mallopt(M_MMAP_THRESHOLD, 256 * 1024)
9700 ;
9701 return 0;
9702}
9703_ACEOF
9704if ac_fn_c_try_compile "$LINENO"; then :
9705
9706$as_echo "#define HAVE_MALLOPT_MMAP_THRESHOLD 1" >>confdefs.h
9707
9708 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9709$as_echo "yes" >&6; }
9710else
9711 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9712$as_echo "no" >&6; }
9713
9714fi
9715rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9716
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009717for ac_prog in true
9718do
9719 # Extract the first word of "$ac_prog", so it can be a program name with args.
9720set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00009721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9722$as_echo_n "checking for $ac_word... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05009723if test "${ac_cv_prog_TRUE+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009724 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009725else
9726 if test -n "$TRUE"; then
9727 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
9728else
9729as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9730for as_dir in $PATH
9731do
9732 IFS=$as_save_IFS
9733 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009734 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009735 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 +00009736 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00009737 $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 +00009738 break 2
9739 fi
9740done
Matthias Kloseb9621712010-04-24 17:59:49 +00009741 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009742IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009743
9744fi
9745fi
9746TRUE=$ac_cv_prog_TRUE
9747if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
9749$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009750else
Matthias Kloseb9621712010-04-24 17:59:49 +00009751 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9752$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009753fi
9754
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009755
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009756 test -n "$TRUE" && break
9757done
9758test -n "$TRUE" || TRUE="/bin/true"
9759
9760
Matthias Kloseb9621712010-04-24 17:59:49 +00009761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
9762$as_echo_n "checking for inet_aton in -lc... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05009763if test "${ac_cv_lib_c_inet_aton+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009764 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009765else
9766 ac_check_lib_save_LIBS=$LIBS
9767LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009768cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009769/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009770
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009771/* Override any GCC internal prototype to avoid an error.
9772 Use char because int might match the return type of a GCC
9773 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009774#ifdef __cplusplus
9775extern "C"
9776#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009777char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009778int
9779main ()
9780{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009781return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009782 ;
9783 return 0;
9784}
9785_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009786if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009787 ac_cv_lib_c_inet_aton=yes
9788else
Matthias Kloseb9621712010-04-24 17:59:49 +00009789 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009790fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009791rm -f core conftest.err conftest.$ac_objext \
9792 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009793LIBS=$ac_check_lib_save_LIBS
9794fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009795{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
9796$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05009797if test "x$ac_cv_lib_c_inet_aton" = x""yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009798 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009799else
Matthias Kloseb9621712010-04-24 17:59:49 +00009800 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
9801$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05009802if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009803 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009804else
9805 ac_check_lib_save_LIBS=$LIBS
9806LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009807cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009808/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009809
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009810/* Override any GCC internal prototype to avoid an error.
9811 Use char because int might match the return type of a GCC
9812 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009813#ifdef __cplusplus
9814extern "C"
9815#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009816char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009817int
9818main ()
9819{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009820return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009821 ;
9822 return 0;
9823}
9824_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009825if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009826 ac_cv_lib_resolv_inet_aton=yes
9827else
Matthias Kloseb9621712010-04-24 17:59:49 +00009828 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009829fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009830rm -f core conftest.err conftest.$ac_objext \
9831 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009832LIBS=$ac_check_lib_save_LIBS
9833fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009834{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
9835$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05009836if test "x$ac_cv_lib_resolv_inet_aton" = x""yes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009837 cat >>confdefs.h <<_ACEOF
9838#define HAVE_LIBRESOLV 1
9839_ACEOF
9840
9841 LIBS="-lresolv $LIBS"
9842
9843fi
9844
9845
9846fi
9847
9848
Christian Heimesd0764e22007-12-04 15:00:33 +00009849# On Tru64, chflags seems to be present, but calling it will
9850# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +00009851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
9852$as_echo_n "checking for chflags... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05009853if test "${ac_cv_have_chflags+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009854 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009855else
Matthias Kloseb9621712010-04-24 17:59:49 +00009856 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009857 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +00009858else
Matthias Kloseb9621712010-04-24 17:59:49 +00009859 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +00009860/* end confdefs.h. */
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009861[
Christian Heimesd0764e22007-12-04 15:00:33 +00009862#include <sys/stat.h>
9863#include <unistd.h>
9864int main(int argc, char*argv[])
9865{
9866 if(chflags(argv[0], 0) != 0)
9867 return 1;
9868 return 0;
9869}
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009870]
Christian Heimesd0764e22007-12-04 15:00:33 +00009871_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009872if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009873 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009874else
Matthias Kloseb9621712010-04-24 17:59:49 +00009875 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009876fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009877rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9878 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009879fi
9880
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009881
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009882fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009883{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
9884$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009885if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009886 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Benjamin Peterson316e02b2011-05-10 15:01:56 -05009887if test "x$ac_cv_func_chflags" = x""yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009888 ac_cv_have_chflags="yes"
9889else
9890 ac_cv_have_chflags="no"
9891fi
9892
9893fi
9894if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009895
Matthias Kloseb9621712010-04-24 17:59:49 +00009896$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009897
9898fi
9899
Matthias Kloseb9621712010-04-24 17:59:49 +00009900{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
9901$as_echo_n "checking for lchflags... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05009902if test "${ac_cv_have_lchflags+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009903 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009904else
Matthias Kloseb9621712010-04-24 17:59:49 +00009905 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009906 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +00009907else
Matthias Kloseb9621712010-04-24 17:59:49 +00009908 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +00009909/* end confdefs.h. */
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009910[
Christian Heimesd0764e22007-12-04 15:00:33 +00009911#include <sys/stat.h>
9912#include <unistd.h>
9913int main(int argc, char*argv[])
9914{
9915 if(lchflags(argv[0], 0) != 0)
9916 return 1;
9917 return 0;
9918}
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009919]
Christian Heimesd0764e22007-12-04 15:00:33 +00009920_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009921if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009922 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009923else
Matthias Kloseb9621712010-04-24 17:59:49 +00009924 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +00009925fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009926rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9927 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009928fi
9929
9930
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009931fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009932{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
9933$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009934if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009935 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Benjamin Peterson316e02b2011-05-10 15:01:56 -05009936if test "x$ac_cv_func_lchflags" = x""yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009937 ac_cv_have_lchflags="yes"
9938else
9939 ac_cv_have_lchflags="no"
9940fi
9941
9942fi
9943if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009944
Matthias Kloseb9621712010-04-24 17:59:49 +00009945$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009946
9947fi
9948
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009949case $ac_sys_system/$ac_sys_release in
9950Darwin/*)
9951 _CUR_CFLAGS="${CFLAGS}"
9952 _CUR_LDFLAGS="${LDFLAGS}"
9953 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
9954 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
9955 ;;
9956esac
9957
Matthias Kloseb9621712010-04-24 17:59:49 +00009958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
9959$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05009960if test "${ac_cv_lib_z_inflateCopy+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009961 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009962else
9963 ac_check_lib_save_LIBS=$LIBS
9964LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009965cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009966/* end confdefs.h. */
9967
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009968/* Override any GCC internal prototype to avoid an error.
9969 Use char because int might match the return type of a GCC
9970 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009971#ifdef __cplusplus
9972extern "C"
9973#endif
9974char inflateCopy ();
9975int
9976main ()
9977{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009978return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009979 ;
9980 return 0;
9981}
9982_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009983if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009984 ac_cv_lib_z_inflateCopy=yes
9985else
Matthias Kloseb9621712010-04-24 17:59:49 +00009986 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009987fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009988rm -f core conftest.err conftest.$ac_objext \
9989 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009990LIBS=$ac_check_lib_save_LIBS
9991fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009992{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
9993$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -05009994if test "x$ac_cv_lib_z_inflateCopy" = x""yes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009995
Matthias Kloseb9621712010-04-24 17:59:49 +00009996$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009997
9998fi
9999
10000
10001case $ac_sys_system/$ac_sys_release in
10002Darwin/*)
10003 CFLAGS="${_CUR_CFLAGS}"
10004 LDFLAGS="${_CUR_LDFLAGS}"
10005 ;;
10006esac
10007
Matthias Kloseb9621712010-04-24 17:59:49 +000010008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
10009$as_echo_n "checking for hstrerror... " >&6; }
10010cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010011/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010012
Martin v. Löwise9416172003-05-03 10:12:45 +000010013#include <netdb.h>
10014
Martin v. Löwise9416172003-05-03 10:12:45 +000010015int
10016main ()
10017{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010018void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010019 ;
10020 return 0;
10021}
10022_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010023if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010024
Matthias Kloseb9621712010-04-24 17:59:49 +000010025$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010026
Matthias Kloseb159a552010-04-25 21:00:44 +000010027 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010028$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010029else
Matthias Kloseb9621712010-04-24 17:59:49 +000010030 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10031$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010032
10033fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010034rm -f core conftest.err conftest.$ac_objext \
10035 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010036
Matthias Kloseb9621712010-04-24 17:59:49 +000010037{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
10038$as_echo_n "checking for inet_aton... " >&6; }
10039cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010040/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010041
Martin v. Löwis86d66262006-02-17 08:40:11 +000010042#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010043#include <sys/socket.h>
10044#include <netinet/in.h>
10045#include <arpa/inet.h>
10046
Martin v. Löwise9416172003-05-03 10:12:45 +000010047int
10048main ()
10049{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010050void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010051 ;
10052 return 0;
10053}
10054_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010055if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010056
Matthias Kloseb9621712010-04-24 17:59:49 +000010057$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010058
Matthias Kloseb159a552010-04-25 21:00:44 +000010059 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010060$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010061else
Matthias Kloseb9621712010-04-24 17:59:49 +000010062 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10063$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010064
10065fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010066rm -f core conftest.err conftest.$ac_objext \
10067 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010068
Matthias Kloseb9621712010-04-24 17:59:49 +000010069{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
10070$as_echo_n "checking for inet_pton... " >&6; }
10071cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010072/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010073
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010074#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010075#include <sys/socket.h>
10076#include <netinet/in.h>
10077#include <arpa/inet.h>
10078
Martin v. Löwise9416172003-05-03 10:12:45 +000010079int
10080main ()
10081{
10082void* p = inet_pton
10083 ;
10084 return 0;
10085}
10086_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010087if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010088
Matthias Kloseb9621712010-04-24 17:59:49 +000010089$as_echo "#define HAVE_INET_PTON 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
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010098rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000010099
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010100# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000010101{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
10102$as_echo_n "checking for setgroups... " >&6; }
10103cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010104/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010105
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010106#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010107#ifdef HAVE_GRP_H
10108#include <grp.h>
10109#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000010110
Martin v. Löwisd5843682002-11-21 20:41:28 +000010111int
10112main ()
10113{
10114void* p = setgroups
10115 ;
10116 return 0;
10117}
10118_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010119if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010120
Matthias Kloseb9621712010-04-24 17:59:49 +000010121$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +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öwisd5843682002-11-21 20:41:28 +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öwisd5843682002-11-21 20:41:28 +000010128
10129fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010130rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010131
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010132# check for openpty and forkpty
10133
10134for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010135do :
10136 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010137if test "x$ac_cv_func_openpty" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010138 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010139#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010140_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010141
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010142else
Matthias Kloseb9621712010-04-24 17:59:49 +000010143 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
10144$as_echo_n "checking for openpty in -lutil... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010145if test "${ac_cv_lib_util_openpty+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010146 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010147else
Martin v. Löwis11437992002-04-12 09:54:03 +000010148 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010149LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010150cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010151/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010152
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010153/* Override any GCC internal prototype to avoid an error.
10154 Use char because int might match the return type of a GCC
10155 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010156#ifdef __cplusplus
10157extern "C"
10158#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010159char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010160int
10161main ()
10162{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010163return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010164 ;
10165 return 0;
10166}
10167_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010168if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010169 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010170else
Matthias Kloseb9621712010-04-24 17:59:49 +000010171 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010172fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010173rm -f core conftest.err conftest.$ac_objext \
10174 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010175LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010176fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010177{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
10178$as_echo "$ac_cv_lib_util_openpty" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010179if test "x$ac_cv_lib_util_openpty" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010180 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010181 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010182else
Matthias Kloseb9621712010-04-24 17:59:49 +000010183 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
10184$as_echo_n "checking for openpty in -lbsd... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010185if test "${ac_cv_lib_bsd_openpty+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010186 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010187else
10188 ac_check_lib_save_LIBS=$LIBS
10189LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010190cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010191/* end confdefs.h. */
10192
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010193/* Override any GCC internal prototype to avoid an error.
10194 Use char because int might match the return type of a GCC
10195 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010196#ifdef __cplusplus
10197extern "C"
10198#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010199char openpty ();
10200int
10201main ()
10202{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010203return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010204 ;
10205 return 0;
10206}
10207_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010208if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010209 ac_cv_lib_bsd_openpty=yes
10210else
Matthias Kloseb9621712010-04-24 17:59:49 +000010211 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010212fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010213rm -f core conftest.err conftest.$ac_objext \
10214 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010215LIBS=$ac_check_lib_save_LIBS
10216fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010217{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
10218$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010219if test "x$ac_cv_lib_bsd_openpty" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010220 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010221 LIBS="$LIBS -lbsd"
10222fi
10223
10224
10225fi
10226
Fred Drake8cef4cf2000-06-28 16:40:38 +000010227
10228fi
10229done
10230
10231for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010232do :
10233 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010234if test "x$ac_cv_func_forkpty" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010235 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010236#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010237_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010238
Fred Drake8cef4cf2000-06-28 16:40:38 +000010239else
Matthias Kloseb9621712010-04-24 17:59:49 +000010240 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
10241$as_echo_n "checking for forkpty in -lutil... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010242if test "${ac_cv_lib_util_forkpty+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010243 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010244else
Martin v. Löwis11437992002-04-12 09:54:03 +000010245 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010246LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010247cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010248/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010249
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010250/* Override any GCC internal prototype to avoid an error.
10251 Use char because int might match the return type of a GCC
10252 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010253#ifdef __cplusplus
10254extern "C"
10255#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010256char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010257int
10258main ()
10259{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010260return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010261 ;
10262 return 0;
10263}
10264_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010265if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010266 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010267else
Matthias Kloseb9621712010-04-24 17:59:49 +000010268 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010269fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010270rm -f core conftest.err conftest.$ac_objext \
10271 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010272LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010273fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010274{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
10275$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010276if test "x$ac_cv_lib_util_forkpty" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010277 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010278 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010279else
Matthias Kloseb9621712010-04-24 17:59:49 +000010280 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
10281$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010282if test "${ac_cv_lib_bsd_forkpty+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010283 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010284else
10285 ac_check_lib_save_LIBS=$LIBS
10286LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010287cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010288/* end confdefs.h. */
10289
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010290/* Override any GCC internal prototype to avoid an error.
10291 Use char because int might match the return type of a GCC
10292 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010293#ifdef __cplusplus
10294extern "C"
10295#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010296char forkpty ();
10297int
10298main ()
10299{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010300return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010301 ;
10302 return 0;
10303}
10304_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010305if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010306 ac_cv_lib_bsd_forkpty=yes
10307else
Matthias Kloseb9621712010-04-24 17:59:49 +000010308 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010309fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010310rm -f core conftest.err conftest.$ac_objext \
10311 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010312LIBS=$ac_check_lib_save_LIBS
10313fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010314{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
10315$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010316if test "x$ac_cv_lib_bsd_forkpty" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010317 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010318 LIBS="$LIBS -lbsd"
10319fi
10320
10321
10322fi
10323
Fred Drake8cef4cf2000-06-28 16:40:38 +000010324
10325fi
10326done
10327
Jack Jansendd19cf82001-12-06 22:36:17 +000010328
Christian Heimesb186d002008-03-18 15:15:01 +000010329# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000010330for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000010331do :
10332 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010333if test "x$ac_cv_func_memmove" = x""yes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000010334 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010335#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000010336_ACEOF
10337
10338fi
10339done
10340
10341
Michael W. Hudson54241132001-12-07 15:38:26 +000010342# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000010343for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000010344do :
10345 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10346ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070010347if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010348 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010349#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010350_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000010351
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010352fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000010353done
10354
Michael W. Hudson54241132001-12-07 15:38:26 +000010355
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070010356ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
10357if test "x$ac_cv_func_dup2" = x""yes; then :
10358 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000010359
Martin v. Löwis1142de32002-03-29 16:28:31 +000010360else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010361 case " $LIBOBJS " in
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070010362 *" dup2.$ac_objext "* ) ;;
10363 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010364 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010365esac
10366
Martin v. Löwis1142de32002-03-29 16:28:31 +000010367fi
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070010368
10369ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
10370if test "x$ac_cv_func_getcwd" = x""yes; then :
10371 $as_echo "#define HAVE_GETCWD 1" >>confdefs.h
10372
10373else
10374 case " $LIBOBJS " in
10375 *" getcwd.$ac_objext "* ) ;;
10376 *) LIBOBJS="$LIBOBJS getcwd.$ac_objext"
10377 ;;
10378esac
10379
10380fi
10381
10382ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
10383if test "x$ac_cv_func_strdup" = x""yes; then :
10384 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
10385
10386else
10387 case " $LIBOBJS " in
10388 *" strdup.$ac_objext "* ) ;;
10389 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
10390 ;;
10391esac
10392
10393fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000010394
10395
10396for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010397do :
10398 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010399if test "x$ac_cv_func_getpgrp" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010400 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010401#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010402_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010403 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010404/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010405#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010406int
10407main ()
10408{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010409getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010410 ;
10411 return 0;
10412}
10413_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010414if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010415
Matthias Kloseb9621712010-04-24 17:59:49 +000010416$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010417
Guido van Rossum627b2d71993-12-24 10:39:16 +000010418fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010419rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010420
Guido van Rossum627b2d71993-12-24 10:39:16 +000010421fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010422done
Guido van Rossum627b2d71993-12-24 10:39:16 +000010423
Jack Jansen150753c2003-03-29 22:07:47 +000010424for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010425do :
10426 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010427if test "x$ac_cv_func_setpgrp" = x""yes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000010428 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010429#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000010430_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010431 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010432/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000010433#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000010434int
10435main ()
10436{
10437setpgrp(0,0);
10438 ;
10439 return 0;
10440}
10441_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010442if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010443
Matthias Kloseb9621712010-04-24 17:59:49 +000010444$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010445
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010446fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010447rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000010448
10449fi
10450done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010451
Thomas Wouters3a584202000-08-05 23:28:51 +000010452for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000010453do :
10454 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010455if test "x$ac_cv_func_gettimeofday" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010456 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010457#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010458_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010459 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010460/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010461#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010462int
10463main ()
10464{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010465gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010466 ;
10467 return 0;
10468}
10469_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010470if ac_fn_c_try_compile "$LINENO"; then :
10471
Guido van Rossum627b2d71993-12-24 10:39:16 +000010472else
Skip Montanaro6dead952003-09-25 14:50:04 +000010473
Matthias Kloseb9621712010-04-24 17:59:49 +000010474$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010475
Martin v. Löwis11437992002-04-12 09:54:03 +000010476
Guido van Rossum627b2d71993-12-24 10:39:16 +000010477fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010478rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010479
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010480fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010481done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010482
Michael W. Hudson54241132001-12-07 15:38:26 +000010483
Matthias Kloseb9621712010-04-24 17:59:49 +000010484{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
10485$as_echo_n "checking for major... " >&6; }
10486cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010487/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010488
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010489#if defined(MAJOR_IN_MKDEV)
10490#include <sys/mkdev.h>
10491#elif defined(MAJOR_IN_SYSMACROS)
10492#include <sys/sysmacros.h>
10493#else
10494#include <sys/types.h>
10495#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010496
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010497int
10498main ()
10499{
10500
10501 makedev(major(0),minor(0));
10502
10503 ;
10504 return 0;
10505}
10506_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010507if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010508
10509
Matthias Kloseb9621712010-04-24 17:59:49 +000010510$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010511
Matthias Kloseb9621712010-04-24 17:59:49 +000010512 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10513$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010514
10515else
Skip Montanaro6dead952003-09-25 14:50:04 +000010516
Matthias Kloseb9621712010-04-24 17:59:49 +000010517 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10518$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010519
10520fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010521rm -f core conftest.err conftest.$ac_objext \
10522 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010523
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010524# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000010525# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000010526{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
10527$as_echo_n "checking for getaddrinfo... " >&6; }
10528cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010529/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010530
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010531#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010532#include <sys/socket.h>
10533#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010534#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010535
Martin v. Löwis11437992002-04-12 09:54:03 +000010536int
10537main ()
10538{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010539getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000010540 ;
10541 return 0;
10542}
10543_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010544if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010545 have_getaddrinfo=yes
10546else
Matthias Kloseb9621712010-04-24 17:59:49 +000010547 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010548fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010549rm -f core conftest.err conftest.$ac_objext \
10550 conftest$ac_exeext conftest.$ac_ext
10551{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
10552$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010553if test $have_getaddrinfo = yes
10554then
Matthias Kloseb9621712010-04-24 17:59:49 +000010555 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
10556$as_echo_n "checking getaddrinfo bug... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010557 if test "${ac_cv_buggy_getaddrinfo+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010558 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010559else
Matthias Kloseb9621712010-04-24 17:59:49 +000010560 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010561 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010562else
Matthias Kloseb9621712010-04-24 17:59:49 +000010563 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010564/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010565
10566#include <sys/types.h>
10567#include <netdb.h>
10568#include <string.h>
10569#include <sys/socket.h>
10570#include <netinet/in.h>
10571
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010572int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010573{
10574 int passive, gaierr, inet4 = 0, inet6 = 0;
10575 struct addrinfo hints, *ai, *aitop;
10576 char straddr[INET6_ADDRSTRLEN], strport[16];
10577
10578 for (passive = 0; passive <= 1; passive++) {
10579 memset(&hints, 0, sizeof(hints));
10580 hints.ai_family = AF_UNSPEC;
10581 hints.ai_flags = passive ? AI_PASSIVE : 0;
10582 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000010583 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010584 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
10585 (void)gai_strerror(gaierr);
10586 goto bad;
10587 }
10588 for (ai = aitop; ai; ai = ai->ai_next) {
10589 if (ai->ai_addr == NULL ||
10590 ai->ai_addrlen == 0 ||
10591 getnameinfo(ai->ai_addr, ai->ai_addrlen,
10592 straddr, sizeof(straddr), strport, sizeof(strport),
10593 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
10594 goto bad;
10595 }
10596 switch (ai->ai_family) {
10597 case AF_INET:
10598 if (strcmp(strport, "54321") != 0) {
10599 goto bad;
10600 }
10601 if (passive) {
10602 if (strcmp(straddr, "0.0.0.0") != 0) {
10603 goto bad;
10604 }
10605 } else {
10606 if (strcmp(straddr, "127.0.0.1") != 0) {
10607 goto bad;
10608 }
10609 }
10610 inet4++;
10611 break;
10612 case AF_INET6:
10613 if (strcmp(strport, "54321") != 0) {
10614 goto bad;
10615 }
10616 if (passive) {
10617 if (strcmp(straddr, "::") != 0) {
10618 goto bad;
10619 }
10620 } else {
10621 if (strcmp(straddr, "::1") != 0) {
10622 goto bad;
10623 }
10624 }
10625 inet6++;
10626 break;
10627 case AF_UNSPEC:
10628 goto bad;
10629 break;
10630 default:
10631 /* another family support? */
10632 break;
10633 }
10634 }
10635 }
10636
10637 if (!(inet4 == 0 || inet4 == 2))
10638 goto bad;
10639 if (!(inet6 == 0 || inet6 == 2))
10640 goto bad;
10641
10642 if (aitop)
10643 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010644 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010645
10646 bad:
10647 if (aitop)
10648 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010649 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010650}
10651
Martin v. Löwis11437992002-04-12 09:54:03 +000010652_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010653if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010654 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010655else
Matthias Kloseb9621712010-04-24 17:59:49 +000010656 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010657fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010658rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10659 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010660fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010661
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010662fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010663
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010664fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010665
Benjamin Petersond4694ed2010-11-01 01:44:30 +000010666{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
10667$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
10668
Mark Dickinson2df5d282009-12-31 21:22:50 +000010669if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010670then
10671 if test $ipv6 = yes
10672 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010673 echo 'Fatal: You must get working getaddrinfo() function.'
10674 echo ' or you can specify "--disable-ipv6"'.
10675 exit 1
10676 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010677else
Martin v. Löwis11437992002-04-12 09:54:03 +000010678
Matthias Kloseb9621712010-04-24 17:59:49 +000010679$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010680
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010681fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000010682
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010683for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000010684do :
10685 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010686if test "x$ac_cv_func_getnameinfo" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010687 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010688#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010689_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010690
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010691fi
10692done
10693
Michael W. Hudson54241132001-12-07 15:38:26 +000010694
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010695# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000010696{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
10697$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010698if test "${ac_cv_header_time+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010699 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010700else
Matthias Kloseb9621712010-04-24 17:59:49 +000010701 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010702/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010703#include <sys/types.h>
10704#include <sys/time.h>
10705#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010706
Martin v. Löwis11437992002-04-12 09:54:03 +000010707int
10708main ()
10709{
10710if ((struct tm *) 0)
10711return 0;
10712 ;
10713 return 0;
10714}
10715_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010716if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010717 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000010718else
Matthias Kloseb9621712010-04-24 17:59:49 +000010719 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010720fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010721rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010722fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010723{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
10724$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010725if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010726
Matthias Kloseb9621712010-04-24 17:59:49 +000010727$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010728
10729fi
10730
Matthias Kloseb9621712010-04-24 17:59:49 +000010731{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
10732$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010733if test "${ac_cv_struct_tm+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010734 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010735else
Matthias Kloseb9621712010-04-24 17:59:49 +000010736 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010737/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010738#include <sys/types.h>
10739#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010740
Martin v. Löwis11437992002-04-12 09:54:03 +000010741int
10742main ()
10743{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010744struct tm tm;
10745 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000010746 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000010747 ;
10748 return 0;
10749}
10750_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010751if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010752 ac_cv_struct_tm=time.h
10753else
Matthias Kloseb9621712010-04-24 17:59:49 +000010754 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010755fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010756rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010757fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010758{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
10759$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010760if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010761
Matthias Kloseb9621712010-04-24 17:59:49 +000010762$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010763
10764fi
10765
Matthias Kloseb9621712010-04-24 17:59:49 +000010766ac_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 +000010767#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000010768
Matthias Kloseb9621712010-04-24 17:59:49 +000010769"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010770if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010771
10772cat >>confdefs.h <<_ACEOF
10773#define HAVE_STRUCT_TM_TM_ZONE 1
10774_ACEOF
10775
10776
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010777fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010778
Martin v. Löwis11437992002-04-12 09:54:03 +000010779if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
10780
Matthias Kloseb9621712010-04-24 17:59:49 +000010781$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010782
10783else
Matthias Kloseb9621712010-04-24 17:59:49 +000010784 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
10785"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010786if test "x$ac_cv_have_decl_tzname" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010787 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010788else
Matthias Kloseb9621712010-04-24 17:59:49 +000010789 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010790fi
10791
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010792cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010793#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010794_ACEOF
10795
Matthias Kloseb9621712010-04-24 17:59:49 +000010796 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
10797$as_echo_n "checking for tzname... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010798if test "${ac_cv_var_tzname+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010799 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010800else
Matthias Kloseb9621712010-04-24 17:59:49 +000010801 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010802/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010803#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010804#if !HAVE_DECL_TZNAME
10805extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000010806#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010807
Martin v. Löwis11437992002-04-12 09:54:03 +000010808int
10809main ()
10810{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010811return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000010812 ;
10813 return 0;
10814}
10815_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010816if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010817 ac_cv_var_tzname=yes
10818else
Matthias Kloseb9621712010-04-24 17:59:49 +000010819 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010820fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010821rm -f core conftest.err conftest.$ac_objext \
10822 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000010823fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010824{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
10825$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010826 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010827
Matthias Kloseb9621712010-04-24 17:59:49 +000010828$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010829
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010830 fi
10831fi
10832
Matthias Kloseb9621712010-04-24 17:59:49 +000010833ac_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 -050010834if test "x$ac_cv_member_struct_stat_st_rdev" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010835
10836cat >>confdefs.h <<_ACEOF
10837#define HAVE_STRUCT_STAT_ST_RDEV 1
10838_ACEOF
10839
10840
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010841fi
10842
Matthias Kloseb9621712010-04-24 17:59:49 +000010843ac_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 -050010844if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000010845
Martin v. Löwis11437992002-04-12 09:54:03 +000010846cat >>confdefs.h <<_ACEOF
10847#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
10848_ACEOF
10849
10850
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010851fi
10852
Matthias Kloseb9621712010-04-24 17:59:49 +000010853ac_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 -050010854if test "x$ac_cv_member_struct_stat_st_flags" = x""yes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000010855
10856cat >>confdefs.h <<_ACEOF
10857#define HAVE_STRUCT_STAT_ST_FLAGS 1
10858_ACEOF
10859
10860
10861fi
10862
Matthias Kloseb9621712010-04-24 17:59:49 +000010863ac_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 -050010864if test "x$ac_cv_member_struct_stat_st_gen" = x""yes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000010865
10866cat >>confdefs.h <<_ACEOF
10867#define HAVE_STRUCT_STAT_ST_GEN 1
10868_ACEOF
10869
10870
10871fi
10872
Matthias Kloseb9621712010-04-24 17:59:49 +000010873ac_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 -050010874if test "x$ac_cv_member_struct_stat_st_birthtime" = x""yes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000010875
10876cat >>confdefs.h <<_ACEOF
10877#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
10878_ACEOF
10879
10880
10881fi
10882
Matthias Kloseb9621712010-04-24 17:59:49 +000010883ac_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 -050010884if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000010885
Martin v. Löwis11437992002-04-12 09:54:03 +000010886cat >>confdefs.h <<_ACEOF
10887#define HAVE_STRUCT_STAT_ST_BLOCKS 1
10888_ACEOF
10889
10890
Matthias Kloseb9621712010-04-24 17:59:49 +000010891$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010892
10893else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010894 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000010895 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010896 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
10897 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010898esac
10899
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010900fi
10901
Michael W. Hudson54241132001-12-07 15:38:26 +000010902
Martin v. Löwis11437992002-04-12 09:54:03 +000010903
Matthias Kloseb9621712010-04-24 17:59:49 +000010904{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
10905$as_echo_n "checking for time.h that defines altzone... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010906if test "${ac_cv_header_time_altzone+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010907 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010908else
Matthias Kloseb159a552010-04-25 21:00:44 +000010909
Matthias Kloseb9621712010-04-24 17:59:49 +000010910 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010911/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000010912#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010913int
10914main ()
10915{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010916return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000010917 ;
10918 return 0;
10919}
10920_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010921if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010922 ac_cv_header_time_altzone=yes
10923else
Matthias Kloseb9621712010-04-24 17:59:49 +000010924 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000010925fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010926rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000010927
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010928fi
10929
Matthias Kloseb9621712010-04-24 17:59:49 +000010930{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
10931$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010932if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010933
Matthias Kloseb9621712010-04-24 17:59:49 +000010934$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010935
10936fi
10937
Guido van Rossumda88dad1995-01-26 00:46:29 +000010938was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000010939{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
10940$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
10941cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010942/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000010943
10944#include <sys/types.h>
10945#include <sys/select.h>
10946#include <sys/time.h>
10947
Martin v. Löwis11437992002-04-12 09:54:03 +000010948int
10949main ()
10950{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010951;
Martin v. Löwis11437992002-04-12 09:54:03 +000010952 ;
10953 return 0;
10954}
10955_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010956if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010957
10958
Matthias Kloseb9621712010-04-24 17:59:49 +000010959$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000010960
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010961 was_it_defined=yes
10962
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010963fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010964rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010965{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
10966$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010967
Matthias Kloseb9621712010-04-24 17:59:49 +000010968{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
10969$as_echo_n "checking for addrinfo... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050010970if test "${ac_cv_struct_addrinfo+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010971 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010972else
Matthias Kloseb9621712010-04-24 17:59:49 +000010973 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010974/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010975#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010976int
10977main ()
10978{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010979struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000010980 ;
10981 return 0;
10982}
10983_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010984if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010985 ac_cv_struct_addrinfo=yes
10986else
Matthias Kloseb9621712010-04-24 17:59:49 +000010987 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010988fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010989rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10990fi
10991
Matthias Kloseb9621712010-04-24 17:59:49 +000010992{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
10993$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010994if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010995
Matthias Kloseb9621712010-04-24 17:59:49 +000010996$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010997
10998fi
10999
Matthias Kloseb9621712010-04-24 17:59:49 +000011000{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
11001$as_echo_n "checking for sockaddr_storage... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050011002if test "${ac_cv_struct_sockaddr_storage+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011003 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011004else
Matthias Kloseb9621712010-04-24 17:59:49 +000011005 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011006/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011007
11008# include <sys/types.h>
11009# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011010int
11011main ()
11012{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011013struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000011014 ;
11015 return 0;
11016}
11017_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011018if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011019 ac_cv_struct_sockaddr_storage=yes
11020else
Matthias Kloseb9621712010-04-24 17:59:49 +000011021 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011022fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011023rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11024fi
11025
Matthias Kloseb9621712010-04-24 17:59:49 +000011026{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
11027$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011028if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011029
Matthias Kloseb9621712010-04-24 17:59:49 +000011030$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011031
11032fi
11033
Guido van Rossum627b2d71993-12-24 10:39:16 +000011034# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000011035
Matthias Kloseb9621712010-04-24 17:59:49 +000011036{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
11037$as_echo_n "checking whether char is unsigned... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050011038if test "${ac_cv_c_char_unsigned+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011039 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000011040else
Matthias Kloseb9621712010-04-24 17:59:49 +000011041 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011042/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011043$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000011044int
11045main ()
11046{
11047static int test_array [1 - 2 * !(((char) -1) < 0)];
11048test_array [0] = 0
11049
11050 ;
11051 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000011052}
Martin v. Löwis11437992002-04-12 09:54:03 +000011053_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011054if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000011055 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011056else
Matthias Kloseb9621712010-04-24 17:59:49 +000011057 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011058fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011059rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011060fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011061{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
11062$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011063if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011064 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011065
11066fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000011067
Matthias Kloseb9621712010-04-24 17:59:49 +000011068{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
11069$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050011070if test "${ac_cv_c_const+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011071 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011072else
Matthias Kloseb9621712010-04-24 17:59:49 +000011073 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011074/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011075
Martin v. Löwis11437992002-04-12 09:54:03 +000011076int
11077main ()
11078{
11079/* FIXME: Include the comments suggested by Paul. */
11080#ifndef __cplusplus
11081 /* Ultrix mips cc rejects this. */
11082 typedef int charset[2];
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011083 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000011084 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011085 char const *const *pcpcc;
11086 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011087 /* NEC SVR4.0.2 mips cc rejects this. */
11088 struct point {int x, y;};
11089 static struct point const zero = {0,0};
11090 /* AIX XL C 1.02.0.0 rejects this.
11091 It does not let you subtract one const X* pointer from another in
11092 an arm of an if-expression whose if-part is not a constant
11093 expression */
11094 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011095 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011096 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011097 ++pcpcc;
11098 ppc = (char**) pcpcc;
11099 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011100 { /* SCO 3.2v4 cc rejects this. */
11101 char *t;
11102 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011103
Martin v. Löwis11437992002-04-12 09:54:03 +000011104 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011105 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011106 }
11107 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
11108 int x[] = {25, 17};
11109 const int *foo = &x[0];
11110 ++foo;
11111 }
11112 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11113 typedef const int *iptr;
11114 iptr p = 0;
11115 ++p;
11116 }
11117 { /* AIX XL C 1.02.0.0 rejects this saying
11118 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11119 struct s { int j; const int *ap[3]; };
11120 struct s *b; b->j = 5;
11121 }
11122 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11123 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011124 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011125 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011126 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000011127#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000011128
Martin v. Löwis11437992002-04-12 09:54:03 +000011129 ;
11130 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000011131}
Martin v. Löwis11437992002-04-12 09:54:03 +000011132_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011133if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011134 ac_cv_c_const=yes
11135else
Matthias Kloseb9621712010-04-24 17:59:49 +000011136 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011137fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011138rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011139fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011140{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
11141$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011142if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011143
Matthias Kloseb9621712010-04-24 17:59:49 +000011144$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011145
11146fi
11147
Michael W. Hudson54241132001-12-07 15:38:26 +000011148
Guido van Rossumda88dad1995-01-26 00:46:29 +000011149works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011150{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
11151$as_echo_n "checking for working volatile... " >&6; }
11152cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011153/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011154
Martin v. Löwis11437992002-04-12 09:54:03 +000011155int
11156main ()
11157{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011158volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011159 ;
11160 return 0;
11161}
11162_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011163if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011164 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011165else
Skip Montanaro6dead952003-09-25 14:50:04 +000011166
Matthias Kloseb9621712010-04-24 17:59:49 +000011167$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011168
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011169
Guido van Rossum627b2d71993-12-24 10:39:16 +000011170fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011171rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011172{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11173$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011174
Guido van Rossumda88dad1995-01-26 00:46:29 +000011175works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011176{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
11177$as_echo_n "checking for working signed char... " >&6; }
11178cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011179/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011180
Martin v. Löwis11437992002-04-12 09:54:03 +000011181int
11182main ()
11183{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011184signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000011185 ;
11186 return 0;
11187}
11188_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011189if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011190 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011191else
Skip Montanaro6dead952003-09-25 14:50:04 +000011192
Matthias Kloseb9621712010-04-24 17:59:49 +000011193$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000011194
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011195
Guido van Rossum7f43da71994-08-01 12:15:30 +000011196fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011197rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011198{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11199$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011200
Guido van Rossumda88dad1995-01-26 00:46:29 +000011201have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011202{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
11203$as_echo_n "checking for prototypes... " >&6; }
11204cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011205/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011206int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011207int
11208main ()
11209{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011210return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000011211 ;
11212 return 0;
11213}
11214_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011215if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011216
Matthias Kloseb9621712010-04-24 17:59:49 +000011217$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011218
Matthias Kloseb159a552010-04-25 21:00:44 +000011219 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011220fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011221rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011222{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
11223$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011224
Guido van Rossumda88dad1995-01-26 00:46:29 +000011225works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011226{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
11227$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
11228cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011229/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011230
11231#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000011232int foo(int x, ...) {
11233 va_list va;
11234 va_start(va, x);
11235 va_arg(va, int);
11236 va_arg(va, char *);
11237 va_arg(va, double);
11238 return 0;
11239}
Guido van Rossum7f43da71994-08-01 12:15:30 +000011240
Martin v. Löwis11437992002-04-12 09:54:03 +000011241int
11242main ()
11243{
Guido van Rossum90eea071996-08-30 20:58:57 +000011244return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000011245 ;
11246 return 0;
11247}
11248_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011249if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011250
11251
Matthias Kloseb9621712010-04-24 17:59:49 +000011252$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011253
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011254 works=yes
11255
Guido van Rossum627b2d71993-12-24 10:39:16 +000011256fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011257rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011258{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11259$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011260
Martin v. Löwisd6320502004-08-12 13:45:08 +000011261# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000011262{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
11263$as_echo_n "checking for socketpair... " >&6; }
11264cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011265/* end confdefs.h. */
11266
11267#include <sys/types.h>
11268#include <sys/socket.h>
11269
11270int
11271main ()
11272{
11273void *x=socketpair
11274 ;
11275 return 0;
11276}
11277_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011278if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000011279
Matthias Kloseb9621712010-04-24 17:59:49 +000011280$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000011281
Matthias Kloseb159a552010-04-25 21:00:44 +000011282 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011283$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011284else
Matthias Kloseb9621712010-04-24 17:59:49 +000011285 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11286$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011287
11288fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011289rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011290
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011291# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000011292{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
11293$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
11294cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011295/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011296#include <sys/types.h>
11297#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011298int
11299main ()
11300{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011301struct sockaddr x;
11302x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011303 ;
11304 return 0;
11305}
11306_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011307if ac_fn_c_try_compile "$LINENO"; then :
11308 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11309$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011310
Matthias Kloseb9621712010-04-24 17:59:49 +000011311$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011312
11313else
Matthias Kloseb9621712010-04-24 17:59:49 +000011314 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11315$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011316
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011317fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011318rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011319
Guido van Rossumda88dad1995-01-26 00:46:29 +000011320va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
11322$as_echo_n "checking whether va_list is an array... " >&6; }
11323cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011324/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011325
11326#ifdef HAVE_STDARG_PROTOTYPES
11327#include <stdarg.h>
11328#else
11329#include <varargs.h>
11330#endif
11331
Martin v. Löwis11437992002-04-12 09:54:03 +000011332int
11333main ()
11334{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011335va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000011336 ;
11337 return 0;
11338}
11339_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011340if ac_fn_c_try_compile "$LINENO"; then :
11341
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011342else
Skip Montanaro6dead952003-09-25 14:50:04 +000011343
Martin v. Löwis11437992002-04-12 09:54:03 +000011344
Matthias Kloseb9621712010-04-24 17:59:49 +000011345$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011346
Guido van Rossumda88dad1995-01-26 00:46:29 +000011347 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011348
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011349fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011350rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011351{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
11352$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011353
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011354# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000011355
11356
Matthias Kloseb9621712010-04-24 17:59:49 +000011357ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050011358if test "x$ac_cv_func_gethostbyname_r" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011359
Matthias Kloseb9621712010-04-24 17:59:49 +000011360 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000011361
Matthias Kloseb9621712010-04-24 17:59:49 +000011362 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
11363$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011364 OLD_CFLAGS=$CFLAGS
11365 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011366 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011367/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011368
11369# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011370
Martin v. Löwis11437992002-04-12 09:54:03 +000011371int
11372main ()
11373{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011374
11375 char *name;
11376 struct hostent *he, *res;
11377 char buffer[2048];
11378 int buflen = 2048;
11379 int h_errnop;
11380
11381 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011382
11383 ;
11384 return 0;
11385}
11386_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011387if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011388
Matthias Kloseb9621712010-04-24 17:59:49 +000011389 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011390
Martin v. Löwis11437992002-04-12 09:54:03 +000011391
Matthias Kloseb9621712010-04-24 17:59:49 +000011392$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011393
Matthias Kloseb9621712010-04-24 17:59:49 +000011394 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11395$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011396
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011397else
Skip Montanaro6dead952003-09-25 14:50:04 +000011398
Matthias Kloseb9621712010-04-24 17:59:49 +000011399 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11400$as_echo "no" >&6; }
11401 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
11402$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
11403 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011404/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011405
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011406# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011407
Martin v. Löwis11437992002-04-12 09:54:03 +000011408int
11409main ()
11410{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011411
11412 char *name;
11413 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000011414 char buffer[2048];
11415 int buflen = 2048;
11416 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011417
Matthias Kloseb159a552010-04-25 21:00:44 +000011418 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011419
11420 ;
11421 return 0;
11422}
11423_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011424if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011425
Matthias Kloseb9621712010-04-24 17:59:49 +000011426 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011427
Martin v. Löwis11437992002-04-12 09:54:03 +000011428
Matthias Kloseb159a552010-04-25 21:00:44 +000011429$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011430
Matthias Kloseb9621712010-04-24 17:59:49 +000011431 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11432$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011433
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011434else
Skip Montanaro6dead952003-09-25 14:50:04 +000011435
Matthias Kloseb9621712010-04-24 17:59:49 +000011436 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11437$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011438 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
11439$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
11440 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11441/* end confdefs.h. */
11442
11443# include <netdb.h>
11444
11445int
11446main ()
11447{
11448
11449 char *name;
11450 struct hostent *he;
11451 struct hostent_data data;
11452
11453 (void) gethostbyname_r(name, he, &data);
11454
11455 ;
11456 return 0;
11457}
11458_ACEOF
11459if ac_fn_c_try_compile "$LINENO"; then :
11460
11461 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
11462
11463
11464$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
11465
11466 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11467$as_echo "yes" >&6; }
11468
11469else
11470
11471 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11472$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011473
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011474fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011475rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011476
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011477fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011478rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011479
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011480fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011481rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011482 CFLAGS=$OLD_CFLAGS
11483
11484else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011485
Matthias Kloseb9621712010-04-24 17:59:49 +000011486 for ac_func in gethostbyname
11487do :
11488 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050011489if test "x$ac_cv_func_gethostbyname" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011490 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011491#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011492_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011493
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011494fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011495done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011496
Michael W. Hudson54241132001-12-07 15:38:26 +000011497
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011498fi
11499
Michael W. Hudson54241132001-12-07 15:38:26 +000011500
11501
11502
11503
11504
11505
Guido van Rossum627b2d71993-12-24 10:39:16 +000011506# checks for system services
11507# (none yet)
11508
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011509# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000011510ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050011511if test "x$ac_cv_func___fpu_control" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011512
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011513else
Matthias Kloseb9621712010-04-24 17:59:49 +000011514 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
11515$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050011516if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011517 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011518else
Martin v. Löwis11437992002-04-12 09:54:03 +000011519 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011520LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011521cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011522/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011523
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011524/* Override any GCC internal prototype to avoid an error.
11525 Use char because int might match the return type of a GCC
11526 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011527#ifdef __cplusplus
11528extern "C"
11529#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011530char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011531int
11532main ()
11533{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011534return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011535 ;
11536 return 0;
11537}
11538_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011539if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011540 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011541else
Matthias Kloseb9621712010-04-24 17:59:49 +000011542 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011543fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011544rm -f core conftest.err conftest.$ac_objext \
11545 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011546LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011547fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011548{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
11549$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050011550if test "x$ac_cv_lib_ieee___fpu_control" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011551 cat >>confdefs.h <<_ACEOF
11552#define HAVE_LIBIEEE 1
11553_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011554
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011555 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011556
Guido van Rossum627b2d71993-12-24 10:39:16 +000011557fi
11558
Michael W. Hudson54241132001-12-07 15:38:26 +000011559
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011560fi
11561
Michael W. Hudson54241132001-12-07 15:38:26 +000011562
Guido van Rossum7f253911997-05-09 02:42:48 +000011563# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000011564{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
11565$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011566
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011567# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011568if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011569 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000011570if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000011571then
11572
Matthias Kloseb9621712010-04-24 17:59:49 +000011573$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011574
Matthias Kloseb9621712010-04-24 17:59:49 +000011575 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11576$as_echo "yes" >&6; }
11577else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11578$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011579fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000011580else
Matthias Kloseb9621712010-04-24 17:59:49 +000011581 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11582$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011583fi
11584
Guido van Rossum7f253911997-05-09 02:42:48 +000011585
Guido van Rossum7f43da71994-08-01 12:15:30 +000011586# check for --with-libm=...
11587
Guido van Rossum563e7081996-09-10 18:20:48 +000011588case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000011589Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000011590*) LIBM=-lm
11591esac
Matthias Kloseb9621712010-04-24 17:59:49 +000011592{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
11593$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011594
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011595# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011596if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011597 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000011598if test "$withval" = no
11599then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000011600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
11601$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011602elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011603then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000011604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
11605$as_echo "set LIBM=\"$withval\"" >&6; }
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070011606else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011607fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011608else
Matthias Kloseb9621712010-04-24 17:59:49 +000011609 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
11610$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011611fi
11612
Guido van Rossum7f43da71994-08-01 12:15:30 +000011613
11614# check for --with-libc=...
11615
Matthias Kloseb9621712010-04-24 17:59:49 +000011616{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
11617$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011618
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011619# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011620if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011621 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000011622if test "$withval" = no
11623then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000011624 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
11625$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011626elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011627then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000011628 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
11629$as_echo "set LIBC=\"$withval\"" >&6; }
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070011630else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011631fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011632else
Matthias Kloseb9621712010-04-24 17:59:49 +000011633 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
11634$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011635fi
11636
Guido van Rossum7f43da71994-08-01 12:15:30 +000011637
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011638# **************************************************
11639# * Check for various properties of floating point *
11640# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011641
Matthias Kloseb9621712010-04-24 17:59:49 +000011642{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
11643$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050011644if test "${ac_cv_little_endian_double+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011645 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011646else
11647
Matthias Kloseb9621712010-04-24 17:59:49 +000011648if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011649 ac_cv_little_endian_double=no
11650else
Matthias Kloseb9621712010-04-24 17:59:49 +000011651 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011652/* end confdefs.h. */
11653
11654#include <string.h>
11655int main() {
11656 double x = 9006104071832581.0;
11657 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
11658 return 0;
11659 else
11660 return 1;
11661}
11662
11663_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011664if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011665 ac_cv_little_endian_double=yes
11666else
Matthias Kloseb9621712010-04-24 17:59:49 +000011667 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011668fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011669rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11670 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011671fi
11672
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011673fi
11674
Matthias Kloseb9621712010-04-24 17:59:49 +000011675{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
11676$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011677if test "$ac_cv_little_endian_double" = yes
11678then
11679
Matthias Kloseb9621712010-04-24 17:59:49 +000011680$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011681
11682fi
11683
Matthias Kloseb9621712010-04-24 17:59:49 +000011684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
11685$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050011686if test "${ac_cv_big_endian_double+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011687 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011688else
11689
Matthias Kloseb9621712010-04-24 17:59:49 +000011690if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011691 ac_cv_big_endian_double=no
11692else
Matthias Kloseb9621712010-04-24 17:59:49 +000011693 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011694/* end confdefs.h. */
11695
11696#include <string.h>
11697int main() {
11698 double x = 9006104071832581.0;
11699 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
11700 return 0;
11701 else
11702 return 1;
11703}
11704
11705_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011706if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011707 ac_cv_big_endian_double=yes
11708else
Matthias Kloseb9621712010-04-24 17:59:49 +000011709 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011710fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011711rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11712 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011713fi
11714
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011715fi
11716
Matthias Kloseb9621712010-04-24 17:59:49 +000011717{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
11718$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011719if test "$ac_cv_big_endian_double" = yes
11720then
11721
Matthias Kloseb9621712010-04-24 17:59:49 +000011722$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011723
11724fi
11725
11726# Some ARM platforms use a mixed-endian representation for doubles.
11727# While Python doesn't currently have full support for these platforms
11728# (see e.g., issue 1762561), we can at least make sure that float <-> string
11729# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000011730{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
11731$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050011732if test "${ac_cv_mixed_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_mixed_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, "\x01\xff\x3f\x43\x05\x04\x03\x02", 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_mixed_endian_double=yes
11754else
Matthias Kloseb9621712010-04-24 17:59:49 +000011755 ac_cv_mixed_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_mixed_endian_double" >&5
11764$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011765if test "$ac_cv_mixed_endian_double" = yes
11766then
11767
Matthias Kloseb9621712010-04-24 17:59:49 +000011768$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011769
11770fi
11771
Mark Dickinson7abf8d42009-04-18 20:17:52 +000011772# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000011773# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000011774# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000011775# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011776# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000011777# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011778
11779# This inline assembler syntax may also work for suncc and icc,
11780# so we try it on all platforms.
11781
Matthias Kloseb9621712010-04-24 17:59:49 +000011782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
11783$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
11784cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011785/* end confdefs.h. */
11786
11787int
11788main ()
11789{
11790
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011791 unsigned short cw;
11792 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
11793 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011794
11795 ;
11796 return 0;
11797}
11798_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011799if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011800 have_gcc_asm_for_x87=yes
11801else
Matthias Kloseb9621712010-04-24 17:59:49 +000011802 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011803fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011804rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011805{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
11806$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011807if test "$have_gcc_asm_for_x87" = yes
11808then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011809
Matthias Kloseb9621712010-04-24 17:59:49 +000011810$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011811
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011812fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011813
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011814# Detect whether system arithmetic is subject to x87-style double
11815# rounding issues. The result of this test has little meaning on non
11816# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
11817# mode is round-to-nearest and double rounding issues are present, and
11818# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000011819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
11820$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011821# $BASECFLAGS may affect the result
11822ac_save_cc="$CC"
11823CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011824if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011825 ac_cv_x87_double_rounding=no
11826else
Matthias Kloseb9621712010-04-24 17:59:49 +000011827 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011828/* end confdefs.h. */
11829
11830#include <stdlib.h>
11831#include <math.h>
11832int main() {
11833 volatile double x, y, z;
11834 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
11835 x = 0.99999999999999989; /* 1-2**-53 */
11836 y = 1./x;
11837 if (y != 1.)
11838 exit(0);
11839 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
11840 x = 1e16;
11841 y = 2.99999;
11842 z = x + y;
11843 if (z != 1e16+4.)
11844 exit(0);
11845 /* both tests show evidence of double rounding */
11846 exit(1);
11847}
11848
11849_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011850if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011851 ac_cv_x87_double_rounding=no
11852else
Matthias Kloseb9621712010-04-24 17:59:49 +000011853 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011854fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011855rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11856 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011857fi
11858
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011859CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000011860{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
11861$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011862if test "$ac_cv_x87_double_rounding" = yes
11863then
11864
Matthias Kloseb9621712010-04-24 17:59:49 +000011865$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011866
11867fi
11868
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011869# ************************************
11870# * Check for mathematical functions *
11871# ************************************
11872
11873LIBS_SAVE=$LIBS
11874LIBS="$LIBS $LIBM"
11875
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011876for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
11877do :
11878 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11879ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070011880if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011881 cat >>confdefs.h <<_ACEOF
11882#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11883_ACEOF
11884
11885fi
11886done
11887
Victor Stinner8f9f8d62011-05-09 12:45:41 +020011888for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011889do :
11890 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11891ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070011892if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011893 cat >>confdefs.h <<_ACEOF
11894#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11895_ACEOF
11896
11897fi
11898done
11899
11900ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
11901"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050011902if test "x$ac_cv_have_decl_isinf" = x""yes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011903 ac_have_decl=1
11904else
11905 ac_have_decl=0
11906fi
11907
11908cat >>confdefs.h <<_ACEOF
11909#define HAVE_DECL_ISINF $ac_have_decl
11910_ACEOF
11911ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
11912"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050011913if test "x$ac_cv_have_decl_isnan" = x""yes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011914 ac_have_decl=1
11915else
11916 ac_have_decl=0
11917fi
11918
11919cat >>confdefs.h <<_ACEOF
11920#define HAVE_DECL_ISNAN $ac_have_decl
11921_ACEOF
11922ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
11923"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050011924if test "x$ac_cv_have_decl_isfinite" = x""yes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011925 ac_have_decl=1
11926else
11927 ac_have_decl=0
11928fi
11929
11930cat >>confdefs.h <<_ACEOF
11931#define HAVE_DECL_ISFINITE $ac_have_decl
11932_ACEOF
11933
11934
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011935# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
11936# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000011937{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
11938$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050011939if test "${ac_cv_tanh_preserves_zero_sign+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011940 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011941else
11942
Matthias Kloseb9621712010-04-24 17:59:49 +000011943if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011944 ac_cv_tanh_preserves_zero_sign=no
11945else
Matthias Kloseb9621712010-04-24 17:59:49 +000011946 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011947/* end confdefs.h. */
11948
11949#include <math.h>
11950#include <stdlib.h>
11951int main() {
11952 /* return 0 if either negative zeros don't exist
11953 on this platform or if negative zeros exist
11954 and tanh(-0.) == -0. */
11955 if (atan2(0., -1.) == atan2(-0., -1.) ||
11956 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
11957 else exit(1);
11958}
11959
11960_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011961if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011962 ac_cv_tanh_preserves_zero_sign=yes
11963else
Matthias Kloseb9621712010-04-24 17:59:49 +000011964 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011965fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011966rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11967 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011968fi
11969
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011970fi
11971
Matthias Kloseb9621712010-04-24 17:59:49 +000011972{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
11973$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011974if test "$ac_cv_tanh_preserves_zero_sign" = yes
11975then
11976
Matthias Kloseb9621712010-04-24 17:59:49 +000011977$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011978
11979fi
11980
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011981if test "$ac_cv_func_log1p" = yes
11982then
11983 # On some versions of AIX, log1p(-0.) returns 0. instead of
11984 # -0. See issue #9920.
11985 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
11986$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050011987 if test "${ac_cv_log1p_drops_zero_sign+set}" = set; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011988 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011989else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011990
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011991 if test "$cross_compiling" = yes; then :
11992 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011993else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011994 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11995/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011996
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011997 #include <math.h>
11998 #include <stdlib.h>
11999 int main() {
12000 /* Fail if the signs of log1p(-0.) and -0. can be
12001 distinguished. */
12002 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
12003 return 0;
12004 else
12005 return 1;
12006 }
12007
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012008_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012009if ac_fn_c_try_run "$LINENO"; then :
12010 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012011else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012012 ac_cv_log1p_drops_zero_sign=yes
12013fi
12014rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12015 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012016fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012017
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012018fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012019
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
12021$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
12022fi
12023if test "$ac_cv_log1p_drops_zero_sign" = yes
12024then
12025
12026$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
12027
12028fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012029
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000012030LIBS=$LIBS_SAVE
12031
Mark Dickinsona614f042009-11-28 12:48:43 +000012032# For multiprocessing module, check that sem_open
12033# actually works. For FreeBSD versions <= 7.2,
12034# the kernel module that provides POSIX semaphores
12035# isn't loaded by default, so an attempt to call
12036# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000012037{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
12038$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050012039if test "${ac_cv_posix_semaphores_enabled+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012040 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000012041else
Matthias Kloseb9621712010-04-24 17:59:49 +000012042 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000012043 ac_cv_posix_semaphores_enabled=yes
12044else
Matthias Kloseb9621712010-04-24 17:59:49 +000012045 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000012046/* end confdefs.h. */
12047
12048#include <unistd.h>
12049#include <fcntl.h>
12050#include <stdio.h>
12051#include <semaphore.h>
12052#include <sys/stat.h>
12053
12054int main(void) {
12055 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
12056 if (a == SEM_FAILED) {
12057 perror("sem_open");
12058 return 1;
12059 }
12060 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000012061 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000012062 return 0;
12063}
12064
12065_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012066if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000012067 ac_cv_posix_semaphores_enabled=yes
12068else
Matthias Kloseb9621712010-04-24 17:59:49 +000012069 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000012070fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012071rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12072 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000012073fi
12074
12075
Mark Dickinsona614f042009-11-28 12:48:43 +000012076fi
12077
Matthias Kloseb9621712010-04-24 17:59:49 +000012078{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
12079$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000012080if test $ac_cv_posix_semaphores_enabled = no
12081then
12082
Matthias Kloseb9621712010-04-24 17:59:49 +000012083$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000012084
12085fi
12086
Mark Dickinson10683072009-04-18 21:18:19 +000012087# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000012088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
12089$as_echo_n "checking for broken sem_getvalue... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050012090if test "${ac_cv_broken_sem_getvalue+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012091 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012092else
Matthias Kloseb9621712010-04-24 17:59:49 +000012093 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012094 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000012095else
Matthias Kloseb9621712010-04-24 17:59:49 +000012096 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000012097/* end confdefs.h. */
12098
12099#include <unistd.h>
12100#include <fcntl.h>
12101#include <stdio.h>
12102#include <semaphore.h>
12103#include <sys/stat.h>
12104
12105int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000012106 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000012107 int count;
12108 int res;
12109 if(a==SEM_FAILED){
12110 perror("sem_open");
12111 return 1;
12112
12113 }
12114 res = sem_getvalue(a, &count);
12115 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000012116 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000012117 return res==-1 ? 1 : 0;
12118}
12119
Mark Dickinson10683072009-04-18 21:18:19 +000012120_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012121if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012122 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000012123else
Matthias Kloseb9621712010-04-24 17:59:49 +000012124 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012125fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012126rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12127 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012128fi
12129
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012130
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012131fi
12132
Matthias Kloseb9621712010-04-24 17:59:49 +000012133{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
12134$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012135if test $ac_cv_broken_sem_getvalue = yes
12136then
12137
Matthias Kloseb9621712010-04-24 17:59:49 +000012138$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012139
12140fi
12141
Mark Dickinsonbd792642009-03-18 20:06:12 +000012142# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000012143{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
12144$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012145# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012146if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000012147 enableval=$enable_big_digits; case $enable_big_digits in
12148yes)
12149 enable_big_digits=30 ;;
12150no)
12151 enable_big_digits=15 ;;
1215215|30)
12153 ;;
12154*)
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070012155 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 +000012156esac
Matthias Kloseb9621712010-04-24 17:59:49 +000012157{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
12158$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012159
12160cat >>confdefs.h <<_ACEOF
12161#define PYLONG_BITS_IN_DIGIT $enable_big_digits
12162_ACEOF
12163
12164
12165else
Matthias Kloseb9621712010-04-24 17:59:49 +000012166 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
12167$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012168fi
12169
12170
Guido van Rossumef2255b2000-03-10 22:30:29 +000012171# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012172ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050012173if test "x$ac_cv_header_wchar_h" = x""yes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012174
12175
Matthias Kloseb9621712010-04-24 17:59:49 +000012176$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012177
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012178 wchar_h="yes"
12179
Guido van Rossumef2255b2000-03-10 22:30:29 +000012180else
Martin v. Löwis11437992002-04-12 09:54:03 +000012181 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000012182
12183fi
12184
Michael W. Hudson54241132001-12-07 15:38:26 +000012185
Martin v. Löwis11437992002-04-12 09:54:03 +000012186
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012187# determine wchar_t size
12188if test "$wchar_h" = yes
12189then
Matthias Kloseb9621712010-04-24 17:59:49 +000012190 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012191# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12192# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12193# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000012194{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
12195$as_echo_n "checking size of wchar_t... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050012196if test "${ac_cv_sizeof_wchar_t+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012197 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012198else
Matthias Kloseb9621712010-04-24 17:59:49 +000012199 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
12200"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012201
Martin v. Löwis11437992002-04-12 09:54:03 +000012202else
Matthias Kloseb9621712010-04-24 17:59:49 +000012203 if test "$ac_cv_type_wchar_t" = yes; then
12204 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12205$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070012206as_fn_error 77 "cannot compute sizeof (wchar_t)
12207See \`config.log' for more details" "$LINENO" 5 ; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012208 else
12209 ac_cv_sizeof_wchar_t=0
12210 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012211fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012212
Martin v. Löwis11437992002-04-12 09:54:03 +000012213fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012214{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
12215$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012216
12217
12218
Martin v. Löwis11437992002-04-12 09:54:03 +000012219cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012220#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012221_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012222
Michael W. Hudson54241132001-12-07 15:38:26 +000012223
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012224fi
12225
Matthias Kloseb9621712010-04-24 17:59:49 +000012226{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
12227$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012228have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012229cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012230/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012231
12232#include <tcl.h>
12233#if TCL_UTF_MAX != 6
12234# error "NOT UCS4_TCL"
12235#endif
12236int
12237main ()
12238{
12239
12240 ;
12241 return 0;
12242}
12243_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012244if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012245
12246
Matthias Kloseb9621712010-04-24 17:59:49 +000012247$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012248
12249 have_ucs4_tcl=yes
12250
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012251fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012252rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012253{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
12254$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012255
Skip Montanaro6dead952003-09-25 14:50:04 +000012256# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012257if test "$wchar_h" = yes
12258then
12259 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000012260 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
12261$as_echo_n "checking whether wchar_t is signed... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050012262 if test "${ac_cv_wchar_t_signed+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012263 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012264else
12265
Matthias Kloseb9621712010-04-24 17:59:49 +000012266 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012267 ac_cv_wchar_t_signed=yes
12268else
Matthias Kloseb9621712010-04-24 17:59:49 +000012269 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012270/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012271
12272 #include <wchar.h>
12273 int main()
12274 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000012275 /* Success: exit code 0 */
12276 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012277 }
12278
12279_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012280if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012281 ac_cv_wchar_t_signed=yes
12282else
Matthias Kloseb9621712010-04-24 17:59:49 +000012283 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012284fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012285rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12286 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012287fi
12288
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012289fi
12290
Matthias Kloseb9621712010-04-24 17:59:49 +000012291 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
12292$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012293fi
12294
Matthias Kloseb9621712010-04-24 17:59:49 +000012295{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what type to use for str" >&5
12296$as_echo_n "checking what type to use for str... " >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000012297
12298# Check whether --with-wide-unicode was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012299if test "${with_wide_unicode+set}" = set; then :
Georg Brandl52d168a2008-01-07 18:10:24 +000012300 withval=$with_wide_unicode;
12301if test "$withval" != no
12302then unicode_size="4"
12303else unicode_size="2"
12304fi
12305
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012306else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012307
Georg Brandl52d168a2008-01-07 18:10:24 +000012308case "$have_ucs4_tcl" in
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012309 yes) unicode_size="4";;
Georg Brandl52d168a2008-01-07 18:10:24 +000012310 *) unicode_size="2" ;;
12311esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012312
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012313fi
12314
Martin v. Löwis0036cba2002-04-12 09:58:45 +000012315
12316
Georg Brandl52d168a2008-01-07 18:10:24 +000012317case "$unicode_size" in
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012318 4)
12319 $as_echo "#define Py_UNICODE_SIZE 4" >>confdefs.h
12320
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012321 ABIFLAGS="${ABIFLAGS}u"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012322 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000012323 *) $as_echo "#define Py_UNICODE_SIZE 2" >>confdefs.h
Georg Brandl52d168a2008-01-07 18:10:24 +000012324 ;;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012325esac
12326
Michael W. Hudson54241132001-12-07 15:38:26 +000012327
Martin v. Löwis11437992002-04-12 09:54:03 +000012328
Georg Brandl52d168a2008-01-07 18:10:24 +000012329# wchar_t is only usable if it maps to an unsigned type
12330if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000012331 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000012332then
12333 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012334
Matthias Kloseb9621712010-04-24 17:59:49 +000012335$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012336
Matthias Kloseb9621712010-04-24 17:59:49 +000012337 $as_echo "#define PY_UNICODE_TYPE wchar_t" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012338
Georg Brandl52d168a2008-01-07 18:10:24 +000012339elif test "$ac_cv_sizeof_short" = "$unicode_size"
12340then
12341 PY_UNICODE_TYPE="unsigned short"
Matthias Kloseb9621712010-04-24 17:59:49 +000012342 $as_echo "#define PY_UNICODE_TYPE unsigned short" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012343
Georg Brandl52d168a2008-01-07 18:10:24 +000012344elif test "$ac_cv_sizeof_long" = "$unicode_size"
12345then
12346 PY_UNICODE_TYPE="unsigned long"
Matthias Kloseb9621712010-04-24 17:59:49 +000012347 $as_echo "#define PY_UNICODE_TYPE unsigned long" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012348
Georg Brandl52d168a2008-01-07 18:10:24 +000012349else
12350 PY_UNICODE_TYPE="no type found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012351fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012352{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PY_UNICODE_TYPE" >&5
12353$as_echo "$PY_UNICODE_TYPE" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000012354
12355# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000012356 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12357$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050012358if test "${ac_cv_c_bigendian+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012359 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000012360else
Matthias Kloseb9621712010-04-24 17:59:49 +000012361 ac_cv_c_bigendian=unknown
12362 # See if we're dealing with a universal compiler.
12363 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12364/* end confdefs.h. */
12365#ifndef __APPLE_CC__
12366 not a universal capable compiler
12367 #endif
12368 typedef int dummy;
12369
Skip Montanaro6dead952003-09-25 14:50:04 +000012370_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012371if ac_fn_c_try_compile "$LINENO"; then :
12372
12373 # Check for potential -arch flags. It is not universal unless
12374 # there are at least two -arch flags with different values.
12375 ac_arch=
12376 ac_prev=
12377 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12378 if test -n "$ac_prev"; then
12379 case $ac_word in
12380 i?86 | x86_64 | ppc | ppc64)
12381 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12382 ac_arch=$ac_word
12383 else
12384 ac_cv_c_bigendian=universal
12385 break
12386 fi
12387 ;;
12388 esac
12389 ac_prev=
12390 elif test "x$ac_word" = "x-arch"; then
12391 ac_prev=arch
12392 fi
12393 done
12394fi
12395rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12396 if test $ac_cv_c_bigendian = unknown; then
12397 # See if sys/param.h defines the BYTE_ORDER macro.
12398 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012399/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012400#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012401 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012402
Martin v. Löwis11437992002-04-12 09:54:03 +000012403int
12404main ()
12405{
Matthias Kloseb9621712010-04-24 17:59:49 +000012406#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12407 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12408 && LITTLE_ENDIAN)
12409 bogus endian macros
12410 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012411
12412 ;
12413 return 0;
12414}
12415_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012416if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012417 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000012418 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012419/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012420#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012421 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012422
Martin v. Löwis11437992002-04-12 09:54:03 +000012423int
12424main ()
12425{
Guido van Rossumef2255b2000-03-10 22:30:29 +000012426#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000012427 not big endian
12428 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012429
12430 ;
12431 return 0;
12432}
12433_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012434if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012435 ac_cv_c_bigendian=yes
12436else
Matthias Kloseb9621712010-04-24 17:59:49 +000012437 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000012438fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012439rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012440fi
12441rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12442 fi
12443 if test $ac_cv_c_bigendian = unknown; then
12444 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12445 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012446/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000012447#include <limits.h>
12448
Martin v. Löwis11437992002-04-12 09:54:03 +000012449int
12450main ()
12451{
Matthias Kloseb9621712010-04-24 17:59:49 +000012452#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12453 bogus endian macros
12454 #endif
12455
Martin v. Löwis11437992002-04-12 09:54:03 +000012456 ;
12457 return 0;
12458}
12459_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012460if ac_fn_c_try_compile "$LINENO"; then :
12461 # It does; now see whether it defined to _BIG_ENDIAN or not.
12462 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12463/* end confdefs.h. */
12464#include <limits.h>
12465
12466int
12467main ()
12468{
12469#ifndef _BIG_ENDIAN
12470 not big endian
12471 #endif
12472
12473 ;
12474 return 0;
12475}
12476_ACEOF
12477if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012478 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012479else
Matthias Kloseb9621712010-04-24 17:59:49 +000012480 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012481fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012482rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12483fi
12484rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12485 fi
12486 if test $ac_cv_c_bigendian = unknown; then
12487 # Compile a test program.
12488 if test "$cross_compiling" = yes; then :
12489 # Try to guess by grepping values from an object file.
12490 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12491/* end confdefs.h. */
12492short int ascii_mm[] =
12493 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12494 short int ascii_ii[] =
12495 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12496 int use_ascii (int i) {
12497 return ascii_mm[i] + ascii_ii[i];
12498 }
12499 short int ebcdic_ii[] =
12500 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12501 short int ebcdic_mm[] =
12502 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12503 int use_ebcdic (int i) {
12504 return ebcdic_mm[i] + ebcdic_ii[i];
12505 }
12506 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012507
Matthias Kloseb9621712010-04-24 17:59:49 +000012508int
12509main ()
12510{
12511return use_ascii (foo) == use_ebcdic (foo);
12512 ;
12513 return 0;
12514}
12515_ACEOF
12516if ac_fn_c_try_compile "$LINENO"; then :
12517 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12518 ac_cv_c_bigendian=yes
12519 fi
12520 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12521 if test "$ac_cv_c_bigendian" = unknown; then
12522 ac_cv_c_bigendian=no
12523 else
12524 # finding both strings is unlikely to happen, but who knows?
12525 ac_cv_c_bigendian=unknown
12526 fi
12527 fi
12528fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012529rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012530else
Matthias Kloseb9621712010-04-24 17:59:49 +000012531 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012532/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012533$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012534int
12535main ()
12536{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012537
Matthias Kloseb9621712010-04-24 17:59:49 +000012538 /* Are we little or big endian? From Harbison&Steele. */
12539 union
12540 {
12541 long int l;
12542 char c[sizeof (long int)];
12543 } u;
12544 u.l = 1;
12545 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012546
12547 ;
12548 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000012549}
Martin v. Löwis11437992002-04-12 09:54:03 +000012550_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012551if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012552 ac_cv_c_bigendian=no
12553else
Matthias Kloseb9621712010-04-24 17:59:49 +000012554 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000012555fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012556rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12557 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000012558fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012559
Matthias Kloseb9621712010-04-24 17:59:49 +000012560 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012561fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012562{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12563$as_echo "$ac_cv_c_bigendian" >&6; }
12564 case $ac_cv_c_bigendian in #(
12565 yes)
12566 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12567;; #(
12568 no)
12569 ;; #(
12570 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012571
Matthias Kloseb9621712010-04-24 17:59:49 +000012572$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012573
Matthias Kloseb9621712010-04-24 17:59:49 +000012574 ;; #(
12575 *)
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070012576 as_fn_error $? "unknown endianness
12577 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000012578 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000012579
Michael W. Hudson54241132001-12-07 15:38:26 +000012580
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012581# ABI version string for Python extension modules. This appears between the
12582# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
12583# from the following attributes which affect the ABI of this Python build (in
12584# this order):
12585#
12586# * The Python implementation (always 'cpython-' for us)
12587# * The major and minor version numbers
12588# * --with-pydebug (adds a 'd')
12589# * --with-pymalloc (adds a 'm')
12590# * --with-wide-unicode (adds a 'u')
12591#
12592# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012593# would get a shared library ABI version tag of 'cpython-32dmu' and shared
12594# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012595
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
12597$as_echo_n "checking ABIFLAGS... " >&6; }
12598{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
12599$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
12601$as_echo_n "checking SOABI... " >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012602SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012603{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
12604$as_echo "$SOABI" >&6; }
12605
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012606{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
12607$as_echo_n "checking LDVERSION... " >&6; }
12608LDVERSION='$(VERSION)$(ABIFLAGS)'
12609{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
12610$as_echo "$LDVERSION" >&6; }
12611
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012612# SO is the extension of shared libraries `(including the dot!)
12613# -- usually .so, .sl on HP-UX, .dll on Cygwin
12614{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SO" >&5
12615$as_echo_n "checking SO... " >&6; }
12616if test -z "$SO"
12617then
12618 case $ac_sys_system in
12619 hp*|HP*)
12620 case `uname -m` in
12621 ia64) SO=.so;;
12622 *) SO=.sl;;
12623 esac
12624 ;;
12625 CYGWIN*) SO=.dll;;
Barry Warsaw278266f2010-10-14 17:38:46 +000012626 Linux*|GNU*)
12627 SO=.${SOABI}.so;;
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012628 *) SO=.so;;
12629 esac
12630else
12631 # this might also be a termcap variable, see #610332
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012632 echo
12633 echo '====================================================================='
12634 echo '+ +'
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012635 echo '+ WARNING: You have set SO in your environment. +'
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012636 echo '+ Do you really mean to change the extension for shared libraries? +'
12637 echo '+ Continuing in 10 seconds to let you to ponder. +'
12638 echo '+ +'
12639 echo '====================================================================='
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012640 sleep 10
12641fi
12642{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SO" >&5
12643$as_echo "$SO" >&6; }
12644
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012645# Check whether right shifting a negative integer extends the sign bit
12646# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000012647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
12648$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050012649if test "${ac_cv_rshift_extends_sign+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012650 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000012651else
Martin v. Löwis11437992002-04-12 09:54:03 +000012652
Matthias Kloseb9621712010-04-24 17:59:49 +000012653if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000012654 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012655else
Matthias Kloseb9621712010-04-24 17:59:49 +000012656 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012657/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012658
12659int main()
12660{
Vladimir Marangozova6180282000-07-12 05:05:06 +000012661 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012662}
12663
Martin v. Löwis11437992002-04-12 09:54:03 +000012664_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012665if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000012666 ac_cv_rshift_extends_sign=yes
12667else
Matthias Kloseb9621712010-04-24 17:59:49 +000012668 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000012669fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012670rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12671 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000012672fi
12673
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012674fi
12675
Matthias Kloseb9621712010-04-24 17:59:49 +000012676{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
12677$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000012678if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012679then
Martin v. Löwis11437992002-04-12 09:54:03 +000012680
Matthias Kloseb9621712010-04-24 17:59:49 +000012681$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012682
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012683fi
12684
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012685# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000012686{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
12687$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050012688if test "${ac_cv_have_getc_unlocked+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012689 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012690else
Martin v. Löwis11437992002-04-12 09:54:03 +000012691
Matthias Kloseb9621712010-04-24 17:59:49 +000012692cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012693/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012694#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012695int
12696main ()
12697{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012698
12699 FILE *f = fopen("/dev/null", "r");
12700 flockfile(f);
12701 getc_unlocked(f);
12702 funlockfile(f);
12703
Martin v. Löwis11437992002-04-12 09:54:03 +000012704 ;
12705 return 0;
12706}
12707_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012708if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012709 ac_cv_have_getc_unlocked=yes
12710else
Matthias Kloseb9621712010-04-24 17:59:49 +000012711 ac_cv_have_getc_unlocked=no
12712fi
12713rm -f core conftest.err conftest.$ac_objext \
12714 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012715fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012716
Matthias Kloseb9621712010-04-24 17:59:49 +000012717{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
12718$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012719if test "$ac_cv_have_getc_unlocked" = yes
12720then
Martin v. Löwis11437992002-04-12 09:54:03 +000012721
Matthias Kloseb9621712010-04-24 17:59:49 +000012722$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012723
12724fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012725
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012726# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000012727# save the value of LIBS so we don't actually link Python with readline
12728LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012729
Gregory P. Smith18820942008-09-07 06:24:49 +000012730# On some systems we need to link readline to a termcap compatible
12731# library. NOTE: Keep the precedence of listed libraries synchronised
12732# with setup.py.
12733py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012734{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
12735$as_echo_n "checking how to link readline libs... " >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012736for py_libtermcap in "" ncursesw ncurses curses termcap; do
12737 if test -z "$py_libtermcap"; then
12738 READLINE_LIBS="-lreadline"
12739 else
12740 READLINE_LIBS="-lreadline -l$py_libtermcap"
12741 fi
12742 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000012743 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012744/* end confdefs.h. */
12745
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012746/* Override any GCC internal prototype to avoid an error.
12747 Use char because int might match the return type of a GCC
12748 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012749#ifdef __cplusplus
12750extern "C"
12751#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012752char readline ();
12753int
12754main ()
12755{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012756return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012757 ;
12758 return 0;
12759}
12760_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012761if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000012762 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012763fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012764rm -f core conftest.err conftest.$ac_objext \
12765 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000012766 if test $py_cv_lib_readline = yes; then
12767 break
12768 fi
12769done
12770# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
12771#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000012772if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012773 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
12774$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012775else
Matthias Kloseb9621712010-04-24 17:59:49 +000012776 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
12777$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012778
Matthias Kloseb9621712010-04-24 17:59:49 +000012779$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012780
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012781fi
12782
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012783# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000012784{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
12785$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050012786if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012787 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012788else
12789 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012790LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012791cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012792/* end confdefs.h. */
12793
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012794/* Override any GCC internal prototype to avoid an error.
12795 Use char because int might match the return type of a GCC
12796 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012797#ifdef __cplusplus
12798extern "C"
12799#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012800char rl_callback_handler_install ();
12801int
12802main ()
12803{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012804return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012805 ;
12806 return 0;
12807}
12808_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012809if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012810 ac_cv_lib_readline_rl_callback_handler_install=yes
12811else
Matthias Kloseb9621712010-04-24 17:59:49 +000012812 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012813fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012814rm -f core conftest.err conftest.$ac_objext \
12815 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012816LIBS=$ac_check_lib_save_LIBS
12817fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012818{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
12819$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050012820if test "x$ac_cv_lib_readline_rl_callback_handler_install" = x""yes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012821
Matthias Kloseb9621712010-04-24 17:59:49 +000012822$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012823
12824fi
12825
12826
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012827# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000012828cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012829/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012830#include <readline/readline.h>
12831_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012832if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012833 have_readline=yes
12834else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012835 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000012836
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012837fi
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070012838rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012839if test $have_readline = yes
12840then
Matthias Kloseb9621712010-04-24 17:59:49 +000012841 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012842/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012843#include <readline/readline.h>
12844
12845_ACEOF
12846if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012847 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012848
Matthias Kloseb9621712010-04-24 17:59:49 +000012849$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012850
12851fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012852rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012853
Matthias Kloseb9621712010-04-24 17:59:49 +000012854 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000012855/* end confdefs.h. */
12856#include <readline/readline.h>
12857
12858_ACEOF
12859if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012860 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000012861
Matthias Kloseb9621712010-04-24 17:59:49 +000012862$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000012863
12864fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012865rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000012866
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012867fi
12868
Martin v. Löwis0daad592001-09-30 21:09:59 +000012869# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000012870{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
12871$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050012872if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012873 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000012874else
Martin v. Löwis11437992002-04-12 09:54:03 +000012875 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012876LIBS="-lreadline $READLINE_LIBS $LIBS"
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. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012879
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012880/* Override any GCC internal prototype to avoid an error.
12881 Use char because int might match the return type of a GCC
12882 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012883#ifdef __cplusplus
12884extern "C"
12885#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012886char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012887int
12888main ()
12889{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012890return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012891 ;
12892 return 0;
12893}
12894_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012895if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012896 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000012897else
Matthias Kloseb9621712010-04-24 17:59:49 +000012898 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000012899fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012900rm -f core conftest.err conftest.$ac_objext \
12901 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012902LIBS=$ac_check_lib_save_LIBS
12903fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012904{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
12905$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050012906if test "x$ac_cv_lib_readline_rl_pre_input_hook" = x""yes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012907
Matthias Kloseb9621712010-04-24 17:59:49 +000012908$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000012909
Martin v. Löwis0daad592001-09-30 21:09:59 +000012910fi
12911
Michael W. Hudson54241132001-12-07 15:38:26 +000012912
Thomas Wouters89d996e2007-09-08 17:39:28 +000012913# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000012914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
12915$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050012916if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012917 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000012918else
12919 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012920LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012921cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000012922/* end confdefs.h. */
12923
12924/* Override any GCC internal prototype to avoid an error.
12925 Use char because int might match the return type of a GCC
12926 builtin and then its argument prototype would still apply. */
12927#ifdef __cplusplus
12928extern "C"
12929#endif
12930char rl_completion_display_matches_hook ();
12931int
12932main ()
12933{
12934return rl_completion_display_matches_hook ();
12935 ;
12936 return 0;
12937}
12938_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012939if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000012940 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
12941else
Matthias Kloseb9621712010-04-24 17:59:49 +000012942 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000012943fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012944rm -f core conftest.err conftest.$ac_objext \
12945 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000012946LIBS=$ac_check_lib_save_LIBS
12947fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012948{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
12949$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050012950if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = x""yes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000012951
Matthias Kloseb9621712010-04-24 17:59:49 +000012952$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000012953
12954fi
12955
12956
Martin v. Löwis0daad592001-09-30 21:09:59 +000012957# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000012958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
12959$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050012960if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012961 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000012962else
Martin v. Löwis11437992002-04-12 09:54:03 +000012963 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012964LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012965cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012966/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012967
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012968/* Override any GCC internal prototype to avoid an error.
12969 Use char because int might match the return type of a GCC
12970 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012971#ifdef __cplusplus
12972extern "C"
12973#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012974char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012975int
12976main ()
12977{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012978return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012979 ;
12980 return 0;
12981}
12982_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012983if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012984 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000012985else
Matthias Kloseb9621712010-04-24 17:59:49 +000012986 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000012987fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012988rm -f core conftest.err conftest.$ac_objext \
12989 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012990LIBS=$ac_check_lib_save_LIBS
12991fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012992{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
12993$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050012994if test "x$ac_cv_lib_readline_rl_completion_matches" = x""yes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012995
Matthias Kloseb9621712010-04-24 17:59:49 +000012996$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000012997
Guido van Rossum353ae582001-07-10 16:45:32 +000012998fi
12999
Jack Jansendd19cf82001-12-06 22:36:17 +000013000
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013001# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000013002cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013003/* end confdefs.h. */
13004#include <readline/readline.h>
13005_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013006if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013007 have_readline=yes
13008else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013009 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000013010
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013011fi
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070013012rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013013if test $have_readline = yes
13014then
Matthias Kloseb9621712010-04-24 17:59:49 +000013015 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013016/* end confdefs.h. */
13017#include <readline/readline.h>
13018
13019_ACEOF
13020if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000013021 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013022
Matthias Kloseb9621712010-04-24 17:59:49 +000013023$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013024
13025fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000013026rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013027
13028fi
13029
Martin v. Löwis82bca632006-02-10 20:49:30 +000013030# End of readline checks: restore LIBS
13031LIBS=$LIBS_no_readline
13032
Matthias Kloseb9621712010-04-24 17:59:49 +000013033{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
13034$as_echo_n "checking for broken nice()... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050013035if test "${ac_cv_broken_nice+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013036 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000013037else
Martin v. Löwis11437992002-04-12 09:54:03 +000013038
Matthias Kloseb9621712010-04-24 17:59:49 +000013039if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013040 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013041else
Matthias Kloseb9621712010-04-24 17:59:49 +000013042 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013043/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013044
13045int main()
13046{
13047 int val1 = nice(1);
13048 if (val1 != -1 && val1 == nice(2))
13049 exit(0);
13050 exit(1);
13051}
13052
Martin v. Löwis11437992002-04-12 09:54:03 +000013053_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013054if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013055 ac_cv_broken_nice=yes
13056else
Matthias Kloseb9621712010-04-24 17:59:49 +000013057 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013058fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013059rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13060 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013061fi
13062
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013063fi
13064
Matthias Kloseb9621712010-04-24 17:59:49 +000013065{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
13066$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013067if test "$ac_cv_broken_nice" = yes
13068then
Martin v. Löwis11437992002-04-12 09:54:03 +000013069
Matthias Kloseb9621712010-04-24 17:59:49 +000013070$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013071
13072fi
13073
Matthias Kloseb9621712010-04-24 17:59:49 +000013074{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
13075$as_echo_n "checking for broken poll()... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050013076if test "${ac_cv_broken_poll+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013077 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013078else
Matthias Kloseb9621712010-04-24 17:59:49 +000013079 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013080 ac_cv_broken_poll=no
13081else
Matthias Kloseb9621712010-04-24 17:59:49 +000013082 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013083/* end confdefs.h. */
13084
13085#include <poll.h>
13086
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013087int main()
13088{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013089 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013090 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013091
13092 close (42);
13093
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013094 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013095 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013096 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013097 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013098 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013099 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013100 return 1;
13101}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013102
13103_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013104if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013105 ac_cv_broken_poll=yes
13106else
Matthias Kloseb9621712010-04-24 17:59:49 +000013107 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013108fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013109rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13110 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013111fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013112
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013113fi
13114
Matthias Kloseb9621712010-04-24 17:59:49 +000013115{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
13116$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013117if test "$ac_cv_broken_poll" = yes
13118then
13119
Matthias Kloseb9621712010-04-24 17:59:49 +000013120$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013121
13122fi
13123
Brett Cannon43802422005-02-10 20:48:03 +000013124# 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 +000013125# (which is not required by ISO C or UNIX spec) and/or if we support
13126# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000013127ac_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 +000013128#include <$ac_cv_struct_tm>
13129
Matthias Kloseb9621712010-04-24 17:59:49 +000013130"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050013131if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then :
Brett Cannon43802422005-02-10 20:48:03 +000013132
13133cat >>confdefs.h <<_ACEOF
13134#define HAVE_STRUCT_TM_TM_ZONE 1
13135_ACEOF
13136
13137
13138fi
13139
13140if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13141
Matthias Kloseb9621712010-04-24 17:59:49 +000013142$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013143
13144else
Matthias Kloseb9621712010-04-24 17:59:49 +000013145 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13146"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050013147if test "x$ac_cv_have_decl_tzname" = x""yes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013148 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013149else
Matthias Kloseb9621712010-04-24 17:59:49 +000013150 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013151fi
13152
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013153cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013154#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013155_ACEOF
13156
Matthias Kloseb9621712010-04-24 17:59:49 +000013157 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13158$as_echo_n "checking for tzname... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050013159if test "${ac_cv_var_tzname+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013160 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013161else
Matthias Kloseb9621712010-04-24 17:59:49 +000013162 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013163/* end confdefs.h. */
13164#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013165#if !HAVE_DECL_TZNAME
13166extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000013167#endif
13168
13169int
13170main ()
13171{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013172return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000013173 ;
13174 return 0;
13175}
13176_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013177if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000013178 ac_cv_var_tzname=yes
13179else
Matthias Kloseb9621712010-04-24 17:59:49 +000013180 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000013181fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013182rm -f core conftest.err conftest.$ac_objext \
13183 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013184fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013185{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13186$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000013187 if test $ac_cv_var_tzname = yes; then
13188
Matthias Kloseb9621712010-04-24 17:59:49 +000013189$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013190
13191 fi
13192fi
13193
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013194
Martin v. Löwis1d459062005-03-14 21:23:33 +000013195# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000013196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
13197$as_echo_n "checking for working tzset()... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050013198if test "${ac_cv_working_tzset+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013199 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013200else
13201
Matthias Kloseb9621712010-04-24 17:59:49 +000013202if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013203 ac_cv_working_tzset=no
13204else
Matthias Kloseb9621712010-04-24 17:59:49 +000013205 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013206/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013207
13208#include <stdlib.h>
13209#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000013210#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000013211
13212#if HAVE_TZNAME
13213extern char *tzname[];
13214#endif
13215
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013216int main()
13217{
Brett Cannon18367812003-09-19 00:59:16 +000013218 /* Note that we need to ensure that not only does tzset(3)
13219 do 'something' with localtime, but it works as documented
13220 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000013221 This includes making sure that tzname is set properly if
13222 tm->tm_zone does not exist since it is the alternative way
13223 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000013224
13225 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000013226 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000013227 */
13228
Martin v. Löwis1d459062005-03-14 21:23:33 +000013229 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000013230 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
13231
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013232 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013233 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013234 if (localtime(&groundhogday)->tm_hour != 0)
13235 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013236#if HAVE_TZNAME
13237 /* For UTC, tzname[1] is sometimes "", sometimes " " */
13238 if (strcmp(tzname[0], "UTC") ||
13239 (tzname[1][0] != 0 && tzname[1][0] != ' '))
13240 exit(1);
13241#endif
Brett Cannon18367812003-09-19 00:59:16 +000013242
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013243 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013244 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013245 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013246 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013247#if HAVE_TZNAME
13248 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
13249 exit(1);
13250#endif
Brett Cannon18367812003-09-19 00:59:16 +000013251
13252 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
13253 tzset();
13254 if (localtime(&groundhogday)->tm_hour != 11)
13255 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013256#if HAVE_TZNAME
13257 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
13258 exit(1);
13259#endif
13260
13261#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000013262 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
13263 exit(1);
13264 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
13265 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013266#endif
Brett Cannon18367812003-09-19 00:59:16 +000013267
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013268 exit(0);
13269}
13270
13271_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013272if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013273 ac_cv_working_tzset=yes
13274else
Matthias Kloseb9621712010-04-24 17:59:49 +000013275 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013276fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013277rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13278 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013279fi
13280
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013281fi
13282
Matthias Kloseb9621712010-04-24 17:59:49 +000013283{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
13284$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013285if test "$ac_cv_working_tzset" = yes
13286then
13287
Matthias Kloseb9621712010-04-24 17:59:49 +000013288$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013289
13290fi
13291
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013292# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
13294$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050013295if test "${ac_cv_stat_tv_nsec+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013296 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013297else
Matthias Kloseb9621712010-04-24 17:59:49 +000013298 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013299/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013300#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013301int
13302main ()
13303{
13304
13305struct stat st;
13306st.st_mtim.tv_nsec = 1;
13307
13308 ;
13309 return 0;
13310}
13311_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013312if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000013313 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013314else
Matthias Kloseb9621712010-04-24 17:59:49 +000013315 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013316fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013317rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13318fi
13319
Matthias Kloseb9621712010-04-24 17:59:49 +000013320{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
13321$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013322if test "$ac_cv_stat_tv_nsec" = yes
13323then
13324
Matthias Kloseb9621712010-04-24 17:59:49 +000013325$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013326
13327fi
13328
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013329# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013330{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
13331$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050013332if test "${ac_cv_stat_tv_nsec2+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013333 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013334else
Matthias Kloseb9621712010-04-24 17:59:49 +000013335 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013336/* end confdefs.h. */
13337#include <sys/stat.h>
13338int
13339main ()
13340{
13341
13342struct stat st;
13343st.st_mtimespec.tv_nsec = 1;
13344
13345 ;
13346 return 0;
13347}
13348_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013349if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013350 ac_cv_stat_tv_nsec2=yes
13351else
Matthias Kloseb9621712010-04-24 17:59:49 +000013352 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013353fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013354rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13355fi
13356
Matthias Kloseb9621712010-04-24 17:59:49 +000013357{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
13358$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013359if test "$ac_cv_stat_tv_nsec2" = yes
13360then
13361
Matthias Kloseb9621712010-04-24 17:59:49 +000013362$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013363
13364fi
13365
Jack Jansen666b1e72001-10-31 12:11:48 +000013366# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000013367{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
13368$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050013369if test "${ac_cv_mvwdelch_is_expression+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013370 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013371else
Matthias Kloseb9621712010-04-24 17:59:49 +000013372 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013373/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013374#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013375int
13376main ()
13377{
Jack Jansen666b1e72001-10-31 12:11:48 +000013378
13379 int rtn;
13380 rtn = mvwdelch(0,0,0);
13381
Martin v. Löwis11437992002-04-12 09:54:03 +000013382 ;
13383 return 0;
13384}
13385_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013386if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013387 ac_cv_mvwdelch_is_expression=yes
13388else
Matthias Kloseb9621712010-04-24 17:59:49 +000013389 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013390fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013391rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13392fi
13393
Matthias Kloseb9621712010-04-24 17:59:49 +000013394{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
13395$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000013396
13397if test "$ac_cv_mvwdelch_is_expression" = yes
13398then
Martin v. Löwis11437992002-04-12 09:54:03 +000013399
Matthias Kloseb9621712010-04-24 17:59:49 +000013400$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013401
13402fi
13403
Matthias Kloseb9621712010-04-24 17:59:49 +000013404{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
13405$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050013406if test "${ac_cv_window_has_flags+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013407 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013408else
Matthias Kloseb9621712010-04-24 17:59:49 +000013409 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013410/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013411#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013412int
13413main ()
13414{
Jack Jansen666b1e72001-10-31 12:11:48 +000013415
13416 WINDOW *w;
13417 w->_flags = 0;
13418
Martin v. Löwis11437992002-04-12 09:54:03 +000013419 ;
13420 return 0;
13421}
13422_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013423if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013424 ac_cv_window_has_flags=yes
13425else
Matthias Kloseb9621712010-04-24 17:59:49 +000013426 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013427fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013428rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13429fi
13430
Matthias Kloseb9621712010-04-24 17:59:49 +000013431{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
13432$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013433
Jack Jansen666b1e72001-10-31 12:11:48 +000013434
13435if test "$ac_cv_window_has_flags" = yes
13436then
Martin v. Löwis11437992002-04-12 09:54:03 +000013437
Matthias Kloseb9621712010-04-24 17:59:49 +000013438$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013439
13440fi
13441
Matthias Kloseb9621712010-04-24 17:59:49 +000013442{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
13443$as_echo_n "checking for is_term_resized... " >&6; }
13444cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013445/* end confdefs.h. */
13446#include <curses.h>
13447int
13448main ()
13449{
13450void *x=is_term_resized
13451 ;
13452 return 0;
13453}
13454_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013455if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013456
Matthias Kloseb9621712010-04-24 17:59:49 +000013457$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013458
Matthias Kloseb159a552010-04-25 21:00:44 +000013459 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013460$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013461else
Matthias Kloseb9621712010-04-24 17:59:49 +000013462 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13463$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013464
13465fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013466rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13467
Matthias Kloseb9621712010-04-24 17:59:49 +000013468{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
13469$as_echo_n "checking for resize_term... " >&6; }
13470cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013471/* end confdefs.h. */
13472#include <curses.h>
13473int
13474main ()
13475{
13476void *x=resize_term
13477 ;
13478 return 0;
13479}
13480_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013481if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013482
Matthias Kloseb9621712010-04-24 17:59:49 +000013483$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013484
Matthias Kloseb159a552010-04-25 21:00:44 +000013485 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013486$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013487else
Matthias Kloseb9621712010-04-24 17:59:49 +000013488 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13489$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013490
13491fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013492rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13493
Matthias Kloseb9621712010-04-24 17:59:49 +000013494{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
13495$as_echo_n "checking for resizeterm... " >&6; }
13496cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013497/* end confdefs.h. */
13498#include <curses.h>
13499int
13500main ()
13501{
13502void *x=resizeterm
13503 ;
13504 return 0;
13505}
13506_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013507if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013508
Matthias Kloseb9621712010-04-24 17:59:49 +000013509$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013510
Matthias Kloseb159a552010-04-25 21:00:44 +000013511 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013512$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013513else
Matthias Kloseb9621712010-04-24 17:59:49 +000013514 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13515$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013516
13517fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013518rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13519
Matthias Kloseb9621712010-04-24 17:59:49 +000013520{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
13521$as_echo_n "checking for /dev/ptmx... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013522
13523if test -r /dev/ptmx
13524then
Matthias Kloseb9621712010-04-24 17:59:49 +000013525 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13526$as_echo "yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013527
Matthias Kloseb9621712010-04-24 17:59:49 +000013528$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013529
Thomas Wouters89f507f2006-12-13 04:49:30 +000013530else
Matthias Kloseb9621712010-04-24 17:59:49 +000013531 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13532$as_echo "no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013533fi
13534
Matthias Kloseb9621712010-04-24 17:59:49 +000013535{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
13536$as_echo_n "checking for /dev/ptc... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013537
13538if test -r /dev/ptc
13539then
Matthias Kloseb9621712010-04-24 17:59:49 +000013540 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13541$as_echo "yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013542
Matthias Kloseb9621712010-04-24 17:59:49 +000013543$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000013544
Thomas Wouters89f507f2006-12-13 04:49:30 +000013545else
Matthias Kloseb9621712010-04-24 17:59:49 +000013546 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13547$as_echo "no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013548fi
13549
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013550if test "$have_long_long" = yes
13551then
Matthias Kloseb9621712010-04-24 17:59:49 +000013552 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
13553$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050013554 if test "${ac_cv_have_long_long_format+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013555 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013556else
Matthias Kloseb9621712010-04-24 17:59:49 +000013557 if test "$cross_compiling" = yes; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013558 ac_cv_have_long_long_format=no
13559else
Matthias Kloseb9621712010-04-24 17:59:49 +000013560 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013561/* end confdefs.h. */
13562
13563 #include <stdio.h>
13564 #include <stddef.h>
13565 #include <string.h>
13566
13567 #ifdef HAVE_SYS_TYPES_H
13568 #include <sys/types.h>
13569 #endif
13570
13571 int main()
13572 {
13573 char buffer[256];
13574
13575 if (sprintf(buffer, "%lld", (long long)123) < 0)
13576 return 1;
13577 if (strcmp(buffer, "123"))
13578 return 1;
13579
13580 if (sprintf(buffer, "%lld", (long long)-123) < 0)
13581 return 1;
13582 if (strcmp(buffer, "-123"))
13583 return 1;
13584
13585 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
13586 return 1;
13587 if (strcmp(buffer, "123"))
13588 return 1;
13589
13590 return 0;
13591 }
13592
13593_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013594if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013595 ac_cv_have_long_long_format=yes
13596else
Matthias Kloseb9621712010-04-24 17:59:49 +000013597 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013598fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013599rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13600 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013601fi
13602
13603
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013604fi
13605
Matthias Kloseb9621712010-04-24 17:59:49 +000013606 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
13607$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013608fi
13609
Mark Dickinson89d7d412009-12-31 20:50:59 +000013610if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013611then
13612
Matthias Kloseb9621712010-04-24 17:59:49 +000013613$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013614
13615fi
13616
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000013617if test $ac_sys_system = Darwin
13618then
13619 LIBS="$LIBS -framework CoreFoundation"
13620fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013621
Matthias Kloseb9621712010-04-24 17:59:49 +000013622{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
13623$as_echo_n "checking for %zd printf() format support... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050013624if test "${ac_cv_have_size_t_format+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013625 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013626else
Matthias Kloseb9621712010-04-24 17:59:49 +000013627 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000013628 ac_cv_have_size_t_format="cross -- assuming yes"
13629
Thomas Wouters477c8d52006-05-27 19:21:47 +000013630else
Matthias Kloseb9621712010-04-24 17:59:49 +000013631 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000013632/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013633
Thomas Wouters477c8d52006-05-27 19:21:47 +000013634#include <stdio.h>
13635#include <stddef.h>
13636#include <string.h>
13637
Christian Heimes2c181612007-12-17 20:04:13 +000013638#ifdef HAVE_SYS_TYPES_H
13639#include <sys/types.h>
13640#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000013641
13642#ifdef HAVE_SSIZE_T
13643typedef ssize_t Py_ssize_t;
13644#elif SIZEOF_VOID_P == SIZEOF_LONG
13645typedef long Py_ssize_t;
13646#else
13647typedef int Py_ssize_t;
13648#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000013649
Christian Heimes2c181612007-12-17 20:04:13 +000013650int main()
13651{
13652 char buffer[256];
13653
Thomas Wouters477c8d52006-05-27 19:21:47 +000013654 if(sprintf(buffer, "%zd", (size_t)123) < 0)
13655 return 1;
13656
Thomas Wouters89f507f2006-12-13 04:49:30 +000013657 if (strcmp(buffer, "123"))
13658 return 1;
13659
13660 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
13661 return 1;
13662
13663 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000013664 return 1;
13665
13666 return 0;
13667}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013668
Thomas Wouters477c8d52006-05-27 19:21:47 +000013669_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013670if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013671 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013672else
Matthias Kloseb9621712010-04-24 17:59:49 +000013673 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013674fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013675rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13676 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013677fi
13678
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013679fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013680{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
13681$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000013682if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013683
Matthias Kloseb9621712010-04-24 17:59:49 +000013684$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013685
13686fi
13687
Matthias Kloseb9621712010-04-24 17:59:49 +000013688ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000013689#ifdef HAVE_SYS_TYPES_H
13690#include <sys/types.h>
13691#endif
13692#ifdef HAVE_SYS_SOCKET_H
13693#include <sys/socket.h>
13694#endif
13695
Matthias Kloseb9621712010-04-24 17:59:49 +000013696"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050013697if test "x$ac_cv_type_socklen_t" = x""yes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000013698
Martin v. Löwis11437992002-04-12 09:54:03 +000013699else
Guido van Rossum95713eb2000-05-18 20:53:31 +000013700
Matthias Kloseb9621712010-04-24 17:59:49 +000013701$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000013702
13703fi
13704
Michael W. Hudson54241132001-12-07 15:38:26 +000013705
Matthias Kloseb9621712010-04-24 17:59:49 +000013706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
13707$as_echo_n "checking for broken mbstowcs... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050013708if test "${ac_cv_broken_mbstowcs+set}" = set; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013709 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013710else
Matthias Kloseb9621712010-04-24 17:59:49 +000013711 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000013712 ac_cv_broken_mbstowcs=no
13713else
Matthias Kloseb9621712010-04-24 17:59:49 +000013714 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000013715/* end confdefs.h. */
13716
13717#include<stdlib.h>
13718int main() {
13719 size_t len = -1;
13720 const char *str = "text";
13721 len = mbstowcs(NULL, str, 0);
13722 return (len != 4);
13723}
13724
13725_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013726if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000013727 ac_cv_broken_mbstowcs=no
13728else
Matthias Kloseb9621712010-04-24 17:59:49 +000013729 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000013730fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013731rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13732 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000013733fi
13734
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013735fi
13736
Matthias Kloseb9621712010-04-24 17:59:49 +000013737{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
13738$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000013739if test "$ac_cv_broken_mbstowcs" = yes
13740then
13741
Matthias Kloseb9621712010-04-24 17:59:49 +000013742$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000013743
13744fi
13745
Antoine Pitrou042b1282010-08-13 21:15:58 +000013746{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
13747$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
Benjamin Peterson316e02b2011-05-10 15:01:56 -050013748if test "${ac_cv_computed_gotos+set}" = set; then :
Antoine Pitrou042b1282010-08-13 21:15:58 +000013749 $as_echo_n "(cached) " >&6
13750else
13751 if test "$cross_compiling" = yes; then :
13752 ac_cv_computed_gotos=no
13753else
13754 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13755/* end confdefs.h. */
13756
13757int main(int argc, char **argv)
13758{
13759 static void *targets[1] = { &&LABEL1 };
13760 goto LABEL2;
13761LABEL1:
13762 return 0;
13763LABEL2:
13764 goto *targets[0];
13765 return 1;
13766}
13767
13768_ACEOF
13769if ac_fn_c_try_run "$LINENO"; then :
13770 ac_cv_computed_gotos=yes
13771else
13772 ac_cv_computed_gotos=no
13773fi
13774rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13775 conftest.$ac_objext conftest.beam conftest.$ac_ext
13776fi
13777
13778fi
13779
13780{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
13781$as_echo "$ac_cv_computed_gotos" >&6; }
13782if test "$ac_cv_computed_gotos" = yes
13783then
13784
13785$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
13786
13787fi
13788
Antoine Pitroub52ec782009-01-25 16:34:23 +000013789# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000013790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
13791$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013792
13793# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013794if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000013795 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000013796if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000013797then
13798
Matthias Kloseb9621712010-04-24 17:59:49 +000013799$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000013800
Matthias Kloseb9621712010-04-24 17:59:49 +000013801 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13802$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013803fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000013804if test "$withval" = no
13805then
13806
13807$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
13808
Matthias Kloseb9621712010-04-24 17:59:49 +000013809 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13810$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013811fi
13812
Antoine Pitrou042b1282010-08-13 21:15:58 +000013813else
13814 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
13815$as_echo "no value specified" >&6; }
13816fi
13817
Antoine Pitroub52ec782009-01-25 16:34:23 +000013818
Benjamin Petersond8d835b2010-10-15 23:14:46 +000013819case $ac_sys_system in
13820AIX*)
13821
13822$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
13823 ;;
13824esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000013825
Michael W. Hudson54241132001-12-07 15:38:26 +000013826
Gregory P. Smith138fa432010-12-13 08:00:52 +000013827ac_fn_c_check_func "$LINENO" "pipe2" "ac_cv_func_pipe2"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050013828if test "x$ac_cv_func_pipe2" = x""yes; then :
Gregory P. Smith138fa432010-12-13 08:00:52 +000013829
13830$as_echo "#define HAVE_PIPE2 1" >>confdefs.h
13831
13832fi
Jesus Cea6a792292010-05-03 21:18:48 +000013833
13834
Mark Dickinsonb2153e92010-05-05 22:31:36 +000013835
13836
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000013837for h in `(cd $srcdir;echo Python/thread_*.h)`
13838do
13839 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
13840done
13841
Michael W. Hudson54241132001-12-07 15:38:26 +000013842
Neal Norwitzd24499d2005-12-18 21:36:39 +000013843SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Kloseb9621712010-04-24 17:59:49 +000013844{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
13845$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013846for dir in $SRCDIRS; do
13847 if test ! -d $dir; then
13848 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000013849 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013850done
Matthias Kloseb9621712010-04-24 17:59:49 +000013851{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
13852$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000013853
Guido van Rossum627b2d71993-12-24 10:39:16 +000013854# generate output files
Antoine Pitrou20327222009-05-24 20:39:11 +000013855ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000013856
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000013857ac_config_files="$ac_config_files Modules/ld_so_aix"
13858
Martin v. Löwis11437992002-04-12 09:54:03 +000013859cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013860# This file is a shell script that caches the results of configure
13861# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000013862# scripts and configure runs, see configure's option --config-cache.
13863# It is not useful on other systems. If it contains results you don't
13864# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013865#
Martin v. Löwis11437992002-04-12 09:54:03 +000013866# config.status only pays attention to the cache file if you give it
13867# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013868#
Skip Montanaro6dead952003-09-25 14:50:04 +000013869# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000013870# loading this file, other *unset* `ac_cv_foo' will be assigned the
13871# following values.
13872
13873_ACEOF
13874
Guido van Rossumf78abae1997-01-21 22:02:36 +000013875# The following way of writing the cache mishandles newlines in values,
13876# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013877# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013878# Ultrix sh set writes to stderr and can't be redirected directly,
13879# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013880(
13881 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
13882 eval ac_val=\$$ac_var
13883 case $ac_val in #(
13884 *${as_nl}*)
13885 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000013886 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
13887$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013888 esac
13889 case $ac_var in #(
13890 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000013891 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
13892 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013893 esac ;;
13894 esac
13895 done
13896
Martin v. Löwis11437992002-04-12 09:54:03 +000013897 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013898 case $as_nl`(ac_space=' '; set) 2>&1` in #(
13899 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000013900 # `set' does not quote correctly, so add quotes: double-quote
13901 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000013902 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013903 "s/'/'\\\\''/g;
13904 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013905 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000013906 *)
13907 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013908 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000013909 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013910 esac |
13911 sort
13912) |
Martin v. Löwis11437992002-04-12 09:54:03 +000013913 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013914 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000013915 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013916 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000013917 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
13918 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013919 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
13920 :end' >>confcache
13921if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
13922 if test -w "$cache_file"; then
Benjamin Peterson316e02b2011-05-10 15:01:56 -050013923 test "x$cache_file" != "x/dev/null" &&
Matthias Kloseb9621712010-04-24 17:59:49 +000013924 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
13925$as_echo "$as_me: updating cache $cache_file" >&6;}
Benjamin Peterson316e02b2011-05-10 15:01:56 -050013926 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013927 else
Matthias Kloseb9621712010-04-24 17:59:49 +000013928 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
13929$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013930 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013931fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013932rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000013933
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013934test "x$prefix" = xNONE && prefix=$ac_default_prefix
13935# Let make expand exec_prefix.
13936test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000013937
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013938DEFS=-DHAVE_CONFIG_H
13939
Skip Montanaro6dead952003-09-25 14:50:04 +000013940ac_libobjs=
13941ac_ltlibobjs=
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070013942U=
Skip Montanaro6dead952003-09-25 14:50:04 +000013943for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
13944 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013945 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000013946 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013947 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
13948 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000013949 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
13950 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000013951done
13952LIBOBJS=$ac_libobjs
13953
13954LTLIBOBJS=$ac_ltlibobjs
13955
13956
Martin v. Löwis11437992002-04-12 09:54:03 +000013957
Matthias Kloseb9621712010-04-24 17:59:49 +000013958
Benjamin Peterson316e02b2011-05-10 15:01:56 -050013959: ${CONFIG_STATUS=./config.status}
Matthias Kloseb9621712010-04-24 17:59:49 +000013960ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000013961ac_clean_files_save=$ac_clean_files
13962ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013963{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
13964$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
13965as_write_fail=0
13966cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000013967#! $SHELL
13968# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000013969# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013970# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000013971# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000013972
Martin v. Löwis11437992002-04-12 09:54:03 +000013973debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000013974ac_cs_recheck=false
13975ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000013976
Matthias Kloseb9621712010-04-24 17:59:49 +000013977SHELL=\${CONFIG_SHELL-$SHELL}
13978export SHELL
13979_ASEOF
13980cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
13981## -------------------- ##
13982## M4sh Initialization. ##
13983## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000013984
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013985# Be more Bourne compatible
13986DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000013987if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013988 emulate sh
13989 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000013990 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000013991 # is contrary to our usage. Disable this feature.
13992 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013993 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013994else
Matthias Kloseb9621712010-04-24 17:59:49 +000013995 case `(set -o) 2>/dev/null` in #(
13996 *posix*) :
13997 set -o posix ;; #(
13998 *) :
13999 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014000esac
Michael W. Hudson54241132001-12-07 15:38:26 +000014001fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000014002
14003
Matthias Kloseb9621712010-04-24 17:59:49 +000014004as_nl='
14005'
14006export as_nl
14007# Printing a long string crashes Solaris 7 /usr/bin/printf.
14008as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
14009as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
14010as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
14011# Prefer a ksh shell builtin over an external printf program on Solaris,
14012# but without wasting forks for bash or zsh.
14013if test -z "$BASH_VERSION$ZSH_VERSION" \
14014 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
14015 as_echo='print -r --'
14016 as_echo_n='print -rn --'
14017elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
14018 as_echo='printf %s\n'
14019 as_echo_n='printf %s'
14020else
14021 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
14022 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
14023 as_echo_n='/usr/ucb/echo -n'
14024 else
14025 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
14026 as_echo_n_body='eval
14027 arg=$1;
14028 case $arg in #(
14029 *"$as_nl"*)
14030 expr "X$arg" : "X\\(.*\\)$as_nl";
14031 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
14032 esac;
14033 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
14034 '
14035 export as_echo_n_body
14036 as_echo_n='sh -c $as_echo_n_body as_echo'
14037 fi
14038 export as_echo_body
14039 as_echo='sh -c $as_echo_body as_echo'
14040fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014041
14042# The user is always right.
14043if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014044 PATH_SEPARATOR=:
14045 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
14046 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
14047 PATH_SEPARATOR=';'
14048 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014049fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014050
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014051
14052# IFS
14053# We need space, tab and new line, in precisely that order. Quoting is
14054# there to prevent editors from complaining about space-tab.
14055# (If _AS_PATH_WALK were called with IFS unset, it would disable word
14056# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014057IFS=" "" $as_nl"
14058
14059# Find who we are. Look in the path if we contain no directory separator.
Matthias Kloseb9621712010-04-24 17:59:49 +000014060case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014061 *[\\/]* ) as_myself=$0 ;;
14062 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000014063for as_dir in $PATH
14064do
14065 IFS=$as_save_IFS
14066 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000014067 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
14068 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014069IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000014070
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014071 ;;
14072esac
14073# We did not find ourselves, most probably we were run as `sh COMMAND'
14074# in which case we are not to be found in the path.
14075if test "x$as_myself" = x; then
14076 as_myself=$0
14077fi
14078if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014079 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
14080 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014081fi
14082
Matthias Kloseb9621712010-04-24 17:59:49 +000014083# Unset variables that we do not need and which cause bugs (e.g. in
14084# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
14085# suppresses any "Segmentation fault" message there. '((' could
14086# trigger a bug in pdksh 5.2.14.
14087for as_var in BASH_ENV ENV MAIL MAILPATH
14088do eval test x\${$as_var+set} = xset \
14089 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014090done
14091PS1='$ '
14092PS2='> '
14093PS4='+ '
14094
14095# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000014096LC_ALL=C
14097export LC_ALL
14098LANGUAGE=C
14099export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014100
Matthias Kloseb9621712010-04-24 17:59:49 +000014101# CDPATH.
14102(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
14103
14104
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070014105# as_fn_error STATUS ERROR [LINENO LOG_FD]
14106# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000014107# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
14108# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070014109# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000014110as_fn_error ()
14111{
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070014112 as_status=$1; test $as_status -eq 0 && as_status=1
14113 if test "$4"; then
14114 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
14115 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000014116 fi
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070014117 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000014118 as_fn_exit $as_status
14119} # as_fn_error
14120
14121
14122# as_fn_set_status STATUS
14123# -----------------------
14124# Set $? to STATUS, without forking.
14125as_fn_set_status ()
14126{
14127 return $1
14128} # as_fn_set_status
14129
14130# as_fn_exit STATUS
14131# -----------------
14132# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
14133as_fn_exit ()
14134{
14135 set +e
14136 as_fn_set_status $1
14137 exit $1
14138} # as_fn_exit
14139
14140# as_fn_unset VAR
14141# ---------------
14142# Portably unset VAR.
14143as_fn_unset ()
14144{
14145 { eval $1=; unset $1;}
14146}
14147as_unset=as_fn_unset
14148# as_fn_append VAR VALUE
14149# ----------------------
14150# Append the text in VALUE to the end of the definition contained in VAR. Take
14151# advantage of any shell optimizations that allow amortized linear growth over
14152# repeated appends, instead of the typical quadratic growth present in naive
14153# implementations.
14154if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
14155 eval 'as_fn_append ()
14156 {
14157 eval $1+=\$2
14158 }'
14159else
14160 as_fn_append ()
14161 {
14162 eval $1=\$$1\$2
14163 }
14164fi # as_fn_append
14165
14166# as_fn_arith ARG...
14167# ------------------
14168# Perform arithmetic evaluation on the ARGs, and store the result in the
14169# global $as_val. Take advantage of shells that can avoid forks. The arguments
14170# must be portable across $(()) and expr.
14171if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
14172 eval 'as_fn_arith ()
14173 {
14174 as_val=$(( $* ))
14175 }'
14176else
14177 as_fn_arith ()
14178 {
14179 as_val=`expr "$@" || test $? -eq 1`
14180 }
14181fi # as_fn_arith
14182
14183
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014184if expr a : '\(a\)' >/dev/null 2>&1 &&
14185 test "X`expr 00001 : '.*\(...\)'`" = X001; then
14186 as_expr=expr
14187else
14188 as_expr=false
14189fi
14190
14191if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
14192 as_basename=basename
14193else
14194 as_basename=false
14195fi
14196
Matthias Kloseb9621712010-04-24 17:59:49 +000014197if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
14198 as_dirname=dirname
14199else
14200 as_dirname=false
14201fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014202
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014203as_me=`$as_basename -- "$0" ||
14204$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
14205 X"$0" : 'X\(//\)$' \| \
14206 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014207$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014208 sed '/^.*\/\([^/][^/]*\)\/*$/{
14209 s//\1/
14210 q
14211 }
14212 /^X\/\(\/\/\)$/{
14213 s//\1/
14214 q
14215 }
14216 /^X\/\(\/\).*/{
14217 s//\1/
14218 q
14219 }
14220 s/.*/./; q'`
14221
Matthias Kloseb9621712010-04-24 17:59:49 +000014222# Avoid depending upon Character Ranges.
14223as_cr_letters='abcdefghijklmnopqrstuvwxyz'
14224as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14225as_cr_Letters=$as_cr_letters$as_cr_LETTERS
14226as_cr_digits='0123456789'
14227as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014228
14229ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000014230case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014231-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014232 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014233 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000014234 xy) ECHO_C='\c';;
14235 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
14236 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014237 esac;;
14238*)
14239 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000014240esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014241
Martin v. Löwis11437992002-04-12 09:54:03 +000014242rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014243if test -d conf$$.dir; then
14244 rm -f conf$$.dir/conf$$.file
14245else
14246 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000014247 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014248fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014249if (echo >conf$$.file) 2>/dev/null; then
14250 if ln -s conf$$.file conf$$ 2>/dev/null; then
14251 as_ln_s='ln -s'
14252 # ... but there are two gotchas:
14253 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
14254 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
14255 # In both cases, we have to default to `cp -p'.
14256 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
14257 as_ln_s='cp -p'
14258 elif ln conf$$.file conf$$ 2>/dev/null; then
14259 as_ln_s=ln
14260 else
Martin v. Löwis11437992002-04-12 09:54:03 +000014261 as_ln_s='cp -p'
Matthias Kloseb9621712010-04-24 17:59:49 +000014262 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014263else
14264 as_ln_s='cp -p'
14265fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014266rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
14267rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000014268
Matthias Kloseb9621712010-04-24 17:59:49 +000014269
14270# as_fn_mkdir_p
14271# -------------
14272# Create "$as_dir" as a directory, including parents if necessary.
14273as_fn_mkdir_p ()
14274{
14275
14276 case $as_dir in #(
14277 -*) as_dir=./$as_dir;;
14278 esac
14279 test -d "$as_dir" || eval $as_mkdir_p || {
14280 as_dirs=
14281 while :; do
14282 case $as_dir in #(
14283 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
14284 *) as_qdir=$as_dir;;
14285 esac
14286 as_dirs="'$as_qdir' $as_dirs"
14287 as_dir=`$as_dirname -- "$as_dir" ||
14288$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
14289 X"$as_dir" : 'X\(//\)[^/]' \| \
14290 X"$as_dir" : 'X\(//\)$' \| \
14291 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
14292$as_echo X"$as_dir" |
14293 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14294 s//\1/
14295 q
14296 }
14297 /^X\(\/\/\)[^/].*/{
14298 s//\1/
14299 q
14300 }
14301 /^X\(\/\/\)$/{
14302 s//\1/
14303 q
14304 }
14305 /^X\(\/\).*/{
14306 s//\1/
14307 q
14308 }
14309 s/.*/./; q'`
14310 test -d "$as_dir" && break
14311 done
14312 test -z "$as_dirs" || eval "mkdir $as_dirs"
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070014313 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000014314
14315
14316} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000014317if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014318 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000014319else
Skip Montanarof0d5f792004-08-15 14:08:23 +000014320 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000014321 as_mkdir_p=false
14322fi
14323
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014324if test -x / >/dev/null 2>&1; then
14325 as_test_x='test -x'
14326else
14327 if ls -dL / >/dev/null 2>&1; then
14328 as_ls_L_option=L
14329 else
14330 as_ls_L_option=
14331 fi
14332 as_test_x='
14333 eval sh -c '\''
14334 if test -d "$1"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014335 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014336 else
Matthias Kloseb9621712010-04-24 17:59:49 +000014337 case $1 in #(
14338 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014339 esac;
Matthias Kloseb9621712010-04-24 17:59:49 +000014340 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014341 ???[sx]*):;;*)false;;esac;fi
14342 '\'' sh
14343 '
14344fi
14345as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000014346
14347# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014348as_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 +000014349
14350# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014351as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014352
14353
Martin v. Löwis11437992002-04-12 09:54:03 +000014354exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000014355## ----------------------------------- ##
14356## Main body of $CONFIG_STATUS script. ##
14357## ----------------------------------- ##
14358_ASEOF
14359test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014360
Matthias Kloseb9621712010-04-24 17:59:49 +000014361cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14362# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000014363# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014364# values after options handling.
14365ac_log="
Georg Brandl3ebb6b32011-02-20 10:37:07 +000014366This file was extended by python $as_me 3.3, which was
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070014367generated by GNU Autoconf 2.67. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000014368
14369 CONFIG_FILES = $CONFIG_FILES
14370 CONFIG_HEADERS = $CONFIG_HEADERS
14371 CONFIG_LINKS = $CONFIG_LINKS
14372 CONFIG_COMMANDS = $CONFIG_COMMANDS
14373 $ $0 $@
14374
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014375on `(hostname || uname -n) 2>/dev/null | sed 1q`
14376"
14377
Martin v. Löwis11437992002-04-12 09:54:03 +000014378_ACEOF
14379
Matthias Kloseb9621712010-04-24 17:59:49 +000014380case $ac_config_files in *"
14381"*) set x $ac_config_files; shift; ac_config_files=$*;;
14382esac
14383
14384case $ac_config_headers in *"
14385"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
14386esac
14387
14388
14389cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014390# Files that config.status was made for.
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014391config_files="$ac_config_files"
14392config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000014393
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014394_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014395
Matthias Kloseb9621712010-04-24 17:59:49 +000014396cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014397ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000014398\`$as_me' instantiates files and other configuration actions
14399from templates according to the current configuration. Unless the files
14400and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000014401
Matthias Kloseb9621712010-04-24 17:59:49 +000014402Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000014403
14404 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014405 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000014406 --config print configuration, then exit
14407 -q, --quiet, --silent
14408 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000014409 -d, --debug don't remove temporary files
14410 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000014411 --file=FILE[:TEMPLATE]
14412 instantiate the configuration file FILE
14413 --header=FILE[:TEMPLATE]
14414 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000014415
14416Configuration files:
14417$config_files
14418
14419Configuration headers:
14420$config_headers
14421
Matthias Kloseb9621712010-04-24 17:59:49 +000014422Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014423
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014424_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014425cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14426ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000014427ac_cs_version="\\
Georg Brandl3ebb6b32011-02-20 10:37:07 +000014428python config.status 3.3
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070014429configured by $0, generated by GNU Autoconf 2.67,
Matthias Kloseb9621712010-04-24 17:59:49 +000014430 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000014431
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070014432Copyright (C) 2010 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000014433This config.status script is free software; the Free Software Foundation
14434gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014435
14436ac_pwd='$ac_pwd'
14437srcdir='$srcdir'
14438INSTALL='$INSTALL'
Matthias Kloseb9621712010-04-24 17:59:49 +000014439test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000014440_ACEOF
14441
Matthias Kloseb9621712010-04-24 17:59:49 +000014442cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14443# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000014444ac_need_defaults=:
14445while test $# != 0
14446do
14447 case $1 in
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070014448 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014449 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14450 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000014451 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000014452 ;;
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070014453 --*=)
14454 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14455 ac_optarg=
14456 ac_shift=:
14457 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014458 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000014459 ac_option=$1
14460 ac_optarg=$2
14461 ac_shift=shift
14462 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014463 esac
14464
Skip Montanaro6dead952003-09-25 14:50:04 +000014465 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000014466 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000014467 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14468 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014469 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000014470 $as_echo "$ac_cs_version"; exit ;;
14471 --config | --confi | --conf | --con | --co | --c )
14472 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014473 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000014474 debug=: ;;
14475 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000014476 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014477 case $ac_optarg in
14478 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070014479 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000014480 esac
14481 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014482 ac_need_defaults=false;;
14483 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000014484 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014485 case $ac_optarg in
14486 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14487 esac
14488 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014489 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014490 --he | --h)
14491 # Conflict between --help and --header
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070014492 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000014493Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014494 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000014495 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000014496 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
14497 | -silent | --silent | --silen | --sile | --sil | --si | --s)
14498 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014499
14500 # This is an error.
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070014501 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000014502Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014503
Matthias Kloseb9621712010-04-24 17:59:49 +000014504 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014505 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014506
14507 esac
14508 shift
14509done
14510
Skip Montanaro6dead952003-09-25 14:50:04 +000014511ac_configure_extra_args=
14512
14513if $ac_cs_silent; then
14514 exec 6>/dev/null
14515 ac_configure_extra_args="$ac_configure_extra_args --silent"
14516fi
14517
14518_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014519cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000014520if \$ac_cs_recheck; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014521 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
14522 shift
14523 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
14524 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014525 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000014526 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000014527fi
14528
Martin v. Löwis11437992002-04-12 09:54:03 +000014529_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014530cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014531exec 5>>config.log
14532{
14533 echo
14534 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
14535## Running $as_me. ##
14536_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000014537 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014538} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014539
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014540_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014541cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014542_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014543
Matthias Kloseb9621712010-04-24 17:59:49 +000014544cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014545
14546# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000014547for ac_config_target in $ac_config_targets
14548do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014549 case $ac_config_target in
14550 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
14551 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
14552 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014553 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
14554 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014555 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
14556 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000014557 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000014558 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014559
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070014560 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014561 esac
14562done
14563
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014564
Martin v. Löwis11437992002-04-12 09:54:03 +000014565# If the user did not use the arguments to specify the items to instantiate,
14566# then the envvar interface is used. Set only those that are not.
14567# We use the long form for the default assignment because of an extremely
14568# bizarre bug on SunOS 4.1.3.
14569if $ac_need_defaults; then
14570 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
14571 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
14572fi
14573
Skip Montanaro6dead952003-09-25 14:50:04 +000014574# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014575# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000014576# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014577# Hook for its removal unless debugging.
14578# Note that there is a small window in which the directory will not be cleaned:
14579# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000014580$debug ||
14581{
Benjamin Peterson316e02b2011-05-10 15:01:56 -050014582 tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014583 trap 'exit_status=$?
Benjamin Peterson316e02b2011-05-10 15:01:56 -050014584 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014585' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000014586 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000014587}
Martin v. Löwis11437992002-04-12 09:54:03 +000014588# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000014589
Martin v. Löwis11437992002-04-12 09:54:03 +000014590{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014591 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Benjamin Peterson316e02b2011-05-10 15:01:56 -050014592 test -n "$tmp" && test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000014593} ||
14594{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014595 tmp=./conf$$-$RANDOM
14596 (umask 077 && mkdir "$tmp")
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070014597} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000014598
Matthias Kloseb9621712010-04-24 17:59:49 +000014599# Set up the scripts for CONFIG_FILES section.
14600# No need to generate them if there are no CONFIG_FILES.
14601# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014602if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014603
Matthias Kloseb9621712010-04-24 17:59:49 +000014604
14605ac_cr=`echo X | tr X '\015'`
14606# On cygwin, bash can eat \r inside `` if the user requested igncr.
14607# But we know of no other shell where ac_cr would be empty at this
14608# point, so we can use a bashism as a fallback.
14609if test "x$ac_cr" = x; then
14610 eval ac_cr=\$\'\\r\'
14611fi
14612ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
14613if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070014614 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000014615else
14616 ac_cs_awk_cr=$ac_cr
14617fi
14618
Benjamin Peterson316e02b2011-05-10 15:01:56 -050014619echo 'BEGIN {' >"$tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000014620_ACEOF
14621
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014622
Matthias Kloseb9621712010-04-24 17:59:49 +000014623{
14624 echo "cat >conf$$subs.awk <<_ACEOF" &&
14625 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
14626 echo "_ACEOF"
14627} >conf$$subs.sh ||
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070014628 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
14629ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014630ac_delim='%!_!# '
14631for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000014632 . ./conf$$subs.sh ||
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070014633 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014634
Matthias Kloseb9621712010-04-24 17:59:49 +000014635 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
14636 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014637 break
14638 elif $ac_last_try; then
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070014639 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014640 else
14641 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000014642 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014643done
Matthias Kloseb9621712010-04-24 17:59:49 +000014644rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014645
Matthias Kloseb9621712010-04-24 17:59:49 +000014646cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Benjamin Peterson316e02b2011-05-10 15:01:56 -050014647cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014648_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014649sed -n '
14650h
14651s/^/S["/; s/!.*/"]=/
14652p
14653g
14654s/^[^!]*!//
14655:repl
14656t repl
14657s/'"$ac_delim"'$//
14658t delim
14659:nl
14660h
14661s/\(.\{148\}\)..*/\1/
14662t more1
14663s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
14664p
14665n
14666b repl
14667:more1
14668s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14669p
14670g
14671s/.\{148\}//
14672t nl
14673:delim
14674h
14675s/\(.\{148\}\)..*/\1/
14676t more2
14677s/["\\]/\\&/g; s/^/"/; s/$/"/
14678p
14679b
14680:more2
14681s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14682p
14683g
14684s/.\{148\}//
14685t delim
14686' <conf$$subs.awk | sed '
14687/^[^""]/{
14688 N
14689 s/\n//
14690}
14691' >>$CONFIG_STATUS || ac_write_fail=1
14692rm -f conf$$subs.awk
14693cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14694_ACAWK
Benjamin Peterson316e02b2011-05-10 15:01:56 -050014695cat >>"\$tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000014696 for (key in S) S_is_set[key] = 1
14697 FS = ""
14698
14699}
14700{
14701 line = $ 0
14702 nfields = split(line, field, "@")
14703 substed = 0
14704 len = length(field[1])
14705 for (i = 2; i < nfields; i++) {
14706 key = field[i]
14707 keylen = length(key)
14708 if (S_is_set[key]) {
14709 value = S[key]
14710 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
14711 len += length(value) + length(field[++i])
14712 substed = 1
14713 } else
14714 len += 1 + keylen
14715 }
14716
14717 print line
14718}
14719
14720_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014721_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014722cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14723if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
14724 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
14725else
14726 cat
Benjamin Peterson316e02b2011-05-10 15:01:56 -050014727fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070014728 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014729_ACEOF
14730
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070014731# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
14732# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014733# trailing colons and then remove the whole line if VPATH becomes empty
14734# (actually we leave an empty line to preserve line numbers).
14735if test "x$srcdir" = x.; then
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070014736 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
14737h
14738s///
14739s/^/:/
14740s/[ ]*$/:/
14741s/:\$(srcdir):/:/g
14742s/:\${srcdir}:/:/g
14743s/:@srcdir@:/:/g
14744s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014745s/:*$//
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070014746x
14747s/\(=[ ]*\).*/\1/
14748G
14749s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014750s/^[^=]*=[ ]*$//
14751}'
14752fi
14753
Matthias Kloseb9621712010-04-24 17:59:49 +000014754cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014755fi # test -n "$CONFIG_FILES"
14756
Matthias Kloseb9621712010-04-24 17:59:49 +000014757# Set up the scripts for CONFIG_HEADERS section.
14758# No need to generate them if there are no CONFIG_HEADERS.
14759# This happens for instance with `./config.status Makefile'.
14760if test -n "$CONFIG_HEADERS"; then
Benjamin Peterson316e02b2011-05-10 15:01:56 -050014761cat >"$tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014762BEGIN {
14763_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014764
Matthias Kloseb9621712010-04-24 17:59:49 +000014765# Transform confdefs.h into an awk script `defines.awk', embedded as
14766# here-document in config.status, that substitutes the proper values into
14767# config.h.in to produce config.h.
14768
14769# Create a delimiter string that does not exist in confdefs.h, to ease
14770# handling of long lines.
14771ac_delim='%!_!# '
14772for ac_last_try in false false :; do
Benjamin Peterson316e02b2011-05-10 15:01:56 -050014773 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
14774 if test -z "$ac_t"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014775 break
14776 elif $ac_last_try; then
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070014777 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000014778 else
14779 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
14780 fi
14781done
14782
14783# For the awk script, D is an array of macro values keyed by name,
14784# likewise P contains macro parameters if any. Preserve backslash
14785# newline sequences.
14786
14787ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
14788sed -n '
14789s/.\{148\}/&'"$ac_delim"'/g
14790t rset
14791:rset
14792s/^[ ]*#[ ]*define[ ][ ]*/ /
14793t def
14794d
14795:def
14796s/\\$//
14797t bsnl
14798s/["\\]/\\&/g
14799s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14800D["\1"]=" \3"/p
14801s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
14802d
14803:bsnl
14804s/["\\]/\\&/g
14805s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14806D["\1"]=" \3\\\\\\n"\\/p
14807t cont
14808s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
14809t cont
14810d
14811:cont
14812n
14813s/.\{148\}/&'"$ac_delim"'/g
14814t clear
14815:clear
14816s/\\$//
14817t bsnlc
14818s/["\\]/\\&/g; s/^/"/; s/$/"/p
14819d
14820:bsnlc
14821s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
14822b cont
14823' <confdefs.h | sed '
14824s/'"$ac_delim"'/"\\\
14825"/g' >>$CONFIG_STATUS || ac_write_fail=1
14826
14827cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14828 for (key in D) D_is_set[key] = 1
14829 FS = ""
14830}
14831/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
14832 line = \$ 0
14833 split(line, arg, " ")
14834 if (arg[1] == "#") {
14835 defundef = arg[2]
14836 mac1 = arg[3]
14837 } else {
14838 defundef = substr(arg[1], 2)
14839 mac1 = arg[2]
14840 }
14841 split(mac1, mac2, "(") #)
14842 macro = mac2[1]
14843 prefix = substr(line, 1, index(line, defundef) - 1)
14844 if (D_is_set[macro]) {
14845 # Preserve the white space surrounding the "#".
14846 print prefix "define", macro P[macro] D[macro]
14847 next
14848 } else {
14849 # Replace #undef with comments. This is necessary, for example,
14850 # in the case of _POSIX_SOURCE, which is predefined and required
14851 # on some systems where configure will not decide to define it.
14852 if (defundef == "undef") {
14853 print "/*", prefix defundef, macro, "*/"
14854 next
14855 }
14856 }
14857}
14858{ print }
14859_ACAWK
14860_ACEOF
14861cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070014862 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000014863fi # test -n "$CONFIG_HEADERS"
14864
14865
14866eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
14867shift
14868for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014869do
14870 case $ac_tag in
14871 :[FHLC]) ac_mode=$ac_tag; continue;;
14872 esac
14873 case $ac_mode$ac_tag in
14874 :[FHL]*:*);;
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070014875 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014876 :[FH]-) ac_tag=-:-;;
14877 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
14878 esac
14879 ac_save_IFS=$IFS
14880 IFS=:
14881 set x $ac_tag
14882 IFS=$ac_save_IFS
14883 shift
14884 ac_file=$1
14885 shift
14886
14887 case $ac_mode in
14888 :L) ac_source=$1;;
14889 :[FH])
14890 ac_file_inputs=
14891 for ac_f
14892 do
14893 case $ac_f in
Benjamin Peterson316e02b2011-05-10 15:01:56 -050014894 -) ac_f="$tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014895 *) # Look for the file first in the build tree, then in the source tree
14896 # (if the path is not absolute). The absolute path cannot be DOS-style,
14897 # because $ac_f cannot contain `:'.
14898 test -f "$ac_f" ||
14899 case $ac_f in
14900 [\\/$]*) false;;
14901 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
14902 esac ||
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070014903 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014904 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014905 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
14906 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014907 done
14908
14909 # Let's still pretend it is `configure' which instantiates (i.e., don't
14910 # use $as_me), people would be surprised to read:
14911 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014912 configure_input='Generated from '`
14913 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
14914 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014915 if test x"$ac_file" != x-; then
14916 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000014917 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
14918$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014919 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014920 # Neutralize special characters interpreted by sed in replacement strings.
14921 case $configure_input in #(
14922 *\&* | *\|* | *\\* )
14923 ac_sed_conf_input=`$as_echo "$configure_input" |
14924 sed 's/[\\\\&|]/\\\\&/g'`;; #(
14925 *) ac_sed_conf_input=$configure_input;;
14926 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014927
14928 case $ac_tag in
Benjamin Peterson316e02b2011-05-10 15:01:56 -050014929 *:-:* | *:-) cat >"$tmp/stdin" \
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070014930 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014931 esac
14932 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014933 esac
14934
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014935 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000014936$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014937 X"$ac_file" : 'X\(//\)[^/]' \| \
14938 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014939 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014940$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014941 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14942 s//\1/
14943 q
14944 }
14945 /^X\(\/\/\)[^/].*/{
14946 s//\1/
14947 q
14948 }
14949 /^X\(\/\/\)$/{
14950 s//\1/
14951 q
14952 }
14953 /^X\(\/\).*/{
14954 s//\1/
14955 q
14956 }
14957 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000014958 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000014959 ac_builddir=.
14960
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014961case "$ac_dir" in
14962.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
14963*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014964 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014965 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000014966 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014967 case $ac_top_builddir_sub in
14968 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
14969 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
14970 esac ;;
14971esac
14972ac_abs_top_builddir=$ac_pwd
14973ac_abs_builddir=$ac_pwd$ac_dir_suffix
14974# for backward compatibility:
14975ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000014976
14977case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014978 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000014979 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014980 ac_top_srcdir=$ac_top_builddir_sub
14981 ac_abs_top_srcdir=$ac_pwd ;;
14982 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000014983 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014984 ac_top_srcdir=$srcdir
14985 ac_abs_top_srcdir=$srcdir ;;
14986 *) # Relative name.
14987 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
14988 ac_top_srcdir=$ac_top_build_prefix$srcdir
14989 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014990esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014991ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000014992
Martin v. Löwis11437992002-04-12 09:54:03 +000014993
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014994 case $ac_mode in
14995 :F)
14996 #
14997 # CONFIG_FILE
14998 #
Martin v. Löwis11437992002-04-12 09:54:03 +000014999
15000 case $INSTALL in
15001 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015002 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015003 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000015004_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015005
Matthias Kloseb9621712010-04-24 17:59:49 +000015006cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015007# If the template does not know about datarootdir, expand it.
15008# FIXME: This hack should be removed a few years after 2.60.
15009ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000015010ac_sed_dataroot='
15011/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015012 p
15013 q
15014}
15015/@datadir@/p
15016/@docdir@/p
15017/@infodir@/p
15018/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000015019/@mandir@/p'
15020case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015021*datarootdir*) ac_datarootdir_seen=yes;;
15022*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000015023 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
15024$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015025_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015026cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015027 ac_datarootdir_hack='
15028 s&@datadir@&$datadir&g
15029 s&@docdir@&$docdir&g
15030 s&@infodir@&$infodir&g
15031 s&@localedir@&$localedir&g
15032 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000015033 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015034esac
15035_ACEOF
15036
15037# Neutralize VPATH when `$srcdir' = `.'.
15038# Shell code in configure.ac might set extrasub.
15039# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000015040cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15041ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000015042$extrasub
15043_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015044cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015045:t
15046/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000015047s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015048s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000015049s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015050s&@srcdir@&$ac_srcdir&;t t
15051s&@abs_srcdir@&$ac_abs_srcdir&;t t
15052s&@top_srcdir@&$ac_top_srcdir&;t t
15053s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
15054s&@builddir@&$ac_builddir&;t t
15055s&@abs_builddir@&$ac_abs_builddir&;t t
15056s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
15057s&@INSTALL@&$ac_INSTALL&;t t
15058$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000015059"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050015060eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070015061 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015062
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015063test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Benjamin Peterson316e02b2011-05-10 15:01:56 -050015064 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
15065 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000015066 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070015067which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015068$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070015069which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000015070
Benjamin Peterson316e02b2011-05-10 15:01:56 -050015071 rm -f "$tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000015072 case $ac_file in
Benjamin Peterson316e02b2011-05-10 15:01:56 -050015073 -) cat "$tmp/out" && rm -f "$tmp/out";;
15074 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000015075 esac \
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070015076 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015077 ;;
15078 :H)
15079 #
15080 # CONFIG_HEADER
15081 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015082 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015083 {
15084 $as_echo "/* $configure_input */" \
Benjamin Peterson316e02b2011-05-10 15:01:56 -050015085 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
15086 } >"$tmp/config.h" \
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070015087 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Benjamin Peterson316e02b2011-05-10 15:01:56 -050015088 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015089 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
15090$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015091 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015092 rm -f "$ac_file"
Benjamin Peterson316e02b2011-05-10 15:01:56 -050015093 mv "$tmp/config.h" "$ac_file" \
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070015094 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015095 fi
15096 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015097 $as_echo "/* $configure_input */" \
Benjamin Peterson316e02b2011-05-10 15:01:56 -050015098 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070015099 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015100 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015101 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000015102
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015103
15104 esac
15105
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000015106
15107 case $ac_file$ac_mode in
15108 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
15109
15110 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015111done # for ac_tag
15112
Guido van Rossum627b2d71993-12-24 10:39:16 +000015113
Matthias Kloseb9621712010-04-24 17:59:49 +000015114as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000015115_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015116ac_clean_files=$ac_clean_files_save
15117
Matthias Kloseb9621712010-04-24 17:59:49 +000015118test $ac_write_fail = 0 ||
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070015119 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000015120
Martin v. Löwis11437992002-04-12 09:54:03 +000015121
15122# configure is writing to config.log, and then calls config.status.
15123# config.status does its own redirection, appending to config.log.
15124# Unfortunately, on DOS this fails, as config.log is still kept open
15125# by configure, so config.status won't be able to write to it; its
15126# output is simply discarded. So we exec the FD to /dev/null,
15127# effectively closing config.log, so it can be properly (re)opened and
15128# appended to by config.status. When coming back to configure, we
15129# need to make the FD available again.
15130if test "$no_create" != yes; then
15131 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000015132 ac_config_status_args=
15133 test "$silent" = yes &&
15134 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000015135 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000015136 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000015137 exec 5>>config.log
15138 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
15139 # would make configure fail if this is the last instruction.
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070015140 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000015141fi
15142if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
15143 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
15144$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015145fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000015146
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015147
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015148echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015149if test ! -f Modules/Setup
15150then
15151 cp $srcdir/Modules/Setup.dist Modules/Setup
15152fi
15153
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015154echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015155if test ! -f Modules/Setup.local
15156then
15157 echo "# Edit this file for local setup changes" >Modules/Setup.local
15158fi
15159
15160echo "creating Makefile"
15161$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
15162 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000015163 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000015164mv config.c Modules